motion
Version:
motion - moving development forward
62 lines (61 loc) • 3.24 kB
JSON
{
"_args": [
[
"prr@https://registry.npmjs.org/prr/-/prr-0.0.0.tgz",
"/Users/nw/flint/packages/flint"
]
],
"_from": "prr@>=0.0.0 <0.1.0",
"_id": "prr@0.0.0",
"_inCache": true,
"_location": "/prr",
"_phantomChildren": {},
"_requested": {
"name": "prr",
"raw": "prr@https://registry.npmjs.org/prr/-/prr-0.0.0.tgz",
"rawSpec": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz",
"type": "remote"
},
"_requiredBy": [
"/errno"
],
"_resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz",
"_shasum": "1a84b85908325501411853d0081ee3fa86e2926a",
"_shrinkwrap": null,
"_spec": "prr@https://registry.npmjs.org/prr/-/prr-0.0.0.tgz",
"_where": "/Users/nw/flint/packages/flint",
"authors": [
"Rod Vagg <rod@vagg.org> (https://github.com/rvagg)"
],
"bugs": {
"url": "https://github.com/rvagg/prr/issues"
},
"dependencies": {},
"description": "A better Object.defineProperty()",
"devDependencies": {
"tap": "*"
},
"homepage": "https://github.com/rvagg/prr",
"keywords": [
"defineProperty",
"ender",
"properties",
"property"
],
"license": "MIT",
"main": "./prr.js",
"name": "prr",
"optionalDependencies": {},
"readme": "# prr [](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\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 file for more details.",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/rvagg/prr.git"
},
"scripts": {
"test": "node ./test.js"
},
"version": "0.0.0"
}