![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
nested-props
Advanced tools
This package is an utils to help you define nested properties and values deep inside a javascript object. See example below.
npm install nested-props --save
var nested = require('nested-props')
var obj = {
coordinates: [{
value: [11, 22]
}, {
value: [33, 44, 55]
}]
}
nested.set(obj, 'user.name', 'username')
nested.set(obj, 'user.id', '666')
nested.set(obj, 'user.info.city', 'paris')
nested.set(obj, 'user.info.country', 'france')
/*
{ coordinates: [ { value: [Object] }, { value: [Object] } ],
user:
{ name: 'username',
id: '666',
info: { city: 'paris', country: 'france' } } }
*/
nested.set(obj, 'user.id.value', '666')
/*
{ coordinates: [ { value: [Object] }, { value: [Object] } ],
user:
{ name: 'username',
id: { value: '666' },
info: { city: 'paris', country: 'france' } } }
*/
nested.set(obj, 'user.id.value', '777')
/*
{ coordinates: [ { value: [Object] }, { value: [Object] } ],
user:
{ name: 'username',
id: { value: '777' },
info: { city: 'paris', country: 'france' } } }
*/
var country = nested.get(obj, 'user.info.country')
/*
france
*/
/* use this method to prevent : TypeError: Cannot read property 'test' of undefined */
var undefinedTest = nested.get(obj, 'user.test.test')
/*
undefined
*/
var coordinate1 = nested.get(obj, 'coordinates[0].value')
/* [11, 22] */
var x2 = nested.get(obj, 'coordinates[1].value[0]')
/* 33 */
var y2 = nested.get(obj, 'coordinates[1].value[1]')
/* 44 */
var x3 = nested.get(obj, 'coordinates[2].value[0]')
/* null */
FAQs
Define nested properties value
The npm package nested-props receives a total of 1 weekly downloads. As such, nested-props popularity was classified as not popular.
We found that nested-props demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.