You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-40Lines changed: 41 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# set-value [](https://paypal.me/jonathanschlinkert?locale.x=en_US)[](https://www.npmjs.com/package/set-value)[](https://npmjs.org/package/set-value)[](https://npmjs.org/package/set-value)
1
+
# set-value [](https://www.npmjs.com/package/set-value)[](https://npmjs.org/package/set-value)[](https://npmjs.org/package/set-value)[](https://github.com/jonschlinkert/set-value/actions/workflows/main.yml)
2
2
3
3
> Set nested properties on an object using dot notation.
4
4
@@ -122,46 +122,46 @@ Benchmarks were run on a MacBook Pro 2.5 GHz Intel Core i7, 16 GB 1600 MHz DDR3.
122
122
123
123
```
124
124
# deep (194 bytes)
125
-
deep-object x 879,975 ops/sec ±0.85% (94 runs sampled)
126
-
deep-property x 1,746,617 ops/sec ±0.59% (96 runs sampled)
127
-
deephas x 792,449 ops/sec ±0.61% (94 runs sampled)
128
-
dot-prop x 1,258,403 ops/sec ±0.81% (93 runs sampled)
129
-
dot2val x 2,096,518 ops/sec ±0.71% (94 runs sampled)
130
-
es5-dot-prop x 1,627,431 ops/sec ±0.57% (94 runs sampled)
131
-
lodash-set x 1,100,116 ops/sec ±0.80% (94 runs sampled)
132
-
object-path-set x 1,292,062 ops/sec ±0.56% (91 runs sampled)
133
-
object-set x 276,868 ops/sec ±0.60% (92 runs sampled)
134
-
set-value x 2,587,076 ops/sec ±0.47% (92 runs sampled)
135
-
136
-
fastest is set-value(by 210% avg)
125
+
deep-object x 823,287 ops/sec ±1.00% (90 runs sampled)
126
+
deep-property x 1,787,990 ops/sec ±0.82% (92 runs sampled)
127
+
deephas x 840,700 ops/sec ±0.95% (93 runs sampled)
128
+
dot-prop x 1,249,663 ops/sec ±0.89% (90 runs sampled)
129
+
dot2val x 2,067,212 ops/sec ±1.08% (91 runs sampled)
130
+
es5-dot-prop x 1,668,806 ops/sec ±0.92% (92 runs sampled)
131
+
lodash-set x 1,286,725 ops/sec ±0.82% (90 runs sampled)
132
+
object-path-set x 1,261,242 ops/sec ±1.63% (90 runs sampled)
133
+
object-set x 285,369 ops/sec ±0.91% (90 runs sampled)
134
+
set-value x 2,076,931 ops/sec ±0.86% (93 runs sampled)
135
+
136
+
fastest is set-value, dot2val (by 203% avg)
137
137
138
138
# medium (98 bytes)
139
-
deep-object x 5,823,296 ops/sec ±0.63% (92 runs sampled)
140
-
deep-property x 4,045,998 ops/sec ±0.69% (91 runs sampled)
141
-
deephas x 1,237,999 ops/sec ±0.56% (92 runs sampled)
142
-
dot-prop x 2,833,082 ops/sec ±0.82% (93 runs sampled)
143
-
dot2val x 4,669,511 ops/sec ±0.50% (94 runs sampled)
144
-
es5-dot-prop x 3,348,092 ops/sec ±0.71% (92 runs sampled)
145
-
lodash-set x 3,051,898 ops/sec ±0.61% (94 runs sampled)
146
-
object-path-set x 3,867,590 ops/sec ±0.48% (92 runs sampled)
147
-
object-set x 888,369 ops/sec ±0.52% (96 runs sampled)
148
-
set-value x 8,209,356 ops/sec ±0.68% (91 runs sampled)
149
-
150
-
fastest is set-value (by 248% avg)
139
+
deep-object x 5,811,161 ops/sec ±1.12% (90 runs sampled)
140
+
deep-property x 4,075,885 ops/sec ±0.91% (90 runs sampled)
141
+
deephas x 1,508,136 ops/sec ±0.82% (92 runs sampled)
142
+
dot-prop x 2,809,838 ops/sec ±1.16% (87 runs sampled)
143
+
dot2val x 4,600,890 ops/sec ±0.76% (91 runs sampled)
144
+
es5-dot-prop x 3,263,790 ops/sec ±0.97% (91 runs sampled)
145
+
lodash-set x 3,486,628 ops/sec ±1.20% (90 runs sampled)
146
+
object-path-set x 3,729,018 ops/sec ±0.90% (92 runs sampled)
147
+
object-set x 973,961 ops/sec ±0.80% (92 runs sampled)
148
+
set-value x 6,941,474 ops/sec ±1.24% (90 runs sampled)
149
+
150
+
fastest is set-value (by 206% avg)
151
151
152
152
# shallow (101 bytes)
153
-
deep-object x 9,558,659 ops/sec ±0.81% (92 runs sampled)
154
-
deep-property x 5,190,792 ops/sec ±0.72% (93 runs sampled)
155
-
deephas x 1,395,091 ops/sec ±0.55% (90 runs sampled)
156
-
dot-prop x 4,203,222 ops/sec ±0.67% (94 runs sampled)
157
-
dot2val x 5,908,936 ops/sec ±0.52% (93 runs sampled)
158
-
es5-dot-prop x 4,511,259 ops/sec ±0.65% (94 runs sampled)
159
-
lodash-set x 8,624,572 ops/sec ±0.87% (90 runs sampled)
160
-
object-path-set x 5,800,121 ops/sec ±0.73% (90 runs sampled)
161
-
object-set x 1,629,494 ops/sec ±0.68% (92 runs sampled)
162
-
set-value x 13,925,948 ops/sec ±0.68% (89 runs sampled)
163
-
164
-
fastest is set-value (by 268% avg)
153
+
deep-object x 9,416,410 ops/sec ±1.19% (89 runs sampled)
154
+
deep-property x 5,108,536 ops/sec ±0.98% (93 runs sampled)
155
+
deephas x 1,706,979 ops/sec ±0.98% (86 runs sampled)
156
+
dot-prop x 4,045,902 ops/sec ±1.10% (92 runs sampled)
157
+
dot2val x 5,862,418 ops/sec ±0.88% (91 runs sampled)
158
+
es5-dot-prop x 4,439,646 ops/sec ±1.18% (90 runs sampled)
159
+
lodash-set x 9,303,292 ops/sec ±1.19% (89 runs sampled)
160
+
object-path-set x 5,657,479 ops/sec ±0.95% (93 runs sampled)
161
+
object-set x 2,020,041 ops/sec ±0.92% (91 runs sampled)
162
+
set-value x 11,272,227 ops/sec ±1.36% (88 runs sampled)
163
+
164
+
fastest is set-value (by 213% avg)
165
165
166
166
```
167
167
@@ -265,22 +265,23 @@ You might also be interested in these projects:
265
265
*[has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value"Returns true if a value exists, false if empty. Works with deeply nested values using object paths.")
266
266
*[merge-value](https://www.npmjs.com/package/merge-value): Similar to assign-value but deeply merges object values or nested values using object path/dot notation. | [homepage](https://github.com/jonschlinkert/merge-value"Similar to assign-value but deeply merges object values or nested values using object path/dot notation.")
267
267
*[omit-value](https://www.npmjs.com/package/omit-value): Omit properties from an object or deeply nested property of an object using object path… [more](https://github.com/jonschlinkert/omit-value) | [homepage](https://github.com/jonschlinkert/omit-value"Omit properties from an object or deeply nested property of an object using object path notation.")
268
-
*[set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value"Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.")
268
+
*[set-value](https://www.npmjs.com/package/set-value): Set nested properties on an object using dot notation. | [homepage](https://github.com/jonschlinkert/set-value"Set nested properties on an object using dot notation.")
269
269
*[union-value](https://www.npmjs.com/package/union-value): Set an array of unique values as the property of an object. Supports setting deeply… [more](https://github.com/jonschlinkert/union-value) | [homepage](https://github.com/jonschlinkert/union-value"Set an array of unique values as the property of an object. Supports setting deeply nested properties using using object-paths/dot notation.")
270
270
*[unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value"Delete nested properties from an object using dot notation.")
0 commit comments