util-nonempty 4.1.2 → 4.1.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/CHANGELOG.md CHANGED
@@ -9,12 +9,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
9
9
 
10
10
  - export types ([11b5fb9](https://github.com/codsen/codsen/commit/11b5fb936ce20e0a77c3a09806773e1cd7695c50))
11
11
 
12
- ## 4.0.13 (2022-04-18)
13
-
14
- ### Bug Fixes
15
-
16
- - tweak types ([057cdbc](https://github.com/codsen/codsen/commit/057cdbc432bd31f8f141038ea37a92886e3e6a08))
17
-
18
12
  ## 4.0.0 (2021-09-09)
19
13
 
20
14
  ### Features
@@ -23,7 +17,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
23
17
 
24
18
  ### BREAKING CHANGES
25
19
 
26
- - programs now are in ES Modules and won't work with Common JS require()
20
+ - programs now are in ES Modules and won't work with Common JS `require()`
27
21
 
28
22
  ## 3.1.0 (2021-05-24)
29
23
 
@@ -39,9 +33,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
39
33
 
40
34
  ## 3.0.1 (2021-01-28)
41
35
 
42
- ### Bug Fixes
36
+ ### Fixed
43
37
 
44
- - add testStats to npmignore ([f3c84e9](https://github.com/codsen/codsen/commit/f3c84e95afc5514214312f913692d85b2e12eb29))
38
+ - add `testStats` to npmignore ([f3c84e9](https://github.com/codsen/codsen/commit/f3c84e95afc5514214312f913692d85b2e12eb29))
45
39
 
46
40
  ## 3.0.0 (2021-01-23)
47
41
 
@@ -55,13 +49,13 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
55
49
 
56
50
  ## 2.10.0 (2020-11-28)
57
51
 
58
- Accidental version bump during migration to sourcehut. Sorry about that.
52
+ Accidental version bump during migration to SourceHut. Sorry about that.
59
53
 
60
54
  ## 2.9.44 (2019-10-02)
61
55
 
62
56
  ### Performance Improvements
63
57
 
64
- - tap Array.isArray directly, speed improvements ([83cd308](https://gitlab.com/codsen/codsen/commit/83cd308))
58
+ - tap `Array.isArray` directly, speed improvements ([83cd308](https://gitlab.com/codsen/codsen/commit/83cd308))
65
59
 
66
60
  ## 2.9.0 (2019-01-20)
67
61
 
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name util-nonempty
3
3
  * @fileoverview Is the input (plain object, array, string or whatever) not empty?
4
- * @version 4.1.2
4
+ * @version 4.1.4
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/util-nonempty/}
8
8
  */
9
9
 
10
- import n from"lodash.isplainobject";var t="4.1.2";var p=t;function l(e){return e==null?!1:Array.isArray(e)||typeof e=="string"?!!e.length:n(e)?!!Object.keys(e).length:typeof e=="number"}export{l as nonEmpty,p as version};
10
+ import s from"lodash.isplainobject";var t="4.1.4";var p=t;function l(e){return e==null?!1:Array.isArray(e)||typeof e=="string"?!!e.length:s(e)?!!Object.keys(e).length:typeof e=="number"}export{l as nonEmpty,p as version};
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name util-nonempty
3
3
  * @fileoverview Is the input (plain object, array, string or whatever) not empty?
4
- * @version 4.1.2
4
+ * @version 4.1.4
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/util-nonempty/}
8
8
  */
9
9
 
10
- "use strict";var utilNonempty=(()=>{var d=Object.create;var o=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),h=(t,e)=>{for(var r in e)o(t,r,{get:e[r],enumerable:!0})},i=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of b(e))!j.call(t,n)&&n!==r&&o(t,n,{get:()=>e[n],enumerable:!(s=f(e,n))||s.enumerable});return t};var v=(t,e,r)=>(r=t!=null?d(m(t)):{},i(e||!t||!t.__esModule?o(r,"default",{value:t,enumerable:!0}):r,t)),x=t=>i(o({},"__esModule",{value:!0}),t);var l=g((L,a)=>{var O="[object Object]";function w(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function P(t,e){return function(r){return t(e(r))}}var k=Function.prototype,c=Object.prototype,p=k.toString,S=c.hasOwnProperty,A=p.call(Object),E=c.toString,T=P(Object.getPrototypeOf,Object);function D(t){return!!t&&typeof t=="object"}function R(t){if(!D(t)||E.call(t)!=O||w(t))return!1;var e=T(t);if(e===null)return!0;var r=S.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&p.call(r)==A}a.exports=R});var F={};h(F,{nonEmpty:()=>M,version:()=>I});var y=v(l(),1);var u="4.1.2";var I=u;function M(t){return t==null?!1:Array.isArray(t)||typeof t=="string"?!!t.length:(0,y.default)(t)?!!Object.keys(t).length:typeof t=="number"}return x(F);})();
10
+ "use strict";var utilNonempty=(()=>{var d=Object.create;var o=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),h=(t,e)=>{for(var r in e)o(t,r,{get:e[r],enumerable:!0})},i=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of b(e))!j.call(t,n)&&n!==r&&o(t,n,{get:()=>e[n],enumerable:!(s=f(e,n))||s.enumerable});return t};var v=(t,e,r)=>(r=t!=null?d(m(t)):{},i(e||!t||!t.__esModule?o(r,"default",{value:t,enumerable:!0}):r,t)),x=t=>i(o({},"__esModule",{value:!0}),t);var l=g((L,a)=>{var O="[object Object]";function w(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function P(t,e){return function(r){return t(e(r))}}var k=Function.prototype,c=Object.prototype,p=k.toString,S=c.hasOwnProperty,A=p.call(Object),E=c.toString,T=P(Object.getPrototypeOf,Object);function D(t){return!!t&&typeof t=="object"}function R(t){if(!D(t)||E.call(t)!=O||w(t))return!1;var e=T(t);if(e===null)return!0;var r=S.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&p.call(r)==A}a.exports=R});var F={};h(F,{nonEmpty:()=>M,version:()=>I});var y=v(l(),1);var u="4.1.4";var I=u;function M(t){return t==null?!1:Array.isArray(t)||typeof t=="string"?!!t.length:(0,y.default)(t)?!!Object.keys(t).length:typeof t=="number"}return x(F);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "util-nonempty",
3
- "version": "4.1.2",
3
+ "version": "4.1.4",
4
4
  "description": "Is the input (plain object, array, string or whatever) not empty?",
5
5
  "keywords": [
6
6
  "array",
@@ -38,7 +38,7 @@
38
38
  "examples": "node '../../ops/scripts/run-examples.js'",
39
39
  "lect": "node '../../ops/lect/lect.js' && yarn run prettier 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
40
40
  "letspublish": "yarn publish || :",
41
- "lint": "eslint . --fix",
41
+ "lint": "eslint . --ext .js --ext .ts --fix",
42
42
  "perf": "node perf/check.js",
43
43
  "prepare": "echo 'ready'",
44
44
  "prettier": "prettier",
@@ -1,20 +0,0 @@
1
- // Quick Take
2
-
3
- import { strict as assert } from "assert";
4
-
5
- import { nonEmpty } from "../dist/util-nonempty.esm.js";
6
-
7
- assert.equal(nonEmpty("z"), true);
8
- assert.equal(nonEmpty(""), false);
9
- assert.equal(nonEmpty(["a"]), true);
10
- assert.equal(nonEmpty([123]), true);
11
- assert.equal(nonEmpty([[[[[[[[[[[]]]]]]]]]]]), true);
12
- assert.equal(nonEmpty({ a: "" }), true);
13
- assert.equal(nonEmpty({ a: "a" }), true);
14
- assert.equal(nonEmpty({}), false);
15
-
16
- const f = () => {
17
- return "z";
18
- };
19
- assert.equal(nonEmpty(f), false);
20
- // (answer is instantly false if input is not array, plain object or string)