util-nonempty 4.1.3 → 4.1.5

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
- ### Fixed
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
 
@@ -41,7 +35,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
41
35
 
42
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
 
package/README.md CHANGED
@@ -1,28 +1,25 @@
1
- # util-nonempty
1
+ <h1 align="center">util-nonempty</h1>
2
2
 
3
- > Is the input (plain object, array, string or whatever) not empty?
3
+ <p align="center">Is the input (plain object, array, string or whatever) not empty?</p>
4
4
 
5
- <div class="package-badges">
6
- <a href="https://www.npmjs.com/package/util-nonempty" rel="nofollow noreferrer noopener">
7
- <img src="https://img.shields.io/badge/-npm-blue?style=flat-square" alt="page on npm">
8
- </a>
5
+ <p align="center">
9
6
  <a href="https://codsen.com/os/util-nonempty" rel="nofollow noreferrer noopener">
10
7
  <img src="https://img.shields.io/badge/-codsen-blue?style=flat-square" alt="page on codsen.com">
11
8
  </a>
9
+ <a href="https://www.npmjs.com/package/util-nonempty" rel="nofollow noreferrer noopener">
10
+ <img src="https://img.shields.io/badge/-npm-blue?style=flat-square" alt="page on npm">
11
+ </a>
12
12
  <a href="https://github.com/codsen/codsen/tree/main/packages/util-nonempty" rel="nofollow noreferrer noopener">
13
13
  <img src="https://img.shields.io/badge/-github-blue?style=flat-square" alt="page on github">
14
14
  </a>
15
15
  <a href="https://npmcharts.com/compare/util-nonempty?interval=30" rel="nofollow noreferrer noopener" target="_blank">
16
16
  <img src="https://img.shields.io/npm/dm/util-nonempty.svg?style=flat-square" alt="Downloads per month">
17
17
  </a>
18
- <a href="https://prettier.io" rel="nofollow noreferrer noopener" target="_blank">
19
- <img src="https://img.shields.io/badge/code_style-prettier-brightgreen.svg?style=flat-square" alt="Code style: prettier">
20
- </a>
21
- <img src="https://img.shields.io/badge/licence-MIT-brightgreen.svg?style=flat-square" alt="MIT License">
22
- <a href="https://liberamanifesto.com" rel="nofollow noreferrer noopener" target="_blank">
23
- <img src="https://img.shields.io/badge/libera-manifesto-lightgrey.svg?style=flat-square" alt="libera manifesto">
18
+ <a href="https://codsen.com/os/util-nonempty/changelog" rel="nofollow noreferrer noopener">
19
+ <img src="https://img.shields.io/badge/changelog-here-brightgreen?style=flat-square" alt="changelog">
24
20
  </a>
25
- </div>
21
+ <img src="https://img.shields.io/badge/licence-MIT-brightgreen.svg?style=flat-square" alt="MIT Licence">
22
+ </p>
26
23
 
27
24
  ## Install
28
25
 
@@ -65,8 +62,8 @@ To report bugs or request features or assistance, [raise an issue](https://githu
65
62
 
66
63
  ## Licence
67
64
 
68
- MIT License
65
+ MIT License.
69
66
 
70
- Copyright (c) 2010-2022 Roy Revelt and other contributors
67
+ Copyright © 2010-2022 Roy Revelt and other contributors.
71
68
 
72
- <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">
69
+ <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>
@@ -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.3
4
+ * @version 4.1.5
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.3";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.5";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.3
4
+ * @version 4.1.5
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.3";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.5";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.3",
3
+ "version": "4.1.5",
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)