ast-is-empty 4.1.0 → 4.2.0
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/CHANGELOG.md +13 -2
- package/LICENSE +1 -1
- package/README.md +4 -27
- package/dist/ast-is-empty.esm.js +2 -2
- package/dist/ast-is-empty.umd.js +3 -3
- package/package.json +25 -23
- package/.eslintcache +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,11 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## 4.
|
|
6
|
+
## 4.2.0 (2026-08-19)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- resolve review findings REV-004 through REV-007 ([b60e9ee](https://github.com/codsen/codsen/commit/b60e9eeb499af94685cfb87b4970fe025be1fc10))
|
|
11
|
+
- retire direct publish aliases ([f98e31e](https://github.com/codsen/codsen/commit/f98e31eb89bc185471225664e610b55f34fbf648))
|
|
7
12
|
|
|
8
13
|
### Features
|
|
9
14
|
|
|
10
|
-
-
|
|
15
|
+
- add codsen-glob and migrate glob consumers ([5595a2b](https://github.com/codsen/codsen/commit/5595a2b267eaa6cb60072d037aef00b7a28edd42))
|
|
16
|
+
- refresh the tooling and generate with the latest dependencies ([781f802](https://github.com/codsen/codsen/commit/781f802911066a82a4533b0e5a3fcbd742d0dd83))
|
|
17
|
+
|
|
18
|
+
### Reverts
|
|
19
|
+
|
|
20
|
+
- Revert "Merge pull request #128 from codsen/release/npm-32198404552-1" ([5baeeaa](https://github.com/codsen/codsen/commit/5baeeaaa677b86f1eaa6396cadf3aea32b06416e)), closes [#128](https://github.com/codsen/codsen/issues/128)
|
|
21
|
+
- Revert "Merge pull request #127 from codsen/release/npm-32194020886-1" ([5f1e94d](https://github.com/codsen/codsen/commit/5f1e94deef910ce735266b16aeee08a76de7a862)), closes [#127](https://github.com/codsen/codsen/issues/127)
|
|
11
22
|
|
|
12
23
|
## 4.0.10 (2023-05-13)
|
|
13
24
|
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright © 2010-
|
|
3
|
+
Copyright © 2010-2026 Roy Revelt and other contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
6
|
a copy of this software and associated documentation files (the
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ npm i ast-is-empty
|
|
|
32
32
|
## Quick Take
|
|
33
33
|
|
|
34
34
|
```js
|
|
35
|
-
import { strict as assert } from "assert";
|
|
35
|
+
import { strict as assert } from "node:assert";
|
|
36
36
|
|
|
37
37
|
import { isEmpty } from "ast-is-empty";
|
|
38
38
|
|
|
@@ -42,35 +42,12 @@ assert.equal(
|
|
|
42
42
|
}),
|
|
43
43
|
true,
|
|
44
44
|
);
|
|
45
|
-
|
|
46
|
-
assert.equal(
|
|
47
|
-
isEmpty({
|
|
48
|
-
a: [""],
|
|
49
|
-
b: {
|
|
50
|
-
c: {
|
|
51
|
-
d: "",
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
}),
|
|
55
|
-
true,
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
assert.equal(
|
|
59
|
-
isEmpty([
|
|
60
|
-
{
|
|
61
|
-
a: [""],
|
|
62
|
-
b: { c: { d: "" } },
|
|
63
|
-
},
|
|
64
|
-
"",
|
|
65
|
-
["", "", ""],
|
|
66
|
-
]),
|
|
67
|
-
true,
|
|
68
|
-
);
|
|
69
45
|
```
|
|
70
46
|
|
|
47
|
+
|
|
71
48
|
## Documentation
|
|
72
49
|
|
|
73
|
-
Please [visit codsen.com](https://codsen.com/os/ast-is-empty/) for a full description of the API.
|
|
50
|
+
Please [visit codsen.com](https://codsen.com/os/ast-is-empty/) for a full description of the API. If you’re looking for the **Changelog**, it’s [here](https://github.com/codsen/codsen/blob/main/packages/ast-is-empty/CHANGELOG.md).
|
|
74
51
|
|
|
75
52
|
## Contributing
|
|
76
53
|
|
|
@@ -80,6 +57,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
|
|
|
80
57
|
|
|
81
58
|
MIT License
|
|
82
59
|
|
|
83
|
-
Copyright © 2010-
|
|
60
|
+
Copyright © 2010-2026 Roy Revelt and other contributors
|
|
84
61
|
|
|
85
62
|
<p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>
|
package/dist/ast-is-empty.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ast-is-empty
|
|
3
3
|
* @fileoverview Find out, is nested array/object/string/AST tree is empty
|
|
4
|
-
* @version 4.
|
|
4
|
+
* @version 4.2.0
|
|
5
5
|
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ast-is-empty/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import{isPlainObject as
|
|
10
|
+
import{isPlainObject as l}from"codsen-utils";var r="4.2.0";var m=r;function n(e){let t=!0;if(Array.isArray(e)){if(e.length===0)return!0;for(let s of e){if(t=n(s),t===null)return null;if(!t)return!1}}else if(l(e)){let s=Object.keys(e);if(s.length===0)return!0;for(let o of s){if(t=n(e[o]),t===null)return null;if(!t)return!1}}else if(typeof e=="string"){if(e.length!==0)return!1}else return null;return t}export{n as isEmpty,m as version};
|
package/dist/ast-is-empty.umd.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ast-is-empty
|
|
3
3
|
* @fileoverview Find out, is nested array/object/string/AST tree is empty
|
|
4
|
-
* @version 4.
|
|
4
|
+
* @version 4.2.0
|
|
5
5
|
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ast-is-empty/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var astIsEmpty=(()=>{var
|
|
10
|
+
"use strict";var astIsEmpty=(()=>{var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var p=(e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0})},h=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of f(t))!c.call(e,n)&&n!==r&&s(e,n,{get:()=>t[n],enumerable:!(i=a(t,n))||i.enumerable});return e};var d=e=>h(s({},"__esModule",{value:!0}),e);var y={};p(y,{isEmpty:()=>l,version:()=>m});var A=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]);function o(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}var u="4.2.0";var m=u;function l(e){let t=!0;if(Array.isArray(e)){if(e.length===0)return!0;for(let r of e){if(t=l(r),t===null)return null;if(!t)return!1}}else if(o(e)){let r=Object.keys(e);if(r.length===0)return!0;for(let i of r){if(t=l(e[i]),t===null)return null;if(!t)return!1}}else if(typeof e=="string"){if(e.length!==0)return!1}else return null;return t}return d(y);})();
|
|
11
11
|
/**
|
|
12
12
|
* @name codsen-utils
|
|
13
13
|
* @fileoverview Various utility functions
|
|
14
|
-
* @version 1.
|
|
14
|
+
* @version 1.8.0
|
|
15
15
|
* @author Roy Revelt
|
|
16
16
|
* @license MIT
|
|
17
17
|
* {@link https://codsen.com/os/codsen-utils/}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ast-is-empty",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Find out, is nested array/object/string/AST tree is empty",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -45,43 +45,45 @@
|
|
|
45
45
|
},
|
|
46
46
|
"types": "types/index.d.ts",
|
|
47
47
|
"scripts": {
|
|
48
|
-
"build": "node
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"dev": "DEV=true node '../../ops/scripts/esbuild.js' && npm run dts",
|
|
48
|
+
"build": "node ../../ops/scripts/esbuild.js && npm run dts",
|
|
49
|
+
"coverage": "c8 uvu test",
|
|
50
|
+
"dev": "node ../../ops/scripts/esbuild.js --dev && npm run dts",
|
|
52
51
|
"devtest": "c8 npm run unit && npm run examples && npm run lint",
|
|
53
|
-
"dts": "rollup -c &&
|
|
52
|
+
"dts": "rollup -c && biome format --write --config-path=../../biome.json --vcs-enabled=false --use-editorconfig=false types/index.d.ts",
|
|
54
53
|
"examples": "node '../../ops/scripts/run-examples.js'",
|
|
55
|
-
"lect": "node '../../ops/lect/lect.js'
|
|
56
|
-
"
|
|
57
|
-
"lint": "
|
|
54
|
+
"lect": "node '../../ops/lect/lect.js'",
|
|
55
|
+
"lect:check": "node '../../ops/lect/lect.js' --check",
|
|
56
|
+
"lint": "biome lint --error-on-warnings . && npm run typecheck",
|
|
57
|
+
"lint:fix": "biome lint --write --error-on-warnings . && npm run typecheck",
|
|
58
58
|
"perf": "node perf/check.js",
|
|
59
59
|
"prep": "echo 'ready'",
|
|
60
|
-
"prettier": "
|
|
61
|
-
"prettier:format": "
|
|
62
|
-
"pretest": "npm run lect && npm run build",
|
|
60
|
+
"prettier": "biome format",
|
|
61
|
+
"prettier:format": "biome format --write .",
|
|
62
|
+
"pretest": "npm run lect:check && npm run build",
|
|
63
63
|
"test": "npm run devtest",
|
|
64
|
+
"typecheck": "tsc --noEmit --pretty false --project tsconfig.json",
|
|
64
65
|
"unit": "uvu test"
|
|
65
66
|
},
|
|
66
|
-
"engines": {
|
|
67
|
-
"node": ">=14.18.0"
|
|
68
|
-
},
|
|
69
67
|
"c8": {
|
|
68
|
+
"all": true,
|
|
69
|
+
"branches": 100,
|
|
70
70
|
"check-coverage": true,
|
|
71
|
-
"exclude": [
|
|
72
|
-
|
|
73
|
-
],
|
|
74
|
-
"lines": 100
|
|
71
|
+
"exclude": ["**/test/**/*.*"],
|
|
72
|
+
"functions": 100,
|
|
73
|
+
"include": ["dist/*.esm.js"],
|
|
74
|
+
"lines": 100,
|
|
75
|
+
"statements": 100
|
|
75
76
|
},
|
|
76
77
|
"lect": {
|
|
77
78
|
"licence": {
|
|
78
|
-
"extras": [
|
|
79
|
-
""
|
|
80
|
-
]
|
|
79
|
+
"extras": [""]
|
|
81
80
|
}
|
|
82
81
|
},
|
|
83
82
|
"dependencies": {
|
|
84
|
-
"codsen-utils": "^1.
|
|
83
|
+
"codsen-utils": "^1.8.0"
|
|
84
|
+
},
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">=18.20.8"
|
|
85
87
|
},
|
|
86
88
|
"publishConfig": {
|
|
87
89
|
"registry": "https://registry.npmjs.org/"
|
package/.eslintcache
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"/home/runner/work/codsen/codsen/packages/ast-is-empty/examples/_quickTake.js":"1","/home/runner/work/codsen/codsen/packages/ast-is-empty/perf/check.js":"2","/home/runner/work/codsen/codsen/packages/ast-is-empty/rollup.config.js":"3","/home/runner/work/codsen/codsen/packages/ast-is-empty/src/main.ts":"4","/home/runner/work/codsen/codsen/packages/ast-is-empty/test/test.js":"5"},{"size":402,"mtime":1760566739071,"results":"6","hashOfConfig":"7"},{"size":330,"mtime":1760566739071,"results":"8","hashOfConfig":"9"},{"size":373,"mtime":1760566739071,"results":"10","hashOfConfig":"7"},{"size":1149,"mtime":1760566739071,"results":"11","hashOfConfig":"9"},{"size":2303,"mtime":1760566739071,"results":"12","hashOfConfig":"13"},{"filePath":"14","messages":"15","suppressedMessages":"16","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1nlhngw",{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xjytlu",{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"nrihsz","/home/runner/work/codsen/codsen/packages/ast-is-empty/examples/_quickTake.js",[],[],"/home/runner/work/codsen/codsen/packages/ast-is-empty/perf/check.js",[],[],"/home/runner/work/codsen/codsen/packages/ast-is-empty/rollup.config.js",[],[],"/home/runner/work/codsen/codsen/packages/ast-is-empty/src/main.ts",[],[],"/home/runner/work/codsen/codsen/packages/ast-is-empty/test/test.js",[],["29","30","31","32","33","34"],{"ruleId":"35","severity":2,"message":"36","line":3,"column":17,"nodeType":null,"messageId":"37","endLine":3,"endColumn":19,"suppressions":"38"},{"ruleId":"35","severity":2,"message":"39","line":3,"column":21,"nodeType":null,"messageId":"37","endLine":3,"endColumn":23,"suppressions":"40"},{"ruleId":"35","severity":2,"message":"41","line":3,"column":25,"nodeType":null,"messageId":"37","endLine":3,"endColumn":31,"suppressions":"42"},{"ruleId":"35","severity":2,"message":"43","line":3,"column":33,"nodeType":null,"messageId":"37","endLine":3,"endColumn":37,"suppressions":"44"},{"ruleId":"35","severity":2,"message":"45","line":3,"column":39,"nodeType":null,"messageId":"37","endLine":3,"endColumn":42,"suppressions":"46"},{"ruleId":"35","severity":2,"message":"47","line":3,"column":44,"nodeType":null,"messageId":"37","endLine":3,"endColumn":49,"suppressions":"48"},"@typescript-eslint/no-unused-vars","'is' is defined but never used.","unusedVar",["49"],"'ok' is defined but never used.",["50"],"'throws' is defined but never used.",["51"],"'type' is defined but never used.",["52"],"'not' is defined but never used.",["53"],"'match' is defined but never used.",["54"],{"kind":"55","justification":"56"},{"kind":"55","justification":"56"},{"kind":"55","justification":"56"},{"kind":"55","justification":"56"},{"kind":"55","justification":"56"},{"kind":"55","justification":"56"},"directive",""]
|