keyarray-set
Advanced tools
Comparing version 0.1.0 to 1.0.0
{ | ||
"name": "keyarray-set", | ||
"description": "set nested properties with key arrays", | ||
"version": "0.1.0", | ||
"author": { | ||
"name": "Kyle E. Mitchell", | ||
"email": "kyle@kemitchell.com", | ||
"url": "http://kemitchell.com/" | ||
}, | ||
"bugs": "https://github.com/kemitchell/keyarray-set.js/issues", | ||
"version": "1.0.0", | ||
"author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)", | ||
"files": [ | ||
"files.js" | ||
], | ||
"dependencies": { | ||
@@ -15,8 +13,6 @@ "keyarray-get": "0.1.x" | ||
"devDependencies": { | ||
"check-versions": "^1.0.0", | ||
"jscs": "^1.12.0", | ||
"jshint": "^2.7.0", | ||
"literate-assertions": "^0.1.0" | ||
"defence-cli": "^2.0.0", | ||
"replace-require-self": "^1.1.1", | ||
"standard": "^8.0.0" | ||
}, | ||
"homepage": "https://github.com/kemitchell/keyarray-set.js", | ||
"keywords": [ | ||
@@ -31,15 +27,8 @@ "arrays", | ||
], | ||
"license": "Apache-2.0", | ||
"main": "keyarray-set.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/kemitchell/keyarray-set.js.git" | ||
}, | ||
"license": "MIT", | ||
"repository": "kemitchell/keyarray-set.js", | ||
"scripts": { | ||
"check": "check-versions --check-module", | ||
"lint": "jshint keyarray-set.js && jscs keyarray-set.js", | ||
"pre-commit": "npm run check && npm run lint && npm run test", | ||
"test": "literate-assertions < README.md | sed 's!keyarray-set!./!g' | node", | ||
"travis-ci": "npm run pre-commit" | ||
"test": "defence -i javascript README.md | replace-require-self | node", | ||
"lint": "standard" | ||
} | ||
} |
@@ -1,14 +0,5 @@ | ||
keyarray-set.js | ||
=============== | ||
[![NPM version](https://img.shields.io/npm/v/keyarray-set.svg)](https://www.npmjs.com/package/keyarray-set) | ||
[![build status](https://img.shields.io/travis/kemitchell/keyarray-set.js.svg)](http://travis-ci.org/kemitchell/keyarray-set.js) | ||
Set nested properties with key arrays. | ||
```javascript | ||
var set = require('keyarray-set'); | ||
var set = require('keyarray-set') | ||
var assert = require('assert') | ||
typeof set; // === 'function' | ||
var anObject = { | ||
@@ -18,11 +9,13 @@ a: { | ||
} | ||
}; | ||
} | ||
set(anObject, ['a', 'b', 'c'], 'new value'); // === 'new value' | ||
assert(set(anObject, ['a', 'b', 'c'], 'new value') === 'new value') | ||
anObject.a.b.hasOwnProperty('c'); // === true | ||
assert(anObject.a.b.hasOwnProperty('c') === true) | ||
anObject.a.b.c; // === 'new value' | ||
assert(anObject.a.b.c === 'new value') | ||
set(anObject, ['nonexistent', 'key'], 'another value'); // throws TypeError | ||
assert.throws(function () { | ||
set(anObject, ['nonexistent', 'key'], 'another value') | ||
}, TypeError) | ||
``` |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license
Found 1 instance in 1 package
3
0
100
0
2158
3
0
1
21
1