We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
while
1 parent 6515792 commit fa0f75cCopy full SHA for fa0f75c
src/index.js
@@ -1,7 +1,7 @@
1
export function dset(obj, keys, val) {
2
keys.split && (keys=keys.split('.'));
3
var i=0, l=keys.length, t=obj, x, k;
4
- for (; i < l;) {
+ while (i < l) {
5
k = keys[i++];
6
if (k === '__proto__' || k === 'constructor' || k === 'prototype') break;
7
t = t[k] = (i === l) ? val : (typeof(x=t[k])===typeof(keys)) ? x : (keys[i]*0 !== 0 || !!~(''+keys[i]).indexOf('.')) ? {} : [];
0 commit comments