1.4.2 • Published 8 years ago

require-clone v1.4.2

Weekly downloads
2
License
MIT
Repository
-
Last release
8 years ago

require-clone

Get a completely clean copy of a module or package and all its internal dependencies. Use it like you use require.

Usage

const requireClone = require('require-clone')

const myPackage = requireClone('my-package');

Use-case

If you have a dependent module that is returning an object, and that object depends on variables in the top scope of the module, then you can never get an independent clone of that object. Another way of putting it is that your dependency is acting like a singleton but you need multiple independent instances.

1.4.2

8 years ago

1.4.1

8 years ago

1.4.0

8 years ago

1.3.7

8 years ago

1.3.6

8 years ago

1.3.5

8 years ago

1.3.4

8 years ago

1.3.3

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago