remove-anything 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,6 +49,17 @@ removeProps(payload, {}, [])
|
|
|
49
49
|
// { a: 1, b: undefined }
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
### In-Place Mutation
|
|
53
|
+
|
|
54
|
+
Use `removePropInPlace` to mutate the original object instead of creating a new one:
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
const payload = { a: 1, b: undefined, c: {} }
|
|
58
|
+
removePropInPlace(payload, undefined, {})
|
|
59
|
+
|
|
60
|
+
// payload is now mutated to: { a: 1 }
|
|
61
|
+
```
|
|
62
|
+
|
|
52
63
|
## Meet the family (more tiny utils with TS support)
|
|
53
64
|
|
|
54
65
|
- [is-what 🙉](https://github.com/mesqueeb/is-what)
|