massaman 0.0.1-rc.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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +139 -0
  3. package/dist/array/index.d.mts +2 -0
  4. package/dist/array/index.mjs +2 -0
  5. package/dist/array-C8MqjyiP.mjs +191 -0
  6. package/dist/array-C8MqjyiP.mjs.map +1 -0
  7. package/dist/control/index.d.mts +2 -0
  8. package/dist/control/index.mjs +2 -0
  9. package/dist/control-B4mDPBn6.mjs +164 -0
  10. package/dist/control-B4mDPBn6.mjs.map +1 -0
  11. package/dist/conversion/index.d.mts +2 -0
  12. package/dist/conversion/index.mjs +2 -0
  13. package/dist/conversion-ByBXBR5i.mjs +189 -0
  14. package/dist/conversion-ByBXBR5i.mjs.map +1 -0
  15. package/dist/error/index.d.mts +2 -0
  16. package/dist/error/index.mjs +2 -0
  17. package/dist/function/index.d.mts +2 -0
  18. package/dist/function/index.mjs +2 -0
  19. package/dist/function-2-6QB4m7.mjs +122 -0
  20. package/dist/function-2-6QB4m7.mjs.map +1 -0
  21. package/dist/index-BkyNt8th.d.mts +20 -0
  22. package/dist/index-BkyNt8th.d.mts.map +1 -0
  23. package/dist/index-Br9PO6mU.d.mts +155 -0
  24. package/dist/index-Br9PO6mU.d.mts.map +1 -0
  25. package/dist/index-BuBpCB73.d.mts +197 -0
  26. package/dist/index-BuBpCB73.d.mts.map +1 -0
  27. package/dist/index-COFf0Pih.d.mts +128 -0
  28. package/dist/index-COFf0Pih.d.mts.map +1 -0
  29. package/dist/index-DqsBQ7Pp.d.mts +120 -0
  30. package/dist/index-DqsBQ7Pp.d.mts.map +1 -0
  31. package/dist/index-Dw_tuZdb.d.mts +134 -0
  32. package/dist/index-Dw_tuZdb.d.mts.map +1 -0
  33. package/dist/index.d.mts +12 -0
  34. package/dist/index.mjs +12 -0
  35. package/dist/math/index.d.mts +2 -0
  36. package/dist/math/index.mjs +2 -0
  37. package/dist/object/index.d.mts +2 -0
  38. package/dist/object/index.mjs +2 -0
  39. package/dist/object-BHnp9Sr9.mjs +27 -0
  40. package/dist/object-BHnp9Sr9.mjs.map +1 -0
  41. package/dist/pattern/index.d.mts +2 -0
  42. package/dist/pattern/index.mjs +2 -0
  43. package/dist/predicate/index.d.mts +2 -0
  44. package/dist/predicate/index.mjs +2 -0
  45. package/dist/predicate-CYzSOMLW.mjs +108 -0
  46. package/dist/predicate-CYzSOMLW.mjs.map +1 -0
  47. package/dist/promise/index.d.mts +2 -0
  48. package/dist/promise/index.mjs +2 -0
  49. package/dist/string/index.d.mts +2 -0
  50. package/dist/string/index.mjs +2 -0
  51. package/package.json +108 -0
