From ac0da78a1b3212328299dc4e5e65b6a077f71246 Mon Sep 17 00:00:00 2001 From: d-yokoi Date: Sun, 24 Mar 2019 20:56:56 +0900 Subject: [PATCH] change build target from es2015 to es2017 --- src/index.js | 16 +++------------- tsconfig.json | 2 +- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/index.js b/src/index.js index c2fb2e1..705829b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,12 +1,4 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; Object.defineProperty(exports, "__esModule", { value: true }); const createHash = require("create-hash"); const pbkdf2_1 = require("pbkdf2"); @@ -76,11 +68,9 @@ function mnemonicToSeedAsync(mnemonic, password) { }); } exports.mnemonicToSeedAsync = mnemonicToSeedAsync; -function mnemonicToSeedHexAsync(mnemonic, password) { - return __awaiter(this, void 0, void 0, function* () { - const buf = yield mnemonicToSeedAsync(mnemonic, password); - return buf.toString('hex'); - }); +async function mnemonicToSeedHexAsync(mnemonic, password) { + const buf = await mnemonicToSeedAsync(mnemonic, password); + return buf.toString('hex'); } exports.mnemonicToSeedHexAsync = mnemonicToSeedHexAsync; function mnemonicToEntropy(mnemonic, wordlist) { diff --git a/tsconfig.json b/tsconfig.json index f096ab1..00de8d5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2015", + "target": "es2017", "module": "commonjs", "outDir": "./src", "declaration": true,