Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polkadot/x-textdecoder

Package Overview
Dependencies
Maintainers
2
Versions
733
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polkadot/x-textdecoder - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

3

browser.js

@@ -9,4 +9,3 @@ "use strict";

// Copyright 2020 @polkadot/x-textencoder authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
// SPDX-License-Identifier: Apache-2.0
var _default = typeof TextDecoder === 'undefined' ? class {

@@ -13,0 +12,0 @@ // eslint-disable-next-line @typescript-eslint/no-unused-vars,no-useless-constructor

@@ -11,6 +11,5 @@ "use strict";

// Copyright 2020 @polkadot/x-textencoder authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
// SPDX-License-Identifier: Apache-2.0
var _default = typeof TextDecoder === 'undefined' ? _util.TextDecoder : TextDecoder;
exports.default = _default;
{
"name": "@polkadot/x-textdecoder",
"version": "0.3.2",
"version": "0.3.3",
"description": "A TextDecoder replacement",

@@ -26,4 +26,4 @@ "browser": "browser.js",

"dependencies": {
"@babel/runtime": "^7.11.2"
"@babel/runtime": "^7.12.1"
}
}
# @polkadot/x-textdecoder
A cross-environment TextDecoder.
Install it via `yarn add @polkadot/x-textdecoder`
```js
import TextDecoder from '@polkadot/x-textdecoder';
...
const decoder = new TextDecoder('utf-8');
```

@@ -10,5 +10,4 @@ "use strict";

// Copyright 2020 @polkadot/x-textdecoder authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
// SPDX-License-Identifier: Apache-2.0
console.log(new _browser.default('utf-8').decode(new Uint8Array([1, 2, 3])));
console.log(new _node.default('utf-8').decode(new Uint8Array([1, 2, 3])));
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc