Skip to content

Lack-Zillions-Over/prop-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.