utilitas 1995.2.85 → 1995.2.87

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/lib/manifest.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const manifest = {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1995.2.85",
4
+ "version": "1995.2.87",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
@@ -28,14 +28,14 @@ const manifest = {
28
28
  "@ffprobe-installer/ffprobe": "^2.1.2",
29
29
  "@google-cloud/aiplatform": "^3.14.0",
30
30
  "@google-cloud/speech": "^6.3.0",
31
- "@google-cloud/storage": "^7.7.0",
31
+ "@google-cloud/storage": "^7.8.0",
32
32
  "@google-cloud/text-to-speech": "^5.1.0",
33
33
  "@google-cloud/vertexai": "^0.5.0",
34
34
  "@google-cloud/vision": "^4.1.0",
35
35
  "@google/generative-ai": "^0.2.1",
36
36
  "@mozilla/readability": "^0.5.0",
37
- "@ngrok/ngrok": "^1.1.0",
38
- "@sentry/node": "^7.104.0",
37
+ "@ngrok/ngrok": "^1.1.1",
38
+ "@sentry/node": "^7.106.0",
39
39
  "acme-client": "^5.3.0",
40
40
  "browserify-fs": "^1.0.0",
41
41
  "buffer": "^6.0.3",
@@ -67,7 +67,7 @@ const manifest = {
67
67
  "url": "github:Leask/node-url",
68
68
  "webpack-cli": "^5.1.4",
69
69
  "whisper-node": "^1.1.1",
70
- "wrangler": "^3.30.1",
70
+ "wrangler": "^3.32.0",
71
71
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
72
72
  "youtube-transcript": "^1.0.6"
73
73
  }
package/lib/utilitas.mjs CHANGED
@@ -114,6 +114,24 @@ const deepCleanBigInt = (any, func = String) => {
114
114
  return resp;
115
115
  };
116
116
 
117
+ const assembleBuffer = any => {
118
+ let resp = any;
119
+ switch (getType(any)) {
120
+ case 'Object':
121
+ if (any.type === 'Buffer' && Array.isArray(any.data)) {
122
+ resp = Buffer.from(any.data);
123
+ } else {
124
+ resp = {};
125
+ for (let i in any) { resp[i] = assembleBuffer(any[i]); }
126
+ }
127
+ break;
128
+ case 'Array':
129
+ resp = [];
130
+ any.map(x => { resp.push(assembleBuffer(x)); });
131
+ }
132
+ return resp;
133
+ };
134
+
117
135
  const mapKeys = (any, map, strict, path) => {
118
136
  let [resp, func] = [any, map];
119
137
  if (Object.isObject(map)) { func = (key) => { return map[key]; } }
@@ -791,6 +809,7 @@ export {
791
809
  analyzeModule,
792
810
  arrayEqual,
793
811
  assembleApiUrl,
812
+ assembleBuffer,
794
813
  assembleUrl,
795
814
  assertArray,
796
815
  assertBuffer,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1995.2.85",
4
+ "version": "1995.2.87",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
@@ -39,14 +39,14 @@
39
39
  "@ffprobe-installer/ffprobe": "^2.1.2",
40
40
  "@google-cloud/aiplatform": "^3.14.0",
41
41
  "@google-cloud/speech": "^6.3.0",
42
- "@google-cloud/storage": "^7.7.0",
42
+ "@google-cloud/storage": "^7.8.0",
43
43
  "@google-cloud/text-to-speech": "^5.1.0",
44
44
  "@google-cloud/vertexai": "^0.5.0",
45
45
  "@google-cloud/vision": "^4.1.0",
46
46
  "@google/generative-ai": "^0.2.1",
47
47
  "@mozilla/readability": "^0.5.0",
48
- "@ngrok/ngrok": "^1.1.0",
49
- "@sentry/node": "^7.104.0",
48
+ "@ngrok/ngrok": "^1.1.1",
49
+ "@sentry/node": "^7.106.0",
50
50
  "acme-client": "^5.3.0",
51
51
  "browserify-fs": "^1.0.0",
52
52
  "buffer": "^6.0.3",
@@ -78,7 +78,7 @@
78
78
  "url": "github:Leask/node-url",
79
79
  "webpack-cli": "^5.1.4",
80
80
  "whisper-node": "^1.1.1",
81
- "wrangler": "^3.30.1",
81
+ "wrangler": "^3.32.0",
82
82
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
83
83
  "youtube-transcript": "^1.0.6"
84
84
  }