Comparing version 0.3.0 to 0.3.1
{ | ||
"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 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
12738
253
139
0