{"_id":"mutable-proxy","_rev":"4647291","name":"mutable-proxy","description":"A library for creating mutable proxies","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"griffingj","email":"Griffingj@gmail.com"}],"time":{"modified":"2026-04-10T20:21:55.000Z","created":"2016-09-18T07:38:54.723Z","1.0.0":"2018-12-20T21:36:29.005Z","0.1.7":"2016-09-18T07:55:55.686Z","0.1.6":"2016-09-18T07:53:51.409Z","0.1.5":"2016-09-18T07:51:37.528Z","0.1.4":"2016-09-18T07:48:46.013Z","0.1.3":"2016-09-18T07:45:17.302Z","0.1.2":"2016-09-18T07:38:54.723Z"},"users":{},"author":{"name":"John Griffing"},"repository":{"type":"git","url":"git+https://github.com/Griffingj/mutable-proxy.git"},"versions":{"1.0.0":{"name":"mutable-proxy","version":"1.0.0","description":"A library for creating mutable proxies","main":"build/index.js","repository":{"type":"git","url":"git+https://github.com/Griffingj/mutable-proxy.git"},"scripts":{"test":"lab","start":"babel-node src/example/readme.js","lint":"eslint src","test-cov":"lab --coverage","report-cov":"lab --coverage -r lcov | codeclimate-test-reporter","prepublish":"npm run build","build":"babel src --out-dir build","validate":"npm ls"},"engines":{"node":">=6.X.X","npm":">=3.X.X"},"author":{"name":"John Griffing"},"license":"MIT","devDependencies":{"babel-cli":"^6.8.0","babel-core":"^6.8.0","babel-eslint":"^6.0.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-2":"^6.5.0","babel-register":"^6.14.0","codeclimate-test-reporter":"^0.3.3","eslint":"^2.7.0","eslint-config-airbnb":"^8.0.0","eslint-plugin-import":"^1.7.0","eslint-plugin-jsx-a11y":"^1.0.4","eslint-plugin-react":"^5.0.1","expect":"^1.20.2","git-validate":"^2.2.1","lab":"^11.0.1"},"pre-commit":["test","lint","validate"],"gitHead":"7dd97070379d080b00369be92b63e19b03ffbbaf","bugs":{"url":"https://github.com/Griffingj/mutable-proxy/issues"},"homepage":"https://github.com/Griffingj/mutable-proxy#readme","_id":"mutable-proxy@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.11.1","_npmUser":{"name":"treora","email":"gerben@treora.com"},"dist":{"shasum":"3c6e6f9304c2e5a4751bb65b5a66677de9bcf3c8","size":4690,"noattachment":false,"key":"/mutable-proxy/-/mutable-proxy-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/mutable-proxy/download/mutable-proxy-1.0.0.tgz"},"maintainers":[{"name":"griffingj","email":"Griffingj@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mutable-proxy_1.0.0_1545341788892_0.7219059319993455"},"_hasShrinkwrap":false,"publish_time":1545341789005,"_cnpm_publish_time":1545341789005,"_cnpmcore_publish_time":"2021-12-16T13:36:07.674Z"},"0.1.7":{"name":"mutable-proxy","version":"0.1.7","description":"A library for creating mutable proxies","main":"build/index.js","repository":{"type":"git","url":"git+https://github.com/Griffingj/mutable-proxy.git"},"scripts":{"test":"lab","start":"babel-node src/example/readme.js","lint":"eslint src","test-cov":"lab --coverage","report-cov":"lab --coverage -r lcov | codeclimate-test-reporter","prepublish":"npm run build","build":"babel src --out-dir build","validate":"npm ls"},"engines":{"node":"6.X.X","npm":"3.X.X"},"author":{"name":"John Griffing"},"license":"MIT","devDependencies":{"babel-cli":"^6.8.0","babel-core":"^6.8.0","babel-eslint":"^6.0.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-2":"^6.5.0","babel-register":"^6.14.0","codeclimate-test-reporter":"^0.3.3","eslint":"^2.7.0","eslint-config-airbnb":"^8.0.0","eslint-plugin-import":"^1.7.0","eslint-plugin-jsx-a11y":"^1.0.4","eslint-plugin-react":"^5.0.1","expect":"^1.20.2","git-validate":"^2.2.1","lab":"^11.0.1"},"pre-commit":["test","lint","validate"],"gitHead":"af53135203ff609af111cda2aec585d93ee63a2a","bugs":{"url":"https://github.com/Griffingj/mutable-proxy/issues"},"homepage":"https://github.com/Griffingj/mutable-proxy#readme","_id":"mutable-proxy@0.1.7","_shasum":"5d2836ee0d7a8866d1c1da83a359f8da24c292b9","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"griffingj","email":"Griffingj@gmail.com"},"dist":{"shasum":"5d2836ee0d7a8866d1c1da83a359f8da24c292b9","size":5343,"noattachment":false,"key":"/mutable-proxy/-/mutable-proxy-0.1.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/mutable-proxy/download/mutable-proxy-0.1.7.tgz"},"maintainers":[{"name":"griffingj","email":"Griffingj@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/mutable-proxy-0.1.7.tgz_1474185353852_0.415619227103889"},"directories":{},"publish_time":1474185355686,"_hasShrinkwrap":false,"_cnpm_publish_time":1474185355686,"_cnpmcore_publish_time":"2021-12-16T13:36:07.928Z"},"0.1.6":{"name":"mutable-proxy","version":"0.1.6","description":"A library for creating mutable proxies","main":"build/index.js","repository":{"type":"git","url":"git+https://github.com/Griffingj/mutable-proxy.git"},"scripts":{"test":"lab","start":"babel-node src/example/readme.js","lint":"eslint src","test-cov":"lab --coverage","report-cov":"lab --coverage -r lcov | codeclimate-test-reporter","prepublish":"npm run build","build":"babel src --out-dir build","validate":"npm ls"},"engines":{"node":"6.X.X","npm":"3.X.X"},"author":{"name":"John Griffing"},"license":"MIT","devDependencies":{"babel-cli":"^6.8.0","babel-core":"^6.8.0","babel-eslint":"^6.0.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-2":"^6.5.0","babel-register":"^6.14.0","codeclimate-test-reporter":"^0.3.3","eslint":"^2.7.0","eslint-config-airbnb":"^8.0.0","eslint-plugin-import":"^1.7.0","eslint-plugin-jsx-a11y":"^1.0.4","eslint-plugin-react":"^5.0.1","expect":"^1.20.2","git-validate":"^2.2.1","lab":"^11.0.1"},"pre-commit":["test","lint","validate"],"gitHead":"4dd41f73aaa1282ae3ac8685657278116b49a60e","bugs":{"url":"https://github.com/Griffingj/mutable-proxy/issues"},"homepage":"https://github.com/Griffingj/mutable-proxy#readme","_id":"mutable-proxy@0.1.6","_shasum":"7c93c2b3311d8ba581abb72997bacf3fa9227f4c","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"griffingj","email":"Griffingj@gmail.com"},"dist":{"shasum":"7c93c2b3311d8ba581abb72997bacf3fa9227f4c","size":5349,"noattachment":false,"key":"/mutable-proxy/-/mutable-proxy-0.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/mutable-proxy/download/mutable-proxy-0.1.6.tgz"},"maintainers":[{"name":"griffingj","email":"Griffingj@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/mutable-proxy-0.1.6.tgz_1474185229560_0.15886003174819052"},"directories":{},"publish_time":1474185231409,"_hasShrinkwrap":false,"_cnpm_publish_time":1474185231409,"_cnpmcore_publish_time":"2021-12-16T13:36:08.140Z"},"0.1.5":{"name":"mutable-proxy","version":"0.1.5","description":"A library for creating mutable proxies","main":"build/index.js","repository":{"type":"git","url":"git+https://github.com/Griffingj/mutable-proxy.git"},"scripts":{"test":"lab","start":"babel-node src/example/readme.js","lint":"eslint src","test-cov":"lab --coverage","report-cov":"lab --coverage -r lcov | codeclimate-test-reporter","prepublish":"npm run build","build":"babel src --out-dir build","validate":"npm ls"},"engines":{"node":"6.X.X","npm":"3.X.X"},"author":{"name":"John Griffing"},"license":"MIT","devDependencies":{"babel-cli":"^6.8.0","babel-core":"^6.8.0","babel-eslint":"^6.0.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-2":"^6.5.0","babel-register":"^6.14.0","codeclimate-test-reporter":"^0.3.3","eslint":"^2.7.0","eslint-config-airbnb":"^8.0.0","eslint-plugin-import":"^1.7.0","eslint-plugin-jsx-a11y":"^1.0.4","eslint-plugin-react":"^5.0.1","expect":"^1.20.2","git-validate":"^2.2.1","lab":"^11.0.1"},"pre-commit":["test","lint","validate"],"gitHead":"c94b54c1396783b45cb08e0df7907ea46cc85465","bugs":{"url":"https://github.com/Griffingj/mutable-proxy/issues"},"homepage":"https://github.com/Griffingj/mutable-proxy#readme","_id":"mutable-proxy@0.1.5","_shasum":"bad9d856637874ebb1cf4e2fb6fcffe8deb851d3","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"griffingj","email":"Griffingj@gmail.com"},"dist":{"shasum":"bad9d856637874ebb1cf4e2fb6fcffe8deb851d3","size":5375,"noattachment":false,"key":"/mutable-proxy/-/mutable-proxy-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/mutable-proxy/download/mutable-proxy-0.1.5.tgz"},"maintainers":[{"name":"griffingj","email":"Griffingj@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/mutable-proxy-0.1.5.tgz_1474185095638_0.693584299646318"},"directories":{},"publish_time":1474185097528,"_hasShrinkwrap":false,"_cnpm_publish_time":1474185097528,"_cnpmcore_publish_time":"2021-12-16T13:36:08.594Z"},"0.1.4":{"name":"mutable-proxy","version":"0.1.4","description":"A library for creating mutable proxies","main":"build/index.js","repository":{"type":"git","url":"git+https://github.com/Griffingj/mutable-proxy.git"},"scripts":{"test":"lab","start":"babel-node src/example/readme.js","lint":"eslint src","test-cov":"lab --coverage","report-cov":"lab --coverage -r lcov | codeclimate-test-reporter","prepublish":"npm run build","build":"babel src --out-dir build","validate":"npm ls"},"engines":{"node":"6.X.X","npm":"3.X.X"},"author":{"name":"John Griffing"},"license":"MIT","devDependencies":{"babel-cli":"^6.8.0","babel-core":"^6.8.0","babel-eslint":"^6.0.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-2":"^6.5.0","babel-register":"^6.14.0","codeclimate-test-reporter":"^0.3.3","eslint":"^2.7.0","eslint-config-airbnb":"^8.0.0","eslint-plugin-import":"^1.7.0","eslint-plugin-jsx-a11y":"^1.0.4","eslint-plugin-react":"^5.0.1","expect":"^1.20.2","git-validate":"^2.2.1","lab":"^11.0.1"},"pre-commit":["test","lint","validate"],"gitHead":"70c164d5acff76f047bb644f0733456ab61815c1","bugs":{"url":"https://github.com/Griffingj/mutable-proxy/issues"},"homepage":"https://github.com/Griffingj/mutable-proxy#readme","_id":"mutable-proxy@0.1.4","_shasum":"340d7f28c6ebd2afe8ba0e81a1ab68dee330198f","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"griffingj","email":"Griffingj@gmail.com"},"dist":{"shasum":"340d7f28c6ebd2afe8ba0e81a1ab68dee330198f","size":5347,"noattachment":false,"key":"/mutable-proxy/-/mutable-proxy-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/mutable-proxy/download/mutable-proxy-0.1.4.tgz"},"maintainers":[{"name":"griffingj","email":"Griffingj@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/mutable-proxy-0.1.4.tgz_1474184924215_0.535300426883623"},"directories":{},"publish_time":1474184926013,"_hasShrinkwrap":false,"_cnpm_publish_time":1474184926013,"_cnpmcore_publish_time":"2021-12-16T13:36:08.828Z"},"0.1.3":{"name":"mutable-proxy","version":"0.1.3","description":"A library for creating mutable proxies","main":"build/index.js","repository":{"type":"git","url":"git+https://github.com/Griffingj/mutable-proxy.git"},"scripts":{"test":"lab","start":"babel-node src/example/readme.js","lint":"eslint src","test-cov":"lab --coverage","report-cov":"lab --coverage -r lcov | codeclimate-test-reporter","prepublish":"npm run build","build":"babel src --out-dir build","validate":"npm ls"},"engines":{"node":"6.X.X","npm":"3.X.X"},"author":{"name":"John Griffing"},"license":"MIT","devDependencies":{"babel-cli":"^6.8.0","babel-core":"^6.8.0","babel-eslint":"^6.0.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-2":"^6.5.0","babel-register":"^6.14.0","codeclimate-test-reporter":"^0.3.3","eslint":"^2.7.0","eslint-config-airbnb":"^8.0.0","eslint-plugin-import":"^1.7.0","eslint-plugin-jsx-a11y":"^1.0.4","eslint-plugin-react":"^5.0.1","expect":"^1.20.2","git-validate":"^2.2.1","lab":"^11.0.1"},"pre-commit":["test","lint","validate"],"gitHead":"88584b636ee3fa71e7c9871200af5886810a6c9f","bugs":{"url":"https://github.com/Griffingj/mutable-proxy/issues"},"homepage":"https://github.com/Griffingj/mutable-proxy#readme","_id":"mutable-proxy@0.1.3","_shasum":"7d01aa5d0a7a2ba1f9c189d59234fde6847d35d9","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"griffingj","email":"Griffingj@gmail.com"},"dist":{"shasum":"7d01aa5d0a7a2ba1f9c189d59234fde6847d35d9","size":5344,"noattachment":false,"key":"/mutable-proxy/-/mutable-proxy-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/mutable-proxy/download/mutable-proxy-0.1.3.tgz"},"maintainers":[{"name":"griffingj","email":"Griffingj@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/mutable-proxy-0.1.3.tgz_1474184715410_0.541520829545334"},"directories":{},"publish_time":1474184717302,"_hasShrinkwrap":false,"_cnpm_publish_time":1474184717302,"_cnpmcore_publish_time":"2021-12-16T13:36:09.029Z"},"0.1.2":{"name":"mutable-proxy","version":"0.1.2","description":"A library for creating mutable proxies","main":"build/index.js","repository":{"type":"git","url":"git+https://github.com/Griffingj/mutable-proxy.git"},"scripts":{"test":"lab","start":"babel-node src/example/readme.js","lint":"eslint src","test-cov":"lab --coverage","report-cov":"lab --coverage -r lcov | codeclimate-test-reporter","prepublish":"npm run build","build":"babel src --out-dir build","validate":"npm ls"},"engines":{"node":"6.X.X","npm":"3.X.X"},"author":{"name":"John Griffing"},"license":"MIT","devDependencies":{"babel-cli":"^6.8.0","babel-core":"^6.8.0","babel-eslint":"^6.0.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-2":"^6.5.0","babel-register":"^6.14.0","codeclimate-test-reporter":"^0.3.3","eslint":"^2.7.0","eslint-config-airbnb":"^8.0.0","eslint-plugin-import":"^1.7.0","eslint-plugin-jsx-a11y":"^1.0.4","eslint-plugin-react":"^5.0.1","expect":"^1.20.2","git-validate":"^2.2.1","lab":"^11.0.1"},"pre-commit":["test","lint","validate"],"gitHead":"63f293d1fd4b3c866032ffa7e8db06d4ce498aa4","bugs":{"url":"https://github.com/Griffingj/mutable-proxy/issues"},"homepage":"https://github.com/Griffingj/mutable-proxy#readme","_id":"mutable-proxy@0.1.2","_shasum":"86de03e62ef6c68b6ef82765a81cd59dd345948f","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"griffingj","email":"Griffingj@gmail.com"},"dist":{"shasum":"86de03e62ef6c68b6ef82765a81cd59dd345948f","size":5342,"noattachment":false,"key":"/mutable-proxy/-/mutable-proxy-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/mutable-proxy/download/mutable-proxy-0.1.2.tgz"},"maintainers":[{"name":"griffingj","email":"Griffingj@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/mutable-proxy-0.1.2.tgz_1474184332980_0.7351432857103646"},"directories":{},"publish_time":1474184334723,"_hasShrinkwrap":false,"_cnpm_publish_time":1474184334723,"_cnpmcore_publish_time":"2021-12-16T13:36:09.390Z"}},"readme":"# MutableProxy\n\n[![Travis-Ci](https://travis-ci.org/Griffingj/mutable-proxy.svg?branch=master)](https://travis-ci.org/Griffingj/mutable-proxy.svg?branch=master)\n[![Code Climate](https://codeclimate.com/github/Griffingj/mutable-proxy/badges/gpa.svg)](https://codeclimate.com/github/Griffingj/mutable-proxy)\n[![Test Coverage](https://codeclimate.com/github/Griffingj/mutable-proxy/badges/coverage.svg)](https://codeclimate.com/github/Griffingj/mutable-proxy/coverage)\n## Basic Usage\n\nThe factory returns a controller object with functions to affect the mutable state of the proxy\n\n```javascript\nconst {\n  setTarget,\n  setHandler,\n  proxy\n} = mutableProxyFactory();\n```\n\nSet a simple object as target for the proxy\n\n```javascript\nsetTarget({ a: 'apple' });\nconsole.log(proxy.a); // => 'apple'\nconsole.log(Object.getPrototypeOf(proxy) === Object.prototype); // => 'true'\n```\n\nSet an array as target for the proxy\n\n```javascript\nsetTarget(['a', 'b', 'c']);\nconsole.log(proxy[1]); // => 'b'\nconsole.log(Object.getPrototypeOf(proxy) === Array.prototype);// => 'true'\n```\n\nSet a function as target for the proxy\n\n```javascript\nsetTarget(() => 5);\nconsole.log(proxy()); // => '5'\nconsole.log(Object.getPrototypeOf(proxy) === Function.prototype); // => 'true'\n```\n\nSet an object with a custom prototype for the proxy\n\n```javascript\nclass Person {\n  constructor(name) {\n    this.name = name;\n  }\n  speak() {\n    return `hi, my name is ${this.name}`;\n  }\n}\n\nsetTarget(new Person('John'));\nconsole.log(proxy.speak()); // => 'hi, my name is John'\nconsole.log(Object.getPrototypeOf(proxy)); // => 'Person {}'\n```\n","_attachments":{},"homepage":"https://github.com/Griffingj/mutable-proxy#readme","bugs":{"url":"https://github.com/Griffingj/mutable-proxy/issues"},"license":"MIT"}