melperjs 17.1.0 → 17.1.1

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.
@@ -24,14 +24,10 @@ let xss = require("xss");
24
24
  xss = __toESM(xss, 1);
25
25
  let set_cookie_parser = require("set-cookie-parser");
26
26
  set_cookie_parser = __toESM(set_cookie_parser, 1);
27
- let lodash_camelCase_js = require("lodash/camelCase.js");
28
- lodash_camelCase_js = __toESM(lodash_camelCase_js, 1);
29
- let lodash_upperFirst_js = require("lodash/upperFirst.js");
30
- lodash_upperFirst_js = __toESM(lodash_upperFirst_js, 1);
31
- let lodash_isEmpty_js = require("lodash/isEmpty.js");
32
- lodash_isEmpty_js = __toESM(lodash_isEmpty_js, 1);
33
- let lodash_shuffle_js = require("lodash/shuffle.js");
34
- lodash_shuffle_js = __toESM(lodash_shuffle_js, 1);
27
+ let es_toolkit_string = require("es-toolkit/string");
28
+ let es_toolkit_array = require("es-toolkit/array");
29
+ let es_toolkit_compat_isEmpty = require("es-toolkit/compat/isEmpty");
30
+ es_toolkit_compat_isEmpty = __toESM(es_toolkit_compat_isEmpty, 1);
35
31
  //#region src/general.js
36
32
  const CONSTANTS = {
37
33
  LOWER_CASE: "abcdefghijklmnopqrstuvwxyz",
@@ -107,13 +103,13 @@ function splitTrim(string, separator = null) {
107
103
  }
108
104
  function checkEmpty(value) {
109
105
  if (typeof value === "number") return value === 0;
110
- return (0, lodash_isEmpty_js.default)(value);
106
+ return (0, es_toolkit_compat_isEmpty.default)(value);
111
107
  }
112
108
  function pascalCase(string) {
113
- return (0, lodash_upperFirst_js.default)((0, lodash_camelCase_js.default)(string));
109
+ return (0, es_toolkit_string.upperFirst)((0, es_toolkit_string.camelCase)(string));
114
110
  }
115
111
  function titleCase(string, separator = " ") {
116
- return (string || "").split(separator).map(lodash_upperFirst_js.default).join(separator);
112
+ return (string || "").split(separator).map(es_toolkit_string.upperFirst).join(separator);
117
113
  }
118
114
  function isInt32(value) {
119
115
  return Number.isInteger(value) && value >= CONSTANTS.INT32_MIN && value <= CONSTANTS.INT32_MAX;
@@ -164,7 +160,7 @@ function waitForProperty(object, property, timeoutMs, interval = 100) {
164
160
  });
165
161
  }
166
162
  function shuffleObject(object) {
167
- return Object.fromEntries((0, lodash_shuffle_js.default)(Object.entries(object)));
163
+ return Object.fromEntries((0, es_toolkit_array.shuffle)(Object.entries(object)));
168
164
  }
169
165
  function objectStringify(object) {
170
166
  for (const key of Object.keys(object)) {
@@ -195,7 +191,7 @@ function safeString(string) {
195
191
  });
196
192
  }
197
193
  function shuffleString(string) {
198
- return (0, lodash_shuffle_js.default)(string.split("")).join("");
194
+ return (0, es_toolkit_array.shuffle)(string.split("")).join("");
199
195
  }
200
196
  function randomBoolean() {
201
197
  return Math.random() < .5;
package/dist/general.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_general = require("./general-CAhFOkv8.cjs");
2
+ const require_general = require("./general-C6nIgKnW.cjs");
3
3
  exports.CONSTANTS = require_general.CONSTANTS;
4
4
  exports.Exception = require_general.Exception;
5
5
  exports.checkEmpty = require_general.checkEmpty;
package/dist/general.mjs CHANGED
@@ -1,9 +1,8 @@
1
1
  import xss from "xss";
2
2
  import setCookieParser from "set-cookie-parser";
3
- import camelCase from "lodash/camelCase.js";
4
- import upperFirst from "lodash/upperFirst.js";
5
- import isEmpty from "lodash/isEmpty.js";
6
- import shuffle from "lodash/shuffle.js";
3
+ import { camelCase, upperFirst } from "es-toolkit/string";
4
+ import { shuffle } from "es-toolkit/array";
5
+ import isEmpty from "es-toolkit/compat/isEmpty";
7
6
  //#region src/general.js
8
7
  const CONSTANTS = {
9
8
  LOWER_CASE: "abcdefghijklmnopqrstuvwxyz",
package/dist/node.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_general = require("./general-CAhFOkv8.cjs");
2
+ const require_general = require("./general-C6nIgKnW.cjs");
3
3
  let fs = require("fs");
4
4
  fs = require_general.__toESM(fs, 1);
5
5
  let path = require("path");
package/docs/general.md CHANGED
@@ -114,7 +114,7 @@ Splits a string, trims each piece, and drops empty results. Default separator is
114
114
 
115
115
  ### pascalCase(string)
116
116
 
117
- Converts arbitrary text to `PascalCase` (uses lodash internally).
117
+ Converts arbitrary text to `PascalCase` (uses es-toolkit internally).
118
118
 
119
119
  - **Parameters:**
120
120
  - `string` (String): Input text.
@@ -149,7 +149,7 @@ Strips HTML tags via the `xss` library and additionally removes the body of dang
149
149
 
150
150
  ### shuffleString(string)
151
151
 
152
- Randomly reorders the characters in a string using lodash's `shuffle` (Fisher-Yates).
152
+ Randomly reorders the characters in a string using es-toolkit's `shuffle` (Fisher-Yates).
153
153
 
154
154
  - **Parameters:**
155
155
  - `string` (String): Source string.
@@ -238,7 +238,7 @@ Builds a deterministic hex string of the requested length from a seed via `mulbe
238
238
 
239
239
  ### checkEmpty(value)
240
240
 
241
- Like lodash's `isEmpty` but additionally treats `0` (numeric zero) as empty.
241
+ Like es-toolkit's `isEmpty` but additionally treats `0` (numeric zero) as empty.
242
242
 
243
243
  - **Parameters:**
244
244
  - `value` (Any): Value to test.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "melperjs",
3
- "version": "17.1.0",
3
+ "version": "17.1.1",
4
4
  "description": "A compact JavaScript utility library for strings, objects, tokens, hashing, cookies, proxies, file I/O, shell, and more.",
5
5
  "keywords": [
6
6
  "melperjs",
@@ -62,12 +62,12 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "bcryptjs": "^3.0.3",
65
- "lodash": "4.18.1",
65
+ "es-toolkit": "^1.47.0",
66
66
  "set-cookie-parser": "^3.1.0",
67
67
  "xss": "^1.0.15"
68
68
  },
69
69
  "devDependencies": {
70
- "tsdown": "^0.22.0"
70
+ "tsdown": "^0.22.2"
71
71
  },
72
72
  "publishConfig": {
73
73
  "access": "public"