@koine/utils 1.0.94 → 1.0.95
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/arraySum.d.ts +7 -0
- package/arraySum.js +9 -0
- package/decode.d.ts +1 -1
- package/encode.d.ts +1 -1
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/lowercase.d.ts +7 -0
- package/lowercase.js +9 -0
- package/node/arraySum.js +13 -0
- package/node/index.js +3 -0
- package/node/lowercase.js +13 -0
- package/node/uppercase.js +13 -0
- package/package.json +1 -1
- package/uppercase.d.ts +7 -0
- package/uppercase.js +9 -0
package/arraySum.d.ts
ADDED
package/arraySum.js
ADDED
package/decode.d.ts
CHANGED
package/encode.d.ts
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./accentSets";
|
|
2
2
|
export * from "./addOrReplaceAtIdx";
|
|
3
3
|
export * from "./arrayOfAll";
|
|
4
|
+
export * from "./arraySum";
|
|
4
5
|
export * from "./arrayToLookup";
|
|
5
6
|
export * from "./buildUrlQueryString";
|
|
6
7
|
export * from "./capitalize";
|
|
@@ -76,6 +77,7 @@ export * from "./isUndefined";
|
|
|
76
77
|
export * from "./isWeakMap";
|
|
77
78
|
export * from "./isWeakSet";
|
|
78
79
|
export * from "./location";
|
|
80
|
+
export * from "./lowercase";
|
|
79
81
|
export * from "./mapListBy";
|
|
80
82
|
export * from "./matchSorter";
|
|
81
83
|
export * from "./mergeObjects";
|
|
@@ -112,6 +114,7 @@ export * from "./truncate";
|
|
|
112
114
|
export * from "./uid";
|
|
113
115
|
export * from "./updateLinkParams";
|
|
114
116
|
export * from "./updateUrlQueryParams";
|
|
117
|
+
export * from "./uppercase";
|
|
115
118
|
export * from "./uuid";
|
|
116
119
|
export * from "./wait";
|
|
117
120
|
export type { Primitive, Class, Constructor, TypedArray, Observer, ObservableLike, Except, Writable, Merge, MergeDeep, MergeExclusive, RequireAtLeastOne, RequireExactlyOne, RequireAllOrNone, RemoveIndexSignature, PartialDeep, ReadonlyDeep, LiteralUnion, Opaque, InvariantOf, SetOptional, SetRequired, ValueOf, ConditionalKeys, ConditionalPick, ConditionalExcept, UnionToIntersection, LiteralToPrimitive, Stringified, IterableElement, Entry, Exact, Entries, SetReturnType, Simplify, Get, StringKeyOf, Schema, Jsonify, JsonPrimitive, JsonObject, JsonArray, JsonValue, Promisable, AsyncReturnType, Asyncify, Trim, Split, Includes, Join, LastArrayElement, FixedLengthArray, MultidimensionalArray, MultidimensionalReadonlyArray, PositiveInfinity, NegativeInfinity, Finite, Integer, Float, NegativeFloat, Negative, NonNegative, NegativeInteger, NonNegativeInteger, CamelCase, CamelCasedProperties, CamelCasedPropertiesDeep, KebabCase, KebabCasedProperties, KebabCasedPropertiesDeep, PascalCase, PascalCasedProperties, PascalCasedPropertiesDeep, SnakeCase, SnakeCasedProperties, SnakeCasedPropertiesDeep, ScreamingSnakeCase, DelimiterCase, DelimiterCasedProperties, DelimiterCasedPropertiesDeep, PackageJson, TsConfigJson, SetNonNullable, Spread, PartialOnUndefinedDeep, OptionalKeysOf, HasOptionalKeys, RequiredKeysOf, HasRequiredKeys, UnwrapOpaque, EmptyObject, IsEmptyObject, TupleToUnion, OmitIndexSignature, PickIndexSignature, ConditionalPickDeep, } from "type-fest";
|
package/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./accentSets";
|
|
2
2
|
export * from "./addOrReplaceAtIdx";
|
|
3
3
|
export * from "./arrayOfAll";
|
|
4
|
+
export * from "./arraySum";
|
|
4
5
|
export * from "./arrayToLookup";
|
|
5
6
|
export * from "./buildUrlQueryString";
|
|
6
7
|
export * from "./capitalize";
|
|
@@ -77,6 +78,7 @@ export * from "./isUndefined";
|
|
|
77
78
|
export * from "./isWeakMap";
|
|
78
79
|
export * from "./isWeakSet";
|
|
79
80
|
export * from "./location";
|
|
81
|
+
export * from "./lowercase";
|
|
80
82
|
export * from "./mapListBy";
|
|
81
83
|
export * from "./matchSorter";
|
|
82
84
|
export * from "./mergeObjects";
|
|
@@ -114,5 +116,6 @@ export * from "./truncate";
|
|
|
114
116
|
export * from "./uid";
|
|
115
117
|
export * from "./updateLinkParams";
|
|
116
118
|
export * from "./updateUrlQueryParams";
|
|
119
|
+
export * from "./uppercase";
|
|
117
120
|
export * from "./uuid";
|
|
118
121
|
export * from "./wait";
|
package/lowercase.d.ts
ADDED
package/lowercase.js
ADDED
package/node/arraySum.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.arraySum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Sum array of numbers
|
|
6
|
+
*
|
|
7
|
+
* @category array | math
|
|
8
|
+
*/
|
|
9
|
+
var arraySum = function (numbers) {
|
|
10
|
+
return numbers.reduce(function (sum, current) { return sum + current; }, 0);
|
|
11
|
+
};
|
|
12
|
+
exports.arraySum = arraySum;
|
|
13
|
+
exports.default = exports.arraySum;
|
package/node/index.js
CHANGED
|
@@ -4,6 +4,7 @@ var tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./accentSets"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./addOrReplaceAtIdx"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./arrayOfAll"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./arraySum"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./arrayToLookup"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./buildUrlQueryString"), exports);
|
|
9
10
|
tslib_1.__exportStar(require("./capitalize"), exports);
|
|
@@ -80,6 +81,7 @@ tslib_1.__exportStar(require("./isUndefined"), exports);
|
|
|
80
81
|
tslib_1.__exportStar(require("./isWeakMap"), exports);
|
|
81
82
|
tslib_1.__exportStar(require("./isWeakSet"), exports);
|
|
82
83
|
tslib_1.__exportStar(require("./location"), exports);
|
|
84
|
+
tslib_1.__exportStar(require("./lowercase"), exports);
|
|
83
85
|
tslib_1.__exportStar(require("./mapListBy"), exports);
|
|
84
86
|
tslib_1.__exportStar(require("./matchSorter"), exports);
|
|
85
87
|
tslib_1.__exportStar(require("./mergeObjects"), exports);
|
|
@@ -117,5 +119,6 @@ tslib_1.__exportStar(require("./truncate"), exports);
|
|
|
117
119
|
tslib_1.__exportStar(require("./uid"), exports);
|
|
118
120
|
tslib_1.__exportStar(require("./updateLinkParams"), exports);
|
|
119
121
|
tslib_1.__exportStar(require("./updateUrlQueryParams"), exports);
|
|
122
|
+
tslib_1.__exportStar(require("./uppercase"), exports);
|
|
120
123
|
tslib_1.__exportStar(require("./uuid"), exports);
|
|
121
124
|
tslib_1.__exportStar(require("./wait"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lowercase = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Replacement for native `toLowercase` tyescript ready (type narrowing ready)
|
|
6
|
+
*
|
|
7
|
+
* @category native
|
|
8
|
+
*/
|
|
9
|
+
var lowercase = function (str) {
|
|
10
|
+
return (str || "").toLowerCase();
|
|
11
|
+
};
|
|
12
|
+
exports.lowercase = lowercase;
|
|
13
|
+
exports.default = exports.lowercase;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uppercase = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Replacement for native `toUpperCase` tyescript ready (type narrowing ready)
|
|
6
|
+
*
|
|
7
|
+
* @category native
|
|
8
|
+
*/
|
|
9
|
+
var uppercase = function (str) {
|
|
10
|
+
return (str || "").toUpperCase();
|
|
11
|
+
};
|
|
12
|
+
exports.uppercase = uppercase;
|
|
13
|
+
exports.default = exports.uppercase;
|
package/package.json
CHANGED
package/uppercase.d.ts
ADDED