From 24fe3b90263b823d0a03937a8df557a1e07467d2 Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Wed, 1 Apr 2020 17:53:12 +0800 Subject: [PATCH] feat: use module export Signed-off-by: MiaoWoo --- packages/nodejs/src/punycode/index.ts | 3 +-- packages/nodejs/src/url/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/nodejs/src/punycode/index.ts b/packages/nodejs/src/punycode/index.ts index 3fd5755b..8cdadb13 100644 --- a/packages/nodejs/src/punycode/index.ts +++ b/packages/nodejs/src/punycode/index.ts @@ -4,7 +4,6 @@ const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 /** Bootstring parameters */ -//@ts-ignore const base = 36; const tMin = 1; const tMax = 26; @@ -440,4 +439,4 @@ const punycode = { 'toUnicode': toUnicode }; -module.exports = punycode; +export = punycode; diff --git a/packages/nodejs/src/url/index.ts b/packages/nodejs/src/url/index.ts index f2c2ddab..b7418f39 100644 --- a/packages/nodejs/src/url/index.ts +++ b/packages/nodejs/src/url/index.ts @@ -21,8 +21,8 @@ 'use strict'; -var punycode = require('punycode'); -// @ts-ignore +import * as punycode from 'punycode' + var util = { isString: function (arg) { return typeof (arg) === 'string';