@akanjs/common 0.0.40 → 0.0.41
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/index.d.ts +1 -19
- package/index.js +344 -21
- package/package.json +5 -2
- package/src/Logger.d.ts +2 -3
- package/src/applyMixins.d.ts +2 -3
- package/src/capitalize.d.ts +1 -3
- package/src/deepObjectify.d.ts +1 -3
- package/src/index.d.ts +18 -19
- package/src/isDayjs.d.ts +2 -2
- package/src/isQueryEqual.d.ts +1 -3
- package/src/isValidDate.d.ts +2 -5
- package/src/lowerlize.d.ts +1 -3
- package/src/mergeVersion.d.ts +1 -3
- package/src/objectify.d.ts +1 -3
- package/src/pathGet.d.ts +1 -3
- package/src/pathSet.d.ts +1 -3
- package/src/pluralize.d.ts +2 -1
- package/src/randomPick.d.ts +1 -3
- package/src/randomPicks.d.ts +1 -3
- package/src/sleep.d.ts +1 -3
- package/src/splitVersion.d.ts +1 -3
- package/src/types.d.ts +5 -8
- package/src/Logger.js +0 -162
- package/src/applyMixins.js +0 -49
- package/src/capitalize.js +0 -30
- package/src/deepObjectify.js +0 -48
- package/src/index.js +0 -75
- package/src/isDayjs.js +0 -27
- package/src/isQueryEqual.js +0 -58
- package/src/isValidDate.js +0 -48
- package/src/lowerlize.js +0 -30
- package/src/mergeVersion.js +0 -28
- package/src/objectify.js +0 -34
- package/src/pathGet.js +0 -31
- package/src/pathSet.js +0 -33
- package/src/pluralize.js +0 -37
- package/src/randomPick.js +0 -28
- package/src/randomPicks.js +0 -39
- package/src/sleep.js +0 -34
- package/src/splitVersion.js +0 -35
- package/src/types.js +0 -15
package/src/pluralize.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
var pluralize_exports = {};
|
|
29
|
-
__export(pluralize_exports, {
|
|
30
|
-
pluralize: () => import_pluralize.default
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(pluralize_exports);
|
|
33
|
-
var import_pluralize = __toESM(require("pluralize"));
|
|
34
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
-
0 && (module.exports = {
|
|
36
|
-
pluralize
|
|
37
|
-
});
|
package/src/randomPick.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var randomPick_exports = {};
|
|
20
|
-
__export(randomPick_exports, {
|
|
21
|
-
randomPick: () => randomPick
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(randomPick_exports);
|
|
24
|
-
const randomPick = /* @__PURE__ */ __name((arr) => arr[Math.floor(Math.random() * arr.length)], "randomPick");
|
|
25
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
-
0 && (module.exports = {
|
|
27
|
-
randomPick
|
|
28
|
-
});
|
package/src/randomPicks.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var randomPicks_exports = {};
|
|
20
|
-
__export(randomPicks_exports, {
|
|
21
|
-
randomPicks: () => randomPicks
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(randomPicks_exports);
|
|
24
|
-
const randomPicks = /* @__PURE__ */ __name((arr, count = 1, allowDuplicate = false) => {
|
|
25
|
-
if (!allowDuplicate && arr.length <= count) return arr;
|
|
26
|
-
const idxs = [];
|
|
27
|
-
let pickIdx;
|
|
28
|
-
for (let i = 0; i < count; i++) {
|
|
29
|
-
do {
|
|
30
|
-
pickIdx = Math.floor(Math.random() * arr.length);
|
|
31
|
-
} while (!allowDuplicate && idxs.includes(pickIdx));
|
|
32
|
-
idxs.push(pickIdx);
|
|
33
|
-
}
|
|
34
|
-
return idxs.map((idx) => arr[idx]);
|
|
35
|
-
}, "randomPicks");
|
|
36
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
-
0 && (module.exports = {
|
|
38
|
-
randomPicks
|
|
39
|
-
});
|
package/src/sleep.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var sleep_exports = {};
|
|
20
|
-
__export(sleep_exports, {
|
|
21
|
-
sleep: () => sleep
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(sleep_exports);
|
|
24
|
-
const sleep = /* @__PURE__ */ __name(async (ms) => {
|
|
25
|
-
return new Promise((resolve) => {
|
|
26
|
-
setTimeout(() => {
|
|
27
|
-
resolve(true);
|
|
28
|
-
}, ms);
|
|
29
|
-
});
|
|
30
|
-
}, "sleep");
|
|
31
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
sleep
|
|
34
|
-
});
|
package/src/splitVersion.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var splitVersion_exports = {};
|
|
20
|
-
__export(splitVersion_exports, {
|
|
21
|
-
splitVersion: () => splitVersion
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(splitVersion_exports);
|
|
24
|
-
const splitVersion = /* @__PURE__ */ __name((version) => {
|
|
25
|
-
const [major, minor, patch] = version.split(".");
|
|
26
|
-
return {
|
|
27
|
-
major,
|
|
28
|
-
minor,
|
|
29
|
-
patch
|
|
30
|
-
};
|
|
31
|
-
}, "splitVersion");
|
|
32
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
-
0 && (module.exports = {
|
|
34
|
-
splitVersion
|
|
35
|
-
});
|
package/src/types.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
var types_exports = {};
|
|
15
|
-
module.exports = __toCommonJS(types_exports);
|