0.1.0 • Published 2 years ago
nullify-object-values-shallow-inplace v0.1.0
nullify-object-values-shallow-inplace
Replace all values in an object with null. Can be useful to help garbage collection while still shadowing same-named prototype keys.
API
This module exports one function:
nullifyObjectValuesShallowInplace(obj)
Assigns null
to each enumerable own key of obj
, then returns obj
.
Usage
see test/usage.mjs.
Known issues
- Needs more/better tests and docs.
License
ISC
0.1.0
2 years ago