@sindresorhus/is
Advanced tools
Comparing version 0.9.0 to 0.10.0
/// <reference types="node" /> | ||
declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; | ||
declare type Primitive = null | undefined | string | number | boolean | Symbol; | ||
export interface ArrayLike { | ||
@@ -8,2 +10,9 @@ length: number; | ||
} | ||
declare type DomElement = object & { | ||
nodeType: 1; | ||
nodeName: string; | ||
}; | ||
declare type NodeStream = object & { | ||
pipe: Function; | ||
}; | ||
export declare const enum TypeName { | ||
@@ -42,3 +51,3 @@ null = "null", | ||
DataView = "DataView", | ||
Promise = "Promise", | ||
Promise = "Promise" | ||
} | ||
@@ -89,17 +98,12 @@ declare function is(value: any): TypeName; | ||
const nan: (value: any) => boolean; | ||
const primitive: (value: any) => value is string | number | boolean | Symbol | null | undefined; | ||
const primitive: (value: any) => value is Primitive; | ||
const integer: (value: any) => value is number; | ||
const safeInteger: (value: any) => value is number; | ||
const plainObject: (value: any) => boolean; | ||
const typedArray: (value: any) => value is Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; | ||
const typedArray: (value: any) => value is TypedArray; | ||
const arrayLike: (value: any) => value is ArrayLike; | ||
const inRange: (value: number, range: number | number[]) => boolean; | ||
const domElement: (value: any) => value is object & { | ||
nodeType: 1; | ||
nodeName: string; | ||
}; | ||
const domElement: (value: any) => value is DomElement; | ||
const observable: (value: any) => boolean; | ||
const nodeStream: (value: any) => value is object & { | ||
pipe: Function; | ||
}; | ||
const nodeStream: (value: any) => value is NodeStream; | ||
const infinite: (value: any) => boolean; | ||
@@ -106,0 +110,0 @@ const even: (rem: number) => boolean; |
"use strict"; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -13,3 +6,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const util = __importStar(require("util")); | ||
const util_1 = __importDefault(require("util")); | ||
const symbol_observable_1 = __importDefault(require("symbol-observable")); | ||
@@ -161,3 +154,3 @@ const toString = Object.prototype.toString; | ||
} | ||
throw new TypeError(`Invalid range: ${util.inspect(range)}`); | ||
throw new TypeError(`Invalid range: ${util_1.default.inspect(range)}`); | ||
}; | ||
@@ -188,3 +181,3 @@ const NODE_TYPE_ELEMENT = 1; | ||
if (is.function_(predicate) === false) { | ||
throw new TypeError(`Invalid predicate: ${util.inspect(predicate)}`); | ||
throw new TypeError(`Invalid predicate: ${util_1.default.inspect(predicate)}`); | ||
} | ||
@@ -218,1 +211,2 @@ if (values.length === 0) { | ||
module.exports.default = is; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sindresorhus/is", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"description": "Type check values: `is.string('🦄') //=> true`", | ||
@@ -18,5 +18,5 @@ "license": "MIT", | ||
"lint": "tslint --format stylish --project .", | ||
"build": "tsc", | ||
"build": "del dist && tsc", | ||
"test": "npm run lint && npm run build && ava dist/tests", | ||
"prepublish": "npm run build && del dist/tests" | ||
"prepublish": "npm run build" | ||
}, | ||
@@ -52,3 +52,3 @@ "files": [ | ||
"@types/jsdom": "^11.0.4", | ||
"@types/node": "^9.6.0", | ||
"@types/node": "^10.1.2", | ||
"@types/tempy": "^0.1.0", | ||
@@ -62,4 +62,4 @@ "@types/zen-observable": "^0.5.3", | ||
"tslint": "^5.9.1", | ||
"tslint-xo": "^0.7.0", | ||
"typescript": "^2.8.1", | ||
"tslint-xo": "^0.8.0", | ||
"typescript": "^2.9.0", | ||
"zen-observable": "^0.8.8" | ||
@@ -66,0 +66,0 @@ }, |
@@ -339,2 +339,3 @@ # is [![Build Status](https://travis-ci.org/sindresorhus/is.svg?branch=master)](https://travis-ci.org/sindresorhus/is) | ||
- [ow](https://github.com/sindresorhus/ow) - Function argument validation for humans | ||
- [is-stream](https://github.com/sindresorhus/is-stream) - Check if something is a Node.js stream | ||
@@ -341,0 +342,0 @@ - [is-observable](https://github.com/sindresorhus/is-observable) - Check if a value is an Observable |
Sorry, the diff of this file is not supported yet
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
361
76978
9
1021
2
2