@supercharge/goodies
Advanced tools
Comparing version 1.9.0 to 1.10.0
@@ -6,4 +6,4 @@ /** | ||
* | ||
* @returns {*} | ||
* @returns {T} | ||
*/ | ||
export declare function esmResolve(input: any): any; | ||
export declare function esmResolve<T>(input: any): T; |
@@ -9,3 +9,3 @@ 'use strict'; | ||
* | ||
* @returns {*} | ||
* @returns {T} | ||
*/ | ||
@@ -12,0 +12,0 @@ function esmResolve(input) { |
@@ -7,4 +7,5 @@ export * from './esmRequire'; | ||
export * from './isNullish'; | ||
export * from './isNotNullish'; | ||
export * from './isPromise'; | ||
export * from './tap'; | ||
export * from './upon'; |
@@ -19,4 +19,5 @@ 'use strict'; | ||
__exportStar(require("./isNullish"), exports); | ||
__exportStar(require("./isNotNullish"), exports); | ||
__exportStar(require("./isPromise"), exports); | ||
__exportStar(require("./tap"), exports); | ||
__exportStar(require("./upon"), exports); |
@@ -10,5 +10,6 @@ /** | ||
* isFunction('no') // false | ||
* | ||
* isFunction(() => {}) // true | ||
* isFunction(function () {}) // true | ||
*/ | ||
export declare function isFunction(input?: any): boolean; | ||
export declare function isFunction(input: any): input is Function; |
@@ -13,2 +13,3 @@ 'use strict'; | ||
* isFunction('no') // false | ||
* | ||
* isFunction(() => {}) // true | ||
@@ -15,0 +16,0 @@ * isFunction(function () {}) // true |
/** | ||
* Runs the given `callback` if the `predicate` is `null` or `undefined`. | ||
* Determine whether the given `input` is `null` or `undefined`. | ||
* | ||
* @param {Boolean} predicate | ||
* @param {Function} callback | ||
* @param {T} input | ||
* | ||
* @returns {*} | ||
* @returns {Boolean} | ||
*/ | ||
export declare function isNullish(input: any): boolean; | ||
export declare function isNullish<T>(input: T | undefined | null): input is null | undefined; |
@@ -5,12 +5,11 @@ 'use strict'; | ||
/** | ||
* Runs the given `callback` if the `predicate` is `null` or `undefined`. | ||
* Determine whether the given `input` is `null` or `undefined`. | ||
* | ||
* @param {Boolean} predicate | ||
* @param {Function} callback | ||
* @param {T} input | ||
* | ||
* @returns {*} | ||
* @returns {Boolean} | ||
*/ | ||
function isNullish(input) { | ||
return input === undefined || input === null; | ||
return input == null; | ||
} | ||
exports.isNullish = isNullish; |
/** | ||
* Determine whether the given `promise` is a Promise. | ||
* | ||
* @param {*} promise | ||
* @param {T} promise | ||
* | ||
@@ -12,2 +12,2 @@ * @returns {Boolean} | ||
*/ | ||
export declare function isPromise(promise?: any): boolean; | ||
export declare function isPromise<T = any>(promise: any): promise is Promise<T>; |
@@ -8,3 +8,3 @@ 'use strict'; | ||
* | ||
* @param {*} promise | ||
* @param {T} promise | ||
* | ||
@@ -11,0 +11,0 @@ * @returns {Boolean} |
{ | ||
"name": "@supercharge/goodies", | ||
"description": "Utility functions for Node.js and JavaScript", | ||
"version": "1.9.0", | ||
"version": "1.10.0", | ||
"author": "Marcus Pöhls <marcus@superchargejs.com>", | ||
@@ -9,16 +9,15 @@ "bugs": { | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@supercharge/tsconfig": "~1.0.0", | ||
"@types/node": "~14.14.37", | ||
"@typescript-eslint/eslint-plugin": "~4.21.0", | ||
"@supercharge/tsconfig": "~2.0.0", | ||
"@types/node": "~16.6.2", | ||
"@typescript-eslint/eslint-plugin": "~4.29.2", | ||
"ava": "~4.0.0-alpha.2", | ||
"eslint": "~7.24.0", | ||
"eslint": "~7.32.0", | ||
"eslint-config-standard-with-typescript": "~20.0.0", | ||
"eslint-plugin-import": "~2.22.1", | ||
"eslint-plugin-import": "~2.24.0", | ||
"eslint-plugin-node": "~11.1.0", | ||
"eslint-plugin-promise": "~4.3.1", | ||
"eslint-plugin-promise": "~5.1.0", | ||
"eslint-plugin-standard": "~4.1.0", | ||
"nyc": "~15.1.0", | ||
"typescript": "~4.2.4" | ||
"typescript": "~4.3.5" | ||
}, | ||
@@ -25,0 +24,0 @@ "main": "dist", |
@@ -95,3 +95,3 @@ <div align="center"> | ||
> [superchargejs.com](https://superchargejs.com) · | ||
> GitHub [@supercharge](https://github.com/supercharge/) · | ||
> GitHub [@supercharge](https://github.com/supercharge) · | ||
> Twitter [@superchargejs](https://twitter.com/superchargejs) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
25
391
0
15990