1- # muk-prop.js
1+ # @ cnpmjs/ muk-prop
22
3- [ ![ Build Status] ( https://secure.travis-ci.org/fent/muk-prop.js.svg )] ( http://travis-ci.org/fent/muk-prop.js )
4- [ ![ Dependency Status] ( https://david-dm.org/fent/muk-prop.js.svg )] ( https://david-dm.org/fent/muk-prop.js )
5- [ ![ codecov] ( https://codecov.io/gh/fent/muk-prop.js/branch/master/graph/badge.svg )] ( https://codecov.io/gh/fent/muk-prop.js )
3+ [ ![ NPM version] [ npm-image ]] [ npm-url ]
4+ [ ![ Node.js CI] ( https://github.com/node-modules/muk-prop.js/actions/workflows/nodejs.yml/badge.svg )] ( https://github.com/node-modules/muk-prop.js/actions/workflows/nodejs.yml )
5+ [ ![ codecov] ( https://codecov.io/gh/node-modules/muk-prop.js/graph/badge.svg?token=YuWQxJfyk2 )] ( https://codecov.io/gh/node-modules/muk-prop.js )
6+ [ ![ npm download] [ download-image ]] [ download-url ]
7+ [ ![ Node.js Version] ( https://img.shields.io/node/v/@cnpmjs/muk-prop.svg?style=flat )] ( https://nodejs.org/en/download/ )
8+
9+ [ npm-image ] : https://img.shields.io/npm/v/@cnpmjs/muk-prop.svg?style=flat-square
10+ [ npm-url ] : https://npmjs.org/package/@cnpmjs/muk-prop
11+ [ download-image ] : https://img.shields.io/npm/dm/@cnpmjs/muk-prop.svg?style=flat-square
12+ [ download-url ] : https://npmjs.org/package/@cnpmjs/muk-prop
613
714![ muk] ( muk.gif )
815
9- # Usage
16+ ## Usage
1017
1118Object method mocking.
1219
1320``` js
1421const fs = require (' fs' );
15- const muk = require (' muk-prop' );
22+ const { muk } = require (' @cnpmjs/ muk-prop' );
1623
1724muk (fs, ' readFile' , (path , callback ) => {
1825 process .nextTick (callback .bind (null , null , ' file contents here' ));
@@ -22,7 +29,7 @@ muk(fs, 'readFile', (path, callback) => {
2229Object props mocking with setter/getter.
2330
2431``` js
25- const muk = require (' muk-prop' );
32+ const { muk } = require (' @cnpmjs/ muk-prop' );
2633
2734const obj = { _a: 1 };
2835muk (obj, ' a' , {
@@ -37,28 +44,37 @@ console.log(obj.a); // 4
3744Check if member has been mocked.
3845
3946``` js
40- muk .isMocked (fs, ' readFile' ); // true
47+ const { isMocked } = require (' @cnpmjs/muk-prop' );
48+
49+ isMocked (fs, ' readFile' ); // true
4150```
4251
4352Restore all mocked methods/props after tests.
4453
4554``` js
46- muk . restore ( );
55+ const { restore } = require ( ' @cnpmjs/muk-prop ' );
4756
4857fs .readFile (file, (err , data ) => {
4958 // will actually read from `file`
5059});
5160```
5261
62+ ## Install
5363
54- # Install
55-
56- npm install muk-prop
64+ ``` bash
65+ npm install @cnpmjs/muk-prop
66+ ```
5767
68+ ## Tests
5869
59- # Tests
6070Tests are written with [ mocha] ( https://mochajs.org )
6171
6272``` bash
6373npm test
6474```
75+
76+ ## Contributors
77+
78+ [ ![ Contributors] ( https://contrib.rocks/image?repo=node-modules/muk-prop.js )] ( https://github.com/node-modules/muk-prop.js/graphs/contributors )
79+
80+ Made with [ contributors-img] ( https://contrib.rocks ) .
0 commit comments