@valkyriestudios/utils 12.16.0 → 12.17.0
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/array/index.d.ts +2 -1
- package/array/index.js +3 -1
- package/index.d.ts +9 -8
- package/package.json +1 -1
package/array/index.d.ts
CHANGED
|
@@ -7,5 +7,6 @@ import { mapKey } from './mapKey';
|
|
|
7
7
|
import { mapPrimitive } from './mapPrimitive';
|
|
8
8
|
import { groupBy } from './groupBy';
|
|
9
9
|
import { shuffle } from './shuffle';
|
|
10
|
+
import { split } from './split';
|
|
10
11
|
import { sort } from './sort';
|
|
11
|
-
export { dedupe, isArray, isArray as is, isNotEmptyArray, isNotEmptyArray as isNotEmpty, isNotEmptyArray as isNeArray, isNotEmptyArray as isNe, join, mapFn, mapKey, mapPrimitive, groupBy, shuffle, sort };
|
|
12
|
+
export { dedupe, isArray, isArray as is, isNotEmptyArray, isNotEmptyArray as isNotEmpty, isNotEmptyArray as isNeArray, isNotEmptyArray as isNe, join, mapFn, mapKey, mapPrimitive, groupBy, shuffle, split, sort };
|
package/array/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sort = exports.shuffle = exports.groupBy = exports.mapPrimitive = exports.mapKey = exports.mapFn = exports.join = exports.isNe = exports.isNeArray = exports.isNotEmpty = exports.isNotEmptyArray = exports.is = exports.isArray = exports.dedupe = void 0;
|
|
3
|
+
exports.sort = exports.split = exports.shuffle = exports.groupBy = exports.mapPrimitive = exports.mapKey = exports.mapFn = exports.join = exports.isNe = exports.isNeArray = exports.isNotEmpty = exports.isNotEmptyArray = exports.is = exports.isArray = exports.dedupe = void 0;
|
|
4
4
|
const dedupe_1 = require("./dedupe");
|
|
5
5
|
Object.defineProperty(exports, "dedupe", { enumerable: true, get: function () { return dedupe_1.dedupe; } });
|
|
6
6
|
const is_1 = require("./is");
|
|
@@ -23,5 +23,7 @@ const groupBy_1 = require("./groupBy");
|
|
|
23
23
|
Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return groupBy_1.groupBy; } });
|
|
24
24
|
const shuffle_1 = require("./shuffle");
|
|
25
25
|
Object.defineProperty(exports, "shuffle", { enumerable: true, get: function () { return shuffle_1.shuffle; } });
|
|
26
|
+
const split_1 = require("./split");
|
|
27
|
+
Object.defineProperty(exports, "split", { enumerable: true, get: function () { return split_1.split; } });
|
|
26
28
|
const sort_1 = require("./sort");
|
|
27
29
|
Object.defineProperty(exports, "sort", { enumerable: true, get: function () { return sort_1.sort; } });
|
package/index.d.ts
CHANGED
|
@@ -84,6 +84,13 @@ declare module "array/shuffle" {
|
|
|
84
84
|
function shuffle(arr: unknown[]): void;
|
|
85
85
|
export { shuffle, shuffle as default };
|
|
86
86
|
}
|
|
87
|
+
declare module "array/split" {
|
|
88
|
+
type SplitOptions<T> = {
|
|
89
|
+
filter_fn?: (el: T) => boolean;
|
|
90
|
+
};
|
|
91
|
+
function split<T>(arr: T[], size: number, opts?: SplitOptions<T>): T[][];
|
|
92
|
+
export { split, split as default };
|
|
93
|
+
}
|
|
87
94
|
declare module "array/sort" {
|
|
88
95
|
type sortOptions<T> = {
|
|
89
96
|
filter_fn?: (el: T) => boolean;
|
|
@@ -106,8 +113,9 @@ declare module "array/index" {
|
|
|
106
113
|
import { mapPrimitive } from "array/mapPrimitive";
|
|
107
114
|
import { groupBy } from "array/groupBy";
|
|
108
115
|
import { shuffle } from "array/shuffle";
|
|
116
|
+
import { split } from "array/split";
|
|
109
117
|
import { sort } from "array/sort";
|
|
110
|
-
export { dedupe, isArray, isArray as is, isNotEmptyArray, isNotEmptyArray as isNotEmpty, isNotEmptyArray as isNeArray, isNotEmptyArray as isNe, join, mapFn, mapKey, mapPrimitive, groupBy, shuffle, sort };
|
|
118
|
+
export { dedupe, isArray, isArray as is, isNotEmptyArray, isNotEmptyArray as isNotEmpty, isNotEmptyArray as isNeArray, isNotEmptyArray as isNe, join, mapFn, mapKey, mapPrimitive, groupBy, shuffle, split, sort };
|
|
111
119
|
}
|
|
112
120
|
declare module "boolean/is" {
|
|
113
121
|
function isBoolean(val: unknown): val is boolean;
|
|
@@ -481,13 +489,6 @@ declare module "is" {
|
|
|
481
489
|
}>;
|
|
482
490
|
export { Is, Is as default };
|
|
483
491
|
}
|
|
484
|
-
declare module "array/split" {
|
|
485
|
-
type SplitOptions<T> = {
|
|
486
|
-
filter_fn?: (el: T) => boolean;
|
|
487
|
-
};
|
|
488
|
-
function split<T>(arr: T[], size: number, opts?: SplitOptions<T>): T[][];
|
|
489
|
-
export { split, split as default };
|
|
490
|
-
}
|
|
491
492
|
declare module "caching/memoize" {
|
|
492
493
|
function memoize<T extends (...args: any[]) => unknown>(fn: T, resolver?: (...args: Parameters<T>) => any, memoize_for?: number | false): T;
|
|
493
494
|
export { memoize, memoize as default };
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "@valkyriestudios/utils", "version": "12.
|
|
1
|
+
{ "name": "@valkyriestudios/utils", "version": "12.17.0", "description": "A collection of single-function utilities for common tasks", "author": { "name": "Peter Vermeulen", "url": "https://www.linkedin.com/in/petervermeulen1/" }, "keywords": [ "utility", "library", "javascript", "js", "node", "bun" ], "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/ValkyrieStudios/utils.git" }, "bugs": { "url": "https://github.com/ValkyrieStudios/utils/issues" }, "homepage": "https://github.com/ValkyrieStudios/utils#readme", "types": "index.d.ts" }
|