hoodwinker

1.1.0 • Public • Published

Hoodwinker

Build Status npm version

Dynamic reference replacement. Via Proxying we are able to re-route references for mocking purposes.

Installation

via npm

npm install hoodwinker

Usage

const Hoodwinker = require('hoodwinker');

const realObject = { "original": true };
const hoodwinker = new Hoodwinker(realObject);

const fake = hoodwinker.hoodwink;
console.log(fake); // { "original": true };

const mocked = { "original": false };
hoodwinker.setHoodwinkTarget(mocked);

console.log(fake); // { "original": false };

Versioning

This library uses the Semver versioning system. The numbers do not relate to maturity but the number of breaking changes introduced.

Package Sidebar

Install

npm i hoodwinker

Weekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

12.6 kB

Total Files

9

Last publish

Collaborators

  • matt.lloyd101