From 11034e1277a2cd360df73a577ae187a2c806b14c Mon Sep 17 00:00:00 2001 From: Daniel Fischer Date: Tue, 11 Aug 2020 23:30:45 +0200 Subject: [PATCH] break: use named export (#17) * add named export * break: export named function * break(types): export named function * chore: remove `kleur.d.ts` file * fix(merge): put back proper type definition Co-authored-by: Luke Edwards --- index.d.ts | 5 +---- src/index.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) mode change 100644 => 100755 src/index.js diff --git a/index.d.ts b/index.d.ts index c1557c5..8c0fca5 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1 @@ -declare module 'klona' { - function klona(val: T): T; - export = klona; -} +export function klona(input: T): T; diff --git a/src/index.js b/src/index.js old mode 100644 new mode 100755 index 396c564..42966e7 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -export default function klona(x) { +export function klona(x) { if (typeof x !== 'object') return x; var k, tmp, str=Object.prototype.toString.call(x);