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

pd

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pd - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

package.json
{
"name": "pd",
"version": "0.3.0",
"version": "0.3.1",
"description": "Manage propertyDescriptors, an OO utility",

@@ -5,0 +5,0 @@ "keywords": ["oo", "oop", "propertydescriptor", "arch", "utility"],

@@ -10,3 +10,3 @@ # pd <a name="_pd" href="#_pd"><small><sup>link</sup></small></a>

var o = Object.create(somePrototype, pd({
"someProp": "someValue"
"someProp": "someValue",
get someGetter() {

@@ -28,3 +28,3 @@

More coming soon!
[OO utilities][7]

@@ -121,4 +121,6 @@ ## Documentation <a name="Documentation" href="#Documentation"><small><sup>link</sup></small></a>

- Object.getOwnPropertyDescriptors (same as pd)
- Object.prototype.new (same as pd.new)
- Object.beget (same as pd.beget)
- Object.prototype.beget (same as pd.beget)
- Object.make (same as pd.make)
- Object.Name (same as pd.Name)

@@ -139,2 +141,3 @@ An example of `.new` which only takes arguments

[5]: http://raynos.org/blog/5/Doing-Object-Oriented-Javascript---part-2
[6]: http://raynos.org/blog/7/Doing-Object-Oriented-Javascript---part-3
[6]: http://raynos.org/blog/7/Doing-Object-Oriented-Javascript---part-3
[7]: https://gist.github.com/1352801

@@ -114,8 +114,14 @@ !(function (exports) {

@param Object proto - the prototype to inherit from
@param Object props - properties to extend the new object with
@arguments Array [proto, ...] - the rest of the arguments will
be mixed into the object, i.e. the object will be extend
with the objects
@return Object - the new object
*/
function make (proto, props) {
return Object.create(proto, pd(props));
function make (proto) {
var o = Object.create(proto);
var args = [].slice.call(arguments, 1);
args.unshift(o);
extend.apply(null, args);
return o;
}

@@ -122,0 +128,0 @@

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