diff options
Diffstat (limited to 'deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md')
-rw-r--r-- | deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md index 3e709e3bd9..b934048235 100644 --- a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md +++ b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md @@ -4,7 +4,7 @@ An sensible alternative to `Object.defineProperty()`. Available in npm and Ender ## Usage -Set the property `'foo'` (`obj.foo`) to have the value `'bar'` with default options (*enumerable, configurable and writable are all false*): +Set the property `'foo'` (`obj.foo`) to have the value `'bar'` with default options (`'enumerable'`, `'configurable'` and `'writable'` are all `false`): ```js prr(obj, 'foo', 'bar') @@ -24,7 +24,9 @@ prr(obj, { one: 'one', two: 'two' }) prr(obj, { one: 'one', two: 'two' }, { enumerable: true, writable: true }) ``` -But obviously, having to write out the full options object makes it nearly as bad as the original `Object.defineProperty()` so we can **simplify**. +### Simplify! + +But obviously, having to write out the full options object makes it nearly as bad as the original `Object.defineProperty()` so we can simplify. As an alternative method we can use an options string where each character represents a option: `'e'=='enumerable'`, `'c'=='configurable'` and `'w'=='writable'`: @@ -42,4 +44,4 @@ Anywhere! For pre-ES5 environments *prr* will simply fall-back to an `object[pro ## Licence -prr 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.
\ No newline at end of file +prr 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. |