@zwa73/utils 1.0.0 → 1.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zwa73/utils",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "my utils",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -14,16 +14,11 @@
14
14
  "dependencies": {
15
15
  "@dqbd/tiktoken": "^1.0.7",
16
16
  "@types/node": "^18.16.3",
17
- "@vitalets/google-translate-api": "^9.1.0",
17
+ "esm": "^3.2.25",
18
18
  "esm-resolve": "^1.0.8",
19
- "express": "^4.18.2",
20
- "gpt-3-encoder": "^1.1.4",
21
19
  "html-entities": "^2.3.3",
22
20
  "http-proxy-agent": "^5.0.0",
23
21
  "https-proxy-agent": "^5.0.1",
24
- "iconv-lite": "^0.6.3",
25
- "md5": "^2.3.0",
26
- "querystring": "^0.2.1",
27
22
  "tsconfig-paths": "^4.2.0"
28
23
  }
29
24
  }
package/release.bat ADDED
@@ -0,0 +1,2 @@
1
+ npm publish --access public
2
+ pause
@@ -0,0 +1,2 @@
1
+ node cjsRmjs.cjs
2
+ pause
@@ -0,0 +1,3 @@
1
+ require = require("esm")(module);
2
+ const req = require('./req.mjs');
3
+ console.log(req.test())
@@ -0,0 +1,2 @@
1
+ node mjsRcjs.mjs
2
+ pause
@@ -0,0 +1,3 @@
1
+ import pkg from './req.cjs';
2
+ const { test } = pkg;
3
+ console.log(test())
@@ -0,0 +1,7 @@
1
+ function test(){
2
+ console.log(123)
3
+ }
4
+
5
+ module.exports = {
6
+ test
7
+ }
@@ -0,0 +1,3 @@
1
+ export function test(){
2
+ console.log(123)
3
+ }
package/src/UtilCodecs.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  import * as he from 'html-entities';
2
- //const encoder = require('gpt-3-encoder');
3
- //const tiktoken = require('@dqbd/tiktoken');
4
2
  import * as tiktoken from '@dqbd/tiktoken';
5
3
  const encoderTurbo = tiktoken.get_encoding("cl100k_base");
6
4
  const encoderDavinci = tiktoken.get_encoding("p50k_base");