{"_id":"muk-prop","_rev":"15-6fd946632ffdc08ca03a12544a623502","name":"muk-prop","description":"Mock object methods and properties.","dist-tags":{"latest":"3.0.1"},"versions":{"0.5.3":{"name":"muk-prop","description":"Mock object methods and properties.","keywords":["test","mock","stub"],"version":"0.5.3","repository":{"type":"git","url":"git://github.com/fent/node-muk-prop.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/.bin/_mocha -- -R spec test/*-test.js"},"directories":{"lib":"./lib"},"devDependencies":{"mocha":"*","istanbul":"0"},"license":"MIT","files":["lib"],"gitHead":"69fb3b432fc541c6d7f34d8f3e4aaef45f6a31e4","bugs":{"url":"https://github.com/fent/node-muk-prop/issues"},"homepage":"https://github.com/fent/node-muk-prop#readme","_id":"muk-prop@0.5.3","_shasum":"27b44bd7cadd4ba6064e117cef87ad83156a3587","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"fent","email":"roly426@gmail.com"},"maintainers":[{"name":"fent","email":"roly426@gmail.com"}],"dist":{"shasum":"27b44bd7cadd4ba6064e117cef87ad83156a3587","tarball":"https://registry.npmjs.org/muk-prop/-/muk-prop-0.5.3.tgz","integrity":"sha512-lhwqQP6FhWaAPL0lBgo17EPWFBFkdDWVcSzZEZ+69ajOrxEMDLL3NGUowG9zRr05A9C0raNs17b4oGd2qYv9SQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBkAI683kDFjT7rT8YZ7GfcSX3VDnYET8sTLSkcYJpY6AiBmFvqIl8vEdIqJ1rDoJXqReiGnr3PJWELnZjrVvZyaLA=="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/muk-prop-0.5.3.tgz_1484981028656_0.7240952285937965"}},"1.0.0":{"name":"muk-prop","description":"Mock object methods and properties.","keywords":["test","mock","stub"],"version":"1.0.0","repository":{"type":"git","url":"git://github.com/fent/node-muk-prop.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/.bin/_mocha -- -R spec test/*-test.js"},"directories":{"lib":"./lib"},"devDependencies":{"mocha":"*","istanbul":"0"},"engines":{"node":">=0.12"},"license":"MIT","files":["lib"],"gitHead":"79f3ed7b6f5f7aa9ea89b141c3ec90cf7f72de94","bugs":{"url":"https://github.com/fent/node-muk-prop/issues"},"homepage":"https://github.com/fent/node-muk-prop#readme","_id":"muk-prop@1.0.0","_shasum":"3e81072f66466a378c284610fa31605e9e3f5424","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.1","_npmUser":{"name":"fent","email":"roly426@gmail.com"},"maintainers":[{"name":"fent","email":"roly426@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"dist":{"shasum":"3e81072f66466a378c284610fa31605e9e3f5424","tarball":"https://registry.npmjs.org/muk-prop/-/muk-prop-1.0.0.tgz","integrity":"sha512-hTZxD4uWIOvcfd0150fg7vhqGtQq0hL6X4ZnSF73rCF+9kOv+dvzPe4WjG75hzUxuf4/zhw4htk6Fq2e8L0GfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHB8vPjHpneSklVA4JaCks+oysjA7h1O6Vxuz824I+ruAiEAuYF40EBZ4/K6FTc7I3oJaZNmrblbzZpWoaii9COTDjE="}]},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/muk-prop-1.0.0.tgz_1488463316979_0.5445286370813847"}},"1.0.1":{"name":"muk-prop","description":"Mock object methods and properties.","keywords":["test","mock","stub"],"version":"1.0.1","repository":{"type":"git","url":"git://github.com/fent/muk-prop.js.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/.bin/_mocha -- -R spec test/*-test.js"},"directories":{"lib":"./lib"},"devDependencies":{"mocha":"*","istanbul":"0"},"engines":{"node":">=0.12"},"license":"MIT","files":["lib"],"gitHead":"0e4053a79934ac8ab7cc116b11a95007f6b040dc","bugs":{"url":"https://github.com/fent/muk-prop.js/issues"},"homepage":"https://github.com/fent/muk-prop.js#readme","_id":"muk-prop@1.0.1","_npmVersion":"5.3.0","_nodeVersion":"8.3.0","_npmUser":{"name":"fent","email":"roly426@gmail.com"},"dist":{"integrity":"sha512-E+awtpiN/XqnUhBzjjFdBb8BbYDmmNV7xEl/PJSTbil6bvLkiOzC2v15om7i4qoypfSSpkowdU5nRTK38YS5og==","shasum":"38a087b782ed2687b2df5592a4155040f64d0887","tarball":"https://registry.npmjs.org/muk-prop/-/muk-prop-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBXvmLZEDVfBOLzfCu4Vo/zqllP4cBazFfiICz1UTvYAiEA7OcIPK+qKXF75j2tiG6LwuaZaEQzuVb0P+/iJG4LIZU="}]},"maintainers":[{"name":"fent","email":"roly426@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/muk-prop-1.0.1.tgz_1502341689788_0.28167852107435465"}},"1.1.0":{"name":"muk-prop","description":"Mock object methods and properties.","keywords":["test","mock","stub"],"version":"1.1.0","repository":{"type":"git","url":"git://github.com/fent/muk-prop.js.git"},"author":{"name":"Roly Fentanes","url":"https://github.com/fent"},"main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/.bin/_mocha -- -R spec test/*-test.js"},"directories":{"lib":"./lib"},"devDependencies":{"istanbul":"^0.4.5","mocha":"^4.0.1"},"engines":{"node":">=4"},"license":"MIT","files":["lib"],"gitHead":"f19ce542650232ce23518b21680c5993ac2fb1eb","bugs":{"url":"https://github.com/fent/muk-prop.js/issues"},"homepage":"https://github.com/fent/muk-prop.js#readme","_id":"muk-prop@1.1.0","_npmVersion":"5.4.2","_nodeVersion":"8.8.1","_npmUser":{"name":"fent","email":"roly426@gmail.com"},"dist":{"integrity":"sha512-zul86QuY6Wi4KQ6bx8ZB8GYxEWh1X8Q6PJb9awXJ6gpismxJbtbuDqgJKFxfurFSow7xonG1mvm3Umn2uX1Row==","shasum":"583137602c10890a558356a8bfe6de62435d63b4","tarball":"https://registry.npmjs.org/muk-prop/-/muk-prop-1.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDATP/BYnAIttB2o2SP/wE03w/Lr8L+bSw9hWvJao9wGwIgfnZquMWd7Z+HVdnvNsRVmlhw27RKlFyjn/wmRqAaoVQ="}]},"maintainers":[{"name":"fent","email":"roly426@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/muk-prop-1.1.0.tgz_1509296975669_0.4011617961805314"}},"1.1.1":{"name":"muk-prop","description":"Mock object methods and properties.","keywords":["test","mock","stub"],"version":"1.1.1","repository":{"type":"git","url":"git://github.com/fent/muk-prop.js.git"},"author":{"name":"fent","url":"https://github.com/fent"},"main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/.bin/_mocha -- -R spec test/*-test.js"},"directories":{"lib":"./lib"},"devDependencies":{"istanbul":"^0.4.5","mocha":"^5.0.0"},"engines":{"node":">=4"},"license":"MIT","files":["lib"],"gitHead":"d08cf4cbb5f22e174b332bd6e37f027a2faace4a","bugs":{"url":"https://github.com/fent/muk-prop.js/issues"},"homepage":"https://github.com/fent/muk-prop.js#readme","_id":"muk-prop@1.1.1","_npmVersion":"5.6.0","_nodeVersion":"9.7.1","_npmUser":{"name":"fent","email":"fentbox@gmail.com"},"dist":{"integrity":"sha512-Jb2AA1upTdAuKDWUio80EzxP66Z+eO4Wq0Q6HsCvVXyzRFTyuEjY6P2MC9xudtOVr3y3g5n39WeHRupnJFWz6w==","shasum":"01341c75a3f32d95ba062eec58b9d2d8683490a3","tarball":"https://registry.npmjs.org/muk-prop/-/muk-prop-1.1.1.tgz","fileCount":5,"unpackedSize":4392,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/S+SyUcmP8EZGJq/PmlEj+b2iq3C6Bl3Lu0pu6GIAHAiAjm4ZzdjXl2LElu4vx0oiCjxikO8TlwLnF98Xdd+DsVw=="}]},"maintainers":[{"name":"fent","email":"roly426@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/muk-prop_1.1.1_1520131976052_0.5915662484322706"},"_hasShrinkwrap":false},"2.0.0":{"name":"muk-prop","description":"Mock object methods and properties.","keywords":["test","mock","stub"],"version":"2.0.0","repository":{"type":"git","url":"git://github.com/fent/muk-prop.js.git"},"author":{"name":"fent","url":"https://github.com/fent"},"main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/.bin/_mocha -- -R spec test/*-test.js"},"directories":{"lib":"./lib"},"devDependencies":{"istanbul":"^0.4.5","mocha":"^5.0.0"},"engines":{"node":">=4"},"license":"MIT","files":["lib"],"gitHead":"267189bcafb25e847def9699d4724fef5a688843","bugs":{"url":"https://github.com/fent/muk-prop.js/issues"},"homepage":"https://github.com/fent/muk-prop.js#readme","_id":"muk-prop@2.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"integrity":"sha512-tIxpVLQBIwE0Rw1CH2AQ3fLulITQUGJQ60Ji496ZvTRX7EbhuR8DaXvaHASWfL0jUpBuZ/XjhhbyULJ0e4feZA==","shasum":"0384a4c7961e69572bd6521858d0f4418f8bb07a","tarball":"https://registry.npmjs.org/muk-prop/-/muk-prop-2.0.0.tgz","fileCount":5,"unpackedSize":4845,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGpot8ajz8z1I9yRfFD7Izoah8zkg3kwETB/L0YU7p0vAiEAwSUGoQGXiZQTT7MMhJr96lWP5TJejIjwmo+elk6UuWw="}]},"maintainers":[{"name":"fent","email":"roly426@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/muk-prop_2.0.0_1522044220596_0.3585148150069688"},"_hasShrinkwrap":false},"1.2.1":{"name":"muk-prop","description":"Mock object methods and properties.","keywords":["test","mock","stub"],"version":"1.2.1","repository":{"type":"git","url":"git://github.com/fent/muk-prop.js.git"},"author":{"name":"fent","url":"https://github.com/fent"},"main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/.bin/_mocha -- -R spec test/*-test.js"},"directories":{"lib":"./lib"},"devDependencies":{"istanbul":"^0.4.5","mocha":"^5.0.0"},"engines":{"node":">=4"},"license":"MIT","files":["lib"],"gitHead":"d08cf4cbb5f22e174b332bd6e37f027a2faace4a","bugs":{"url":"https://github.com/fent/muk-prop.js/issues"},"homepage":"https://github.com/fent/muk-prop.js#readme","_id":"muk-prop@1.2.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"integrity":"sha512-NdkOVav3GoIkBZqMUneU435HW0a90zitpuO1erPRhOQdPtl65dXD3G9/1k46G6/0ZMau4CJFFUHkMKVsyNZT+w==","shasum":"40fa3d6e93553b2016a9fb77d8918568c57ae14d","tarball":"https://registry.npmjs.org/muk-prop/-/muk-prop-1.2.1.tgz","fileCount":5,"unpackedSize":4392,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDu2mP4IyiE37NWEPkpoAAtMcpjAeYqszbV/Y/OKYAWfQIgLqmHdvSWi1zetd25gW9CJhMiuc7JjlR9ANZ9kYz5Oec="}]},"maintainers":[{"name":"fent","email":"roly426@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/muk-prop_1.2.1_1522046401263_0.752719559120598"},"_hasShrinkwrap":false},"3.0.0":{"name":"muk-prop","description":"Mock object methods and properties.","keywords":["test","mock","stub"],"version":"3.0.0","repository":{"type":"git","url":"git://github.com/fent/muk-prop.js.git"},"author":{"name":"fent","url":"https://github.com/fent"},"main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/.bin/_mocha -- -R spec test/*-test.js"},"directories":{"lib":"./lib"},"devDependencies":{"istanbul":"^0.4.5","mocha":"^6.0.0"},"engines":{"node":">=6"},"license":"MIT","gitHead":"c8353bb79aa6432758cf5e27792d3a2200d7d277","bugs":{"url":"https://github.com/fent/muk-prop.js/issues"},"homepage":"https://github.com/fent/muk-prop.js#readme","_id":"muk-prop@3.0.0","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-1pmuhJphBFIgXmM+7D73vWvdWKqi7IM6Q7UrKpJRzkvw+TfD1heYTzMHR20DgiUbO2oZvpfx5SF4cIpaysLqKw==","shasum":"e5490132171348778dc2648cd167bf81d554fe93","tarball":"https://registry.npmjs.org/muk-prop/-/muk-prop-3.0.0.tgz","fileCount":4,"unpackedSize":4512,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHpUWt93PWccaiueoyWXwidVNAlrEhN8s6C0g+JA0Sl5AiAyuVxFIOsV47/yqumEzgk+grV5P11Zb5aS+NF/xEERGQ=="}]},"_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"maintainers":[{"name":"fent","email":"fentbox@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/muk-prop_3.0.0_1683857633398_0.967652197676643"},"_hasShrinkwrap":false},"3.0.1":{"name":"muk-prop","description":"Mock object methods and properties.","keywords":["test","mock","stub"],"version":"3.0.1","repository":{"type":"git","url":"git://github.com/fent/muk-prop.js.git"},"author":{"name":"fent","url":"https://github.com/fent"},"main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/.bin/_mocha -- -R spec test/*-test.js"},"directories":{"lib":"./lib"},"devDependencies":{"istanbul":"^0.4.5","mocha":"^6.0.0"},"engines":{"node":">=6"},"license":"MIT","gitHead":"794adfdd52d4b57acb8dfd7a6064a33e1bdc6be1","bugs":{"url":"https://github.com/fent/muk-prop.js/issues"},"homepage":"https://github.com/fent/muk-prop.js#readme","_id":"muk-prop@3.0.1","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-V2T5sxU50WC9EsEXnf7XSXuQVhx4/2g/6Ox1Rp0GyqTthH0f7isGrGI705RHL56awIQaYpaCFDPbWzqgBGnBng==","shasum":"6deff523eddf7a2778b0c977264bf2166715e2d5","tarball":"https://registry.npmjs.org/muk-prop/-/muk-prop-3.0.1.tgz","fileCount":4,"unpackedSize":4680,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaCoi5hTgO2wIITok35BPXNQPkA73qF1/mhFiQ4fWIjAIgXQKlZf1KitZXMsrcWBVWNWC3PbTeim6kEIG4h76W18s="}]},"_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"maintainers":[{"name":"fent","email":"fentbox@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/muk-prop_3.0.1_1684125775911_0.9449553869794314"},"_hasShrinkwrap":false}},"readme":"# muk-prop.js\n\n[![Build Status](https://secure.travis-ci.org/fent/muk-prop.js.svg)](http://travis-ci.org/fent/muk-prop.js)\n[![Dependency Status](https://david-dm.org/fent/muk-prop.js.svg)](https://david-dm.org/fent/muk-prop.js)\n[![codecov](https://codecov.io/gh/fent/muk-prop.js/branch/master/graph/badge.svg)](https://codecov.io/gh/fent/muk-prop.js)\n\n![muk](muk.gif)\n\n# Usage\n\nObject method mocking.\n\n```js\nconst fs = require('fs');\nconst muk = require('muk-prop');\n\nmuk(fs, 'readFile', (path, callback) => {\n  process.nextTick(callback.bind(null, null, 'file contents here'));\n});\n```\n\nObject props mocking with setter/getter.\n\n```js\nconst muk = require('muk-prop');\n\nconst obj = { _a: 1 };\nmuk(obj, 'a', {\n  set: (val) => obj._a = val * 2,\n  get: (val) => obj._a,\n});\n\nobj.a = 2;\nconsole.log(obj.a); // 4\n```\n\nCheck if member has been mocked.\n\n```js\nmuk.isMocked(fs, 'readFile'); // true\n```\n\nRestore all mocked methods/props after tests.\n\n```js\nmuk.restore();\n\nfs.readFile(file, (err, data) => {\n  // will actually read from `file`\n});\n```\n\n\n# Install\n\n    npm install muk-prop\n\n\n# Tests\nTests are written with [mocha](https://mochajs.org)\n\n```bash\nnpm test\n```\n","maintainers":[{"name":"fent","email":"fentbox@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"time":{"modified":"2023-05-15T04:42:56.167Z","created":"2017-01-21T06:43:50.603Z","0.5.3":"2017-01-21T06:43:50.603Z","1.0.0":"2017-03-02T14:01:57.705Z","1.0.1":"2017-08-10T05:08:10.846Z","1.1.0":"2017-10-29T17:09:36.638Z","1.1.1":"2018-03-04T02:52:56.103Z","1.2.0":"2018-03-26T05:13:57.835Z","2.0.0":"2018-03-26T06:03:42.244Z","1.2.1":"2018-03-26T06:40:01.352Z","3.0.0":"2023-05-12T02:13:53.586Z","3.0.1":"2023-05-15T04:42:56.068Z"},"homepage":"https://github.com/fent/muk-prop.js#readme","keywords":["test","mock","stub"],"repository":{"type":"git","url":"git://github.com/fent/muk-prop.js.git"},"author":{"name":"fent","url":"https://github.com/fent"},"bugs":{"url":"https://github.com/fent/muk-prop.js/issues"},"license":"MIT","readmeFilename":"README.md"}