UNPKG

yapm

Version:

package manager for io.js (npm fork)

33 lines (29 loc) 591 B
input: | { "name": "test", "version": "0.0.0", "dependencies": { "foobar": "*", "bazquux": ">= 1.1.1" }, "license": "BSD-2-Clause" } output: | { "name": "test", "version": "0.0.0", "dependencies": { "foobar": "*", "bazquux": ">= 1.1.1", "whatever": "1.2.x", "qwerty": "1" }, "license": "BSD-2-Clause" } test: !!js/function | function(jju, input) { obj = jju.parse(input) obj.dependencies.whatever = '1.2.x' obj.dependencies.qwerty = '1' return jju.update(input, obj, {mode:'json'}) }