Socket
Socket
Sign inDemoInstall

is-lite

Package Overview
Dependencies
0
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.9.3 to 1.0.0

dist/index.d.mts

18

dist/index.d.ts
declare const objectTypes: readonly ["Array", "ArrayBuffer", "AsyncFunction", "AsyncGenerator", "AsyncGeneratorFunction", "Date", "Error", "Function", "Generator", "GeneratorFunction", "HTMLElement", "Map", "Object", "Promise", "RegExp", "Set", "WeakMap", "WeakSet"];
declare const primitiveTypes: readonly ["bigint", "boolean", "null", "number", "string", "symbol", "undefined"];
export type Class<T = unknown> = new (...arguments_: any[]) => T;
export type ObjectTypes = (typeof objectTypes)[number];
export type PlainObject = Record<number | string | symbol, unknown>;
export type Primitive = null | undefined | string | number | boolean | symbol | bigint;
export type PrimitiveTypes = (typeof primitiveTypes)[number];
export type TypeName = ObjectTypes | PrimitiveTypes;
export declare function getObjectType(value: unknown): ObjectTypes | undefined;
type Class<T = unknown> = new (...arguments_: any[]) => T;
type ObjectTypes = (typeof objectTypes)[number];
type PlainObject = Record<number | string | symbol, unknown>;
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
type PrimitiveTypes = (typeof primitiveTypes)[number];
type TypeName = ObjectTypes | PrimitiveTypes;
declare function getObjectType(value: unknown): ObjectTypes | undefined;
declare function is(value: unknown): TypeName;

@@ -50,2 +50,4 @@ declare namespace is {

}
export default is;
export { Class, ObjectTypes, PlainObject, Primitive, PrimitiveTypes, TypeName, is as default, getObjectType };
export = is

@@ -210,1 +210,7 @@ "use strict";

//# sourceMappingURL=index.js.map
// fix-cjs-exports
if (module.exports.default) {
Object.assign(module.exports.default, module.exports);
module.exports = module.exports.default;
delete module.exports.default;
}
{
"name": "is-lite",
"version": "0.9.3",
"version": "1.0.0",
"description": "A tiny javascript type testing tool",

@@ -28,4 +28,6 @@ "author": "Gil Barbara <gilbarbara@gmail.com>",

"exports": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},

@@ -40,31 +42,32 @@ "files": [

"@gilbarbara/esbuilder": "^0.2.0",
"@gilbarbara/eslint-config": "^0.5.1",
"@gilbarbara/eslint-config": "^0.5.4",
"@gilbarbara/prettier-config": "^1.0.0",
"@gilbarbara/tsconfig": "^0.1.1",
"@size-limit/preset-small-lib": "^8.2.6",
"@types/jest": "^29.5.3",
"@types/node": "^20.4.5",
"del-cli": "^5.0.0",
"@gilbarbara/tsconfig": "^0.2.3",
"@size-limit/preset-small-lib": "^9.0.0",
"@types/node": "^20.8.6",
"@vitest/coverage-v8": "^0.34.6",
"del-cli": "^5.1.0",
"fix-tsup-cjs": "^1.2.0",
"happy-dom": "^12.9.1",
"husky": "^8.0.3",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"prettier": "^3.0.0",
"is-ci-cli": "^2.2.0",
"prettier": "^3.0.3",
"repo-tools": "^0.2.2",
"size-limit": "^8.2.6",
"ts-jest": "^29.1.1",
"size-limit": "^9.0.0",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
},
"scripts": {
"build": "npm run clean && npm run build:files && npm run build:types",
"build:files": "esbuilder --cjs --esm",
"build:types": "tsc",
"build": "npm run clean && tsup && fix-tsup-cjs",
"watch": "tsup --watch",
"clean": "del dist/*",
"watch": "npm run build:files -- --watch",
"lint": "eslint src test",
"test": "jest",
"test:coverage": "jest --bail --coverage",
"test:watch": "jest --watchAll --verbose",
"test": "is-ci \"test:coverage\" \"test:watch\"",
"typecheck": "tsc",
"test:coverage": "TZ=UTC vitest run --coverage",
"test:watch": "TZ=UTC vitest watch",
"format": "prettier \"**/*.{js,jsx,json,yml,yaml,css,less,scss,ts,tsx,md,graphql,mdx}\" --write",
"validate": "npm run lint && npm run test:coverage && npm run build && npm run size",
"validate": "npm run lint && npm run typecheck && npm run test:coverage && npm run build && npm run size",
"size": "size-limit",

@@ -74,2 +77,14 @@ "prepublishOnly": "npm run validate",

},
"tsup": {
"dts": true,
"entry": [
"src/index.ts"
],
"format": [
"cjs",
"esm"
],
"sourcemap": true,
"splitting": false
},
"eslintConfig": {

@@ -76,0 +91,0 @@ "extends": [

@@ -110,8 +110,7 @@ /* eslint-disable @typescript-eslint/ban-types */

/* istanbul ignore else */
if (tagType) {
return tagType;
}
/* c8 ignore next 3 */
/* istanbul ignore next */
return 'Object';

@@ -118,0 +117,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc