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

@antfu/utils

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antfu/utils - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

19

index.d.ts

@@ -123,2 +123,14 @@ /**

declare function clampArrayRange(n: number, arr: readonly unknown[]): number;
/**
* Get random items from an array
*
* @category Array
*/
declare function sample<T>(arr: T[], count: number): T[];
/**
* Shuffle an array. This function mutates the array.
*
* @category Array
*/
declare function shuffle<T>(array: T[]): T[];

@@ -202,2 +214,7 @@ declare const assert: (condition: boolean, message: string) => asserts condition;

declare function template(str: string, ...args: any[]): string;
/**
* Generate a random string
* @category String
*/
declare function randomStr(size?: number, dict?: string): string;

@@ -531,2 +548,2 @@ declare const timestamp: () => number;

export { ArgumentsType, Arrayable, Awaitable, Constructor, ControlledPromise, DeepMerge, ElementOf, Fn, MergeInsertions, Nullable, PartitionFilter, SingletonPromiseReturn, UnionToIntersection, assert, at, batchInvoke, clamp, clampArrayRange, clearUndefined, createControlledPromise, createPromiseLock, createSingletonPromise, debounce, deepMerge, ensurePrefix, ensureSuffix, flattenArrayable, hasOwnProperty, invoke, isBoolean, isBrowser, isDef, isFunction, isKeyOf, isNumber, isObject, isString, isTruthy, isWindow, last, mergeArrayable, move, noNull, noop, notNullish, notUndefined, objectEntries, objectKeys, objectMap, objectPick, p, partition, range, remove, slash, sleep, sum, tap, template, throttle, timestamp, toArray, toString, uniq };
export { ArgumentsType, Arrayable, Awaitable, Constructor, ControlledPromise, DeepMerge, ElementOf, Fn, MergeInsertions, Nullable, PartitionFilter, SingletonPromiseReturn, UnionToIntersection, assert, at, batchInvoke, clamp, clampArrayRange, clearUndefined, createControlledPromise, createPromiseLock, createSingletonPromise, debounce, deepMerge, ensurePrefix, ensureSuffix, flattenArrayable, hasOwnProperty, invoke, isBoolean, isBrowser, isDef, isFunction, isKeyOf, isNumber, isObject, isString, isTruthy, isWindow, last, mergeArrayable, move, noNull, noop, notNullish, notUndefined, objectEntries, objectKeys, objectMap, objectPick, p, partition, randomStr, range, remove, sample, shuffle, slash, sleep, sum, tap, template, throttle, timestamp, toArray, toString, uniq };

38

package.json
{
"name": "@antfu/utils",
"version": "0.5.1",
"version": "0.5.2",
"packageManager": "pnpm@7.0.1",
"description": "Opinionated collection of common JavaScript / TypeScript utils by @antfu",

@@ -12,2 +13,4 @@ "keywords": [

},
"license": "MIT",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"repository": {

@@ -18,5 +21,5 @@ "type": "git",

"funding": "https://github.com/sponsors/antfu",
"license": "MIT",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"sideEffects": false,
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "index.d.ts",
"exports": {

@@ -29,5 +32,2 @@ ".": {

},
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "index.d.ts",
"files": [

@@ -37,7 +37,7 @@ "dist",

],
"sideEffects": false,
"scripts": {
"build": "rollup -c",
"dev": "npm run build -- --watch",
"lint": "eslint \"{src,test}/**/*.ts\"",
"lint:fix": "npm run lint -- --fix",
"lint": "eslint .",
"prepublishOnly": "npm run build",

@@ -49,22 +49,22 @@ "release": "bumpp --commit --push --tag && npm publish",

"devDependencies": {
"@antfu/eslint-config": "^0.20.2",
"@antfu/ni": "^0.14.0",
"@antfu/eslint-config": "^0.23.0",
"@antfu/ni": "^0.16.2",
"@rollup/plugin-alias": "^3.1.9",
"@rollup/plugin-commonjs": "^21.0.3",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"@types/node": "^17.0.23",
"@rollup/plugin-node-resolve": "^13.3.0",
"@types/node": "^17.0.31",
"@types/throttle-debounce": "^2.1.0",
"bumpp": "^7.1.1",
"eslint": "^8.13.0",
"eslint": "^8.15.0",
"esno": "^0.14.1",
"p-limit": "^4.0.0",
"rollup": "^2.70.1",
"rollup": "^2.72.1",
"rollup-plugin-dts": "^4.2.1",
"rollup-plugin-esbuild": "^4.9.1",
"throttle-debounce": "^3.0.1",
"typescript": "^4.6.3",
"vite": "^2.9.1",
"vitest": "^0.9.3"
"typescript": "^4.6.4",
"vite": "^2.9.8",
"vitest": "^0.12.3"
}
}

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc