Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prr

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prr - npm Package Compare versions

Comparing version 0.0.0 to 1.0.0

47

package.json
{
"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"
}
"name": "prr",
"description": "A better Object.defineProperty()",
"version": "1.0.0",
"homepage": "https://github.com/rvagg/prr",
"author": "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"
}

@@ -7,3 +7,3 @@ # prr [![Build Status](https://secure.travis-ci.org/rvagg/prr.png)](http://travis-ci.org/rvagg/prr)

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`):

@@ -28,4 +28,6 @@ ```js

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'`:

@@ -32,0 +34,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc