Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

alternative-facts

1.0.3 • Public • Published

Build Status

alternative-facts

When you want to make the truth false.

JS lib that intercepts code and delivers incorrect values

API

Setup

// require
const alternativeFacts = require('alternative-facts')
const af = alternativeFacts('format'); 
//override any method or property named format
const util = require('util');
const result = tools.format('%s:%s','foo','bar');
// result will be scrambled from "foo:bar"
 

reset

af.reset();
const util2 = require('util');
const result2 = utils2.format('%s:%s','foo','bar');
// result is now "foo:bar"

init

af.reset();
af.init('format');
const util3 = require('util');
const result3 = utils3.format('%s:%s','foo','bar');
// scambled again

Keywords

install

npm i alternative-facts

Downloadsweekly downloads

6

version

1.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability