@quanxiaoxiao/datav 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quanxiaoxiao/datav",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test"
@@ -1,5 +1,3 @@
1
- import _ from 'lodash';
2
-
3
1
  const walk = (obj, nameList) => {
4
2
  const [dataKey, ...other] = nameList;
5
3
  if (Array.isArray(obj)) {
@@ -30,7 +28,7 @@ export default (obj, pathname) => {
30
28
  if (typeof pathname !== 'string' || (/\.$/.test(pathname) && pathname !== '.')) {
31
29
  throw new Error('pathname invalid');
32
30
  }
33
- if (!Array.isArray(obj) && !_.isPlainObject(obj)) {
31
+ if (!obj) {
34
32
  return null;
35
33
  }
36
34
  let str = pathname;