@@ -0,0 +1,2 @@
1
+ import { _ as toSnakeCaseKeys, a as flattenObject, c as mapValues, d as omit, f as omitBy, g as toMerged, h as toCamelCaseKeys, i as findKey, l as merge, m as pickBy, n as cloneDeep, o as invert, p as pick, r as cloneDeepWith, s as mapKeys, t as clone, u as mergeWith, v as evolve } from "../object-BHnp9Sr9.mjs";
2
+ export { clone, cloneDeep, cloneDeepWith, evolve, findKey, flattenObject, invert, mapKeys, mapValues, merge, mergeWith, omit, omitBy, pick, pickBy, toCamelCaseKeys, toMerged, toSnakeCaseKeys };
@@ -0,0 +1,27 @@
1
+ import { clone, cloneDeep, cloneDeepWith, findKey, flattenObject, invert, mapKeys, mapValues, merge, mergeWith, omit, omitBy, pick, pickBy, toCamelCaseKeys, toMerged, toSnakeCaseKeys } from "es-toolkit/object";
2
+ //#region src/object/evolve.ts
3
+ /**
4
+ * Applies a spec of transformation functions to matching keys of an object,
5
+ * returning a new object. Keys not in the spec are copied as-is.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * evolve({ name: ' Alice ', age: 29, role: 'admin' }, {
10
+ * name: (s) => s.trim(),
11
+ * age: (n) => n + 1,
12
+ * })
13
+ * // { name: 'Alice', age: 30, role: 'admin' }
14
+ * ```
15
+ */
16
+ function evolve(obj, spec) {
17
+ const result = { ...obj };
18
+ for (const key of Object.keys(spec)) {
19
+ const transform = spec[key];
20
+ if (transform != null && key in result) result[key] = transform(result[key]);
21
+ }
22
+ return result;
23
+ }
24
+ //#endregion
25
+ export { toSnakeCaseKeys as _, flattenObject as a, mapValues as c, omit as d, omitBy as f, toMerged as g, toCamelCaseKeys as h, findKey as i, merge as l, pickBy as m, cloneDeep as n, invert as o, pick as p, cloneDeepWith as r, mapKeys as s, clone as t, mergeWith as u, evolve as v };
26
+
27
+ //# sourceMappingURL=object-BHnp9Sr9.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object-BHnp9Sr9.mjs","names":[],"sources":["../src/object/evolve.ts"],"sourcesContent":["/* oxlint-disable security/detect-object-injection -- keys sourced from Object.keys(spec), not user input */\n\n/**\n * Applies a spec of transformation functions to matching keys of an object,\n * returning a new object. Keys not in the spec are copied as-is.\n *\n * @example\n * ```ts\n * evolve({ name: ' Alice ', age: 29, role: 'admin' }, {\n * name: (s) => s.trim(),\n * age: (n) => n + 1,\n * })\n * // { name: 'Alice', age: 30, role: 'admin' }\n * ```\n */\nexport function evolve<T extends Record<string, unknown>>(\n obj: T,\n spec: { [K in keyof T]?: (value: T[K]) => T[K] }\n): T {\n const result = { ...obj }\n for (const key of Object.keys(spec) as Array<keyof T>) {\n const transform = spec[key]\n if (transform != null && key in result) {\n result[key] = transform(result[key])\n }\n }\n return result\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAgB,OACd,KACA,MACG;CACH,MAAM,SAAS,EAAE,GAAG,KAAK;CACzB,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,EAAoB;EACrD,MAAM,YAAY,KAAK;EACvB,IAAI,aAAa,QAAQ,OAAO,QAC9B,OAAO,OAAO,UAAU,OAAO,KAAK;;CAGxC,OAAO"}
@@ -0,0 +1,2 @@
1
+ import { NonExhaustiveError, P, Pattern, isMatching, match } from "ts-pattern";
2
+ export { NonExhaustiveError, P, Pattern, isMatching, match };
@@ -0,0 +1,2 @@
1
+ import { NonExhaustiveError, P, Pattern, isMatching, match } from "ts-pattern";
2
+ export { NonExhaustiveError, P, Pattern, isMatching, match };
@@ -0,0 +1,2 @@
1
+ import { A as isSymbol, B as isNotEmpty, C as isNumber, D as isRegExp, E as isPromise, F as isArray, G as either, H as allPass, I as isEmpty, L as isFiniteNumber, M as isUndefined, N as isWeakMap, O as isSet, P as isWeakSet, R as isInteger, S as isNull, T as isPrimitive, U as anyPass, V as isObject, W as both, _ as isLength, a as isBuffer, b as isNode, c as isEqual, d as isFile, f as isFunction, g as isJSONValue, h as isJSONObject, i as isBrowser, j as isTypedArray, k as isString, l as isEqualWith, m as isJSONArray, n as isBlob, o as isDate, p as isJSON, r as isBoolean, s as isEmptyObject, t as isArrayBuffer, u as isError, v as isMap, w as isPlainObject, x as isNotNil, y as isNil, z as isNaN } from "../index-BuBpCB73.mjs";
2
+ export { allPass, anyPass, both, either, isArray, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmpty, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFiniteNumber, isFunction, isInteger, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNaN, isNil, isNode, isNotEmpty, isNotNil, isNull, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet };
@@ -0,0 +1,2 @@
1
+ import { A as isSymbol, B as isNotEmpty, C as isNumber, D as isRegExp, E as isPromise, F as isArray, G as either, H as allPass, I as isEmpty, L as isFiniteNumber, M as isUndefined, N as isWeakMap, O as isSet, P as isWeakSet, R as isInteger, S as isNull, T as isPrimitive, U as anyPass, V as isObject, W as both, _ as isLength, a as isBuffer, b as isNode, c as isEqual, d as isFile, f as isFunction, g as isJSONValue, h as isJSONObject, i as isBrowser, j as isTypedArray, k as isString, l as isEqualWith, m as isJSONArray, n as isBlob, o as isDate, p as isJSON, r as isBoolean, s as isEmptyObject, t as isArrayBuffer, u as isError, v as isMap, w as isPlainObject, x as isNotNil, y as isNil, z as isNaN } from "../predicate-CYzSOMLW.mjs";
2
+ export { allPass, anyPass, both, either, isArray, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmpty, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFiniteNumber, isFunction, isInteger, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNaN, isNil, isNode, isNotEmpty, isNotNil, isNull, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet };
@@ -0,0 +1,108 @@
1
+ import { isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError as isError$1, isFile, isFunction, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap as isMap$1, isNil as isNil$1, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive as isPrimitive$1, isPromise, isRegExp, isSet as isSet$1, isString as isString$1, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet } from "es-toolkit/predicate";
2
+ //#region src/predicate/combinators.ts
3
+ function allPass(predicates) {
4
+ return (value) => predicates.every((pred) => pred(value));
5
+ }
6
+ function anyPass(predicates) {
7
+ return (value) => predicates.some((pred) => pred(value));
8
+ }
9
+ function both(f, g) {
10
+ return (value) => f(value) && g(value);
11
+ }
12
+ function either(f, g) {
13
+ return (value) => f(value) || g(value);
14
+ }
15
+ //#endregion
16
+ //#region src/predicate/guards.ts
17
+ /**
18
+ * Checks if a value is an array.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * isArray([1, 2]) // true
23
+ * isArray('hello') // false
24
+ * ```
25
+ */
26
+ const isArray = Array.isArray;
27
+ /**
28
+ * Checks if a value is a non-null object.
29
+ *
30
+ * Returns `true` for plain objects, arrays, class instances, etc.
31
+ * Returns `false` for `null`, primitives, and functions.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * isObject({}) // true
36
+ * isObject(null) // false
37
+ * ```
38
+ */
39
+ function isObject(value) {
40
+ return value !== null && typeof value === "object";
41
+ }
42
+ /**
43
+ * Checks if a value is empty.
44
+ *
45
+ * - Strings: `''`
46
+ * - Arrays: `length === 0`
47
+ * - Maps/Sets: `size === 0`
48
+ * - Objects: no own enumerable keys
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * isEmpty('') // true
53
+ * isEmpty([]) // true
54
+ * isEmpty({}) // true
55
+ * isEmpty(new Map()) // true
56
+ * ```
57
+ */
58
+ function isEmpty(value) {
59
+ if (typeof value === "string" || Array.isArray(value)) return value.length === 0;
60
+ if (value instanceof Map || value instanceof Set) return value.size === 0;
61
+ return Object.keys(value).length === 0;
62
+ }
63
+ /**
64
+ * Checks if a value is not empty. Complement of {@link isEmpty}.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * isNotEmpty('hello') // true
69
+ * isNotEmpty([]) // false
70
+ * ```
71
+ */
72
+ function isNotEmpty(value) {
73
+ return !isEmpty(value);
74
+ }
75
+ /**
76
+ * Checks if a value is a finite number.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * isFiniteNumber(42) // true
81
+ * isFiniteNumber(Infinity) // false
82
+ * ```
83
+ */
84
+ const isFiniteNumber = Number.isFinite;
85
+ /**
86
+ * Checks if a value is an integer.
87
+ *
88
+ * @example
89
+ * ```ts
90
+ * isInteger(42) // true
91
+ * isInteger(4.2) // false
92
+ * ```
93
+ */
94
+ const isInteger = Number.isInteger;
95
+ /**
96
+ * Checks if a value is NaN.
97
+ *
98
+ * @example
99
+ * ```ts
100
+ * isNaN(NaN) // true
101
+ * isNaN(42) // false
102
+ * ```
103
+ */
104
+ const isNaN = Number.isNaN;
105
+ //#endregion
106
+ export { isSymbol as A, isNotEmpty as B, isNumber as C, isRegExp as D, isPromise as E, isArray as F, either as G, allPass as H, isEmpty as I, isFiniteNumber as L, isUndefined as M, isWeakMap as N, isSet$1 as O, isWeakSet as P, isInteger as R, isNull as S, isPrimitive$1 as T, anyPass as U, isObject as V, both as W, isLength as _, isBuffer as a, isNode as b, isEqual as c, isFile as d, isFunction as f, isJSONValue as g, isJSONObject as h, isBrowser as i, isTypedArray as j, isString$1 as k, isEqualWith as l, isJSONArray as m, isBlob as n, isDate as o, isJSON as p, isBoolean as r, isEmptyObject as s, isArrayBuffer as t, isError$1 as u, isMap$1 as v, isPlainObject as w, isNotNil as x, isNil$1 as y, isNaN as z };
107
+
108
+ //# sourceMappingURL=predicate-CYzSOMLW.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predicate-CYzSOMLW.mjs","names":[],"sources":["../src/predicate/combinators.ts","../src/predicate/guards.ts"],"sourcesContent":["import type { DangerouslyAllowAny } from '../types/internal.js'\n\n/**\n * Extracts the narrowed target type from a type-guard predicate.\n * Returns `never` for plain `boolean` predicates so they don't pollute\n * the union/intersection downstream.\n *\n * `DangerouslyAllowAny` is required here: this conditional needs to match\n * predicate signatures with arbitrary input types (`(n: number) => …`,\n * `(s: string) => …`, etc.). `unknown` would reject those by contravariance.\n */\ntype Guarded<P> = P extends ((value: DangerouslyAllowAny) => value is infer X) ? X : never\n\n/**\n * Extracts the input type from a tuple of predicates. Uses `infer V` in\n * contravariant position so multiple predicates with the same input type\n * collapse to that type. Return-position is `unknown` (covariant, accepts\n * any return value).\n */\ntype InferInput<Ps> = Ps extends ReadonlyArray<(value: infer V) => unknown> ? V : never\n\n/**\n * Converts a union `A | B | C` to an intersection `A & B & C`.\n * Standard contravariant-position trick.\n */\ntype UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (\n k: infer I\n) => void\n ? I\n : never\n\n/**\n * Returns a predicate that checks if a value satisfies ALL predicates.\n *\n * When every input is a type guard, the result narrows to the intersection\n * of every guard's target type. Plain `boolean` predicates contribute nothing\n * to the narrowing (they fall back to no-op).\n *\n * @example\n * ```ts\n * const isPositiveEven = allPass([(n: number) => n > 0, (n: number) => n % 2 === 0])\n * isPositiveEven(4) // true\n *\n * const isNonEmptyString = allPass([isString, isNotEmpty])\n * if (isNonEmptyString(x)) {\n * // x is narrowed to string here\n * }\n * ```\n */\nexport function allPass<T>(predicates: readonly []): (value: T) => true\nexport function allPass<Ps extends ReadonlyArray<(value: DangerouslyAllowAny) => boolean>>(\n predicates: Ps\n): (value: InferInput<Ps>) => value is InferInput<Ps> & UnionToIntersection<Guarded<Ps[number]>>\nexport function allPass(\n predicates: ReadonlyArray<(value: unknown) => boolean>\n): (value: unknown) => boolean {\n return (value: unknown) => predicates.every((pred) => pred(value))\n}\n\n/**\n * Returns a predicate that checks if a value satisfies ANY predicate.\n *\n * When every input is a type guard, the result narrows to the union of every\n * guard's target type (since only one needs to match).\n *\n * @example\n * ```ts\n * const isAdminOrOwner = anyPass([isAdmin, isOwner])\n * isAdminOrOwner(user)\n *\n * const isStringOrNumber = anyPass([isString, isNumber])\n * if (isStringOrNumber(x)) {\n * // x is narrowed to string | number here\n * }\n * ```\n */\nexport function anyPass<T>(predicates: readonly []): (value: T) => false\nexport function anyPass<Ps extends ReadonlyArray<(value: DangerouslyAllowAny) => boolean>>(\n predicates: Ps\n): (value: InferInput<Ps>) => value is InferInput<Ps> & Guarded<Ps[number]>\nexport function anyPass(\n predicates: ReadonlyArray<(value: unknown) => boolean>\n): (value: unknown) => boolean {\n return (value: unknown) => predicates.some((pred) => pred(value))\n}\n\n/**\n * Returns a predicate that checks if a value satisfies both predicates.\n *\n * Binary AND combinator — shorthand for `allPass([f, g])`. When both inputs\n * are type guards, the result narrows to the intersection of their target types.\n *\n * @example\n * ```ts\n * const isPositiveEven = both((n: number) => n > 0, (n: number) => n % 2 === 0)\n * isPositiveEven(4)\n * ```\n */\nexport function both<T, A extends T, B extends T>(\n f: (value: T) => value is A,\n g: (value: T) => value is B\n): (value: T) => value is A & B\nexport function both<T>(f: (value: T) => boolean, g: (value: T) => boolean): (value: T) => boolean\nexport function both<T>(f: (value: T) => boolean, g: (value: T) => boolean): (value: T) => boolean {\n return (value: T) => f(value) && g(value)\n}\n\n/**\n * Returns a predicate that checks if a value satisfies either predicate.\n *\n * Binary OR combinator — shorthand for `anyPass([f, g])`. When both inputs\n * are type guards, the result narrows to the union of their target types.\n *\n * @example\n * ```ts\n * const isNilOrEmpty = either(isNil, (s: string) => s === '')\n * isNilOrEmpty(null)\n * ```\n */\nexport function either<T, A extends T, B extends T>(\n f: (value: T) => value is A,\n g: (value: T) => value is B\n): (value: T) => value is A | B\nexport function either<T>(f: (value: T) => boolean, g: (value: T) => boolean): (value: T) => boolean\nexport function either<T>(\n f: (value: T) => boolean,\n g: (value: T) => boolean\n): (value: T) => boolean {\n return (value: T) => f(value) || g(value)\n}\n","/**\n * Checks if a value is an array.\n *\n * @example\n * ```ts\n * isArray([1, 2]) // true\n * isArray('hello') // false\n * ```\n */\nexport const isArray = Array.isArray\n\n/**\n * Checks if a value is a non-null object.\n *\n * Returns `true` for plain objects, arrays, class instances, etc.\n * Returns `false` for `null`, primitives, and functions.\n *\n * @example\n * ```ts\n * isObject({}) // true\n * isObject(null) // false\n * ```\n */\nexport function isObject(value: unknown): value is object {\n return value !== null && typeof value === 'object'\n}\n\n/**\n * Checks if a value is empty.\n *\n * - Strings: `''`\n * - Arrays: `length === 0`\n * - Maps/Sets: `size === 0`\n * - Objects: no own enumerable keys\n *\n * @example\n * ```ts\n * isEmpty('') // true\n * isEmpty([]) // true\n * isEmpty({}) // true\n * isEmpty(new Map()) // true\n * ```\n */\nexport function isEmpty(value: string | object): boolean {\n if (typeof value === 'string' || Array.isArray(value)) {\n return value.length === 0\n }\n if (value instanceof Map || value instanceof Set) {\n return value.size === 0\n }\n return Object.keys(value).length === 0\n}\n\n/**\n * Checks if a value is not empty. Complement of {@link isEmpty}.\n *\n * @example\n * ```ts\n * isNotEmpty('hello') // true\n * isNotEmpty([]) // false\n * ```\n */\nexport function isNotEmpty(value: string | object): boolean {\n return !isEmpty(value)\n}\n\n/**\n * Checks if a value is a finite number.\n *\n * @example\n * ```ts\n * isFiniteNumber(42) // true\n * isFiniteNumber(Infinity) // false\n * ```\n */\nexport const isFiniteNumber: (value: unknown) => boolean = Number.isFinite\n\n/**\n * Checks if a value is an integer.\n *\n * @example\n * ```ts\n * isInteger(42) // true\n * isInteger(4.2) // false\n * ```\n */\nexport const isInteger: (value: unknown) => boolean = Number.isInteger\n\n/**\n * Checks if a value is NaN.\n *\n * @example\n * ```ts\n * isNaN(NaN) // true\n * isNaN(42) // false\n * ```\n */\nexport const isNaN: (value: unknown) => boolean = Number.isNaN\n"],"mappings":";;AAqDA,SAAgB,QACd,YAC6B;CAC7B,QAAQ,UAAmB,WAAW,OAAO,SAAS,KAAK,MAAM,CAAC;;AAwBpE,SAAgB,QACd,YAC6B;CAC7B,QAAQ,UAAmB,WAAW,MAAM,SAAS,KAAK,MAAM,CAAC;;AAoBnE,SAAgB,KAAQ,GAA0B,GAAiD;CACjG,QAAQ,UAAa,EAAE,MAAM,IAAI,EAAE,MAAM;;AAoB3C,SAAgB,OACd,GACA,GACuB;CACvB,QAAQ,UAAa,EAAE,MAAM,IAAI,EAAE,MAAM;;;;;;;;;;;;;ACvH3C,MAAa,UAAU,MAAM;;;;;;;;;;;;;AAc7B,SAAgB,SAAS,OAAiC;CACxD,OAAO,UAAU,QAAQ,OAAO,UAAU;;;;;;;;;;;;;;;;;;AAmB5C,SAAgB,QAAQ,OAAiC;CACvD,IAAI,OAAO,UAAU,YAAY,MAAM,QAAQ,MAAM,EACnD,OAAO,MAAM,WAAW;CAE1B,IAAI,iBAAiB,OAAO,iBAAiB,KAC3C,OAAO,MAAM,SAAS;CAExB,OAAO,OAAO,KAAK,MAAM,CAAC,WAAW;;;;;;;;;;;AAYvC,SAAgB,WAAW,OAAiC;CAC1D,OAAO,CAAC,QAAQ,MAAM;;;;;;;;;;;AAYxB,MAAa,iBAA8C,OAAO;;;;;;;;;;AAWlE,MAAa,YAAyC,OAAO;;;;;;;;;;AAW7D,MAAa,QAAqC,OAAO"}
@@ -0,0 +1,2 @@
1
+ import { Mutex, Semaphore, delay, timeout, withTimeout } from "es-toolkit/promise";
2
+ export { Mutex, Semaphore, delay, timeout, withTimeout };
@@ -0,0 +1,2 @@
1
+ import { Mutex, Semaphore, delay, timeout, withTimeout } from "es-toolkit/promise";
2
+ export { Mutex, Semaphore, delay, timeout, withTimeout };
@@ -0,0 +1,2 @@
1
+ import { camelCase, capitalize, constantCase, deburr, escape, escapeRegExp, kebabCase, lowerCase, lowerFirst, pad, pascalCase, reverseString, snakeCase, startCase, trim, trimEnd, trimStart, unescape, upperCase, upperFirst, words } from "es-toolkit/string";
2
+ export { camelCase, capitalize, constantCase, deburr, escape, escapeRegExp, kebabCase, lowerCase, lowerFirst, pad, pascalCase, reverseString, snakeCase, startCase, trim, trimEnd, trimStart, unescape, upperCase, upperFirst, words };
@@ -0,0 +1,2 @@
1
+ import { camelCase, capitalize, constantCase, deburr, escape, escapeRegExp, kebabCase, lowerCase, lowerFirst, pad, pascalCase, reverseString, snakeCase, startCase, trim, trimEnd, trimStart, unescape, upperCase, upperFirst, words } from "es-toolkit/string";
2
+ export { camelCase, capitalize, constantCase, deburr, escape, escapeRegExp, kebabCase, lowerCase, lowerFirst, pad, pascalCase, reverseString, snakeCase, startCase, trim, trimEnd, trimStart, unescape, upperCase, upperFirst, words };
package/package.json ADDED
@@ -0,0 +1,108 @@
1
+ {
2
+ "name": "massaman",
3
+ "version": "0.0.1-rc.0",
4
+ "description": "A comprehensive functional programming library and utilities for TypeScript",
5
+ "keywords": [
6
+ "es-toolkit",
7
+ "fp",
8
+ "functional",
9
+ "monad",
10
+ "pattern-matching",
11
+ "result",
12
+ "ts-pattern",
13
+ "typescript",
14
+ "utilities"
15
+ ],
16
+ "homepage": "https://github.com/zrosenbauer/fpkit#readme",
17
+ "bugs": {
18
+ "url": "https://github.com/zrosenbauer/fpkit/issues"
19
+ },
20
+ "license": "MIT",
21
+ "author": "Zac Rosenbauer <me@zrosenbauer.com>",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/zrosenbauer/fpkit.git"
25
+ },
26
+ "files": [
27
+ "dist",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
31
+ "type": "module",
32
+ "sideEffects": false,
33
+ "exports": {
34
+ ".": {
35
+ "types": "./dist/index.d.mts",
36
+ "import": "./dist/index.mjs"
37
+ },
38
+ "./predicate": {
39
+ "types": "./dist/predicate/index.d.mts",
40
+ "import": "./dist/predicate/index.mjs"
41
+ },
42
+ "./array": {
43
+ "types": "./dist/array/index.d.mts",
44
+ "import": "./dist/array/index.mjs"
45
+ },
46
+ "./object": {
47
+ "types": "./dist/object/index.d.mts",
48
+ "import": "./dist/object/index.mjs"
49
+ },
50
+ "./function": {
51
+ "types": "./dist/function/index.d.mts",
52
+ "import": "./dist/function/index.mjs"
53
+ },
54
+ "./string": {
55
+ "types": "./dist/string/index.d.mts",
56
+ "import": "./dist/string/index.mjs"
57
+ },
58
+ "./control": {
59
+ "types": "./dist/control/index.d.mts",
60
+ "import": "./dist/control/index.mjs"
61
+ },
62
+ "./pattern": {
63
+ "types": "./dist/pattern/index.d.mts",
64
+ "import": "./dist/pattern/index.mjs"
65
+ },
66
+ "./math": {
67
+ "types": "./dist/math/index.d.mts",
68
+ "import": "./dist/math/index.mjs"
69
+ },
70
+ "./promise": {
71
+ "types": "./dist/promise/index.d.mts",
72
+ "import": "./dist/promise/index.mjs"
73
+ },
74
+ "./error": {
75
+ "types": "./dist/error/index.d.mts",
76
+ "import": "./dist/error/index.mjs"
77
+ },
78
+ "./conversion": {
79
+ "types": "./dist/conversion/index.d.mts",
80
+ "import": "./dist/conversion/index.mjs"
81
+ }
82
+ },
83
+ "publishConfig": {
84
+ "access": "public"
85
+ },
86
+ "dependencies": {
87
+ "es-toolkit": "1.46.1",
88
+ "ts-pattern": "5.9.0"
89
+ },
90
+ "devDependencies": {
91
+ "@types/node": "^25.7.0",
92
+ "@typescript/native-preview": "7.0.0-dev.20260512.1",
93
+ "@vitest/coverage-v8": "^4.1.6",
94
+ "tsdown": "0.22.0",
95
+ "typescript": "^6.0.3",
96
+ "vitest": "^4.1.6",
97
+ "@tadka/tsconfig": "0.0.0"
98
+ },
99
+ "engines": {
100
+ "node": ">=24.0.0"
101
+ },
102
+ "scripts": {
103
+ "build": "tsdown",
104
+ "test": "vitest run",
105
+ "test:watch": "vitest",
106
+ "typecheck": "tsgo --noEmit"
107
+ }
108
+ }