@pezkuwi/x-textdecoder 14.0.13 → 14.0.15

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 (79) hide show
  1. package/cjs/packageInfo.js +1 -1
  2. package/package.json +15 -54
  3. package/packageInfo.js +1 -1
  4. package/build/LICENSE +0 -201
  5. package/build/README.md +0 -12
  6. package/build/browser.d.ts +0 -5
  7. package/build/browser.js +0 -4
  8. package/build/cjs/browser.d.ts +0 -5
  9. package/build/cjs/browser.js +0 -8
  10. package/build/cjs/fallback.d.ts +0 -5
  11. package/build/cjs/fallback.js +0 -17
  12. package/build/cjs/node.d.ts +0 -5
  13. package/build/cjs/node.js +0 -9
  14. package/build/cjs/package.json +0 -3
  15. package/build/cjs/packageInfo.d.ts +0 -6
  16. package/build/cjs/packageInfo.js +0 -4
  17. package/build/cjs/react-native.d.ts +0 -1
  18. package/build/cjs/react-native.js +0 -4
  19. package/build/cjs/shim.d.ts +0 -1
  20. package/build/cjs/shim.js +0 -5
  21. package/build/cjs/typeCheck.d.ts +0 -1
  22. package/build/cjs/typeCheck.js +0 -6
  23. package/build/fallback.d.ts +0 -5
  24. package/build/fallback.js +0 -13
  25. package/build/node.d.ts +0 -5
  26. package/build/node.js +0 -4
  27. package/build/package.json +0 -168
  28. package/build/packageInfo.d.ts +0 -6
  29. package/build/packageInfo.js +0 -1
  30. package/build/react-native.d.ts +0 -1
  31. package/build/react-native.js +0 -1
  32. package/build/shim.d.ts +0 -1
  33. package/build/shim.js +0 -3
  34. package/build/typeCheck.d.ts +0 -1
  35. package/build/typeCheck.js +0 -4
  36. package/build-deno/README.md +0 -12
  37. package/build-deno/browser.ts +0 -8
  38. package/build-deno/fallback.ts +0 -18
  39. package/build-deno/mod.ts +0 -2
  40. package/build-deno/node.ts +0 -8
  41. package/build-deno/packageInfo.ts +0 -3
  42. package/build-deno/react-native.ts +0 -2
  43. package/build-deno/shim.ts +0 -5
  44. package/build-deno/typeCheck.ts +0 -6
  45. package/build-tsc/browser.d.ts +0 -5
  46. package/build-tsc/fallback.d.ts +0 -5
  47. package/build-tsc/node.d.ts +0 -5
  48. package/build-tsc/packageInfo.d.ts +0 -6
  49. package/build-tsc/react-native.d.ts +0 -1
  50. package/build-tsc/shim.d.ts +0 -1
  51. package/build-tsc/typeCheck.d.ts +0 -1
  52. package/build-tsc-cjs/browser.js +0 -8
  53. package/build-tsc-cjs/fallback.js +0 -17
  54. package/build-tsc-cjs/node.js +0 -9
  55. package/build-tsc-cjs/packageInfo.js +0 -4
  56. package/build-tsc-cjs/react-native.js +0 -4
  57. package/build-tsc-cjs/shim.js +0 -5
  58. package/build-tsc-cjs/typeCheck.js +0 -6
  59. package/build-tsc-esm/browser.js +0 -4
  60. package/build-tsc-esm/fallback.js +0 -13
  61. package/build-tsc-esm/node.js +0 -4
  62. package/build-tsc-esm/packageInfo.js +0 -1
  63. package/build-tsc-esm/react-native.js +0 -1
  64. package/build-tsc-esm/shim.js +0 -3
  65. package/build-tsc-esm/typeCheck.js +0 -4
  66. package/src/browser.ts +0 -10
  67. package/src/fallback.spec.ts +0 -20
  68. package/src/fallback.ts +0 -21
  69. package/src/mod.ts +0 -4
  70. package/src/node.spec.ts +0 -25
  71. package/src/node.ts +0 -10
  72. package/src/packageInfo.ts +0 -6
  73. package/src/react-native.ts +0 -4
  74. package/src/shim.ts +0 -7
  75. package/src/typeCheck.ts +0 -8
  76. package/tsconfig.build.json +0 -15
  77. package/tsconfig.build.tsbuildinfo +0 -1
  78. package/tsconfig.spec.json +0 -17
  79. package/tsconfig.spec.tsbuildinfo +0 -1
@@ -1,168 +0,0 @@
1
- {
2
- "author": "Dijital Kurdistan Tech Institute <dev@pezkuwichain.io>",
3
- "bugs": "https://github.com/pezkuwichain/pezkuwi-common/issues",
4
- "description": "A TextDecoder replacement",
5
- "engines": {
6
- "node": ">=18"
7
- },
8
- "homepage": "https://github.com/pezkuwichain/pezkuwi-common/tree/master/packages/x-textdecoder#readme",
9
- "license": "Apache-2.0",
10
- "name": "@pezkuwi/x-textdecoder",
11
- "repository": {
12
- "directory": "packages/x-textdecoder",
13
- "type": "git",
14
- "url": "https://github.com/pezkuwichain/pezkuwi-common.git"
15
- },
16
- "sideEffects": false,
17
- "type": "module",
18
- "version": "14.0.13",
19
- "main": "./cjs/node.js",
20
- "module": "./cjs/node.js",
21
- "browser": "./cjs/browser.js",
22
- "react-native": "./cjs/react-native.js",
23
- "types": "./cjs/node.d.ts",
24
- "exports": {
25
- "./cjs/package.json": "./cjs/package.json",
26
- "./cjs/*": "./cjs/*.js",
27
- ".": {
28
- "types": "./cjs/node.d.ts./cjs/node.js",
29
- "react-native": "./cjs/react-native.js./cjs/react-native.js",
30
- "browser": "./cjs/browser.js./cjs/browser.js",
31
- "node": "./cjs/node.js./cjs/node.js"
32
- },
33
- "./browser": {
34
- "module": {
35
- "types": "./browser.d.ts",
36
- "default": "./browser.js"
37
- },
38
- "require": {
39
- "types": "./cjs/browser.d.ts",
40
- "default": "./cjs/browser.js"
41
- },
42
- "default": {
43
- "types": "./browser.d.ts",
44
- "default": "./browser.js"
45
- }
46
- },
47
- "./fallback": {
48
- "module": {
49
- "types": "./fallback.d.ts",
50
- "default": "./fallback.js"
51
- },
52
- "require": {
53
- "types": "./cjs/fallback.d.ts",
54
- "default": "./cjs/fallback.js"
55
- },
56
- "default": {
57
- "types": "./fallback.d.ts",
58
- "default": "./fallback.js"
59
- }
60
- },
61
- "./node": {
62
- "module": {
63
- "types": "./node.d.ts",
64
- "default": "./node.js"
65
- },
66
- "require": {
67
- "types": "./cjs/node.d.ts",
68
- "default": "./cjs/node.js"
69
- },
70
- "default": {
71
- "types": "./node.d.ts",
72
- "default": "./node.js"
73
- }
74
- },
75
- "./package.json": {
76
- "require": "./cjs/package.json",
77
- "default": "./package.json"
78
- },
79
- "./packageInfo.js": {
80
- "module": {
81
- "types": "./packageInfo.d.ts",
82
- "default": "./packageInfo.js"
83
- },
84
- "require": {
85
- "types": "./cjs/packageInfo.d.ts",
86
- "default": "./cjs/packageInfo.js"
87
- },
88
- "default": {
89
- "types": "./packageInfo.d.ts",
90
- "default": "./packageInfo.js"
91
- }
92
- },
93
- "./packageInfo": {
94
- "module": {
95
- "types": "./packageInfo.d.ts",
96
- "default": "./packageInfo.js"
97
- },
98
- "require": {
99
- "types": "./cjs/packageInfo.d.ts",
100
- "default": "./cjs/packageInfo.js"
101
- },
102
- "default": {
103
- "types": "./packageInfo.d.ts",
104
- "default": "./packageInfo.js"
105
- }
106
- },
107
- "./react-native": {
108
- "module": {
109
- "types": "./react-native.d.ts",
110
- "default": "./react-native.js"
111
- },
112
- "require": {
113
- "types": "./cjs/react-native.d.ts",
114
- "default": "./cjs/react-native.js"
115
- },
116
- "default": {
117
- "types": "./react-native.d.ts",
118
- "default": "./react-native.js"
119
- }
120
- },
121
- "./shim.js": {
122
- "module": {
123
- "types": "./shim.d.ts",
124
- "default": "./shim.js"
125
- },
126
- "require": {
127
- "types": "./cjs/shim.d.ts",
128
- "default": "./cjs/shim.js"
129
- },
130
- "default": {
131
- "types": "./shim.d.ts",
132
- "default": "./shim.js"
133
- }
134
- },
135
- "./shim": {
136
- "module": {
137
- "types": "./shim.d.ts",
138
- "default": "./shim.js"
139
- },
140
- "require": {
141
- "types": "./cjs/shim.d.ts",
142
- "default": "./cjs/shim.js"
143
- },
144
- "default": {
145
- "types": "./shim.d.ts",
146
- "default": "./shim.js"
147
- }
148
- },
149
- "./typeCheck": {
150
- "module": {
151
- "types": "./typeCheck.d.ts",
152
- "default": "./typeCheck.js"
153
- },
154
- "require": {
155
- "types": "./cjs/typeCheck.d.ts",
156
- "default": "./cjs/typeCheck.js"
157
- },
158
- "default": {
159
- "types": "./typeCheck.d.ts",
160
- "default": "./typeCheck.js"
161
- }
162
- }
163
- },
164
- "dependencies": {
165
- "@pezkuwi/x-global": "14.0.12",
166
- "tslib": "^2.8.0"
167
- }
168
- }
@@ -1,6 +0,0 @@
1
- export declare const packageInfo: {
2
- name: string;
3
- path: string;
4
- type: string;
5
- version: string;
6
- };
@@ -1 +0,0 @@
1
- export const packageInfo = { name: '@pezkuwi/x-textdecoder', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.13' };
@@ -1 +0,0 @@
1
- export * from './browser.js';
@@ -1 +0,0 @@
1
- export * from './browser.js';
package/build/shim.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/build/shim.js DELETED
@@ -1,3 +0,0 @@
1
- import { exposeGlobal } from '@pezkuwi/x-global';
2
- import { TextDecoder } from '@pezkuwi/x-textdecoder';
3
- exposeGlobal('TextDecoder', TextDecoder);
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { TextDecoder as BrowserTD } from './browser.js';
2
- import { TextDecoder as NodeTD } from './node.js';
3
- console.log(new BrowserTD('utf-8').decode(new Uint8Array([1, 2, 3])));
4
- console.log(new NodeTD('utf-8').decode(new Uint8Array([1, 2, 3])));
@@ -1,12 +0,0 @@
1
- # @pezkuwi/x-textdecoder
2
-
3
- A cross-environment TextDecoder.
4
-
5
- Install it via `yarn add @pezkuwi/x-textdecoder`
6
-
7
- ```js
8
- import { TextDecoder } from 'https://deno.land/x/pezkuwi/x-textdecoder/mod.ts';
9
-
10
- ...
11
- const decoder = new TextDecoder('utf-8');
12
- ```
@@ -1,8 +0,0 @@
1
-
2
- import { extractGlobal } from 'https://deno.land/x/pezkuwi/x-global/mod.ts';
3
-
4
- import { TextDecoder as Fallback } from './fallback.ts';
5
-
6
- export { packageInfo } from './packageInfo.ts';
7
-
8
- export const TextDecoder = /*#__PURE__*/ extractGlobal('TextDecoder', Fallback);
@@ -1,18 +0,0 @@
1
-
2
- export class TextDecoder {
3
- __encoding?: string;
4
-
5
- constructor (encoding?: 'utf-8' | 'utf8') {
6
- this.__encoding = encoding;
7
- }
8
-
9
- decode (value: Uint8Array): string {
10
- let result = '';
11
-
12
- for (let i = 0, count = value.length; i < count; i++) {
13
- result += String.fromCharCode(value[i]);
14
- }
15
-
16
- return result;
17
- }
18
- }
package/build-deno/mod.ts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export * from './browser.ts';
@@ -1,8 +0,0 @@
1
-
2
- import util from 'node:util';
3
-
4
- import { extractGlobal } from 'https://deno.land/x/pezkuwi/x-global/mod.ts';
5
-
6
- export { packageInfo } from './packageInfo.ts';
7
-
8
- export const TextDecoder = /*#__PURE__*/ extractGlobal('TextDecoder', util.TextDecoder);
@@ -1,3 +0,0 @@
1
-
2
-
3
- export const packageInfo = { name: '@pezkuwi/x-textdecoder', path: new URL(import.meta.url).pathname, type: 'deno', version: '14.0.13' };
@@ -1,2 +0,0 @@
1
-
2
- export * from './browser.ts';
@@ -1,5 +0,0 @@
1
-
2
- import { exposeGlobal } from 'https://deno.land/x/pezkuwi/x-global/mod.ts';
3
- import { TextDecoder } from 'https://deno.land/x/pezkuwi/x-textdecoder/mod.ts';
4
-
5
- exposeGlobal('TextDecoder', TextDecoder);
@@ -1,6 +0,0 @@
1
-
2
- import { TextDecoder as BrowserTD } from './browser.ts';
3
- import { TextDecoder as NodeTD } from './node.ts';
4
-
5
- console.log(new BrowserTD('utf-8').decode(new Uint8Array([1, 2, 3])));
6
- console.log(new NodeTD('utf-8').decode(new Uint8Array([1, 2, 3])));
@@ -1,5 +0,0 @@
1
- export { packageInfo } from './packageInfo.js';
2
- export declare const TextDecoder: {
3
- new (label?: string, options?: TextDecoderOptions): TextDecoder;
4
- prototype: TextDecoder;
5
- };
@@ -1,5 +0,0 @@
1
- export declare class TextDecoder {
2
- __encoding?: string;
3
- constructor(encoding?: 'utf-8' | 'utf8');
4
- decode(value: Uint8Array): string;
5
- }
@@ -1,5 +0,0 @@
1
- export { packageInfo } from './packageInfo.js';
2
- export declare const TextDecoder: {
3
- new (label?: string, options?: TextDecoderOptions): TextDecoder;
4
- prototype: TextDecoder;
5
- };
@@ -1,6 +0,0 @@
1
- export declare const packageInfo: {
2
- name: string;
3
- path: string;
4
- type: string;
5
- version: string;
6
- };
@@ -1 +0,0 @@
1
- export * from './browser.js';
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TextDecoder = exports.packageInfo = void 0;
4
- const x_global_1 = require("@pezkuwi/x-global");
5
- const fallback_js_1 = require("./fallback.js");
6
- var packageInfo_js_1 = require("./packageInfo.js");
7
- Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
8
- exports.TextDecoder = (0, x_global_1.extractGlobal)('TextDecoder', fallback_js_1.TextDecoder);
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TextDecoder = void 0;
4
- class TextDecoder {
5
- __encoding;
6
- constructor(encoding) {
7
- this.__encoding = encoding;
8
- }
9
- decode(value) {
10
- let result = '';
11
- for (let i = 0, count = value.length; i < count; i++) {
12
- result += String.fromCharCode(value[i]);
13
- }
14
- return result;
15
- }
16
- }
17
- exports.TextDecoder = TextDecoder;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TextDecoder = exports.packageInfo = void 0;
4
- const tslib_1 = require("tslib");
5
- const node_util_1 = tslib_1.__importDefault(require("node:util"));
6
- const x_global_1 = require("@pezkuwi/x-global");
7
- var packageInfo_js_1 = require("./packageInfo.js");
8
- Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
9
- exports.TextDecoder = (0, x_global_1.extractGlobal)('TextDecoder', node_util_1.default.TextDecoder);
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.packageInfo = void 0;
4
- exports.packageInfo = { name: '@pezkuwi/x-textdecoder', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '14.0.13' };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./browser.js"), exports);
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const x_global_1 = require("@pezkuwi/x-global");
4
- const x_textdecoder_1 = require("@pezkuwi/x-textdecoder");
5
- (0, x_global_1.exposeGlobal)('TextDecoder', x_textdecoder_1.TextDecoder);
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const browser_js_1 = require("./browser.js");
4
- const node_js_1 = require("./node.js");
5
- console.log(new browser_js_1.TextDecoder('utf-8').decode(new Uint8Array([1, 2, 3])));
6
- console.log(new node_js_1.TextDecoder('utf-8').decode(new Uint8Array([1, 2, 3])));
@@ -1,4 +0,0 @@
1
- import { extractGlobal } from '@pezkuwi/x-global';
2
- import { TextDecoder as Fallback } from './fallback.js';
3
- export { packageInfo } from './packageInfo.js';
4
- export const TextDecoder = /*#__PURE__*/ extractGlobal('TextDecoder', Fallback);
@@ -1,13 +0,0 @@
1
- export class TextDecoder {
2
- __encoding;
3
- constructor(encoding) {
4
- this.__encoding = encoding;
5
- }
6
- decode(value) {
7
- let result = '';
8
- for (let i = 0, count = value.length; i < count; i++) {
9
- result += String.fromCharCode(value[i]);
10
- }
11
- return result;
12
- }
13
- }
@@ -1,4 +0,0 @@
1
- import util from 'node:util';
2
- import { extractGlobal } from '@pezkuwi/x-global';
3
- export { packageInfo } from './packageInfo.js';
4
- export const TextDecoder = /*#__PURE__*/ extractGlobal('TextDecoder', util.TextDecoder);
@@ -1 +0,0 @@
1
- export const packageInfo = { name: '@pezkuwi/x-textdecoder', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.13' };
@@ -1 +0,0 @@
1
- export * from './browser.js';
@@ -1,3 +0,0 @@
1
- import { exposeGlobal } from '@pezkuwi/x-global';
2
- import { TextDecoder } from '@pezkuwi/x-textdecoder';
3
- exposeGlobal('TextDecoder', TextDecoder);
@@ -1,4 +0,0 @@
1
- import { TextDecoder as BrowserTD } from './browser.js';
2
- import { TextDecoder as NodeTD } from './node.js';
3
- console.log(new BrowserTD('utf-8').decode(new Uint8Array([1, 2, 3])));
4
- console.log(new NodeTD('utf-8').decode(new Uint8Array([1, 2, 3])));
package/src/browser.ts DELETED
@@ -1,10 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/x-textencoder authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { extractGlobal } from '@pezkuwi/x-global';
5
-
6
- import { TextDecoder as Fallback } from './fallback.js';
7
-
8
- export { packageInfo } from './packageInfo.js';
9
-
10
- export const TextDecoder = /*#__PURE__*/ extractGlobal('TextDecoder', Fallback);
@@ -1,20 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/x-textencoder authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
5
-
6
- import { TextDecoder } from './fallback.js';
7
-
8
- describe('TextDecoder (fallback)', (): void => {
9
- it('decodes correctly', (): void => {
10
- expect(
11
- new TextDecoder().decode(new Uint8Array([97, 98, 99]))
12
- ).toEqual('abc');
13
- });
14
-
15
- it('decodes correctly (with constructor param)', (): void => {
16
- expect(
17
- new TextDecoder('utf-8').decode(new Uint8Array([97, 98, 99, 98, 97]))
18
- ).toEqual('abcba');
19
- });
20
- });
package/src/fallback.ts DELETED
@@ -1,21 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/x-textencoder authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- // This is very limited, only handling Ascii values
5
- export class TextDecoder {
6
- __encoding?: string;
7
-
8
- constructor (encoding?: 'utf-8' | 'utf8') {
9
- this.__encoding = encoding;
10
- }
11
-
12
- decode (value: Uint8Array): string {
13
- let result = '';
14
-
15
- for (let i = 0, count = value.length; i < count; i++) {
16
- result += String.fromCharCode(value[i]);
17
- }
18
-
19
- return result;
20
- }
21
- }
package/src/mod.ts DELETED
@@ -1,4 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/x-textencoder authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- export * from './browser.js';
package/src/node.spec.ts DELETED
@@ -1,25 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/x-textencoder authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
5
-
6
- import { xglobal } from '@pezkuwi/x-global';
7
-
8
- // @ts-expect-error Clearing this, it is obviously not valid in normal code
9
- xglobal.TextDecoder = undefined;
10
-
11
- describe('TextDecoder (node)', (): void => {
12
- let TD: typeof TextDecoder;
13
-
14
- beforeEach(async (): Promise<void> => {
15
- const node = await import('./node.js');
16
-
17
- TD = node.TextDecoder;
18
- });
19
-
20
- it('encodes correctly', (): void => {
21
- expect(
22
- new TD().decode(new Uint8Array([97, 98, 99]))
23
- ).toEqual('abc');
24
- });
25
- });
package/src/node.ts DELETED
@@ -1,10 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/x-textencoder authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import util from 'node:util';
5
-
6
- import { extractGlobal } from '@pezkuwi/x-global';
7
-
8
- export { packageInfo } from './packageInfo.js';
9
-
10
- export const TextDecoder = /*#__PURE__*/ extractGlobal('TextDecoder', util.TextDecoder);
@@ -1,6 +0,0 @@
1
- // Copyright 2017-2026 @pezkuwi/x-textdecoder authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- // Do not edit, auto-generated by @pezkuwi/dev
5
-
6
- export const packageInfo = { name: '@pezkuwi/x-textdecoder', path: 'auto', type: 'auto', version: '14.0.13' };
@@ -1,4 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/x-textencoder authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- export * from './browser.js';
package/src/shim.ts DELETED
@@ -1,7 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/x-textdecoder authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { exposeGlobal } from '@pezkuwi/x-global';
5
- import { TextDecoder } from '@pezkuwi/x-textdecoder';
6
-
7
- exposeGlobal('TextDecoder', TextDecoder);
package/src/typeCheck.ts DELETED
@@ -1,8 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/x-textdecoder authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { TextDecoder as BrowserTD } from './browser.js';
5
- import { TextDecoder as NodeTD } from './node.js';
6
-
7
- console.log(new BrowserTD('utf-8').decode(new Uint8Array([1, 2, 3])));
8
- console.log(new NodeTD('utf-8').decode(new Uint8Array([1, 2, 3])));
@@ -1,15 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "baseUrl": "..",
5
- "outDir": "./build",
6
- "rootDir": "./src"
7
- },
8
- "exclude": [
9
- "**/mod.ts",
10
- "**/*.spec.ts"
11
- ],
12
- "references": [
13
- { "path": "../x-global/tsconfig.build.json" }
14
- ]
15
- }