lzo-prop-string
v1.1.0
Published
Accesses the object's properties via string.
Downloads
50
Maintainers
Readme
LZO: Prop String
Accesses and Updates the object's properties via string.
Installation
npm install lzo-prop-string OR yarn add lzo-prop-string
Usage
import { PropString } from 'lzo-prop-string';
PropString.execute('test.name', { test: { name: 'Lack-Zillions-Over' } }); // Lack-Zillions-Over
PropString.execute('test.name', { test: { name: 'John Doe' } }, 'GuilhermeSanto001'); // GuilhermeSantos001
API
PropString.execute<T, R>(text: string, object: T): R
Get value of property in object by string
PropString.execute<T, R>(text: string, object: T, update: R): R
Update value of property in object by string
Backers & Sponsors
Support this project by becoming a sponsor.
License
Licensed under the MIT. See the LICENSE file for details.