1.1.0 • Published 9 months ago

lzo-prop-string v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

LZO: Prop String

Accesses and Updates the object's properties via string.

Sponsor Commitizen friendly TypeScript version Node.js version MIT Build Status - GitHub Actions

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.