tools_dj 1.0.89 → 1.0.91

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/lib/data.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ /** 获取对象的深层属性值,支持点分路径,未找到时返回默认值 */
2
+ export declare function getDeepData(data: any, path: string, defaultValue: any): any;
package/lib/data.js ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDeepData=function(t,i,r){if((0,e.is_empty)(t)||"Object"!=(0,e.is)(t)||(0,e.is_empty)(i))return r;const s=i.split(".");let n=t;for(const t of s){if((0,e.is_empty)(n)||"Object"!=(0,e.is)(n)||!(t in n))return r;n=n[t]}return void 0===n?r:n};const e=require("./index");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tools_dj",
3
- "version": "1.0.89",
3
+ "version": "1.0.91",
4
4
  "description": "dj tools 工具库",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",