delete-object-property
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

🗑️ Delete Object Property

GitHub Workflow Status npm GitHub

Small utility to remove a property from a complex object using strings. Several other packages already exist for this purpose, but I wanted my own :)

⬇️ Installation

npm i delete-object-property

📋 Usage

Works with both objects and arrays.

const object = {
  foo: 'bar',
  bar: {
    baz: 'lorem ipsum',
  },
};

const result = deleteProperties(object, 'bar.baz');

// This will output { foo: 'bar' }
console.log(result);

🔭 Plans

Not much yet

Readme

Keywords

none

Package Sidebar

Install

npm i delete-object-property

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

43.5 kB

Total Files

9

Last publish

Collaborators

  • survivorbat