3.0.0 • Published 5 months ago

property-helpers v3.0.0

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

Property Helpers

Simple helper functions for working with properties

GitHub npm

Support Server


Description

Property Helpers is a collection of helper functions for working with properties in objects and arrays.

Features

  • Written in TypeScript
  • Offers CommonJS, ESM, and UMD bundles
  • Fully tested
  • Extremely fast

Installation

# npm
npm install property-helpers
# yarn
yarn add property-helpers

Documentation

deleteProperty

A helper function to delete a property from an object or array at a path.

export function deleteProperty<T>(input: unknown, path: string[]): T;

getProperty

A helper function to get a property from an object or array at a path.

export function getProperty<T>(input: unknown, path: string[]): T | typeof PROPERTY_NOT_FOUND;

hasProperty

A helper function to check if an object or array has a property at a path.

export function hasProperty(input: unknown, path: string[]): boolean;

setProperty

A helper function to set a property on an object or array at a path.

export function setProperty<T>(input: unknown, path: string[], value: unknown): T;

3.0.1-next.e861bf0

6 months ago

3.0.1-next.e525003

7 months ago

3.0.1-next.2fbaaf5

6 months ago

3.0.1-next.ff86aa5

6 months ago

3.0.1-next.4921229

5 months ago

3.0.1-next.26aae7d

8 months ago

3.0.1-next.23eae87

5 months ago

3.0.1-next.c99cf5d

7 months ago

3.0.1-next.739a9a1

9 months ago

3.0.1-next.0ce0a4d

8 months ago

3.0.1-next.facdaec

8 months ago

3.0.1-next.2d626af

8 months ago

3.0.1-next.73f6ba7

7 months ago

3.0.1-next.85bb7c1

5 months ago

3.0.1-next.570f264

9 months ago

3.0.1-next.08e13d6

9 months ago

3.0.1-next.5c7c298

10 months ago

3.0.1-next.9ff2d33

10 months ago

3.0.1-next.f663e20

10 months ago

3.0.1-next.14143e5

10 months ago

3.0.1-next.d6709fe

11 months ago

3.0.1-next.c9067b4

10 months ago

3.0.1-next.8e377e5

11 months ago

3.0.1-next.40aa9a6

11 months ago

3.0.1-next.69b946d

12 months ago

3.0.1-next.c58da6b

12 months ago

3.0.0

1 year ago

3.0.1-next.f4dc872

11 months ago

3.0.1-next.8204c1f

11 months ago

3.0.1-next.a040376

11 months ago

3.0.1-next.cb9f345

12 months ago

3.0.1-next.1ff348c

12 months ago

3.0.1-next.5f85b44

12 months ago

3.0.1-next.0234fe2

12 months ago

2.0.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago