NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2592 most downloaded on npm
A tiny (194B) utility for safely writing deep Object values~!
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 4 weeks to 2.4 years
Most releases are documented
notes for 6 of 7 stable releases
5 versions withdrawn
withdrawn after publishing
9 years old
12 releases · first in 2018
Nothing published for this version
Add "types" export conditions for TypeScript "nodenext" / "node16" resolution: #40 Thank you @Akkuma
( dset/merge ): Prevent possible prototype pollution ( #34 ): 2d156c7 Thank you @n1ru4l ~!
One column per quarter.
(dset/merge): Add tests for "proto" key (#38): 845879b
Thank you @fortiZde~!
Correct README example errors (#30): 56923fe
Thank you @bgoscinski~!
Full Changelog: v3.1.1...v3.1.2
Use while loop ( #29 ): fa0f75c Thank you @rohit2sharma95 ~!
while loop (#29): fa0f75cFull Changelog: v3.1.0...v3.1.1
Added dset/merge submodule: 5aed5d1 , 8d0224d , 8ee6d12 This is an opt-in module, inspired by GraphQL's upcoming @stream and @defer directives . The p
Added dset/merge submodule: 5aed5d1, 8d0224d, 8ee6d12
This is an opt-in module, inspired by GraphQL's upcoming @stream and @defer directives.
The purpose of this submodule is to merge mutations from multiple sources into a single payload. It will merge new values into existing/previous values, whereas dset (main mode) will replace values at the specified key-path outright. In code, this difference roughly translates to this distinction:
// dset (main)
target.key = { value: 'new value' };
// dset/merge
Object.assign(target.key, { value: 'new value' })See Merging and
test/suites/objects.jsfor more information.
Overwrites existing, non-object values as needed: 569955d Now dset is inline with lodash/set and set-value behaviors
Overwrites existing, non-object values as needed: 569955d
Now dset is inline with lodash/set and set-value behaviors
let input = { foo: 123 };
dset(input, 'foo.bar', 456);
console.log(input);
//=> (Before) { foo: 123 } -- no change
//=> (After) { foo: { bar: 456 } } -- convert "foo" to objectUse named dset export instead of default export: 7ac17ed
-import dset from 'dset';
+import { dset } from 'dset';Exit loop when unsafe key(s) encountered (#22): 0a11c8a
Previously, as of v2.1.0, dset skipped over the offending key, but continued processing those after it.
Now dset matches the lodash/set behavior, abandoning the current dset() execution entirely.
"exports" map for native ESM support: fa7ab74number type (#12): 5b09e52dset(input, ['foo', 1], 123) failed because 1 was a number.['foo', 1] is treated the same as ['foo', '1'] and 'foo.1'Versions between 1.0.0 and 2.0.1 (inclusive) are now marked as deprecated. Thank you @arjunshibu ~!
__proto__, constructor, or prototype.1.0.0 and 2.0.1 (inclusive) are now marked as deprecated.NEW Write into or create new Arrays with numeric path segments ( #9 ): e6fea6f
NEW Write into or create new Arrays with numeric path segments (#9): e6fea6f
Thank you @bwendt-mylo 🎉
let qux = {};
dset(qux, 'a.0.b.0', 1);
dset(qux, 'a.0.b.1', 2);
//=> { a: [{ b: [1, 2] }] }Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →