Socket
Socket
Sign inDemoInstall

@aws-sdk/util-utf8-browser

Package Overview
Dependencies
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/util-utf8-browser - npm Package Compare versions

Comparing version 0.1.0-preview.1 to 0.1.0-preview.2

CHANGELOG.md

4

build/index.js

@@ -6,3 +6,3 @@ "use strict";

function fromUtf8(input) {
if (typeof TextEncoder === 'function') {
if (typeof TextEncoder === "function") {
return whatwgEncodingApi_1.fromUtf8(input);

@@ -14,3 +14,3 @@ }

function toUtf8(input) {
if (typeof TextDecoder === 'function') {
if (typeof TextDecoder === "function") {
return whatwgEncodingApi_1.toUtf8(input);

@@ -17,0 +17,0 @@ }

@@ -21,4 +21,4 @@ "use strict";

else if (i + 1 < input.length &&
((value & 0xfc00) === 0xd800) &&
((input.charCodeAt(i + 1) & 0xfc00) === 0xdc00)) {
(value & 0xfc00) === 0xd800 &&
(input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {
var surrogatePair = 0x10000 +

@@ -45,3 +45,3 @@ ((value & 1023) << 10) +

function toUtf8(input) {
var decoded = '';
var decoded = "";
for (var i = 0, len = input.length; i < len; i++) {

@@ -54,14 +54,12 @@ var byte = input[i];

var nextByte = input[++i];
decoded += String.fromCharCode((byte & 31) << 6 | (nextByte & 63));
decoded += String.fromCharCode(((byte & 31) << 6) | (nextByte & 63));
}
else if (240 <= byte && byte < 365) {
var surrogatePair = [byte, input[++i], input[++i], input[++i]];
var encoded = '%' + surrogatePair
.map(function (byteValue) { return byteValue.toString(16); })
.join('%');
var encoded = "%" + surrogatePair.map(function (byteValue) { return byteValue.toString(16); }).join("%");
decoded += decodeURIComponent(encoded);
}
else {
decoded += String.fromCharCode((byte & 15) << 12 |
(input[++i] & 63) << 6 |
decoded += String.fromCharCode(((byte & 15) << 12) |
((input[++i] & 63) << 6) |
(input[++i] & 63));

@@ -68,0 +66,0 @@ }

@@ -8,5 +8,5 @@ "use strict";

function toUtf8(input) {
return new TextDecoder('utf-8').decode(input);
return new TextDecoder("utf-8").decode(input);
}
exports.toUtf8 = toUtf8;
//# sourceMappingURL=whatwgEncodingApi.js.map
{
"name": "@aws-sdk/util-utf8-browser",
"version": "0.1.0-preview.1",
"description": "A browser UTF-8 string <-> UInt8Array converter",
"main": "./build/index.js",
"scripts": {
"prepublishOnly": "tsc",
"pretest": "tsc -p tsconfig.test.json",
"test": "jest"
},
"author": {
"name": "AWS SDK for JavaScript Team",
"email": "aws-sdk-js@amazon.com",
"url": "https://aws.amazon.com/javascript/"
},
"license": "Apache-2.0",
"dependencies": {
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/jest": "^20.0.2",
"jest": "^20.0.4",
"typescript": "^3.0.0"
},
"types": "./build/index.d.ts",
"gitHead": "960970c0c25938a8d51d1a243d3f21f05acea92e"
"name": "@aws-sdk/util-utf8-browser",
"version": "0.1.0-preview.2",
"description": "A browser UTF-8 string <-> UInt8Array converter",
"main": "./build/index.js",
"scripts": {
"prepublishOnly": "tsc",
"pretest": "tsc -p tsconfig.test.json",
"test": "jest"
},
"author": {
"name": "AWS SDK for JavaScript Team",
"email": "",
"url": "https://aws.amazon.com/javascript/"
},
"license": "Apache-2.0",
"dependencies": {
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/jest": "^24.0.12",
"jest": "^24.7.1",
"typescript": "~3.4.0"
},
"types": "./build/index.d.ts"
}
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": true,
"sourceMap": true,
"strict": true,
"lib": [
"es5",
"es2015.collection"
],
"rootDir": "./src",
"outDir": "./build",
"importHelpers": true,
"noEmitHelpers": true
}
}
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": true,
"sourceMap": true,
"strict": true,
"lib": ["es5", "es2015.collection"],
"rootDir": "./src",
"outDir": "./build",
"importHelpers": true,
"noEmitHelpers": true
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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