@kizmann/pico-js 0.3.19 → 0.3.20

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizmann/pico-js",
3
- "version": "0.3.19",
3
+ "version": "0.3.20",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "author": "Eduard Kizmann <kizmann@protonmail.ch>",
@@ -29,7 +29,15 @@ export class Obj
29
29
  let result = [];
30
30
 
31
31
  Arr.each(keys, (key) => {
32
- result = result.concat(key.split('.'))
32
+
33
+ key = (typeof key === 'string' && key.match(/^[^\.]+(\.[^\.]+)*$/)) ?
34
+ key.split('.') : key;
35
+
36
+ if ( Any.isArray(keys) === false ) {
37
+ key = [key];
38
+ }
39
+
40
+ result = result.concat(key)
33
41
  });
34
42
 
35
43
  let key = result.shift();