1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.objectClear = objectClear;
|
7 |
|
8 | // Copyright 2017-2022 @polkadot/util authors & contributors
|
9 | // SPDX-License-Identifier: Apache-2.0
|
10 |
|
11 | /**
|
12 | * @name objectClear
|
13 | * @summary Removes all the keys from the input object
|
14 | */
|
15 | function objectClear(value) {
|
16 | const keys = Object.keys(value);
|
17 |
|
18 | for (let i = 0; i < keys.length; i++) {
|
19 | delete value[keys[i]];
|
20 | }
|
21 |
|
22 | return value;
|
23 | } |
\ | No newline at end of file |