UNPKG

274 BJavaScriptView Raw
1/**
2 * @name objectClear
3 * @summary Removes all the keys from the input object
4 */
5export function objectClear(value) {
6 const keys = Object.keys(value);
7 for (let i = 0, count = keys.length; i < count; i++) {
8 delete value[keys[i]];
9 }
10 return value;
11}