Package Exports
- js-remove-property
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (js-remove-property) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
js-remove-property
Remove specific properties from a JavaScript object.
How to use
var removeProp = require('js-remove-property');
var test = {
name: 'hoge',
val: 32,
obj : {
name: 'hoge',
},
complex: {
arry: [
'hoge',
'foo',
{
name: 'hoge',
value: 1
}
]
}
};
removeProp('name', test); // remove 'name' properties
console.log(test);
result is.. -->
{
"val": 32,
"arry": ["hoge", "foo"],
"obj": {},
"nested_obj": {
"value": 1,
"obj": {
"value": 1
}
},
"complex": {
"arry": ["hoge", "foo", {
"value": 1
}]
}
}