@leafer/data 1.0.2 → 1.0.4

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": "@leafer/data",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "@leafer/data",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,6 +22,6 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "devDependencies": {
25
- "@leafer/interface": "1.0.2"
25
+ "@leafer/interface": "1.0.4"
26
26
  }
27
27
  }
package/src/index.ts CHANGED
@@ -10,4 +10,8 @@ export enum Answer {
10
10
  YesAndSkip = 3
11
11
  }
12
12
 
13
- export const emptyData: IObject = {}
13
+ export const emptyData: IObject = {}
14
+
15
+ export function isNull(value: any): boolean {
16
+ return value === undefined || value === null
17
+ }
package/types/index.d.ts CHANGED
@@ -41,5 +41,6 @@ declare enum Answer {
41
41
  YesAndSkip = 3
42
42
  }
43
43
  declare const emptyData: IObject;
44
+ declare function isNull(value: any): boolean;
44
45
 
45
- export { Answer, DataHelper, LeafData, emptyData };
46
+ export { Answer, DataHelper, LeafData, emptyData, isNull };