@koine/utils 2.0.0-beta.72 → 2.0.0-beta.73
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/Defer.js +10 -0
- package/Emitter.js +19 -0
- package/accentSets.js +29 -0
- package/addOrReplaceAtIdx.js +14 -0
- package/areEqual.js +45 -0
- package/arrayFilterFalsy.js +1 -0
- package/arrayFindLastIndex.js +8 -0
- package/arrayOfAll.js +1 -0
- package/arraySum.js +1 -0
- package/arrayToLookup.js +4 -0
- package/arrayUniqueByProperties.js +1 -0
- package/buildUrlQueryString.js +20 -0
- package/capitalize.js +2 -0
- package/changeCaseCamel.js +18 -0
- package/changeCaseCapital.js +11 -0
- package/changeCaseConstant.js +7 -0
- package/changeCaseDot.js +2 -0
- package/changeCaseHelpers.d.ts +0 -5
- package/changeCaseHelpers.js +71 -0
- package/changeCaseKebab.js +2 -0
- package/changeCaseNone.js +7 -0
- package/changeCasePascal.js +10 -0
- package/changeCasePascalSnake.js +2 -0
- package/changeCasePath.js +2 -0
- package/changeCaseSentence.js +16 -0
- package/changeCaseSnake.js +2 -0
- package/changeCaseTrain.js +2 -0
- package/chunkByChunks.js +31 -0
- package/chunkBySize.js +7 -0
- package/clamp.js +1 -0
- package/clsx.js +39 -0
- package/convertRange.js +1 -0
- package/cookie.js +1 -0
- package/createPalette.js +11 -0
- package/debounce.js +17 -0
- package/debouncePromise.js +51 -0
- package/debounceRaf.js +12 -0
- package/decode.js +1 -0
- package/encode.js +1 -0
- package/ensureInt.js +1 -0
- package/env.js +1 -0
- package/errorToString.js +2 -0
- package/escapeRegExp.js +1 -0
- package/findDuplicatedIndexes.js +10 -0
- package/forin.js +5 -0
- package/gbToBytes.js +1 -0
- package/getEmptyArray.js +4 -0
- package/getKeys.js +1 -0
- package/getMediaQueryWidthResolvers.js +41 -0
- package/getMediaQueryWidthTailwindScreens.js +26 -0
- package/getNonce.js +2 -0
- package/getParamAmong.js +5 -0
- package/getParamAsInt.js +8 -0
- package/getParamAsString.js +2 -0
- package/getType.js +1 -0
- package/getUrlHashParams.js +8 -0
- package/getUrlHashPathname.js +1 -0
- package/getUrlPathnameParts.js +5 -0
- package/getUrlQueryParams.js +21 -0
- package/imgEmptyPixel.js +1 -0
- package/index.js +156 -0
- package/invariant.js +16 -0
- package/isAbsoluteUrl.js +2 -0
- package/isAnyObject.js +2 -0
- package/isArray.js +2 -0
- package/isBlob.js +2 -0
- package/isBoolean.js +2 -0
- package/isBrowser.js +1 -0
- package/isBrowserNow.js +2 -0
- package/isDate.js +2 -0
- package/isEmptyArray.js +2 -0
- package/isEmptyObject.js +2 -0
- package/isEmptyString.js +1 -0
- package/isError.js +2 -0
- package/isExternalUrl.js +10 -0
- package/isFile.js +2 -0
- package/isFloat.js +2 -0
- package/isFormData.js +2 -0
- package/isFullArray.js +2 -0
- package/isFullObject.js +2 -0
- package/isFullString.js +2 -0
- package/isFunction.js +1 -0
- package/isInt.js +2 -0
- package/isMap.js +2 -0
- package/isNaNValue.js +2 -0
- package/isNegativeNumber.js +2 -0
- package/isNull.js +2 -0
- package/isNullOrUndefined.js +4 -0
- package/isNumber.js +2 -0
- package/isNumericLiteral.js +1 -0
- package/isObject.js +2 -0
- package/isObjectLike.js +2 -0
- package/isObjectStringKeyed.js +2 -0
- package/isOneOf.js +7 -0
- package/isPlainObject.js +5 -0
- package/isPositiveNumber.js +2 -0
- package/isPrimitive.js +12 -0
- package/isPromise.js +2 -0
- package/isRegExp.js +2 -0
- package/isServer.js +2 -0
- package/isServerNow.js +2 -0
- package/isSet.js +2 -0
- package/isString.js +2 -0
- package/isSymbol.js +2 -0
- package/isType.js +12 -0
- package/isUndefined.js +2 -0
- package/isWeakMap.js +2 -0
- package/isWeakSet.js +2 -0
- package/kbToBytes.js +1 -0
- package/location.js +1 -0
- package/lowercase.js +1 -0
- package/mapListBy.js +4 -0
- package/matchSorter.js +238 -0
- package/mbToBytes.js +1 -0
- package/mergeObjects.js +28 -0
- package/mergeUrlQueryParams.js +13 -0
- package/moveSortableArrayItemByKey.js +8 -0
- package/noop.js +1 -0
- package/normaliseUrl.js +2 -0
- package/normaliseUrlPathname.js +2 -0
- package/objectFlat.js +16 -0
- package/objectFlip.js +4 -0
- package/objectMergeWithDefaults.js +20 -0
- package/objectOmit.js +7 -0
- package/objectPick.js +8 -0
- package/objectSort.js +1 -0
- package/objectSortByKeysMatching.js +2 -0
- package/objectToArray.js +1 -0
- package/package.json +1 -1
- package/parseCookie.js +32 -0
- package/parseURL.js +13 -0
- package/quaranteneProps.js +15 -0
- package/randomInt.js +1 -0
- package/randomKey.js +4 -0
- package/readCookie.js +33 -0
- package/removeAccents.js +9 -0
- package/removeCookie.js +9 -0
- package/removeDuplicates.js +1 -0
- package/removeDuplicatesByKey.js +12 -0
- package/removeDuplicatesComparing.js +6 -0
- package/removeIndexesFromArray.js +9 -0
- package/removeTrailingSlash.js +1 -0
- package/removeUrlQueryParams.js +13 -0
- package/render.js +112 -0
- package/round.js +3 -0
- package/roundTo.js +10 -0
- package/serializeCookie.js +68 -0
- package/setCookie.js +44 -0
- package/shuffle.js +16 -0
- package/slugify.js +10 -0
- package/split.js +1 -0
- package/splitReverse.js +1 -0
- package/swapMap.js +7 -0
- package/throttle.js +14 -0
- package/titleCase.js +3 -0
- package/toNumber.js +2 -0
- package/toRgba.js +7 -0
- package/transformToUrlPathname.js +4 -0
- package/truncate.js +5 -0
- package/tryUntil.js +14 -0
- package/types.js +1 -0
- package/uid.js +5 -0
- package/updateLinkParams.js +6 -0
- package/updateUrlQueryParams.js +10 -0
- package/uppercase.js +1 -0
- package/uuid.js +4 -0
- package/uuidNumeric.js +1 -0
- package/wait.js +1 -0
- package/without.js +1 -0
package/render.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
let varname = "data";
|
|
2
|
+
let evaluate = /<%([\s\S]+?(\}?)+)%>/g;
|
|
3
|
+
let interpolate = /<%=([\s\S]+?)%>/g;
|
|
4
|
+
let conditional = /<%\?(\?)?\s*([\s\S]*?)\s*%>/g;
|
|
5
|
+
let iterate = /<%~\s*(?:%>|([\s\S]+?)\s*:\s*([\w$]+)\s*(?::\s*([\w$]+))?\s*%>)/g;
|
|
6
|
+
let use = /<%#([\s\S]+?)%>/g;
|
|
7
|
+
let useParams = /(^|[^\w$])def(?:\.|\[['"])([\w$.]+)(?:['"]\])?\s*:\s*([\w$.]+|"[^"]+"|'[^']+'|\{[^}]+\})/g;
|
|
8
|
+
let define = /<%##\s*([\w.$]+)\s*(:|=)([\s\S]+?)#%>/g;
|
|
9
|
+
let defineParams = /^\s*([\w$]+):([\s\S]+)/;
|
|
10
|
+
let start = "'+(";
|
|
11
|
+
let end = ")+'";
|
|
12
|
+
let skip = /$^/;
|
|
13
|
+
let resolveDefs = (block, def) => (typeof block === "string" ? block : block.toString())
|
|
14
|
+
.replace(define || skip, (_, code, assign, value) => {
|
|
15
|
+
if (code.indexOf("def.") === 0) {
|
|
16
|
+
code = code.substring(4);
|
|
17
|
+
}
|
|
18
|
+
if (!(code in def)) {
|
|
19
|
+
if (assign === ":") {
|
|
20
|
+
value.replace(defineParams, (_, param, v) => {
|
|
21
|
+
def[code] = { arg: param, text: v };
|
|
22
|
+
});
|
|
23
|
+
if (!(code in def))
|
|
24
|
+
def[code] = value;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
new Function("def", "def['" + code + "']=" + value)(def);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return "";
|
|
31
|
+
})
|
|
32
|
+
.replace(use || skip, (_, code) => {
|
|
33
|
+
code = code.replace(useParams, (_, s, d, param) => {
|
|
34
|
+
if (def[d] && def[d].arg && param) {
|
|
35
|
+
let rw = (d + ":" + param).replace(/'|\\/g, "_");
|
|
36
|
+
def.__exp = def.__exp || {};
|
|
37
|
+
def.__exp[rw] = def[d].text.replace(new RegExp("(^|[^\\w$])" + def[d].arg + "([^\\w$])", "g"), "$1" + param + "$2");
|
|
38
|
+
return s + "def.__exp['" + rw + "']";
|
|
39
|
+
}
|
|
40
|
+
return s;
|
|
41
|
+
});
|
|
42
|
+
let v = new Function("def", "return " + code)(def);
|
|
43
|
+
return v ? resolveDefs(v, def) : v;
|
|
44
|
+
});
|
|
45
|
+
let unescape = (code) => code.replace(/\\('|\\)/g, "$1").replace(/[\r\t\n]/g, " ");
|
|
46
|
+
export let render = (tmpl, def) => {
|
|
47
|
+
let sid = 0;
|
|
48
|
+
let indv;
|
|
49
|
+
let str = use || define ? resolveDefs(tmpl, def || {}) : tmpl;
|
|
50
|
+
str = ("var X='" +
|
|
51
|
+
str
|
|
52
|
+
.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, " ")
|
|
53
|
+
.replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, "")
|
|
54
|
+
.replace(/'|\\/g, "\\$&")
|
|
55
|
+
.replace(interpolate || skip, (_, code) => start + unescape(code) + end)
|
|
56
|
+
.replace(conditional || skip, (_, elseCase, code) => elseCase
|
|
57
|
+
? code
|
|
58
|
+
? "';}else if(" + unescape(code) + "){X+='"
|
|
59
|
+
: "';}else{X+='"
|
|
60
|
+
: code
|
|
61
|
+
? "';if(" + unescape(code) + "){X+='"
|
|
62
|
+
: "';}X+='")
|
|
63
|
+
.replace(iterate || skip, (_, arr, vName, iName) => {
|
|
64
|
+
if (!arr)
|
|
65
|
+
return "';} } X+='";
|
|
66
|
+
sid++;
|
|
67
|
+
indv = iName || "i" + sid;
|
|
68
|
+
arr = unescape(arr);
|
|
69
|
+
return ("';var arr" +
|
|
70
|
+
sid +
|
|
71
|
+
"=" +
|
|
72
|
+
arr +
|
|
73
|
+
";if(arr" +
|
|
74
|
+
sid +
|
|
75
|
+
"){var " +
|
|
76
|
+
vName +
|
|
77
|
+
"," +
|
|
78
|
+
indv +
|
|
79
|
+
"=-1,l" +
|
|
80
|
+
sid +
|
|
81
|
+
"=arr" +
|
|
82
|
+
sid +
|
|
83
|
+
".length-1;while(" +
|
|
84
|
+
indv +
|
|
85
|
+
"<l" +
|
|
86
|
+
sid +
|
|
87
|
+
"){" +
|
|
88
|
+
vName +
|
|
89
|
+
"=arr" +
|
|
90
|
+
sid +
|
|
91
|
+
"[" +
|
|
92
|
+
indv +
|
|
93
|
+
"+=1];X+='");
|
|
94
|
+
})
|
|
95
|
+
.replace(evaluate || skip, (_, code) => "';" + unescape(code) + "X+='") +
|
|
96
|
+
"';return X;")
|
|
97
|
+
.replace(/\n/g, "\\n")
|
|
98
|
+
.replace(/\t/g, "\\t")
|
|
99
|
+
.replace(/\r/g, "\\r")
|
|
100
|
+
.replace(/(\s|;|\}|^|\{)X\+='';/g, "$1")
|
|
101
|
+
.replace(/\+''/g, "");
|
|
102
|
+
try {
|
|
103
|
+
return new Function(varname, str);
|
|
104
|
+
}
|
|
105
|
+
catch (e) {
|
|
106
|
+
if (process.env["NODE_ENV"] === "development") {
|
|
107
|
+
console.log("Could not create a template function: " + str);
|
|
108
|
+
throw e;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return () => "";
|
|
112
|
+
};
|
package/round.js
ADDED
package/roundTo.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export let roundTo = (num, decimals = 2) => {
|
|
2
|
+
if (isFinite(num) && !isNaN(num)) {
|
|
3
|
+
const multiplicator = Math.pow(10, decimals);
|
|
4
|
+
return Math.round(num * multiplicator) / multiplicator + "";
|
|
5
|
+
}
|
|
6
|
+
if (process.env["NODE_ENV"] === "development") {
|
|
7
|
+
console.warn("[@koine/utils] math:roundTo -> given not a finite number as first arg");
|
|
8
|
+
}
|
|
9
|
+
return "";
|
|
10
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { isNumber } from "./isNumber";
|
|
2
|
+
const fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
3
|
+
export let serializeCookie = (name, val, attributes = {}) => {
|
|
4
|
+
const { encode = encodeURIComponent, domain, path, httpOnly, secure, sameSite, } = attributes;
|
|
5
|
+
let { maxAge, expires } = attributes;
|
|
6
|
+
const value = encode(val);
|
|
7
|
+
if (process.env["NODE_ENV"] === "development") {
|
|
8
|
+
if (!fieldContentRegExp.test(name)) {
|
|
9
|
+
throw new TypeError("argument name is invalid");
|
|
10
|
+
}
|
|
11
|
+
if (typeof attributes.encode !== "function") {
|
|
12
|
+
throw new TypeError("option encode is invalid");
|
|
13
|
+
}
|
|
14
|
+
if (value && !fieldContentRegExp.test(value)) {
|
|
15
|
+
throw new TypeError("argument val is invalid");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
let str = name + "=" + value;
|
|
19
|
+
if (null != maxAge) {
|
|
20
|
+
maxAge = maxAge - 0;
|
|
21
|
+
if (isNaN(maxAge) || !isFinite(maxAge)) {
|
|
22
|
+
throw new TypeError("option maxAge is invalid");
|
|
23
|
+
}
|
|
24
|
+
str += "; Max-Age=" + Math.floor(maxAge);
|
|
25
|
+
}
|
|
26
|
+
if (domain) {
|
|
27
|
+
if (process.env["NODE_ENV"] === "development") {
|
|
28
|
+
if (!fieldContentRegExp.test(domain)) {
|
|
29
|
+
throw new TypeError("option domain is invalid");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
str += "; Domain=" + domain;
|
|
33
|
+
}
|
|
34
|
+
if (path) {
|
|
35
|
+
if (process.env["NODE_ENV"] === "development") {
|
|
36
|
+
if (!fieldContentRegExp.test(path)) {
|
|
37
|
+
throw new TypeError("option path is invalid");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
str += "; Path=" + path;
|
|
41
|
+
}
|
|
42
|
+
if (expires) {
|
|
43
|
+
if (isNumber(expires)) {
|
|
44
|
+
expires = new Date(Date.now() + expires * 864e5);
|
|
45
|
+
}
|
|
46
|
+
str += "; Expires=" + expires.toUTCString();
|
|
47
|
+
}
|
|
48
|
+
if (httpOnly) {
|
|
49
|
+
str += "; HttpOnly";
|
|
50
|
+
}
|
|
51
|
+
if (secure) {
|
|
52
|
+
str += "; Secure";
|
|
53
|
+
}
|
|
54
|
+
if (sameSite) {
|
|
55
|
+
switch (sameSite.toLowerCase()) {
|
|
56
|
+
case "lax":
|
|
57
|
+
str += "; SameSite=Lax";
|
|
58
|
+
break;
|
|
59
|
+
case "strict":
|
|
60
|
+
str += "; SameSite=Strict";
|
|
61
|
+
break;
|
|
62
|
+
case "none":
|
|
63
|
+
str += "; SameSite=None";
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return str;
|
|
68
|
+
};
|
package/setCookie.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defaultAttributesClient } from "./cookie";
|
|
2
|
+
import { isNumber } from "./isNumber";
|
|
3
|
+
import { isUndefined } from "./isUndefined";
|
|
4
|
+
let converterWrite = (value) => {
|
|
5
|
+
return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
|
|
6
|
+
};
|
|
7
|
+
export let setCookie = (name, value, attributes = {}) => {
|
|
8
|
+
let { expires, ...restAttrs } = attributes;
|
|
9
|
+
const cleanedAttrs = {
|
|
10
|
+
expires: "",
|
|
11
|
+
...defaultAttributesClient,
|
|
12
|
+
...restAttrs,
|
|
13
|
+
};
|
|
14
|
+
if (isUndefined(document)) {
|
|
15
|
+
if (process.env["NODE_ENV"] === "development") {
|
|
16
|
+
console.warn("[@koine/utils:setCookie] document is undefined");
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
if (isNumber(expires)) {
|
|
21
|
+
expires = new Date(Date.now() + expires * 864e5);
|
|
22
|
+
}
|
|
23
|
+
if (expires) {
|
|
24
|
+
cleanedAttrs.expires = expires.toUTCString();
|
|
25
|
+
}
|
|
26
|
+
name = encodeURIComponent(name)
|
|
27
|
+
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
|
|
28
|
+
.replace(/[()]/g, escape);
|
|
29
|
+
let stringifiedAttributes = "";
|
|
30
|
+
for (const name in attributes) {
|
|
31
|
+
const attrName = name;
|
|
32
|
+
if (!attributes[attrName]) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
stringifiedAttributes += "; " + attrName;
|
|
36
|
+
if (attributes[attrName] === true) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
stringifiedAttributes +=
|
|
40
|
+
"=" + String(attributes[attrName]).split(";")[0];
|
|
41
|
+
}
|
|
42
|
+
return (document.cookie =
|
|
43
|
+
name + "=" + converterWrite(value) + stringifiedAttributes);
|
|
44
|
+
};
|
package/shuffle.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export let shuffle = (array) => {
|
|
2
|
+
const length = array == null ? 0 : array.length;
|
|
3
|
+
if (!length) {
|
|
4
|
+
return [];
|
|
5
|
+
}
|
|
6
|
+
let index = -1;
|
|
7
|
+
const lastIndex = length - 1;
|
|
8
|
+
const result = [...array];
|
|
9
|
+
while (++index < length) {
|
|
10
|
+
const rand = index + Math.floor(Math.random() * (lastIndex - index + 1));
|
|
11
|
+
const value = result[rand];
|
|
12
|
+
result[rand] = result[index];
|
|
13
|
+
result[index] = value;
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
};
|
package/slugify.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { accentsSets } from "./accentSets";
|
|
2
|
+
import { removeAccents } from "./removeAccents";
|
|
3
|
+
export let slugify = (text, separator = "-") => removeAccents(text.toString().toLowerCase().trim(), accentsSets.concat([["-", "[·/_,:;']"]]))
|
|
4
|
+
.replace(/\s+/g, "-")
|
|
5
|
+
.replace(/&/g, "-and-")
|
|
6
|
+
.replace(/[^\w-]+/g, "")
|
|
7
|
+
.replace(/--+/g, "-")
|
|
8
|
+
.replace(/^-+/, "")
|
|
9
|
+
.replace(/-+$/, "")
|
|
10
|
+
.replace(/-/g, separator);
|
package/split.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export let split = (string, delimiter) => string.split(delimiter);
|
package/splitReverse.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export let splitReverse = (string, delimiter) => string.split(delimiter).reverse();
|
package/swapMap.js
ADDED
package/throttle.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export let throttle = (fn, limit, context) => {
|
|
2
|
+
let wait;
|
|
3
|
+
return function (...args) {
|
|
4
|
+
context = context || this;
|
|
5
|
+
if (!wait) {
|
|
6
|
+
fn.apply(context, ...args);
|
|
7
|
+
wait = true;
|
|
8
|
+
return setTimeout(function () {
|
|
9
|
+
wait = false;
|
|
10
|
+
}, limit);
|
|
11
|
+
}
|
|
12
|
+
return;
|
|
13
|
+
};
|
|
14
|
+
};
|
package/titleCase.js
ADDED
package/toNumber.js
ADDED
package/toRgba.js
ADDED
package/truncate.js
ADDED
package/tryUntil.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export let tryUntil = (test, timeout, interval, resolve, reject) => {
|
|
2
|
+
const timeWas = new Date();
|
|
3
|
+
const wait = setInterval(function () {
|
|
4
|
+
if (test()) {
|
|
5
|
+
clearInterval(wait);
|
|
6
|
+
resolve();
|
|
7
|
+
}
|
|
8
|
+
else if (new Date() - timeWas > timeout) {
|
|
9
|
+
clearInterval(wait);
|
|
10
|
+
if (reject)
|
|
11
|
+
reject();
|
|
12
|
+
}
|
|
13
|
+
}, interval);
|
|
14
|
+
};
|
package/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/uid.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { buildUrlQueryString } from "./buildUrlQueryString";
|
|
2
|
+
import { getUrlQueryParams } from "./getUrlQueryParams";
|
|
3
|
+
import { mergeUrlQueryParams } from "./mergeUrlQueryParams";
|
|
4
|
+
export let updateUrlQueryParams = (url, newParams = {}) => {
|
|
5
|
+
const parts = url.split("?");
|
|
6
|
+
const allParams = parts[1]
|
|
7
|
+
? mergeUrlQueryParams(getUrlQueryParams(url), newParams)
|
|
8
|
+
: newParams;
|
|
9
|
+
return parts[0] + buildUrlQueryString(allParams);
|
|
10
|
+
};
|
package/uppercase.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export let uppercase = (str) => (str || "").toUpperCase();
|
package/uuid.js
ADDED
package/uuidNumeric.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export let uuidNumeric = () => new Date().valueOf();
|
package/wait.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export let wait = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
|
package/without.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|