🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

hoodwinker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hoodwinker

Dynamic reference replacement

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
2
-71.43%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

mocking

FAQs

Package last updated on 29 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts