nadesiko3 3.7.13 → 3.7.14

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.
Files changed (127) hide show
  1. package/batch/command.txt +473 -473
  2. package/batch/jsplugin2text.nako3 +2 -0
  3. package/core/package.json +1 -1
  4. package/core/src/nako3.mjs +0 -4
  5. package/core/src/nako3.mts +55 -55
  6. package/core/src/nako_ast.mjs +0 -1
  7. package/core/src/nako_ast.mts +1 -1
  8. package/core/src/nako_colors.mjs +0 -1
  9. package/core/src/nako_colors.mts +1 -1
  10. package/core/src/nako_core_version.mjs +2 -2
  11. package/core/src/nako_core_version.mts +2 -2
  12. package/core/src/nako_csv.mjs +0 -1
  13. package/core/src/nako_csv.mts +9 -9
  14. package/core/src/nako_errors.mts +8 -8
  15. package/core/src/nako_from_dncl.mts +5 -5
  16. package/core/src/nako_from_dncl2.mjs +0 -1
  17. package/core/src/nako_from_dncl2.mts +5 -5
  18. package/core/src/nako_gen.mjs +13 -15
  19. package/core/src/nako_gen.mts +224 -220
  20. package/core/src/nako_global.mts +11 -11
  21. package/core/src/nako_indent.mts +92 -92
  22. package/core/src/nako_indent_chars.mts +1 -1
  23. package/core/src/nako_indent_inline.mjs +11 -11
  24. package/core/src/nako_indent_inline.mts +20 -20
  25. package/core/src/nako_lex_rules.mjs +0 -1
  26. package/core/src/nako_lex_rules.mts +8 -8
  27. package/core/src/nako_lexer.mjs +0 -1
  28. package/core/src/nako_lexer.mts +23 -23
  29. package/core/src/nako_logger.mjs +1 -1
  30. package/core/src/nako_logger.mts +38 -38
  31. package/core/src/nako_parser3.mjs +4 -5
  32. package/core/src/nako_parser3.mts +79 -79
  33. package/core/src/nako_parser_base.mjs +1 -1
  34. package/core/src/nako_parser_base.mts +68 -68
  35. package/core/src/nako_parser_const.mjs +0 -1
  36. package/core/src/nako_parser_const.mts +1 -1
  37. package/core/src/nako_prepare.mts +12 -12
  38. package/core/src/nako_source_mapping.mts +9 -9
  39. package/core/src/nako_token.mjs +0 -1
  40. package/core/src/nako_token.mts +2 -2
  41. package/core/src/nako_tools.mjs +0 -1
  42. package/core/src/nako_tools.mts +4 -4
  43. package/core/src/nako_types.mjs +0 -1
  44. package/core/src/nako_types.mts +3 -3
  45. package/core/src/plugin_api.mjs +0 -1
  46. package/core/src/plugin_api.mts +1 -1
  47. package/core/src/plugin_csv.mjs +0 -1
  48. package/core/src/plugin_csv.mts +7 -7
  49. package/core/src/plugin_math.mjs +0 -1
  50. package/core/src/plugin_math.mts +39 -40
  51. package/core/src/plugin_promise.mjs +1 -1
  52. package/core/src/plugin_promise.mts +9 -9
  53. package/core/src/plugin_system.mjs +1 -10
  54. package/core/src/plugin_system.mts +319 -321
  55. package/core/src/plugin_test.mjs +0 -2
  56. package/core/src/plugin_test.mts +6 -6
  57. package/core/src/plugin_toml.mjs +1 -1
  58. package/core/src/plugin_toml.mts +4 -4
  59. package/core/test/flow_test.mjs +22 -0
  60. package/package.json +31 -34
  61. package/release/_hash.txt +24 -24
  62. package/release/_script-tags.txt +16 -16
  63. package/release/command_cnako3.json +1 -1
  64. package/release/edit_main.js +33 -21
  65. package/release/edit_main.js.map +4 -4
  66. package/release/editor.js +33 -21
  67. package/release/plugin_keigo.js.map +2 -2
  68. package/release/plugin_turtle.js.map +2 -2
  69. package/release/plugin_weykturtle3d.js.map +2 -2
  70. package/release/version.js +29 -17
  71. package/release/version_main.js +29 -17
  72. package/release/version_main.js.map +4 -4
  73. package/release/wnako3.js +51 -44
  74. package/release/wnako3.js.map +3 -3
  75. package/release/wnako3webworker.js +45 -38
  76. package/release/wnako3webworker.js.map +2 -2
  77. package/src/cnako3.mts +1 -1
  78. package/src/cnako3mod.mjs +4 -7
  79. package/src/cnako3mod.mts +24 -24
  80. package/src/commander_ja.mts +8 -8
  81. package/src/deno_wrapper.mjs +0 -1
  82. package/src/deno_wrapper.mts +5 -5
  83. package/src/nako_version.mjs +2 -2
  84. package/src/nako_version.mts +2 -2
  85. package/src/plugin_browser.mjs +21 -29
  86. package/src/plugin_browser.mts +30 -35
  87. package/src/plugin_browser_ajax.mts +27 -27
  88. package/src/plugin_browser_audio.mjs +0 -1
  89. package/src/plugin_browser_audio.mts +11 -11
  90. package/src/plugin_browser_camera.mts +8 -8
  91. package/src/plugin_browser_canvas.mjs +0 -2
  92. package/src/plugin_browser_canvas.mts +34 -34
  93. package/src/plugin_browser_chart.mjs +0 -1
  94. package/src/plugin_browser_chart.mts +13 -13
  95. package/src/plugin_browser_color.mts +2 -2
  96. package/src/plugin_browser_crypto.mts +5 -5
  97. package/src/plugin_browser_dialog.mts +4 -4
  98. package/src/plugin_browser_dom_basic.mts +42 -42
  99. package/src/plugin_browser_dom_event.mjs +0 -1
  100. package/src/plugin_browser_dom_event.mts +27 -28
  101. package/src/plugin_browser_dom_parts.mjs +0 -2
  102. package/src/plugin_browser_dom_parts.mts +31 -31
  103. package/src/plugin_browser_geolocation.mts +3 -3
  104. package/src/plugin_browser_hotkey.mts +3 -3
  105. package/src/plugin_browser_html.mts +4 -4
  106. package/src/plugin_browser_in_worker.mts +1 -1
  107. package/src/plugin_browser_location.mts +2 -2
  108. package/src/plugin_browser_speech.mts +7 -7
  109. package/src/plugin_browser_storage.mts +11 -11
  110. package/src/plugin_browser_system.mts +2 -2
  111. package/src/plugin_browser_websocket.mts +6 -6
  112. package/src/plugin_httpserver.mts +17 -17
  113. package/src/plugin_keigo.mts +5 -5
  114. package/src/plugin_node.mjs +7 -48
  115. package/src/plugin_node.mts +114 -145
  116. package/src/plugin_turtle.mts +143 -143
  117. package/src/plugin_weykturtle3d.mjs +0 -3
  118. package/src/plugin_weykturtle3d.mts +135 -135
  119. package/src/plugin_weykturtle3d_three.mjs +0 -1
  120. package/src/plugin_weykturtle3d_three.mts +1 -1
  121. package/src/plugin_weykturtle3d_threeutil.mts +3 -3
  122. package/src/wnako3.mjs +0 -1
  123. package/src/wnako3.mts +1 -1
  124. package/src/wnako3_editor.mjs +0 -2
  125. package/src/wnako3_editor.mts +132 -132
  126. package/src/wnako3mod.mjs +0 -5
  127. package/src/wnako3mod.mts +19 -19
@@ -1,45 +1,45 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
1
+
2
2
  /**
3
3
  * file: plugin_node.mjs
4
4
  * node.js のためのプラグイン
5
5
  */
6
6
  import fs from 'node:fs'
7
- import fse from 'fs-extra'
8
- import fetch, { FormData, Blob } from 'node-fetch'
9
7
  import { exec, execSync, spawn } from 'node:child_process'
10
- import shellQuote from 'shell-quote'
11
8
  import path from 'node:path'
12
- import iconv from 'iconv-lite'
13
- import opener from 'opener'
14
9
  import assert from 'node:assert'
15
10
  // ハッシュ関数で利用
16
11
  import crypto from 'node:crypto'
17
12
  import os, { platform } from 'node:os'
18
13
  import url from 'node:url'
14
+ import opener from 'opener'
15
+ import iconv from 'iconv-lite'
16
+ import shellQuote from 'shell-quote'
17
+ import fetch, { FormData, Blob } from 'node-fetch'
18
+ import fse from 'fs-extra'
19
19
  import { NakoSystem } from '../core/src/plugin_api.mjs'
20
20
 
21
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
21
+
22
22
  import { getEnv, isWindows, getCommandLineArgs, exit } from './deno_wrapper.mjs'
23
23
 
24
24
  const __filename = url.fileURLToPath(import.meta.url)
25
25
  const __dirname = path.dirname(__filename)
26
26
 
27
27
  // ローカル関数
