Skip to content

Commit 633253b

Browse files
committed
Updated compile option lib to es2017
changed to use padStart on convert.ts
1 parent 4d28007 commit 633253b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/core/format/Convert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class Convert {
170170
for (let i = 0; i < rawString.length; i++) {
171171
if (rawString.charCodeAt(i) < 16) {
172172
// Add insignificant zero for control chars (0x00 - 0x0f)
173-
result += '0' + rawString.charCodeAt(i).toString(16);
173+
result += rawString.charCodeAt(i).toString(16).padStart(2, '0');
174174
} else {
175175
result += rawString.charCodeAt(i).toString(16);
176176
}

src/core/format/Utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const split = (name, processor) => {
133133

134134
export const generateNamespaceId = (parentId, name) => {
135135
const hash = sha3_256.create();
136-
hash.update(Uint32Array.from(parentId).buffer);
136+
hash.update(Uint32Array.from(parentId).buffer as any);
137137
hash.update(name);
138138
const result = new Uint32Array(hash.arrayBuffer());
139139
// right zero-filling required to keep unsigned number representation

test/core/format/IdGenerator.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ const mosaicTestVector = {
143143
describe('id generator', () => {
144144
function generateNamespaceId(parentId, name) {
145145
const hash = sha3_256.create();
146-
hash.update(Uint32Array.from(parentId).buffer);
146+
hash.update(Uint32Array.from(parentId).buffer as any);
147147
hash.update(name);
148148
const result = new Uint32Array(hash.arrayBuffer());
149149
// right zero-filling required to keep unsigned number representation

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"outDir": "dist",
1414
"allowJs": false,
1515
"lib": [
16-
"es2016",
16+
"es2017",
1717
"dom"
1818
],
1919
"typeRoots": [

0 commit comments

Comments
 (0)