diginext-utils 3.13.9 → 3.13.10

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.
@@ -1,2 +1,3 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  export default function guessMimeTypeByBuffer(buffer: Buffer): "image/png" | "image/jpeg" | "unknown" | "image/gif" | "image/webp" | "video/mp4" | "video/quicktime" | "video/webm" | "video/mpeg";
@@ -11,7 +11,7 @@ function trimNull(str) {
11
11
  str = str.toString();
12
12
  str = str.replace(/\0/g, "");
13
13
  while (str.indexOf(" ") >= 0) {
14
- str = str.replaceAll(" ", " ");
14
+ str = str.replace(/ /g, " ");
15
15
  }
16
16
  str = (0, trim_1.default)(str);
17
17
  return str;
@@ -41,7 +41,7 @@ exports.getFileNameWithoutExtension = getFileNameWithoutExtension;
41
41
  const getFileNameWithExtension = (url) => {
42
42
  if (!url)
43
43
  return "";
44
- url = url.replaceAll("\\", "/");
44
+ url = url.replace(/\\/g, "/");
45
45
  const _url = decodeURIComponent(url);
46
46
  const m = `${_url.toString().match(/(?:.*\/)?([^\/]+)/)}`;
47
47
  if (m && m.split(",").length > 1) {
@@ -1,2 +1,3 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  export default function guessMimeTypeByBuffer(buffer: Buffer): "image/png" | "image/jpeg" | "unknown" | "image/gif" | "image/webp" | "video/mp4" | "video/quicktime" | "video/webm" | "video/mpeg";
@@ -5,7 +5,7 @@ export function trimNull(str) {
5
5
  str = str.toString();
6
6
  str = str.replace(/\0/g, "");
7
7
  while (str.indexOf(" ") >= 0) {
8
- str = str.replaceAll(" ", " ");
8
+ str = str.replace(/ /g, " ");
9
9
  }
10
10
  str = trim(str);
11
11
  return str;
package/esm/string/url.js CHANGED
@@ -34,7 +34,7 @@ export const getFileNameWithoutExtension = (url) => {
34
34
  export const getFileNameWithExtension = (url) => {
35
35
  if (!url)
36
36
  return "";
37
- url = url.replaceAll("\\", "/");
37
+ url = url.replace(/\\/g, "/");
38
38
  const _url = decodeURIComponent(url);
39
39
  const m = `${_url.toString().match(/(?:.*\/)?([^\/]+)/)}`;
40
40
  if (m && m.split(",").length > 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginext-utils",
3
- "version": "3.13.9",
3
+ "version": "3.13.10",
4
4
  "sideEffects": false,
5
5
  "readme": "README.md",
6
6
  "homepage": "https://wearetopgroup.com",