1.1.0 • Published 7 years ago

set-prop-get-value v1.1.0

Weekly downloads
182
License
ISC
Repository
github
Last release
7 years ago

set-prop-get-value

set a new property in a js object and return the value of the given property

Build StatusCode Coverage 100%ISC LicenseNodeJS

JavaScript Style Guide

api

const setProp = require('set-prop-get-value')

setProp(object, prop_name, prop_value)

example

const setProp = require('set-prop-get-value')

let someObject = {}

setProp(someObject, 'hello', 'world')
// should return `world`
// and now `someObject` should have the new prop `hello: 'world'`

ISC License (ISC)