@microsoft/kiota-serialization-text
Advanced tools
Comparing version 1.0.0-preview.26 to 1.0.0-preview.27
@@ -93,8 +93,5 @@ "use strict"; | ||
this.convertStringToArrayBuffer = (str) => { | ||
const arrayBuffer = new ArrayBuffer(str.length); | ||
const uint8Array = new Uint8Array(arrayBuffer); | ||
for (let i = 0; i < str.length; i++) { | ||
uint8Array[i] = str.charCodeAt(i); | ||
} | ||
return arrayBuffer; | ||
const encoder = new TextEncoder(); | ||
const encodedString = encoder.encode(str); | ||
return encodedString.buffer; | ||
}; | ||
@@ -101,0 +98,0 @@ // eslint-disable-next-line @typescript-eslint/no-unused-vars |
@@ -90,8 +90,5 @@ export class TextSerializationWriter { | ||
this.convertStringToArrayBuffer = (str) => { | ||
const arrayBuffer = new ArrayBuffer(str.length); | ||
const uint8Array = new Uint8Array(arrayBuffer); | ||
for (let i = 0; i < str.length; i++) { | ||
uint8Array[i] = str.charCodeAt(i); | ||
} | ||
return arrayBuffer; | ||
const encoder = new TextEncoder(); | ||
const encodedString = encoder.encode(str); | ||
return encodedString.buffer; | ||
}; | ||
@@ -98,0 +95,0 @@ // eslint-disable-next-line @typescript-eslint/no-unused-vars |
{ | ||
"name": "@microsoft/kiota-serialization-text", | ||
"version": "1.0.0-preview.26", | ||
"version": "1.0.0-preview.27", | ||
"description": "Implementation of Kiota Serialization interfaces for text", | ||
@@ -42,3 +42,3 @@ "main": "dist/cjs/src/index.js", | ||
"dependencies": { | ||
"@microsoft/kiota-abstractions": "^1.0.0-preview.29", | ||
"@microsoft/kiota-abstractions": "^1.0.0-preview.30", | ||
"guid-typescript": "^1.0.9", | ||
@@ -50,3 +50,3 @@ "tslib": "^2.3.1" | ||
}, | ||
"gitHead": "d8c72be43bd7b125183bd882f24664286a590a9a" | ||
"gitHead": "89fc2ade749592228dc0c18d8f863925043d9c79" | ||
} |
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
Sorry, the diff of this file is not supported yet
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
136867
656