ts-util-is
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -5,2 +5,7 @@ # Change Log | ||
<a name="1.1.3"></a> | ||
## [1.1.3](https://github.com/justinlettau/ts-util-is/compare/v1.1.2...v1.1.3) (2017-10-09) | ||
<a name="1.1.2"></a> | ||
@@ -7,0 +12,0 @@ ## [1.1.2](https://github.com/justinlettau/ts-util-is/compare/v1.1.1...v1.1.2) (2017-07-18) |
@@ -78,3 +78,3 @@ /** | ||
*/ | ||
export declare function isObject(value: any): value is Object; | ||
export declare function isObject(value: any): value is object; | ||
/** | ||
@@ -87,3 +87,3 @@ * Determines if a reference is a plain `Object`. A "plain" object is typically created by `{}` or | ||
*/ | ||
export declare function isPlainObject(value: any): value is Object; | ||
export declare function isPlainObject(value: any): value is object; | ||
/** | ||
@@ -90,0 +90,0 @@ * Determines if a reference is a `RegExp`. |
@@ -72,2 +72,3 @@ "use strict"; | ||
*/ | ||
// tslint:disable-next-line:ban-types | ||
function isFunction(value) { | ||
@@ -74,0 +75,0 @@ return typeof value === 'function'; |
{ | ||
"name": "ts-util-is", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "TypeScript typeof utility helper with no dependencies.", | ||
@@ -48,16 +48,16 @@ "keywords": [ | ||
"scripts": { | ||
"build": "tsc -p ./tsconfig.json", | ||
"lint": "tslint -c ./tslint.json -p ./tsconfig.json", | ||
"test": "jasmine JASMINE_CONFIG_PATH=jasmine.json", | ||
"build": "tsc -p ./tsconfig.json", | ||
"release": "standard-version" | ||
"release": "standard-version", | ||
"test": "jasmine JASMINE_CONFIG_PATH=jasmine.json" | ||
}, | ||
"devDependencies": { | ||
"@types/jasmine": "^2.5.53", | ||
"jasmine": "^2.6.0", | ||
"standard-version": "4.2.0", | ||
"ts-node": "^3.1.0", | ||
"tslint": "^5.4.3", | ||
"tslint-config-unicorn-science": "^1.0.3", | ||
"typescript": "^2.4.1" | ||
"@types/jasmine": "^2.6.0", | ||
"jasmine": "^2.8.0", | ||
"standard-version": "^4.2.0", | ||
"ts-node": "^3.3.0", | ||
"tslint": "^5.7.0", | ||
"tslint-config-unicorn-science": "^1.1.7", | ||
"typescript": "^2.5.3" | ||
} | ||
} |
@@ -18,6 +18,6 @@ [![NPM Version](https://badge.fury.io/js/ts-util-is.svg)](https://badge.fury.io/js/ts-util-is) | ||
let value: string | any[] = 'hey there'; | ||
const value: string | string[] = 'hey there'; | ||
if (util.isArray(value)) { | ||
console.log(value.join(' ')); // no TypeScript error! | ||
console.log(value.split(' ')); // `value` is array type | ||
} | ||
@@ -30,6 +30,6 @@ ``` | ||
let value: string | any[] = 'types are fun'; | ||
const value: string | string[] = 'hello again'; | ||
if (isArray(value)) { | ||
console.log(value.join(' ')); // no TypeScript error! | ||
console.log(value.split(' ')); // `value` is array type | ||
} | ||
@@ -36,0 +36,0 @@ ``` |
@@ -71,2 +71,3 @@ /** | ||
*/ | ||
// tslint:disable-next-line:ban-types | ||
export function isFunction(value: any): value is Function { | ||
@@ -119,3 +120,3 @@ return typeof value === 'function'; | ||
*/ | ||
export function isObject(value: any): value is Object { | ||
export function isObject(value: any): value is object { | ||
return typeof value === 'object'; | ||
@@ -131,3 +132,3 @@ } | ||
*/ | ||
export function isPlainObject(value: any): value is Object { | ||
export function isPlainObject(value: any): value is object { | ||
return isObject(value) && Object.prototype.toString.call(value) === '[object Object]'; | ||
@@ -134,0 +135,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
100772
2344
0