# clone-function

> Clones non native JavaScript functions, or references native functions.

Latest version **1.0.6** (published 2013-12-21) · 0 weekly downloads

## Install

```sh
npm install clone-function
pnpm add clone-function
yarn add clone-function
bun add clone-function
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2013-12-21 |
| First published | 2013-09-24 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Matthew Kastor |
| Maintainers | kastor |
| Keywords | clone-function, atropa |

## Links

- npm: https://www.npmjs.com/package/clone-function
- Repository: https://github.com/matthewkastor/clone-function
- Homepage: https://github.com/matthewkastor/clone-function/
- Issues: https://github.com/matthewkastor/clone-function/issues
- npm.io page: https://npm.io/package/clone-function

## Recent versions

- 1.0.6 (latest) — 2013-12-21
- 1.0.5 — 2013-12-21
- 1.0.4 — 2013-12-15
- 1.0.3 — 2013-10-13
- 1.0.2 — 2013-09-24
- 1.0.1 — 2013-09-24

## README

# clone-function

Clones non native JavaScript functions, or references native functions.

## Installation

```
npm install clone-function
```

https://npmjs.org/package/clone-function
Source code available at: https://github.com/matthewkastor/clone-function/

## Usage

```
var cloneFunction = require('clone-function');
var func = function () {
    return 'wee';
};
var copied = func;
var cloned = cloneFunction(func);
console.log(func === copied); // true
console.log(func === cloned); // false
console.log(func() === cloned()); // true
```

In the browser, include `./browser/clone-function_web.js` in your page. `cloneFunction` will
 be available globally in your page.

For full documentation see the docs folder. For examples see the example folder.

## Tests

Tests can be run from the root of this package with

```
npm test
```

## Hacking

There are several other scripts listed in package.json for development and
 hacking on this module. They can be run with `npm run-script` followed by the
 scripts property corresponding to the script you want to run. For example,
 given a script called `buildDocs`, it could be run from the package root by:

```
npm run-script buildDocs
```

## Author

Matthew Kastor
atropa

matthewkastor@gmail.com
https://plus.google.com/100898583798552211130

## License

gpl-3.0
http://www.gnu.org/licenses/gpl-3.0-standalone.html

---
_Source: https://npm.io/package/clone-function · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
