New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

describe-property

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

describe-property - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.npmignore

2

package.json
{
"name": "describe-property",
"version": "1.0.0",
"version": "1.0.1",
"description": "Define JavaScript object properties quickly with ES5 defaults",

@@ -5,0 +5,0 @@ "main": "modules/describeProperty.js",

@@ -19,3 +19,8 @@ [![npm package](https://img.shields.io/npm/v/describe-property.svg?style=flat-square)](https://www.npmjs.org/package/describe-property)

Object.defineProperties(Person.prototype, {
// Methods can be passed directly.
sayHi: d(function () {
console.log('Hello, my name is', this.fullName);
}),
// Getters are defined using d.gs.

@@ -31,7 +36,2 @@ fullName: d.gs(function () {

this._firstName = value.trim();
}),
// Methods can be passed directly.
sayHi: d(function () {
console.log('Hello, my name is', this.fullName);
})

@@ -42,2 +42,23 @@

By default property descriptors use ES5 attributes.
```js
{
configurable: true,
enumerable: false,
writable: true
}
```
But any of these can be overridden using an object literal.
```js
d({
enumerable: true,
value: function () {
// ...
}
}); // => { configurable: true, enumerable: true, writable: true, value: function () {} }
```
### Installation

@@ -62,3 +83,3 @@

This library was inspired by @medikoo's excellent [d](https://github.com/medikoo/d) library. It is intended to be a lighter-weight alternative with fewer features, but also only a single dependency.
This library was inspired by [@medikoo](https://github.com/medikoo)'s excellent [d](https://github.com/medikoo/d) library. It is intended to be a lighter-weight alternative with fewer features, but also only a single dependency.

@@ -65,0 +86,0 @@ ### License

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