From 6be58b3107a80c9594f6ec6d06371b1e6f915ed0 Mon Sep 17 00:00:00 2001 From: Yuichiro Yamashita Date: Mon, 2 Jan 2023 16:32:04 +0900 Subject: [PATCH] add License --- src/runtime/internal/utils.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runtime/internal/utils.ts b/src/runtime/internal/utils.ts index 84d00b19c5..8adb0c279b 100644 --- a/src/runtime/internal/utils.ts +++ b/src/runtime/internal/utils.ts @@ -10,6 +10,8 @@ export function assign(tar: T, src: S): T & S { return tar as T & S; } +// Adapted from https://github.com/then/is-promise/blob/master/index.js +// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE export function is_promise(value: any): value is PromiseLike { return !!value && (typeof value === 'object' || typeof value === 'function') && typeof value.then === 'function'; }