IOTConnect-Web/node_modules/ext/docs/object/clear.md
2024-05-09 09:49:52 +08:00

232 B

Object.clear (ext/object/clear)

Deletes all own, enumerable, non-symbol properties in the object

const clear = require("ext/object/clear");

const obj = { foo: "bar" };

clear(obj);
Object.keys(obj); // []