npm.io
1.0.7 • Published 5 years ago

objrmprop

Licence
MIT
Version
1.0.7
Deps
0
Size
2 kB
Vulns
0
Weekly
0

About

Use this module to create a new object by removing properties from an existing object.

E.g:

const user = {name: "Mohammed MT", title: "SSE", skills: "nodejs"};

const newUser = objrmprop(user, ["title", "skills"]); // Results {name: "Mohammed MT"}

OR

const newUser = objrmprop(user, "title skills"); // Results {name: "Mohammed MT"}

Usage

const objrmprop = require("objrmprop");

// Using Array:

const newUser = objrmprop(user, ["title", "skills"]);

// Using String:

const newUser = objrmprop(user, "title skills");

License

MIT

Keywords