Socket
Socket
Sign inDemoInstall

@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 4.3.0 to 4.4.0

6

dist/index.d.ts
/// <reference types="node" />
/// <reference lib="es2018" />
/// <reference lib="dom" />
import { Class, TypedArray, ObservableLike, Primitive } from './types';
import { Class, Falsy, TypedArray, ObservableLike, Primitive } from './types';
declare const objectTypeNames: readonly ["Function", "Generator", "AsyncGenerator", "GeneratorFunction", "AsyncGeneratorFunction", "AsyncFunction", "Observable", "Array", "Buffer", "Object", "RegExp", "Date", "Error", "Map", "Set", "WeakMap", "WeakSet", "ArrayBuffer", "SharedArrayBuffer", "DataView", "Promise", "URL", "FormData", "URLSearchParams", "HTMLElement", ...("Int8Array" | "Uint8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array" | "BigInt64Array" | "BigUint64Array")[]];

@@ -61,4 +61,4 @@ declare type ObjectTypeName = typeof objectTypeNames[number];

var urlString: (value: unknown) => value is string;
var truthy: (value: unknown) => boolean;
var falsy: (value: unknown) => boolean;
var truthy: <T>(value: false | "" | 0 | 0n | T | null | undefined) => value is T;
var falsy: <T>(value: false | "" | 0 | 0n | T | null | undefined) => value is Falsy;
var nan: (value: unknown) => boolean;

@@ -65,0 +65,0 @@ var primitive: (value: unknown) => value is Primitive;

@@ -196,3 +196,2 @@ "use strict";

};
// TODO: Use the `not` operator with a type guard here when it's available.
// Example: `is.truthy = (value: unknown): value is (not false | not 0 | not '' | not undefined | not null) => Boolean(value);`

@@ -199,0 +198,0 @@ is.truthy = (value) => Boolean(value);

@@ -25,1 +25,2 @@ /**

}
export declare type Falsy = false | 0 | 0n | '' | null | undefined;
{
"name": "@sindresorhus/is",
"version": "4.3.0",
"version": "4.4.0",
"description": "Type check values",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -217,6 +217,4 @@ # is

**TypeScript-only**
TypeScript-only. Returns `true` if `value` is a member of `enum`.
Returns `true` if `value` is a member of `enum`.
```ts

@@ -223,0 +221,0 @@ enum Direction {

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