28
- function fileExists (f: string): boolean {
28
+ function fileExists(f: string): boolean {
29
29
  try {
30
30
  fs.statSync(f)
31
31
  return true
32
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
32
+
33
33
  } catch (err) {
34
34
  return false
35
35
  }
36
36
  }
37
37
 
38
- function isDir (f: string): boolean {
38
+ function isDir(f: string): boolean {
39
39
  try {
40
40
  const st = fs.statSync(f)
41
41
  return st.isDirectory()
42
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
42
+
43
43
  } catch (err) {
44
44
  return false
45
45
  }
@@ -77,7 +77,7 @@ export default {
77
77
  type: 'func',
78
78
  josi: [],
79
79
  pure: true,
80
- fn: function (sys: NakoSystem) {
80
+ fn: function(sys: NakoSystem) {
81
81
  sys.engine = 'cnako'
82
82
  sys.pathSeparator = path.sep // パス記号 #2185
83
83
  // OS判定
@@ -164,7 +164,7 @@ export default {
164
164
  }
165
165
  nodeProcess.stdin.on('data', (buf: Buffer) => {
166
166
  // 生データも保持(『標準入力全取得』向け)
167
- try { sys.tags.__stdinRaw += buf.toString() } catch (_) {}
167
+ try { sys.tags.__stdinRaw += buf.toString() } catch (_err) { /* ignore */ }
168
168
  const bufStr = buf.toString()
169
169
  for (let i = 0; i < bufStr.length; i++) {
170
170
  const c = bufStr.charAt(i)
@@ -185,7 +185,7 @@ export default {
185
185
  sys.tags.__stdinEnded = true
186
186
  if (sys.tags.__endWaiters && Array.isArray(sys.tags.__endWaiters)) {
187
187
  for (const w of sys.tags.__endWaiters) {
188
- try { w() } catch (_) {}
188
+ try { w() } catch (_err) { /* ignore */ }
189
189
  }
190
190
  sys.tags.__endWaiters = []
191
191
  }
@@ -218,7 +218,7 @@ export default {
218
218
  type: 'func',
219
219
  josi: [['を', 'から']],
220
220
  pure: true,
221
- fn: function (f: string) {
221
+ fn: function(f: string) {
222
222
  return fs.readFileSync(f, 'utf-8')
223
223
  }
224
224
  },
@@ -226,7 +226,7 @@ export default {
226
226
  type: 'func',
227
227
  josi: [['を', 'から']],
228
228
  pure: true,
229
- fn: function (f: string) {
229
+ fn: function(f: string) {
230
230
  return fs.readFileSync(f, 'utf-8')
231
231
  }
232
232
  },
@@ -234,8 +234,7 @@ export default {
234
234
  type: 'func',
235
235
  josi: [['を', 'から']],
236
236
  pure: true,
237
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
238
- fn: function (s: string, sys: NakoSystem) {
237
+ fn: function(s: string, sys: NakoSystem) {
239
238
  return fs.readFileSync(s)
240
239
  }
241
240
  },
@@ -244,7 +243,7 @@ export default {
244
243
  josi: [['を'], ['へ', 'に']],
245
244
  pure: true,
246
245
  asyncFn: true,
247
- fn: function (s: any, f: string) {
246
+ fn: function(s: any, f: string) {
248
247
  return new Promise((resolve, reject) => {
249
248
  // 引数sの型によって書き込みオプションを変更する
250
249
  const options: any = {}
@@ -266,8 +265,7 @@ export default {
266
265
  type: 'func',
267
266
  josi: [['を', 'から']],
268
267
  pure: true,
269
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
270
- fn: function (s: string, sys: NakoSystem) {
268
+ fn: function(s: string, sys: NakoSystem) {
271
269
  // iconv.skipDecodeWarning = true
272
270
  const buf = fs.readFileSync(s)
273
271
  const text = iconv.decode(Buffer.from(buf), 'sjis')
@@ -278,8 +276,7 @@ export default {
278
276
  type: 'func',
279
277
  josi: [['を'], ['へ', 'に']],
280
278
  pure: true,
281
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
282
- fn: function (s: string, f: string, sys: NakoSystem) {
279
+ fn: function(s: string, f: string, sys: NakoSystem) {
283
280
  // iconv.skipDecodeWarning = true
284
281
  const buf = iconv.encode(s, 'Shift_JIS')
285
282
  fs.writeFileSync(f, buf)
@@ -290,8 +287,7 @@ export default {
290
287
  type: 'func',
291
288
  josi: [['を', 'から']],
292
289
  pure: true,
293
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
294
- fn: function (s: string, sys: NakoSystem) {
290
+ fn: function(s: string, sys: NakoSystem) {
295
291
  const buf = fs.readFileSync(s)
296
292
  const text = iconv.decode(Buffer.from(buf), 'euc-jp')
297
293
  return text
@@ -301,8 +297,7 @@ export default {
301
297
  type: 'func',
302
298
  josi: [['を'], ['へ', 'に']],
303
299
  pure: true,
304
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
305
- fn: function (s: string, f: string, sys: NakoSystem) {
300
+ fn: function(s: string, f: string, sys: NakoSystem) {
306
301
  const buf = iconv.encode(s, 'euc-jp')
307
302
  fs.writeFileSync(f, buf)
308
303
  },
@@ -312,7 +307,7 @@ export default {
312
307
  type: 'func',
313
308
  josi: [['を']],
314
309
  pure: true,
315
- fn: function (s: string) {
310
+ fn: function(s: string) {
316
311
  const r = execSync(s)
317
312
  return r.toString()
318
313
  }
@@ -321,7 +316,7 @@ export default {
321
316
  type: 'func',
322
317
  josi: [['を']],
323
318
  pure: true,
324
- fn: function (s: string) {
319
+ fn: function(s: string) {
325
320
  exec(s, (err, stdout, stderr) => {
326
321
  if (err) { console.error(stderr) } else {
327
322
  if (stdout) { console.log(stdout) }
@@ -333,8 +328,7 @@ export default {
333
328
  type: 'func',
334
329
  josi: [['で'], ['を']],
335
330
  pure: true,
336
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
337
- fn: function (callback: any, s: string, sys: NakoSystem) {
331
+ fn: function(callback: any, s: string, sys: NakoSystem) {
338
332
  exec(s, (err, stdout, stderr) => {
339
333
  if (err) { throw new Error(stderr) } else { callback(stdout) }
340
334
  })
@@ -344,7 +338,7 @@ export default {
344
338
  type: 'func',
345
339
  josi: [['を', 'で', 'の']],
346
340
  pure: true,
347
- fn: function (url: string) {
341
+ fn: function(url: string) {
348
342
  opener(url)
349
343
  }
350
344
  },
@@ -352,7 +346,7 @@ export default {
352
346
  type: 'func',
353
347
  josi: [['を', 'で', 'の']],
354
348
  pure: true,
355
- fn: function (fname: string, sys: NakoSystem) {
349
+ fn: function(fname: string, sys: NakoSystem) {
356
350
  // windows
357
351
  if (sys.tags.isWin) {
358
352
  if (isDir(fname)) { // ディレクトリを起動
@@ -382,7 +376,7 @@ export default {
382
376
  type: 'func',
383
377
  josi: [['の', 'を', 'で']],
384
378
  pure: true,
385
- fn: function (s: string) {
379
+ fn: function(s: string) {
386
380
  if (s.indexOf('*') >= 0) { // ワイルドカードがある場合
387
381
  const searchPath = path.dirname(s)
388
382
  const mask1 = path.basename(s)
@@ -401,7 +395,7 @@ export default {
401
395
  type: 'func',
402
396
  josi: [['の', 'を', 'で']],
403
397
  pure: true,
404
- fn: function (s: string) {
398
+ fn: function(s: string) {
405
399
  /** @type {string[]} */
406
400
  const result: string[] = []
407
401
  // ワイルドカードの有無を確認
@@ -427,7 +421,7 @@ export default {
427
421
  let st: fs.Stats
428
422
  try {
429
423
  st = fs.statSync(fullpath)
430
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
424
+
431
425
  } catch (e) {
432
426
  continue
433
427
  }
@@ -447,7 +441,7 @@ export default {
447
441
  type: 'func',
448
442
  josi: [['が', 'の']],
449
443
  pure: true,
450
- fn: function (path: string) {
444
+ fn: function(path: string) {
451
445
  return fileExists(path)
452
446
  }
453
447
  },
@@ -455,7 +449,7 @@ export default {
455
449
  type: 'func',
456
450
  josi: [['が', 'の']],
457
451
  pure: true,
458
- fn: function (path: string) {
452
+ fn: function(path: string) {
459
453
  return isDir(path)
460
454
  }
461
455
  },
@@ -463,7 +457,7 @@ export default {
463
457
  type: 'func',
464
458
  josi: [['の', 'を', 'に', 'へ']],
465
459
  pure: true,
466
- fn: function (path: string) {
460
+ fn: function(path: string) {
467
461
  return fse.mkdirpSync(path)
468
462
  }
469
463
  },
@@ -471,7 +465,7 @@ export default {
471
465
  type: 'func',
472
466
  josi: [['から', 'を'], ['に', 'へ']],
473
467
  pure: true,
474
- fn: function (a: string, b: string, sys: NakoSystem) {
468
+ fn: function(a: string, b: string, sys: NakoSystem) {
475
469
  return fse.copySync(a, b)
476
470
  }
477
471
  },
@@ -479,7 +473,7 @@ export default {
479
473
  type: 'func',
480
474
  josi: [['から', 'を'], ['に', 'へ']],
481
475
  pure: true,
482
- fn: function (a: string, b: string, sys: NakoSystem) {
476
+ fn: function(a: string, b: string, sys: NakoSystem) {
483
477
  return fse.copySync(a, b, { overwrite: true })
484
478
  }
485
479
  },
@@ -487,7 +481,7 @@ export default {
487
481
  type: 'func',
488
482
  josi: [['で'], ['から', 'を'], ['に', 'へ']],
489
483
  pure: true,
490
- fn: function (callback: any, a: string, b: string, sys: NakoSystem) {
484
+ fn: function(callback: any, a: string, b: string, sys: NakoSystem) {
491
485
  return fse.copy(a, b, (err: any) => {
492
486
  if (err) { throw new Error('ファイルコピー時:' + err) }
493
487
  callback()
@@ -499,7 +493,7 @@ export default {
499
493
  type: 'func',
500
494
  josi: [['から', 'を'], ['に', 'へ']],
501
495
  pure: true,
502
- fn: function (a: string, b: string, sys: NakoSystem) {
496
+ fn: function(a: string, b: string, sys: NakoSystem) {
503
497
  return fse.moveSync(a, b)
504
498
  }
505
499
  },
@@ -507,7 +501,7 @@ export default {
507
501
  type: 'func',
508
502
  josi: [['から', 'を'], ['に', 'へ']],
509
503
  pure: true,
510
- fn: function (a: string, b: string, sys: NakoSystem) {
504
+ fn: function(a: string, b: string, sys: NakoSystem) {
511
505
  return fse.moveSync(a, b, { overwrite: true })
512
506
  }
513
507
  },
@@ -515,8 +509,7 @@ export default {
515
509
  type: 'func',
516
510
  josi: [['で'], ['から', 'を'], ['に', 'へ']],
517
511
  pure: true,
518
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
519
- fn: function (callback: any, a: string, b: string, sys: NakoSystem) {
512
+ fn: function(callback: any, a: string, b: string, sys: NakoSystem) {
520
513
  fse.move(a, b, (err: any) => {
521
514
  if (err) { throw new Error('ファイル移動時:' + err) }
522
515
  callback()
@@ -528,7 +521,7 @@ export default {
528
521
  type: 'func',
529
522
  josi: [['の', 'を']],
530
523
  pure: true,
531
- fn: function (path: string, sys: NakoSystem) {
524
+ fn: function(path: string, sys: NakoSystem) {
532
525
  return fse.removeSync(path)
533
526
  }
534
527
  },
@@ -536,7 +529,7 @@ export default {
536
529
  type: 'func',
537
530
  josi: [['で'], ['の', 'を']],
538
531
  pure: true,
539
- fn: function (callback: any, path: string, sys: NakoSystem) {
532
+ fn: function(callback: any, path: string, sys: NakoSystem) {
540
533
  return fse.remove(path, (err: any) => {
541
534
  if (err) { throw new Error('ファイル削除時:' + err) }
542
535
  callback()
@@ -548,8 +541,7 @@ export default {
548
541
  type: 'func',
549
542
  josi: [['の', 'から']],
550
543
  pure: true,
551
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
552
- fn: function (path: string, sys: NakoSystem) {
544
+ fn: function(path: string, sys: NakoSystem) {
553
545
  return fs.statSync(path)
554
546
  }
555
547
  },
@@ -557,8 +549,7 @@ export default {
557
549
  type: 'func',
558
550
  josi: [['の', 'から']],
559
551
  pure: true,
560
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
561
- fn: function (path: string, sys: NakoSystem) {
552
+ fn: function(path: string, sys: NakoSystem) {
562
553
  const st = fs.statSync(path)
563
554
  if (!st) { return -1 }
564
555
  return st.size
@@ -569,7 +560,7 @@ export default {
569
560
  type: 'func',
570
561
  josi: [['から', 'の']],
571
562
  pure: true,
572
- fn: function (s: string) {
563
+ fn: function(s: string) {
573
564
  return path.basename(s)
574
565
  }
575
566
  },
@@ -577,7 +568,7 @@ export default {
577
568
  type: 'func',
578
569
  josi: [['から', 'の']],
579
570
  pure: true,
580
- fn: function (s: string) {
571
+ fn: function(s: string) {
581
572
  return path.dirname(s)
582
573
  }
583
574
  },
@@ -585,7 +576,7 @@ export default {
585
576
  type: 'func',
586
577
  josi: [['を', 'の']],
587
578
  pure: true,
588
- fn: function (a: string) {
579
+ fn: function(a: string) {
589
580
  return path.resolve(a)
590
581
  }
591
582
  },
@@ -593,7 +584,7 @@ export default {
593
584
  type: 'func',
594
585
  josi: [['を'], ['で']],
595
586
  pure: true,
596
- fn: function (a: string, b: string) {
587
+ fn: function(a: string, b: string) {
597
588
  return path.resolve(path.join(a, b))
598
589
  }
599
590
  },
@@ -602,7 +593,7 @@ export default {
602
593
  type: 'func',
603
594
  josi: [],
604
595
  pure: true,
605
- fn: function () {
596
+ fn: function() {
606
597
  const cwd = nodeProcess.cwd()
607
598
  return path.resolve(cwd)
608
599
  }
@@ -611,7 +602,7 @@ export default {
611
602
  type: 'func',
612
603
  josi: [['に', 'へ']],
613
604
  pure: true,
614
- fn: function (dir: string) {
605
+ fn: function(dir: string) {
615
606
  nodeProcess.chdir(dir)
616
607
  },
617
608
  return_none: true
@@ -620,7 +611,7 @@ export default {
620
611
  type: 'func',
621
612
  josi: [],
622
613
  pure: true,
623
- fn: function () {
614
+ fn: function() {
624
615
  const cwd = nodeProcess.cwd()
625
616
  return path.resolve(cwd)
626
617
  }
@@ -629,7 +620,7 @@ export default {
629
620
  type: 'func',
630
621
  josi: [['に', 'へ']],
631
622
  pure: true,
632
- fn: function (dir: string) {
623
+ fn: function(dir: string) {
633
624
  nodeProcess.chdir(dir)
634
625
  },
635
626
  return_none: true
@@ -638,7 +629,7 @@ export default {
638
629
  type: 'func',
639
630
  josi: [],
640
631
  pure: true,
641
- fn: function (sys: NakoSystem) {
632
+ fn: function(sys: NakoSystem) {
642
633
  return nodeProcess.env[sys.tags.isWin ? 'USERPROFILE' : 'HOME']
643
634
  }
644
635
  },
@@ -646,7 +637,7 @@ export default {
646
637
  type: 'func',
647
638
  josi: [],
648
639
  pure: true,
649
- fn: function (sys: NakoSystem) {
640
+ fn: function(sys: NakoSystem) {
650
641
  const home = sys.__exec('ホームディレクトリ取得', [sys])
651
642
  return path.join(home, 'Desktop')
652
643
  }
@@ -655,7 +646,7 @@ export default {
655
646
  type: 'func',
656
647
  josi: [],
657
648
  pure: true,
658
- fn: function (sys: NakoSystem) {
649
+ fn: function(sys: NakoSystem) {
659
650
  const home = sys.__exec('ホームディレクトリ取得', [sys])
660
651
  return path.join(home, 'Documents')
661
652
  }
@@ -665,7 +656,7 @@ export default {
665
656
  type: 'func',
666
657
  josi: [],
667
658
  pure: true,
668
- fn: function (sys: NakoSystem) {
659
+ fn: function(sys: NakoSystem) {
669
660
  return sys.tags.__getBokanPath()
670
661
  }
671
662
  },
@@ -673,8 +664,7 @@ export default {
673
664
  type: 'func',
674
665
  josi: [],
675
666
  pure: true,
676
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
677
- fn: function (sys: NakoSystem) {
667
+ fn: function(sys: NakoSystem) {
678
668
  // 環境変数からテンポラリフォルダを取得
679
669
  return os.tmpdir()
680
670
  }
@@ -683,8 +673,7 @@ export default {
683
673
  type: 'func',
684
674
  josi: [['に', 'へ']],
685
675
  pure: true,
686
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
687
- fn: function (dir: string, sys: NakoSystem) {
676
+ fn: function(dir: string, sys: NakoSystem) {
688
677
  if (dir === '' || !dir) {
689
678
  dir = os.tmpdir()
690
679
  }
@@ -697,7 +686,7 @@ export default {
697
686
  type: 'func',
698
687
  josi: [['の']],
699
688
  pure: true,
700
- fn: function (s: string) {
689
+ fn: function(s: string) {
701
690
  return nodeProcess.env[s]
702
691
  }
703
692
  },
@@ -705,7 +694,7 @@ export default {
705
694
  type: 'func',
706
695
  josi: [],
707
696
  pure: true,
708
- fn: function () {
697
+ fn: function() {
709
698
  return nodeProcess.env
710
699
  }
711
700
  },
@@ -715,7 +704,7 @@ export default {
715
704
  type: 'func',
716
705
  josi: [['に', 'へ']],
717
706
  pure: true,
718
- fn: function (v: string, sys: NakoSystem) {
707
+ fn: function(v: string, sys: NakoSystem) {
719
708
  sys.__setSysVar('圧縮解凍ツールパス', v)
720
709
  },
721
710
  return_none: true
@@ -724,7 +713,7 @@ export default {
724
713
  type: 'func',
725
714
  josi: [['を', 'から'], ['に', 'へ']],
726
715
  pure: true,
727
- fn: function (a: string, b: string, sys: NakoSystem) {
716
+ fn: function(a: string, b: string, sys: NakoSystem) {
728
717
  const tpath = sys.tags.__quotePath(sys.tags.__getBinPath(sys.__getSysVar('圧縮解凍ツールパス')))
729
718
  a = sys.tags.__quotePath(a)
730
719
  b = sys.tags.__quotePath(b)
@@ -737,12 +726,12 @@ export default {
737
726
  type: 'func',
738
727
  josi: [['で'], ['を', 'から'], ['に', 'へ']],
739
728
  pure: true,
740
- fn: function (callback: any, a: string, b: string, sys: NakoSystem) {
729
+ fn: function(callback: any, a: string, b: string, sys: NakoSystem) {
741
730
  const tpath = sys.tags.__quotePath(sys.tags.__getBinPath(sys.__getSysVar('圧縮解凍ツールパス')))
742
731
  a = sys.tags.__quotePath(a)
743
732
  b = sys.tags.__quotePath(b)
744
733
  const cmd = `${tpath} x ${a} -o${b} -y`
745
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
734
+
746
735
  exec(cmd, (err, stdout, stderr) => {
747
736
  if (err) { throw new Error('[エラー]『解凍時』' + (err as unknown as string)) }
748
737
  callback(stdout)
@@ -754,7 +743,7 @@ export default {
754
743
  type: 'func',
755
744
  josi: [['を', 'から'], ['に', 'へ']],
756
745
  pure: true,
757
- fn: function (a: string, b: string, sys: NakoSystem) {
746
+ fn: function(a: string, b: string, sys: NakoSystem) {
758
747
  const tpath = sys.tags.__quotePath(sys.tags.__getBinPath(sys.__getSysVar('圧縮解凍ツールパス')))
759
748
  a = sys.tags.__quotePath(a)
760
749
  b = sys.tags.__quotePath(b)
@@ -767,12 +756,12 @@ export default {
767
756
  type: 'func',
768
757
  josi: [['で'], ['を', 'から'], ['に', 'へ']],
769
758
  pure: true,
770
- fn: function (callback: any, a: string, b: string, sys: NakoSystem) {
759
+ fn: function(callback: any, a: string, b: string, sys: NakoSystem) {
771
760
  const tpath = sys.tags.__quotePath(sys.tags.__getBinPath(sys.__getSysVar('圧縮解凍ツールパス')))
772
761
  a = sys.tags.__quotePath(a)
773
762
  b = sys.tags.__quotePath(b)
774
763
  const cmd = `${tpath} a -r ${b} ${a} -y`
775
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
764
+
776
765
  exec(cmd, (err, stdout, stderr) => {
777
766
  if (err) { throw new Error('[エラー]『圧縮時』' + (err.message || JSON.stringify(err))) }
778
767
  callback(stdout)
@@ -785,7 +774,7 @@ export default {
785
774
  type: 'func',
786
775
  josi: [],
787
776
  pure: true,
788
- fn: function () {
777
+ fn: function() {
789
778
  nodeProcess.exit()
790
779
  },
791
780
  return_none: true
@@ -794,11 +783,11 @@ export default {
794
783
  type: 'func',
795
784
  josi: [['を']],
796
785
  pure: true,
797
- fn: function (func: any, sys: NakoSystem) {
786
+ fn: function(func: any, sys: NakoSystem) {
798
787
  if (typeof (func) === 'string') {
799
788
  func = sys.__findFunc(func, '強制終了時')
800
789
  }
801
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
790
+
802
791
  nodeProcess.on('SIGINT', (signal: any) => {
803
792
  const flag = func(sys)
804
793
  if (flag) { nodeProcess.exit() }
@@ -810,7 +799,7 @@ export default {
810
799
  type: 'func',
811
800
  josi: [],
812
801
  pure: true,
813
- fn: function (sys: NakoSystem) {
802
+ fn: function(sys: NakoSystem) {
814
803
  sys.__exec('終', [])
815
804
  },
816
805
  return_none: true
@@ -819,8 +808,7 @@ export default {
819
808
  type: 'func',
820
809
  josi: [],
821
810
  pure: true,
822
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
823
- fn: function (sys: NakoSystem) {
811
+ fn: function(sys: NakoSystem) {
824
812
  return nodeProcess.platform
825
813
  }
826
814
  },
@@ -828,8 +816,7 @@ export default {
828
816
  type: 'func',
829
817
  josi: [],
830
818
  pure: true,
831
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
832
- fn: function (sys: NakoSystem) {
819
+ fn: function(sys: NakoSystem) {
833
820
  return nodeProcess.arch
834
821
  }
835
822
  },
@@ -841,7 +828,7 @@ export default {
841
828
  type: 'func',
842
829
  josi: [['を']],
843
830
  pure: true,
844
- fn: function (callback: (f: string)=>void, sys: NakoSystem) {
831
+ fn: function(callback: (f: string)=>void, sys: NakoSystem) {
845
832
  if (!sys.tags.readline) {
846
833
  throw new Error('『標準入力取得時』命令で標準入力が取得できません')
847
834
  }
@@ -859,7 +846,7 @@ export default {
859
846
  josi: [['と', 'を']],
860
847
  pure: true,
861
848
  asyncFn: true,
862
- fn: async function (msg: string, sys: NakoSystem) {
849
+ fn: async function(msg: string, sys: NakoSystem) {
863
850
  if (!sys.tags.readline) {
864
851
  throw new Error('『尋』命令で標準入力が取得できません')
865
852
  }
@@ -877,7 +864,7 @@ export default {
877
864
  josi: [['と', 'を']],
878
865
  pure: true,
879
866
  asyncFn: true,
880
- fn: async function (msg: string, sys: NakoSystem) {
867
+ fn: async function(msg: string, sys: NakoSystem) {
881
868
  if (!sys.tags.readline) {
882
869
  throw new Error('『尋』命令で標準入力が取得できません')
883
870
  }
@@ -890,8 +877,7 @@ export default {
890
877
  josi: [],
891
878
  pure: true,
892
879
  asyncFn: true,
893
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
894
- fn: function (sys: NakoSystem): Promise<string> {
880
+ fn: function(sys: NakoSystem): Promise<string> {
895
881
  sys.tags.__setupStdin()
896
882
  return new Promise((resolve) => {
897
883
  if (sys.tags.__stdinEnded) {
@@ -908,8 +894,7 @@ export default {
908
894
  type: 'func',
909
895
  josi: [['と'], ['が']],
910
896
  pure: true,
911
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
912
- fn: function (a: any, b: any, sys: NakoSystem) {
897
+ fn: function(a: any, b: any, sys: NakoSystem) {
913
898
  assert.strictEqual(a, b)
914
899
  }
915
900
  },
@@ -918,8 +903,7 @@ export default {
918
903
  type: 'func',
919
904
  josi: [],
920
905
  pure: true,
921
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
922
- fn: function (sys: NakoSystem) {
906
+ fn: function(sys: NakoSystem) {
923
907
  const nif = os.networkInterfaces()
924
908
  if (!nif) { throw new Error('『自分IPアドレス取得』でネットワークのインターフェイスが種畜できません。') }
925
909
  /**
@@ -941,8 +925,7 @@ export default {
941
925
  type: 'func',
942
926
  josi: [],
943
927
  pure: true,
944
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
945
- fn: function (sys: NakoSystem) {
928
+ fn: function(sys: NakoSystem) {
946
929
  const nif = os.networkInterfaces()
947
930
  if (!nif) { throw new Error('『自分IPアドレス取得』でネットワークのインターフェイスが種畜できません。') }
948
931
  const result: string[] = []
@@ -962,7 +945,7 @@ export default {
962
945
  type: 'func',
963
946
  josi: [['の'], ['まで', 'へ', 'に']],
964
947
  pure: true,
965
- fn: function (callback: any, url: string, sys: NakoSystem) {
948
+ fn: function(callback: any, url: string, sys: NakoSystem) {
966
949
  let options = sys.__getSysVar('AJAXオプション')
967
950
  if (options === '') { options = { method: 'GET' } }
968
951
  fetch(url, options).then((res: any) => {
@@ -981,7 +964,7 @@ export default {
981
964
  type: 'func',
982
965
  josi: [['で'], ['から', 'を']],
983
966
  pure: true,
984
- fn: function (callback: any, url: string, sys: NakoSystem) {
967
+ fn: function(callback: any, url: string, sys: NakoSystem) {
985
968
  sys.__exec('AJAX送信時', [callback, url, sys])
986
969
  },
987
970
  return_none: true
@@ -990,7 +973,7 @@ export default {
990
973
  type: 'func',
991
974
  josi: [['の'], ['まで', 'へ', 'に']],
992
975
  pure: true,
993
- fn: function (callback: any, url: string, sys: NakoSystem) {
976
+ fn: function(callback: any, url: string, sys: NakoSystem) {
994
977
  sys.__exec('AJAX送信時', [callback, url, sys])
995
978
  },
996
979
  return_none: true
@@ -999,9 +982,9 @@ export default {
999
982
  type: 'func',
1000
983
  josi: [['の'], ['まで', 'へ', 'に'], ['を']],
1001
984
  pure: true,
1002
- fn: function (callback: any, url: string, params: [key: string], sys: NakoSystem) {
985
+ fn: function(callback: any, url: string, params: [key: string], sys: NakoSystem) {
1003
986
  const flist: Array<string> = []
1004
- // eslint-disable-next-line @typescript-eslint/no-for-in-array
987
+
1005
988
  for (const key in params) {
1006
989
  const v: string = params[key]
1007
990
  const kv: string = encodeURIComponent(key) + '=' + encodeURIComponent(v)
@@ -1029,7 +1012,7 @@ export default {
1029
1012
  type: 'func',
1030
1013
  josi: [['の'], ['まで', 'へ', 'に'], ['を']],
1031
1014
  pure: true,
1032
- fn: function (callback: any, url: string, params: any, sys: NakoSystem) {
1015
+ fn: function(callback: any, url: string, params: any, sys: NakoSystem) {
1033
1016
  const fd = new FormData()
1034
1017
  for (const key in params) { fd.set(key, params[key]) }
1035
1018
 
@@ -1054,7 +1037,7 @@ export default {
1054
1037
  type: 'func',
1055
1038
  josi: [['の']],
1056
1039
  pure: true,
1057
- fn: function (callback: any, sys: NakoSystem) {
1040
+ fn: function(callback: any, sys: NakoSystem) {
1058
1041
  sys.__setSysVar('AJAX:ONERROR', callback)
1059
1042
  }
1060
1043
  },
@@ -1063,7 +1046,7 @@ export default {
1063
1046
  type: 'func',
1064
1047
  josi: [['に', 'へ', 'と']],
1065
1048
  pure: true,
1066
- fn: function (option: any, sys: NakoSystem) {
1049
+ fn: function(option: any, sys: NakoSystem) {
1067
1050
  sys.__setSysVar('AJAXオプション', option)
1068
1051
  },
1069
1052
  return_none: true
@@ -1072,7 +1055,7 @@ export default {
1072
1055
  type: 'func',
1073
1056
  josi: [['まで', 'へ', 'に']],
1074
1057
  pure: true,
1075
- fn: function (url: string, sys: NakoSystem) {
1058
+ fn: function(url: string, sys: NakoSystem) {
1076
1059
  let options = sys.__getSysVar('AJAXオプション')
1077
1060
  if (options === '') { options = { method: 'GET' } }
1078
1061
  return fetch(url, options)
@@ -1083,7 +1066,7 @@ export default {
1083
1066
  type: 'func',
1084
1067
  josi: [['の', 'から', 'を']],
1085
1068
  pure: true,
1086
- fn: function (url: string, sys: NakoSystem) {
1069
+ fn: function(url: string, sys: NakoSystem) {
1087
1070
  return sys.__exec('AJAX保障送信', [url, sys])
1088
1071
  },
1089
1072
  return_none: false
@@ -1092,7 +1075,7 @@ export default {
1092
1075
  type: 'func',
1093
1076
  josi: [['まで', 'へ', 'に']],
1094
1077
  pure: true,
1095
- fn: function (url: string, sys: NakoSystem) {
1078
+ fn: function(url: string, sys: NakoSystem) {
1096
1079
  return sys.__exec('AJAX保障送信', [url, sys])
1097
1080
  },
1098
1081
  return_none: false
@@ -1101,10 +1084,9 @@ export default {
1101
1084
  type: 'func',
1102
1085
  josi: [['まで', 'へ', 'に'], ['を']],
1103
1086
  pure: true,
1104
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1105
- fn: function (url: string, params: [key: string], sys: NakoSystem) {
1087
+ fn: function(url: string, params: [key: string], sys: NakoSystem) {
1106
1088
  const flist: Array<string> = []
1107
- // eslint-disable-next-line @typescript-eslint/no-for-in-array
1089
+
1108
1090
  for (const key in params) {
1109
1091
  const v: string = params[key]
1110
1092
  const kv: string = encodeURIComponent(key) + '=' + encodeURIComponent(v)
@@ -1126,8 +1108,7 @@ export default {
1126
1108
  type: 'func',
1127
1109
  josi: [['まで', 'へ', 'に'], ['を']],
1128
1110
  pure: true,
1129
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1130
- fn: function (url: string, params: any, sys: NakoSystem) {
1111
+ fn: function(url: string, params: any, sys: NakoSystem) {
1131
1112
  const fd = new FormData()
1132
1113
  for (const key in params) { fd.set(key, params[key]) }
1133
1114
 
@@ -1143,8 +1124,7 @@ export default {
1143
1124
  type: 'func',
1144
1125
  josi: [['から'], ['で']],
1145
1126
  pure: true,
1146
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1147
- fn: function (res: any, type: string, sys: NakoSystem) {
1127
+ fn: function(res: any, type: string, sys: NakoSystem) {
1148
1128
  type = type.toString().toUpperCase()
1149
1129
  if (type === 'TEXT' || type === 'テキスト') {
1150
1130
  return res.text()
@@ -1169,7 +1149,7 @@ export default {
1169
1149
  type: 'func',
1170
1150
  josi: [['から', 'を']],
1171
1151
  pure: true,
1172
- fn: function (url: string, sys: NakoSystem) {
1152
+ fn: function(url: string, sys: NakoSystem) {
1173
1153
  let options = sys.__getSysVar('AJAXオプション')
1174
1154
  if (options === '') { options = { method: 'GET' } }
1175
1155
  // fetch 実行
@@ -1191,8 +1171,7 @@ export default {
1191
1171
  type: 'func',
1192
1172
  josi: [['の', 'を']],
1193
1173
  pure: true,
1194
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1195
- fn: function (params: any, sys: NakoSystem) {
1174
+ fn: function(params: any, sys: NakoSystem) {
1196
1175
  const flist: Array<string> = []
1197
1176
  for (const key in params) {
1198
1177
  const v = params[key]
@@ -1207,7 +1186,7 @@ export default {
1207
1186
  josi: [['まで', 'へ', 'に'], ['を']],
1208
1187
  pure: true,
1209
1188
  asyncFn: true,
1210
- fn: function (url: any, params: any, sys: any) {
1189
+ fn: function(url: any, params: any, sys: any) {
1211
1190
  return new Promise((resolve, reject) => {
1212
1191
  const bodyData = sys.__exec('POSTデータ生成', [params, sys])
1213
1192
  const options = {
@@ -1232,8 +1211,7 @@ export default {
1232
1211
  josi: [['まで', 'へ', 'に'], ['を']],
1233
1212
  pure: true,
1234
1213
  asyncFn: true,
1235
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1236
- fn: function (url: any, params: any, sys: any) {
1214
+ fn: function(url: any, params: any, sys: any) {
1237
1215
  return new Promise((resolve, reject) => {
1238
1216
  const fd = new FormData()
1239
1217
  for (const key in params) { fd.set(key, params[key]) }
@@ -1257,7 +1235,7 @@ export default {
1257
1235
  josi: [['から']],
1258
1236
  pure: true,
1259
1237
  asyncFn: true,
1260
- fn: async function (url: string, sys: NakoSystem) {
1238
+ fn: async function(url: string, sys: NakoSystem) {
1261
1239
  let options = sys.__getSysVar('AJAXオプション')
1262
1240
  if (options === '') { options = { method: 'GET' } }
1263
1241
  // console.log(url, options)
@@ -1272,7 +1250,7 @@ export default {
1272
1250
  josi: [['から']],
1273
1251
  pure: true,
1274
1252
  asyncFn: true,
1275
- fn: async function (url: string, sys: NakoSystem) {
1253
+ fn: async function(url: string, sys: NakoSystem) {
1276
1254
  let options = sys.__getSysVar('AJAXオプション')
1277
1255
  if (options === '') { options = { method: 'GET' } }
1278
1256
  const res = await fetch(url, options)
@@ -1286,7 +1264,7 @@ export default {
1286
1264
  josi: [['から']],
1287
1265
  pure: true,
1288
1266
  asyncFn: true,
1289
- fn: async function (url: string, sys: NakoSystem) {
1267
+ fn: async function(url: string, sys: NakoSystem) {
1290
1268
  let options = sys.__getSysVar('AJAXオプション')
1291
1269
  if (options === '') { options = { method: 'GET' } }
1292
1270
  const res = await fetch(url, options)
@@ -1301,7 +1279,7 @@ export default {
1301
1279
  josi: [['へ', 'に'], ['を']],
1302
1280
  pure: true,
1303
1281
  asyncFn: true,
1304
- fn: async function (url: string, s: string, sys: NakoSystem) {
1282
+ fn: async function(url: string, s: string, sys: NakoSystem) {
1305
1283
  const payload = { content: s }
1306
1284
  const res = await fetch(url, {
1307
1285
  method: 'POST',
@@ -1321,7 +1299,7 @@ export default {
1321
1299
  josi: [['へ', 'に'], ['と'], ['を']],
1322
1300
  pure: true,
1323
1301
  asyncFn: true,
1324
- fn: async function (url: string, f: string, s: string, sys: NakoSystem) {
1302
+ fn: async function(url: string, f: string, s: string, sys: NakoSystem) {
1325
1303
  const formData = new FormData()
1326
1304
  formData.append('content', s)
1327
1305
  const imageData = fs.readFileSync(f)
@@ -1344,7 +1322,7 @@ export default {
1344
1322
  type: 'func',
1345
1323
  josi: [['へ', 'に'], ['を']],
1346
1324
  pure: true,
1347
- fn: function (token: string, message: string, sys: NakoSystem) {
1325
+ fn: function(token: string, message: string, sys: NakoSystem) {
1348
1326
  throw new Error('『LINE送信』は2025年4月で使えなくなりました。[詳細URL] https://nadesi.com/v3/doc/go.php?4670')
1349
1327
  }
1350
1328
  },
@@ -1352,7 +1330,7 @@ export default {
1352
1330
  type: 'func',
1353
1331
  josi: [['へ', 'に'], ['と'], ['を']],
1354
1332
  pure: true,
1355
- fn: function (token: string, imageFile: string, message: string, sys: NakoSystem) {
1333
+ fn: function(token: string, imageFile: string, message: string, sys: NakoSystem) {
1356
1334
  throw new Error('『LINE画像送信』は2025年4月で使えなくなりました。[詳細URL] https://nadesi.com/v3/doc/go.php?4670')
1357
1335
  }
1358
1336
  },
@@ -1361,8 +1339,7 @@ export default {
1361
1339
  type: 'func',
1362
1340
  josi: [['の', 'を']],
1363
1341
  pure: true,
1364
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1365
- fn: function (code: string, sys: NakoSystem) {
1342
+ fn: function(code: string, sys: NakoSystem) {
1366
1343
  return iconv.encodingExists(code)
1367
1344
  }
1368
1345
  },
@@ -1370,8 +1347,7 @@ export default {
1370
1347
  type: 'func',
1371
1348
  josi: [['に', 'へ', 'を']],
1372
1349
  pure: true,
1373
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1374
- fn: function (str: string, sys: NakoSystem) {
1350
+ fn: function(str: string, sys: NakoSystem) {
1375
1351
  // iconv.skipDecodeWarning = true
1376
1352
  return iconv.encode(str, 'Shift_JIS')
1377
1353
  }
@@ -1380,8 +1356,7 @@ export default {
1380
1356
  type: 'func',
1381
1357
  josi: [['から', 'を', 'で']],
1382
1358
  pure: true,
1383
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1384
- fn: function (buf: any, sys: NakoSystem) {
1359
+ fn: function(buf: any, sys: NakoSystem) {
1385
1360
  // iconv.skipDecodeWarning = true
1386
1361
  return iconv.decode(Buffer.from(buf), 'sjis')
1387
1362
  }
@@ -1390,8 +1365,7 @@ export default {
1390
1365
  type: 'func',
1391
1366
  josi: [['を'], ['へ', 'で']],
1392
1367
  pure: true,
1393
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1394
- fn: function (s: string, code: string, sys: NakoSystem) {
1368
+ fn: function(s: string, code: string, sys: NakoSystem) {
1395
1369
  // iconv.skipDecodeWarning = true
1396
1370
  return iconv.encode(s, code)
1397
1371
  }
@@ -1400,8 +1374,7 @@ export default {
1400
1374
  type: 'func',
1401
1375
  josi: [['を'], ['から', 'で']],
1402
1376
  pure: true,
1403
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1404
- fn: function (buf: any, code: string, sys: NakoSystem) {
1377
+ fn: function(buf: any, code: string, sys: NakoSystem) {
1405
1378
  // iconv.skipDecodeWarning = true
1406
1379
  return iconv.decode(Buffer.from(buf), code)
1407
1380
  }
@@ -1411,8 +1384,7 @@ export default {
1411
1384
  type: 'func',
1412
1385
  josi: [],
1413
1386
  pure: true,
1414
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1415
- fn: function (sys: NakoSystem) {
1387
+ fn: function(sys: NakoSystem) {
1416
1388
  return crypto.getHashes()
1417
1389
  }
1418
1390
  },
@@ -1420,8 +1392,7 @@ export default {
1420
1392
  type: 'func',
1421
1393
  josi: [['を'], ['の'], ['で']],
1422
1394
  pure: true,
1423
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1424
- fn: function (s: any, alg: string, enc: any, sys: NakoSystem) {
1395
+ fn: function(s: any, alg: string, enc: any, sys: NakoSystem) {
1425
1396
  const hashsum = crypto.createHash(alg)
1426
1397
  hashsum.update(s)
1427
1398
  return hashsum.digest(enc)
@@ -1431,8 +1402,7 @@ export default {
1431
1402
  type: 'func',
1432
1403
  josi: [],
1433
1404
  pure: true,
1434
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1435
- fn: function (sys: NakoSystem) {
1405
+ fn: function(sys: NakoSystem) {
1436
1406
  const uuid = crypto.randomUUID()
1437
1407
  return uuid
1438
1408
  }
@@ -1441,8 +1411,7 @@ export default {
1441
1411
  type: 'func',
1442
1412
  josi: [['の']],
1443
1413
  pure: true,
1444
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1445
- fn: function (cnt: number, sys: NakoSystem) {
1414
+ fn: function(cnt: number, sys: NakoSystem) {
1446
1415
  const a = new Uint8Array(cnt)
1447
1416
  crypto.getRandomValues(a)
1448
1417
  return a