util-nonempty 4.0.3 → 4.0.7

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
@@ -3,26 +3,6 @@
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.0.3 (2021-11-02)
7
-
8
- ### Bug Fixes
9
-
10
- - bump TS and separate ESLint plugins away from this monorepo ([b1ebce1](https://github.com/codsen/codsen/commit/b1ebce1637d8c41c2d848fc24b0ba4058865bd5d))
11
-
12
- ### Features
13
-
14
- - migrate to ES Modules ([c579dff](https://github.com/codsen/codsen/commit/c579dff3b23205e383035ca10ddcec671e35d0fe))
15
-
16
- ### BREAKING CHANGES
17
-
18
- - programs now are in ES Modules and won't work with Common JS require()
19
-
20
- ## 4.0.1 (2021-09-13)
21
-
22
- ### Bug Fixes
23
-
24
- - bump TS and separate ESLint plugins away from this monorepo ([2e07d42](https://github.com/codsen/codsen/commit/2e07d424222b6ffedf5fb45c83ad453627ec2904))
25
-
26
6
  ## 4.0.0 (2021-09-09)
27
7
 
28
8
  ### Features
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-%YEAR% Roy Revelt and other contributors
3
+ Copyright (c) 2010-2021 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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name util-nonempty
3
3
  * @fileoverview Is the input (plain object, array, string or whatever) not empty?
4
- * @version 4.0.3
4
+ * @version 4.0.7
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/util-nonempty/}
@@ -9,20 +9,20 @@
9
9
 
10
10
  import isPlainObject from 'lodash.isplainobject';
11
11
 
12
- var version$1 = "4.0.3";
12
+ var version$1 = "4.0.7";
13
13
 
14
14
  const version = version$1;
15
15
  function nonEmpty(input) {
16
- if (input == null) {
17
- return false;
18
- }
19
- if (Array.isArray(input) || typeof input === "string") {
20
- return !!input.length;
21
- }
22
- if (isPlainObject(input)) {
23
- return !!Object.keys(input).length;
24
- }
25
- return typeof input === "number";
16
+ if (input == null) {
17
+ return false;
18
+ }
19
+ if (Array.isArray(input) || typeof input === "string") {
20
+ return !!input.length;
21
+ }
22
+ if (isPlainObject(input)) {
23
+ return !!Object.keys(input).length;
24
+ }
25
+ return typeof input === "number";
26
26
  }
27
27
 
28
28
  export { nonEmpty, 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.0.3
4
+ * @version 4.0.7
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
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).utilNonempty={})}(this,(function(t){"use strict";var e,n,o=Object.prototype,r=Function.prototype.toString,c=o.hasOwnProperty,i=r.call(Object),f=o.toString,u=(e=Object.getPrototypeOf,n=Object,function(t){return e(n(t))});var l=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=f.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=u(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&r.call(n)==i};t.nonEmpty=function(t){return null!=t&&(Array.isArray(t)||"string"==typeof t?!!t.length:l(t)?!!Object.keys(t).length:"number"==typeof t)},t.version="4.0.3",Object.defineProperty(t,"__esModule",{value:!0})}));
10
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).utilNonempty={})}(this,(function(t){"use strict";var e,n,o=Object.prototype,r=Function.prototype.toString,c=o.hasOwnProperty,i=r.call(Object),f=o.toString,u=(e=Object.getPrototypeOf,n=Object,function(t){return e(n(t))});var l=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=f.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=u(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&r.call(n)==i};t.nonEmpty=function(t){return null!=t&&(Array.isArray(t)||"string"==typeof t?!!t.length:l(t)?!!Object.keys(t).length:"number"==typeof t)},t.version="4.0.7",Object.defineProperty(t,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "util-nonempty",
3
- "version": "4.0.3",
3
+ "version": "4.0.7",
4
4
  "description": "Is the input (plain object, array, string or whatever) not empty?",
5
5
  "keywords": [
6
6
  "array",
@@ -31,13 +31,12 @@
31
31
  "types": "types/index.d.ts",
32
32
  "scripts": {
33
33
  "build": "rollup -c",
34
- "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov",
35
- "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
34
+ "build:esbuild": "node '../../scripts/esbuild.js'",
35
+ "build:esbuild:dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
36
+ "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent",
36
37
  "clean_types": "../../scripts/cleanTypes.js",
37
38
  "dev": "rollup -c --dev",
38
39
  "devunittest": "npm run dev && tap --only -R 'base'",
39
- "esbuild": "node '../../scripts/esbuild.js'",
40
- "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
41
40
  "format": "npm run lect && npm run prettier && npm run lint",
42
41
  "lect": "lect",
43
42
  "lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
@@ -46,17 +45,14 @@
46
45
  "republish": "npm publish || :",
47
46
  "tap": "tap",
48
47
  "pretest": "npm run build",
49
- "test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
48
+ "test": "npm run test:ci && npm run perf",
49
+ "test:ci": "npm run unittest && npm run test:examples && npm run format",
50
50
  "test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
51
51
  "tsc": "tsc",
52
- "unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf"
52
+ "unittest": "tap --no-only --reporter=terse && tsc -p tsconfig.json --noEmit"
53
53
  },
54
54
  "tap": {
55
55
  "check-coverage": false,
56
- "coverage-report": [
57
- "json-summary",
58
- "text"
59
- ],
60
56
  "node-arg": [
61
57
  "--no-warnings",
62
58
  "--experimental-loader",
@@ -78,7 +74,7 @@
78
74
  }
79
75
  },
80
76
  "dependencies": {
81
- "@babel/runtime": "^7.16.0",
77
+ "@babel/runtime": "^7.16.3",
82
78
  "lodash.isplainobject": "^4.0.6"
83
79
  },
84
80
  "devDependencies": {
@@ -90,8 +86,8 @@
90
86
  "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
91
87
  "@babel/plugin-proposal-object-rest-spread": "^7.16.0",
92
88
  "@babel/plugin-proposal-optional-chaining": "^7.16.0",
93
- "@babel/plugin-transform-runtime": "^7.16.0",
94
- "@babel/preset-env": "^7.16.0",
89
+ "@babel/plugin-transform-runtime": "^7.16.4",
90
+ "@babel/preset-env": "^7.16.4",
95
91
  "@babel/preset-typescript": "^7.16.0",
96
92
  "@babel/register": "^7.16.0",
97
93
  "@istanbuljs/esm-loader-hook": "^0.1.2",
@@ -102,25 +98,25 @@
102
98
  "@rollup/plugin-strip": "^2.1.0",
103
99
  "@rollup/plugin-typescript": "^8.3.0",
104
100
  "@types/lodash.isplainobject": "^4.0.6",
105
- "@types/node": "^16.11.6",
101
+ "@types/node": "^16.11.10",
106
102
  "@types/tap": "^15.0.5",
107
- "@typescript-eslint/eslint-plugin": "^5.2.0",
108
- "@typescript-eslint/parser": "^5.2.0",
109
- "core-js": "^3.19.0",
103
+ "@typescript-eslint/eslint-plugin": "^5.5.0",
104
+ "@typescript-eslint/parser": "^5.5.0",
105
+ "core-js": "^3.19.2",
110
106
  "cross-env": "^7.0.3",
111
- "eslint": "^8.1.0",
112
- "lect": "^0.18.3",
113
- "rollup": "^2.59.0",
107
+ "eslint": "^8.3.0",
108
+ "lect": "^0.18.7",
109
+ "rollup": "^2.60.1",
114
110
  "rollup-plugin-ascii": "^0.0.3",
115
111
  "rollup-plugin-banner": "^0.2.1",
116
112
  "rollup-plugin-cleanup": "^3.2.1",
117
- "rollup-plugin-dts": "^4.0.0",
113
+ "rollup-plugin-dts": "^4.0.1",
118
114
  "rollup-plugin-terser": "^7.0.2",
119
- "tap": "^15.0.10",
115
+ "tap": "^15.1.5",
120
116
  "tslib": "^2.3.1",
121
- "typescript": "^4.4.4"
117
+ "typescript": "^4.5.2"
122
118
  },
123
119
  "engines": {
124
- "node": ">=12"
120
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
125
121
  }
126
122
  }