Comparing version 0.1.3 to 0.1.4
@@ -6,2 +6,6 @@ /** | ||
module.exports = function(target) { | ||
// ensure we have a target | ||
target = target || {}; | ||
// iterate through the sources and copy to the target | ||
[].slice.call(arguments, 1).forEach(function(source) { | ||
@@ -8,0 +12,0 @@ if (! source) return; |
@@ -6,3 +6,3 @@ { | ||
"tags": [], | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"dependencies": {}, | ||
@@ -9,0 +9,0 @@ "devDependencies": { |
# cog | ||
[![browser support](https://ci.testling.com/DamonOehlman/cog.png)](https://ci.testling.com/DamonOehlman/cog) | ||
[![browser support](https://ci.testling.com/DamonOehlman/cog.png)](https://ci.testling.com/DamonOehlman/cog) | ||
### querySelectorAll | ||
```js | ||
var qsa = require('cog/qsa'); | ||
// find all the divs with class status | ||
qsa('div.status'); | ||
``` | ||
### extend | ||
```js | ||
var extend = require('cog/extend'); | ||
// shallow extend an object as per jQuery, underscore, etc | ||
var test = extend({}, { a : 5 }, { b : 7 }); | ||
``` |
@@ -6,5 +6,6 @@ var test = require('tape'), | ||
t.plan(2); | ||
t.plan(3); | ||
t.equal(defaults({}, { a: true }).a, true, 'Property a copied across'); | ||
t.equal(defaults({ a: 1 }, { a: 2 }).a, 1, 'Property value not overriden'); | ||
t.equal(defaults(undefined, { a: true }).a, true, 'Property pushed to new object'); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17711
379
21