1.1.0 • Published 5 years ago

fak v1.1.0

Weekly downloads
28
License
ISC
Repository
github
Last release
5 years ago

fak

Package to fake things

Example

You can do with it whatever you want and it won't throw an error:

// statsd.js
import Statsd from 'statsd';
import fak from 'fak';

let result = Statsd;
if (process.env.NODE_ENV !== 'production') {
  result = fak;
}

export default result;


// anyFile.js
import Statsd from '../path/to/statsd.js'

const options = { /* whatever */ }; 
const statsd = new Statsd(options); // for not production it won't throw an error

...

statsd.timing('some.name', time); // and this too
1.1.0

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago