tsu 1.2.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +47 -40
- package/dist/index.js +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# tsu
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> TypeScript utilities
|
|
4
4
|
|
|
5
5
|
<a href="https://npmjs.com/package/tsu">
|
|
6
6
|
<img src="https://img.shields.io/npm/v/tsu" alt="npm version">
|
|
@@ -18,7 +18,7 @@ Install with your favourite package manager:
|
|
|
18
18
|
yarn add tsu
|
|
19
19
|
|
|
20
20
|
# pnpm
|
|
21
|
-
pnpm
|
|
21
|
+
pnpm add tsu
|
|
22
22
|
|
|
23
23
|
# npm
|
|
24
24
|
npm install tsu
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var
|
|
1
|
+
"use strict";var l=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var F=(n,e)=>{for(var t in e)l(n,t,{get:e[t],enumerable:!0})},E=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of O(e))!j.call(n,o)&&o!==t&&l(n,o,{get:()=>e[o],enumerable:!(r=v(e,o))||r.enumerable});return n};var A=n=>E(l({},"__esModule",{value:!0}),n);var gn={};F(gn,{capitalise:()=>cn,chars:()=>ln,debounce:()=>G,deepMerge:()=>w,delay:()=>Q,drop:()=>N,groupsOf:()=>S,head:()=>M,init:()=>C,isArray:()=>s,isBlank:()=>pn,isBoolean:()=>W,isBrowser:()=>g,isDefined:()=>$,isEmpty:()=>mn,isEmptyObject:()=>k,isEven:()=>tn,isFunction:()=>H,isNumber:()=>m,isObject:()=>u,isOdd:()=>rn,isString:()=>c,isTouchDevice:()=>z,isWindow:()=>J,last:()=>U,max:()=>V,memoize:()=>X,min:()=>I,modulo:()=>on,noop:()=>fn,once:()=>nn,partition:()=>q,randomChance:()=>un,randomNumber:()=>h,scroll:()=>K,sleep:()=>sn,splitAt:()=>B,sum:()=>R,tail:()=>D,take:()=>L,throttle:()=>en,toArray:()=>P,toCamel:()=>an,toKebab:()=>bn,toNumber:()=>dn,toOrdinal:()=>Tn,truncate:()=>xn,uniq:()=>p});module.exports=A(gn);function N(n,e){return n<=0?[...e]:e.slice(n)}function S(n,e){if(n<=0)throw new Error("[tsu] Invalid group size. Is it greater than 0?");if(n>=e.length)return[[...e]];let t=[];for(let r=0;r<e.length;r+=n)t.push(e.slice(r,r+n));return t}function M(n){return n[0]}function C(n){return n.slice(0,n.length-1)}function U(n){return n[n.length-1]}function V(n){if(!!n.length)return Math.max(...n)}function I(n){if(!!n.length)return Math.min(...n)}function q(n,e){return e.reduce(([t,r],o,i,f)=>n(o,i,f)?[[...t,o],r]:[t,[...r,o]],[[],[]])}function B(n,e){return n<=0?[[],[...e]]:[e.slice(0,n),e.slice(n)]}function R(n){return n.length?n.reduce((e,t)=>e+t,0):0}function D(n){return n.slice(1)}function L(n,e){return n<=0?[]:e.slice(0,n)}function P(n){return n?Array.isArray(n)?n:[n]:[]}function p(n){return Array.from(new Set(n))}function s(n){return Array.isArray(n)}function W(n){return typeof n=="boolean"}function g(){return typeof window<"u"}function $(n){return typeof n<"u"}function k(n){if(!u(n))return!1;for(let e in n)return!1;return!0}function H(n){return typeof n=="function"}function m(n){return typeof n=="number"}function u(n){return Object.prototype.toString.call(n)==="[object Object]"}function c(n){return typeof n=="string"}function z(){return"ontouchstart"in window||navigator.maxTouchPoints>0}function J(n){return g()&&toString.call(n)==="[object Window]"}function K({to:n,offset:e=0,duration:t=1e3,container:r=null}){let o=c(n)?document.querySelector(n):n,i=c(r)?document.querySelector(r):r,f=(i==null?void 0:i.scrollTop)||(window==null?void 0:window.pageYOffset)||0,a=(m(o)?o:_(o,f))+e,y=Date.now();function b(){let d=Date.now()-y,T=d<t,x=T?Z(f,a,d,t):a;T&&requestAnimationFrame(b),i?i.scrollTop=x:window.scrollTo(0,x)}b()}function Y(n){return n<.5?4*Math.pow(n,3):(n-1)*(2*n-2)*(2*n-2)+1}function Z(n,e,t,r){return n+(e-n)*Y(t/r)}function _(n,e){return n.nodeName==="HTML"?-e:n.getBoundingClientRect().top+e}function G(n,e){let t;return function(...r){clearTimeout(t),t=setTimeout(()=>{clearTimeout(t),n(...r)},e)}}function Q(n,e){setTimeout(()=>{n()},e)}function X(n){let e={};return function(...t){let r=JSON.stringify(t);if(r in e)return e[r];let o=n(...t);return e[r]=o,o}}function nn(n){let e=!1;return(...t)=>{e||(n(...t),e=!0)}}function en(n,e){let t=!1;return function(...r){t||(n(...r),t=!0,setTimeout(()=>{t=!1},e))}}function tn(n){return n%2===0}function rn(n){return n%2!==0}function on(n,e){return n-Math.floor(n/e)*e}function un(n){return h(n)===0}function h(n,e=0){return Math.floor(Math.random()*(n-e))+e}function fn(){}async function sn(n){return new Promise(e=>setTimeout(e,n))}function w(...n){return n.reduce((e,t)=>(Object.keys(t).forEach(r=>{s(e[r])&&s(t[r])?e[r]=p(e[r].concat(t[r])):u(e[r])&&u(t[r])?e[r]=w(e[r],t[r]):e[r]=t[r]}),e),{})}function cn(n,e=!1,t=" "){return e?n.split(t).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(t):n.charAt(0).toUpperCase()+n.slice(1)}function ln(n){return n.split("")}function pn(n){return n.trim().length===0}function mn(n){return n.length===0}function an(n){let e=/-(\w)/g;return n.replace(e,(t,r)=>r?r.toUpperCase():"")}function bn(n){let e=/\B([A-Z])/g;return n.replace(e,"-$1").toLowerCase()}function dn(n){return n.length?Number(n.replace(/[#£€$,%]/g,"")):NaN}function Tn(n){let t=["st","nd","rd"][(n/10%10^1&&n%10)-1]||"th";return`${n}${t}`}function xn(n,e,t="..."){return e<=0?t:n.slice(0,e)+t}0&&(module.exports={capitalise,chars,debounce,deepMerge,delay,drop,groupsOf,head,init,isArray,isBlank,isBoolean,isBrowser,isDefined,isEmpty,isEmptyObject,isEven,isFunction,isNumber,isObject,isOdd,isString,isTouchDevice,isWindow,last,max,memoize,min,modulo,noop,once,partition,randomChance,randomNumber,scroll,sleep,splitAt,sum,tail,take,throttle,toArray,toCamel,toKebab,toNumber,toOrdinal,truncate,uniq});
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare type VoidFn = Fn<void>;
|
|
|
5
5
|
declare type Obj<V = unknown> = Record<string | symbol | number, V>;
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Removes the first n items of an array.
|
|
8
|
+
* Removes the first `n` items of an array.
|
|
9
9
|
*
|
|
10
10
|
* @param n - The number of items to remove.
|
|
11
11
|
* @param array - The array.
|
|
@@ -13,7 +13,7 @@ declare type Obj<V = unknown> = Record<string | symbol | number, V>;
|
|
|
13
13
|
*/
|
|
14
14
|
declare function drop<T>(n: number, array: readonly T[]): T[];
|
|
15
15
|
/**
|
|
16
|
-
* Splits an array into groups of size
|
|
16
|
+
* Splits an array into groups of equal size.
|
|
17
17
|
*
|
|
18
18
|
* @param s - The size of each group.
|
|
19
19
|
* @param array - The array.
|
|
@@ -64,7 +64,7 @@ declare function min(array: readonly number[]): number | undefined;
|
|
|
64
64
|
*/
|
|
65
65
|
declare function partition<T>(filter: (x: T, idx: number, a: readonly T[]) => boolean, array: readonly T[]): [T[], T[]];
|
|
66
66
|
/**
|
|
67
|
-
* Splits an array into two at a
|
|
67
|
+
* Splits an array into two at a stated index.
|
|
68
68
|
*
|
|
69
69
|
* @param i - The position to split at.
|
|
70
70
|
* @param array - The array.
|
|
@@ -86,15 +86,15 @@ declare function sum(array: readonly number[]): number;
|
|
|
86
86
|
*/
|
|
87
87
|
declare function tail<T>(array: readonly T[]): T[];
|
|
88
88
|
/**
|
|
89
|
-
* Returns the first n items of an array.
|
|
89
|
+
* Returns the first `n` items of an array.
|
|
90
90
|
*
|
|
91
91
|
* @param n - The number of items to return.
|
|
92
92
|
* @param array - The array.
|
|
93
|
-
* @returns The first n items.
|
|
93
|
+
* @returns The first `n` items.
|
|
94
94
|
*/
|
|
95
95
|
declare function take<T>(n: number, array: readonly T[]): T[];
|
|
96
96
|
/**
|
|
97
|
-
* Wraps a single value
|
|
97
|
+
* Wraps a single value in an array, if not already an array.
|
|
98
98
|
*
|
|
99
99
|
* @param maybeArray - The value to wrap, or the existing array.
|
|
100
100
|
* @returns The item wrapped in an array, or the provided array.
|
|
@@ -108,14 +108,38 @@ declare function toArray<T>(maybeArray: Nullable<Arrayable<T>>): T[];
|
|
|
108
108
|
*/
|
|
109
109
|
declare function uniq<T>(array: readonly T[]): T[];
|
|
110
110
|
|
|
111
|
+
interface ScrollConfig {
|
|
112
|
+
to: Element | string | number;
|
|
113
|
+
offset?: number;
|
|
114
|
+
duration?: number;
|
|
115
|
+
container?: Element | string | null;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Scrolls the page or provided container to a target element or y-coordinate.
|
|
119
|
+
*
|
|
120
|
+
* @param config - The scroll config.
|
|
121
|
+
* @param config.to - The scroll target.
|
|
122
|
+
* @param config.offset - The offset from the scroll target (in px).
|
|
123
|
+
* @param config.duration - The scroll duration (in ms).
|
|
124
|
+
* @param config.container - The container to scroll in.
|
|
125
|
+
*/
|
|
126
|
+
declare function scroll({ to, offset, duration, container }: ScrollConfig): void;
|
|
127
|
+
|
|
111
128
|
/**
|
|
112
|
-
* Prevents
|
|
129
|
+
* Prevents function execution until it hasn't been called for a stated time period.
|
|
113
130
|
*
|
|
114
131
|
* @param fn - The function.
|
|
115
132
|
* @param delay - The time period (in ms).
|
|
116
133
|
* @returns The debounced function.
|
|
117
134
|
*/
|
|
118
|
-
declare function debounce(fn:
|
|
135
|
+
declare function debounce(fn: VoidFn, delay: number): VoidFn;
|
|
136
|
+
/**
|
|
137
|
+
* Delays function execution until after a stated time period has passed.
|
|
138
|
+
*
|
|
139
|
+
* @param fn - The function.
|
|
140
|
+
* @param delay - The time period (in ms).
|
|
141
|
+
*/
|
|
142
|
+
declare function delay(fn: VoidFn, delay: number): void;
|
|
119
143
|
/**
|
|
120
144
|
* Optimises subsequent calls of a function by caching return values.
|
|
121
145
|
*
|
|
@@ -129,15 +153,15 @@ declare function memoize<T>(fn: Fn<T>): Fn<T>;
|
|
|
129
153
|
* @param fn - The function.
|
|
130
154
|
* @returns The one-time callable function.
|
|
131
155
|
*/
|
|
132
|
-
declare function once(fn:
|
|
156
|
+
declare function once(fn: VoidFn): VoidFn;
|
|
133
157
|
/**
|
|
134
|
-
* Prevents
|
|
158
|
+
* Prevents function execution for a stated time period after it was last called.
|
|
135
159
|
*
|
|
136
160
|
* @param fn - The function.
|
|
137
161
|
* @param limit - The time period.
|
|
138
162
|
* @returns The throttled function.
|
|
139
163
|
*/
|
|
140
|
-
declare function throttle(fn:
|
|
164
|
+
declare function throttle(fn: VoidFn, limit: number): VoidFn;
|
|
141
165
|
|
|
142
166
|
/**
|
|
143
167
|
* Identifies if a value is an array.
|
|
@@ -237,6 +261,13 @@ declare function isOdd(n: number): boolean;
|
|
|
237
261
|
* @returns The remainder of dividing n by m.
|
|
238
262
|
*/
|
|
239
263
|
declare function modulo(n: number, m: number): number;
|
|
264
|
+
/**
|
|
265
|
+
* Rolls an `n`-sided die.
|
|
266
|
+
*
|
|
267
|
+
* @param n - The number of sides on the die.
|
|
268
|
+
* @returns If the die roll was 0.
|
|
269
|
+
*/
|
|
270
|
+
declare function randomChance(n: number): boolean;
|
|
240
271
|
/**
|
|
241
272
|
* Generates a random integer between bounds.
|
|
242
273
|
*
|
|
@@ -245,13 +276,6 @@ declare function modulo(n: number, m: number): number;
|
|
|
245
276
|
* @returns The random integer.
|
|
246
277
|
*/
|
|
247
278
|
declare function randomNumber(max: number, min?: number): number;
|
|
248
|
-
/**
|
|
249
|
-
* Rolls an n-sided die.
|
|
250
|
-
*
|
|
251
|
-
* @param n - The number of sides on the die.
|
|
252
|
-
* @returns If the die roll was 0.
|
|
253
|
-
*/
|
|
254
|
-
declare function randomChance(n: number): boolean;
|
|
255
279
|
|
|
256
280
|
/**
|
|
257
281
|
* Does nothing.
|
|
@@ -260,9 +284,9 @@ declare function randomChance(n: number): boolean;
|
|
|
260
284
|
*/
|
|
261
285
|
declare function noop(): void;
|
|
262
286
|
/**
|
|
263
|
-
* Halts
|
|
287
|
+
* Halts thread execution for a stated time period.
|
|
264
288
|
*
|
|
265
|
-
* @param duration - The time
|
|
289
|
+
* @param duration - The time period (in ms).
|
|
266
290
|
* @returns The halting promise.
|
|
267
291
|
*/
|
|
268
292
|
declare function sleep(duration: number): Promise<void>;
|
|
@@ -276,23 +300,6 @@ declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) e
|
|
|
276
300
|
*/
|
|
277
301
|
declare function deepMerge<T extends Obj<any>[]>(...objects: T): UnionToIntersection<T[number]>;
|
|
278
302
|
|
|
279
|
-
declare type ScrollConfig = {
|
|
280
|
-
to: Element | string | number;
|
|
281
|
-
offset?: number;
|
|
282
|
-
duration?: number;
|
|
283
|
-
container?: Element | string | null;
|
|
284
|
-
};
|
|
285
|
-
/**
|
|
286
|
-
* Scrolls the page or provided container to a target element or y-coordinate.
|
|
287
|
-
*
|
|
288
|
-
* @param config - The scroll config.
|
|
289
|
-
* @param config.to - The scroll target.
|
|
290
|
-
* @param config.offset - The offset from the scroll target (in px).
|
|
291
|
-
* @param config.duration - The scroll duration (in ms).
|
|
292
|
-
* @param config.container - The container to scroll in.
|
|
293
|
-
*/
|
|
294
|
-
declare function scroll({ to, offset, duration, container }: ScrollConfig): void;
|
|
295
|
-
|
|
296
303
|
/**
|
|
297
304
|
* Capitalises the first letter of one word, or all words, in a string.
|
|
298
305
|
*
|
|
@@ -338,7 +345,7 @@ declare function toCamel(str: string): string;
|
|
|
338
345
|
*/
|
|
339
346
|
declare function toKebab(str: string): string;
|
|
340
347
|
/**
|
|
341
|
-
* Converts a string which contains a number
|
|
348
|
+
* Converts a string which contains a number into the number itself.
|
|
342
349
|
*
|
|
343
350
|
* @param str - The string.
|
|
344
351
|
* @returns The number.
|
|
@@ -350,7 +357,7 @@ declare function toNumber(str: string): number;
|
|
|
350
357
|
* @param n - The number.
|
|
351
358
|
* @returns The number with the ordinal suffix appended.
|
|
352
359
|
*/
|
|
353
|
-
declare function toOrdinal(n: number
|
|
360
|
+
declare function toOrdinal(n: number): string;
|
|
354
361
|
/**
|
|
355
362
|
* Truncates a string to a provided length.
|
|
356
363
|
*
|
|
@@ -361,4 +368,4 @@ declare function toOrdinal(n: number | string): string;
|
|
|
361
368
|
*/
|
|
362
369
|
declare function truncate(str: string, length: number, truncateStr?: string): string;
|
|
363
370
|
|
|
364
|
-
export { Arrayable, Fn, Nullable, Obj, VoidFn, capitalise, chars, debounce, deepMerge, drop, groupsOf, head, init, isArray, isBlank, isBoolean, isBrowser, isDefined, isEmpty, isEmptyObject, isEven, isFunction, isNumber, isObject, isOdd, isString, isTouchDevice, isWindow, last, max, memoize, min, modulo, noop, once, partition, randomChance, randomNumber, scroll, sleep, splitAt, sum, tail, take, throttle, toArray, toCamel, toKebab, toNumber, toOrdinal, truncate, uniq };
|
|
371
|
+
export { Arrayable, Fn, Nullable, Obj, VoidFn, capitalise, chars, debounce, deepMerge, delay, drop, groupsOf, head, init, isArray, isBlank, isBoolean, isBrowser, isDefined, isEmpty, isEmptyObject, isEven, isFunction, isNumber, isObject, isOdd, isString, isTouchDevice, isWindow, last, max, memoize, min, modulo, noop, once, partition, randomChance, randomNumber, scroll, sleep, splitAt, sum, tail, take, throttle, toArray, toCamel, toKebab, toNumber, toOrdinal, truncate, uniq };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function j(n,e){return n<=0?[...e]:e.slice(n)}function
|
|
1
|
+
function j(n,e){return n<=0?[...e]:e.slice(n)}function F(n,e){if(n<=0)throw new Error("[tsu] Invalid group size. Is it greater than 0?");if(n>=e.length)return[[...e]];let t=[];for(let r=0;r<e.length;r+=n)t.push(e.slice(r,r+n));return t}function E(n){return n[0]}function A(n){return n.slice(0,n.length-1)}function N(n){return n[n.length-1]}function S(n){if(!!n.length)return Math.max(...n)}function M(n){if(!!n.length)return Math.min(...n)}function C(n,e){return e.reduce(([t,r],o,i,u)=>n(o,i,u)?[[...t,o],r]:[t,[...r,o]],[[],[]])}function U(n,e){return n<=0?[[],[...e]]:[e.slice(0,n),e.slice(n)]}function V(n){return n.length?n.reduce((e,t)=>e+t,0):0}function I(n){return n.slice(1)}function q(n,e){return n<=0?[]:e.slice(0,n)}function B(n){return n?Array.isArray(n)?n:[n]:[]}function d(n){return Array.from(new Set(n))}function s(n){return Array.isArray(n)}function D(n){return typeof n=="boolean"}function g(){return typeof window<"u"}function L(n){return typeof n<"u"}function P(n){if(!f(n))return!1;for(let e in n)return!1;return!0}function W(n){return typeof n=="function"}function T(n){return typeof n=="number"}function f(n){return Object.prototype.toString.call(n)==="[object Object]"}function c(n){return typeof n=="string"}function $(){return"ontouchstart"in window||navigator.maxTouchPoints>0}function k(n){return g()&&toString.call(n)==="[object Window]"}function J({to:n,offset:e=0,duration:t=1e3,container:r=null}){let o=c(n)?document.querySelector(n):n,i=c(r)?document.querySelector(r):r,u=(i==null?void 0:i.scrollTop)||(window==null?void 0:window.pageYOffset)||0,l=(T(o)?o:y(o,u))+e,x=Date.now();function p(){let m=Date.now()-x,a=m<t,b=a?w(u,l,m,t):l;a&&requestAnimationFrame(p),i?i.scrollTop=b:window.scrollTo(0,b)}p()}function h(n){return n<.5?4*Math.pow(n,3):(n-1)*(2*n-2)*(2*n-2)+1}function w(n,e,t,r){return n+(e-n)*h(t/r)}function y(n,e){return n.nodeName==="HTML"?-e:n.getBoundingClientRect().top+e}function Y(n,e){let t;return function(...r){clearTimeout(t),t=setTimeout(()=>{clearTimeout(t),n(...r)},e)}}function Z(n,e){setTimeout(()=>{n()},e)}function _(n){let e={};return function(...t){let r=JSON.stringify(t);if(r in e)return e[r];let o=n(...t);return e[r]=o,o}}function G(n){let e=!1;return(...t)=>{e||(n(...t),e=!0)}}function Q(n,e){let t=!1;return function(...r){t||(n(...r),t=!0,setTimeout(()=>{t=!1},e))}}function nn(n){return n%2===0}function en(n){return n%2!==0}function tn(n,e){return n-Math.floor(n/e)*e}function rn(n){return v(n)===0}function v(n,e=0){return Math.floor(Math.random()*(n-e))+e}function un(){}async function fn(n){return new Promise(e=>setTimeout(e,n))}function O(...n){return n.reduce((e,t)=>(Object.keys(t).forEach(r=>{s(e[r])&&s(t[r])?e[r]=d(e[r].concat(t[r])):f(e[r])&&f(t[r])?e[r]=O(e[r],t[r]):e[r]=t[r]}),e),{})}function mn(n,e=!1,t=" "){return e?n.split(t).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(t):n.charAt(0).toUpperCase()+n.slice(1)}function an(n){return n.split("")}function bn(n){return n.trim().length===0}function dn(n){return n.length===0}function Tn(n){let e=/-(\w)/g;return n.replace(e,(t,r)=>r?r.toUpperCase():"")}function xn(n){let e=/\B([A-Z])/g;return n.replace(e,"-$1").toLowerCase()}function gn(n){return n.length?Number(n.replace(/[#£€$,%]/g,"")):NaN}function hn(n){let t=["st","nd","rd"][(n/10%10^1&&n%10)-1]||"th";return`${n}${t}`}function wn(n,e,t="..."){return e<=0?t:n.slice(0,e)+t}export{mn as capitalise,an as chars,Y as debounce,O as deepMerge,Z as delay,j as drop,F as groupsOf,E as head,A as init,s as isArray,bn as isBlank,D as isBoolean,g as isBrowser,L as isDefined,dn as isEmpty,P as isEmptyObject,nn as isEven,W as isFunction,T as isNumber,f as isObject,en as isOdd,c as isString,$ as isTouchDevice,k as isWindow,N as last,S as max,_ as memoize,M as min,tn as modulo,un as noop,G as once,C as partition,rn as randomChance,v as randomNumber,J as scroll,fn as sleep,U as splitAt,V as sum,I as tail,q as take,Q as throttle,B as toArray,Tn as toCamel,xn as toKebab,gn as toNumber,hn as toOrdinal,wn as truncate,d as uniq};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsu",
|
|
3
|
-
"version": "1.2
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "TypeScript utilities",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "eb3n",
|
|
8
8
|
"main": "./dist/index.js",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"watch": "nr build --watch src",
|
|
31
31
|
"test": "jest",
|
|
32
32
|
"prepublishOnly": "nr test; nr build",
|
|
33
|
-
"docs:dev": "
|
|
34
|
-
"docs:build": "
|
|
33
|
+
"docs:dev": "vitepress dev docs --port 8888",
|
|
34
|
+
"docs:build": "vitepress build docs"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@antfu/ni": "^0.17.2",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"ts-jest": "^28.0.8",
|
|
47
47
|
"tsup": "^6.2.2",
|
|
48
48
|
"typescript": "^4.7.4",
|
|
49
|
+
"vitepress": "1.0.0-alpha.8",
|
|
49
50
|
"vuepress": "2.0.0-beta.41"
|
|
50
51
|
}
|
|
51
52
|
}
|