{"_id":"prr","_rev":"10-f1f394b267df5582fc35680250876b92","name":"prr","description":"A better Object.defineProperty()","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.0":{"name":"prr","description":"A better Object.defineProperty()","version":"0.0.0","homepage":"https://github.com/rvagg/prr","authors":["Rod Vagg <rod@vagg.org> (https://github.com/rvagg)"],"keywords":["property","properties","defineProperty","ender"],"main":"./prr.js","repository":{"type":"git","url":"https://github.com/rvagg/prr.git"},"dependencies":{},"devDependencies":{"tap":"*"},"scripts":{"test":"node ./test.js"},"license":"MIT","_id":"prr@0.0.0","dist":{"shasum":"1a84b85908325501411853d0081ee3fa86e2926a","tarball":"https://registry.npmjs.org/prr/-/prr-0.0.0.tgz","integrity":"sha512-LmUECmrW7RVj6mDWKjTXfKug7TFGdiz9P18HMcO4RHL+RW7MCOGNvpj5j47Rnp6ne6r4fZ2VzyUWEpKbg+tsjQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTUcNoJomh7x8NXsr4hXZypHvb+Fee+/TyGzVGZROLcAIgZOnmPv28RP8KhZjWr3cn8sPdovH5fYNYL0tHcfGOlLo="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"rvagg","email":"rod@vagg.org"},"maintainers":[{"name":"rvagg","email":"rod@vagg.org"}]},"1.0.0":{"name":"prr","description":"A better Object.defineProperty()","version":"1.0.0","homepage":"https://github.com/rvagg/prr","author":{"name":"Rod Vagg","email":"rod@vagg.org","url":"https://github.com/rvagg"},"keywords":["property","properties","defineProperty","ender"],"main":"./prr.js","repository":{"type":"git","url":"https://github.com/rvagg/prr.git"},"dependencies":{},"devDependencies":{"tap":"*"},"scripts":{"test":"node ./test.js"},"license":"MIT","gitHead":"1e29e003b01b3ce877c2b81f2dd0b102a789aa06","bugs":{"url":"https://github.com/rvagg/prr/issues"},"_id":"prr@1.0.0","_shasum":"1301fbed1f9f92414e988eda0c0afdb85ae9d402","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"rvagg","email":"rod@vagg.org"},"maintainers":[{"name":"rvagg","email":"rod@vagg.org"}],"dist":{"shasum":"1301fbed1f9f92414e988eda0c0afdb85ae9d402","tarball":"https://registry.npmjs.org/prr/-/prr-1.0.0.tgz","integrity":"sha512-8XvHqs4VpzqJegAw0ca2VxYFiSliuIeSiLApNMtjLHBclcu6r5ykDu7xGpxoFiZBI9xNjHn9A6uiMQeuRtcfmQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCW0+YAwqwc8UH316hj03QbJhWzd5j+TqM2m1jUh2iZQgIhAIn+kR9qegRdbaAgU96T7k5Tef/5wao+nvFS0rp+z7QR"}]}},"1.0.1":{"name":"prr","description":"A better Object.defineProperty()","version":"1.0.1","homepage":"https://github.com/rvagg/prr","author":{"name":"Rod Vagg","email":"rod@vagg.org","url":"https://github.com/rvagg"},"keywords":["property","properties","defineProperty","ender"],"main":"./prr.js","repository":{"type":"git","url":"https://github.com/rvagg/prr.git"},"dependencies":{},"devDependencies":{"tap":"*"},"scripts":{"test":"node ./test.js"},"license":"MIT","gitHead":"b69ba0edc7aacbda0c98d550579e452b8597c126","bugs":{"url":"https://github.com/rvagg/prr/issues"},"_id":"prr@1.0.1","_shasum":"d3fc114ba06995a45ec6893f484ceb1d78f5f476","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"rvagg","email":"rod@vagg.org"},"maintainers":[{"name":"rvagg","email":"rod@vagg.org"}],"dist":{"shasum":"d3fc114ba06995a45ec6893f484ceb1d78f5f476","tarball":"https://registry.npmjs.org/prr/-/prr-1.0.1.tgz","integrity":"sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwFKvtCIb1zZN6ZZWPc+iS4feAWt0MZ0AzJeiQUWa6nQIhAKTuz95OaUQOLAw7e03MH8MBRyvARWbnOeKoU8BMa4Ef"}]}}},"readme":"# prr [![Build Status](https://secure.travis-ci.org/rvagg/prr.png)](http://travis-ci.org/rvagg/prr)\n\nAn sensible alternative to `Object.defineProperty()`. Available in npm and Ender as **prr**.\n\n## Usage\n\nSet the property `'foo'` (`obj.foo`) to have the value `'bar'` with default options (`'enumerable'`, `'configurable'` and `'writable'` are all `false`):\n\n```js\nprr(obj, 'foo', 'bar')\n```\n\nAdjust the default options:\n\n```js\nprr(obj, 'foo', 'bar', { enumerable: true, writable: true })\n```\n\nDo the same operation for multiple properties:\n\n```js\nprr(obj, { one: 'one', two: 'two' })\n// or with options:\nprr(obj, { one: 'one', two: 'two' }, { enumerable: true, writable: true })\n```\n\n### Simplify!\n\nBut obviously, having to write out the full options object makes it nearly as bad as the original `Object.defineProperty()` so we can simplify.\n\nAs an alternative method we can use an options string where each character represents a option: `'e'=='enumerable'`, `'c'=='configurable'` and `'w'=='writable'`:\n\n```js\nprr(obj, 'foo', 'bar', 'ew') // enumerable and writable but not configurable\n// muliple properties:\nprr(obj, { one: 'one', two: 'two' }, 'ewc') // configurable too\n```\n\n## Where can I use it?\n\nAnywhere! For pre-ES5 environments *prr* will simply fall-back to an `object[property] = value` so you can get close to what you want.\n\n*prr* is Ender-compatible so you can include it in your Ender build and `$.prr(...)` or `var prr = require('prr'); prr(...)`.\n\n## Licence\n\nprr is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.\n","maintainers":[{"name":"rvagg","email":"rod@vagg.org"}],"time":{"modified":"2022-06-24T22:15:45.096Z","created":"2013-04-01T17:21:27.562Z","0.0.0":"2013-04-01T17:21:30.886Z","1.0.0":"2014-06-29T07:19:44.640Z","1.0.1":"2014-07-22T06:50:49.598Z"},"repository":{"type":"git","url":"https://github.com/rvagg/prr.git"},"homepage":"https://github.com/rvagg/prr","keywords":["property","properties","defineProperty","ender"],"author":{"name":"Rod Vagg","email":"rod@vagg.org","url":"https://github.com/rvagg"},"bugs":{"url":"https://github.com/rvagg/prr/issues"},"license":"MIT","readmeFilename":"README.md","users":{"tungv":true}}