@kizmann/pico-js 0.3.26 → 0.3.27
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/pico-js.js +1 -1
- package/dist/pico-js.js.map +1 -1
- package/package.json +1 -1
- package/src/utility/object.js +8 -0
package/package.json
CHANGED
package/src/utility/object.js
CHANGED
@@ -27,6 +27,10 @@ export class Obj
|
|
27
27
|
keys = keys.join('.');
|
28
28
|
}
|
29
29
|
|
30
|
+
if ( obj[keys] !== undefined ) {
|
31
|
+
return obj[keys];
|
32
|
+
}
|
33
|
+
|
30
34
|
if ( ! Any.isString(keys) ) {
|
31
35
|
keys = keys.toString();
|
32
36
|
}
|
@@ -60,6 +64,10 @@ export class Obj
|
|
60
64
|
keys = keys.toString();
|
61
65
|
}
|
62
66
|
|
67
|
+
if ( obj[keys] !== undefined ) {
|
68
|
+
obj[keys] = val; return obj;
|
69
|
+
}
|
70
|
+
|
63
71
|
keys = keys.split('.');
|
64
72
|
|
65
73
|
let index = 0, length = keys.length, nested = obj;
|