Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sindresorhus/is

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sindresorhus/is - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

dist/tests/test.d.ts

24

dist/index.d.ts
/// <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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc