@polkadot/x-textdecoder
Advanced tools
Comparing version 11.0.2 to 11.1.1
import { extractGlobal } from '@polkadot/x-global'; | ||
import { TextDecoder as Fallback } from './fallback.js'; | ||
export { packageInfo } from './packageInfo.js'; | ||
export const TextDecoder = /*#__PURE__*/ extractGlobal('TextDecoder', Fallback); | ||
export const TextDecoder = /*#__PURE__*/ extractGlobal('TextDecoder', Fallback); |
@@ -8,2 +8,2 @@ "use strict"; | ||
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } }); | ||
exports.TextDecoder = (0, x_global_1.extractGlobal)('TextDecoder', fallback_js_1.TextDecoder); | ||
exports.TextDecoder = (0, x_global_1.extractGlobal)('TextDecoder', fallback_js_1.TextDecoder); |
@@ -5,3 +5,3 @@ "use strict"; | ||
class TextDecoder { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-useless-constructor | ||
// eslint-disable-next-line no-useless-constructor | ||
constructor(_) { | ||
@@ -18,2 +18,2 @@ // nothing | ||
} | ||
exports.TextDecoder = TextDecoder; | ||
exports.TextDecoder = TextDecoder; |
@@ -9,2 +9,2 @@ "use strict"; | ||
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } }); | ||
exports.TextDecoder = (0, x_global_1.extractGlobal)('TextDecoder', util_1.default.TextDecoder); | ||
exports.TextDecoder = (0, x_global_1.extractGlobal)('TextDecoder', util_1.default.TextDecoder); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.packageInfo = void 0; | ||
exports.packageInfo = { name: '@polkadot/x-textdecoder', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '11.0.2' }; | ||
exports.packageInfo = { name: '@polkadot/x-textdecoder', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '11.1.1' }; |
@@ -6,2 +6,2 @@ "use strict"; | ||
Object.defineProperty(exports, "TextDecoder", { enumerable: true, get: function () { return browser_js_1.TextDecoder; } }); | ||
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return browser_js_1.packageInfo; } }); | ||
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return browser_js_1.packageInfo; } }); |
@@ -5,2 +5,2 @@ "use strict"; | ||
const x_textdecoder_1 = require("@polkadot/x-textdecoder"); | ||
(0, x_global_1.exposeGlobal)('TextDecoder', x_textdecoder_1.TextDecoder); | ||
(0, x_global_1.exposeGlobal)('TextDecoder', x_textdecoder_1.TextDecoder); |
@@ -6,2 +6,2 @@ "use strict"; | ||
console.log(new browser_js_1.TextDecoder('utf-8').decode(new Uint8Array([1, 2, 3]))); | ||
console.log(new node_js_1.TextDecoder('utf-8').decode(new Uint8Array([1, 2, 3]))); | ||
console.log(new node_js_1.TextDecoder('utf-8').decode(new Uint8Array([1, 2, 3]))); |
export class TextDecoder { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-useless-constructor | ||
// eslint-disable-next-line no-useless-constructor | ||
constructor(_) { | ||
@@ -13,2 +13,2 @@ // nothing | ||
} | ||
} | ||
} |
import util from 'util'; | ||
import { extractGlobal } from '@polkadot/x-global'; | ||
export { packageInfo } from './packageInfo.js'; | ||
export const TextDecoder = /*#__PURE__*/ extractGlobal('TextDecoder', util.TextDecoder); | ||
export const TextDecoder = /*#__PURE__*/ extractGlobal('TextDecoder', util.TextDecoder); |
{ | ||
"author": "Jaco Greeff <jacogr@gmail.com>", | ||
"bugs": "https://github.com/polkadot-js/common/issues", | ||
"contributors": [], | ||
"description": "A TextDecoder replacement", | ||
"engines": { | ||
"node": ">=14.0.0" | ||
"node": ">=14" | ||
}, | ||
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/x-textdecoder#readme", | ||
"license": "Apache-2.0", | ||
"maintainers": [], | ||
"name": "@polkadot/x-textdecoder", | ||
@@ -20,3 +18,3 @@ "repository": { | ||
"type": "module", | ||
"version": "11.0.2", | ||
"version": "11.1.1", | ||
"main": "./cjs/node.js", | ||
@@ -96,3 +94,3 @@ "module": "./node.js", | ||
"dependencies": { | ||
"@polkadot/x-global": "11.0.2", | ||
"@polkadot/x-global": "11.1.1", | ||
"tslib": "^2.5.0" | ||
@@ -99,0 +97,0 @@ }, |
@@ -1,1 +0,1 @@ | ||
export const packageInfo = { name: '@polkadot/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: '11.0.2' }; | ||
export const packageInfo = { name: '@polkadot/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: '11.1.1' }; |
@@ -1,1 +0,1 @@ | ||
export { TextDecoder, packageInfo } from './browser.js'; | ||
export { TextDecoder, packageInfo } from './browser.js'; |
import { exposeGlobal } from '@polkadot/x-global'; | ||
import { TextDecoder } from '@polkadot/x-textdecoder'; | ||
exposeGlobal('TextDecoder', TextDecoder); | ||
exposeGlobal('TextDecoder', TextDecoder); |
import { TextDecoder as BrowserTD } from './browser.js'; | ||
import { TextDecoder as NodeTD } from './node.js'; | ||
console.log(new BrowserTD('utf-8').decode(new Uint8Array([1, 2, 3]))); | ||
console.log(new NodeTD('utf-8').decode(new Uint8Array([1, 2, 3]))); | ||
console.log(new NodeTD('utf-8').decode(new Uint8Array([1, 2, 3]))); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
108
18524
+ Added@polkadot/x-global@11.1.1(transitive)
- Removed@polkadot/x-global@11.0.2(transitive)
Updated@polkadot/x-global@11.1.1