prime-util
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -12,5 +12,5 @@ "use strict"; | ||
result = get(source, parts) | ||
return result == undefined ? null : result | ||
return result === undefined ? null : result | ||
} | ||
module.exports = fromPath |
{ | ||
"name": "prime-util", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Extra Utilities using Prime", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "make test" | ||
"lint": "jshint .", | ||
"mocha": "mocha --reporter spec test/**/*", | ||
"test": "npm run lint && npm run mocha" | ||
}, | ||
@@ -16,10 +18,10 @@ "author": "Arian Stolwijk", | ||
"dependencies": { | ||
"prime": "~0.4.0", | ||
"mout": "~0.9.0" | ||
"mout": "^0.10.0", | ||
"prime": "~0.4.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "1.12", | ||
"expect.js": "0.2", | ||
"jshint": "2.1" | ||
"jshint": "^2.5.5", | ||
"mocha": "^1.21.4" | ||
} | ||
} |
@@ -108,10 +108,2 @@ Prime-Util | ||
### array/last | ||
Returns the last value of the array. | ||
```js | ||
last([1, 2, 3]) // 3 | ||
``` | ||
### array/include | ||
@@ -145,9 +137,15 @@ | ||
### object/merge | ||
### object/fromPath | ||
Merges different objects into one object. | ||
Returns the value from an object by its path | ||
```js | ||
var merge = require('prime-util/object/merge') | ||
merge({a: 1}, {a: 2, b: 3}, {c: 4}) // {a: 2, b: 3, c: 4} | ||
fromPath({ | ||
food: { | ||
fruits: { | ||
apples: "red", | ||
lemon: "yellow" | ||
} | ||
} | ||
}, 'food.fruits.apples') // 'red' | ||
``` | ||
@@ -157,3 +155,3 @@ | ||
The following modules have been removed: | ||
* prime/mixin | ||
* prime/mixin - use `mixin` property of prime | ||
* array/clean - use (mout/array/compact) | ||
@@ -166,2 +164,2 @@ * array/invoke - use (mout/array/invoke) | ||
* array/find - use (mout/array/find) | ||
* object/merge - use (mout/array/merge) | ||
* object/merge - use (mout/array/merge) |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
12605
22
274
162
+ Addedmout@0.10.0(transitive)
Updatedmout@^0.10.0