+4
-3
@@ -99,5 +99,6 @@ 'use strict'; | ||
| } | ||
| function* getIsAsync() { | ||
| return !!(yield GET_IS_ASYNC); | ||
| } | ||
| const getIsAsync = quansync({ | ||
| async: () => Promise.resolve(true), | ||
| sync: () => false | ||
| }); | ||
@@ -104,0 +105,0 @@ exports.GET_IS_ASYNC = GET_IS_ASYNC; |
+1
-1
@@ -30,5 +30,5 @@ import type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions } from './types.cjs'; | ||
| */ | ||
| declare function getIsAsync(): Generator<typeof GET_IS_ASYNC, boolean, unknown>; | ||
| declare const getIsAsync: QuansyncFn<boolean, []>; | ||
| export { GET_IS_ASYNC, QuansyncError, getIsAsync, quansync, toGenerator }; | ||
| export type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions }; |
+1
-1
@@ -30,5 +30,5 @@ import type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions } from './types.mjs'; | ||
| */ | ||
| declare function getIsAsync(): Generator<typeof GET_IS_ASYNC, boolean, unknown>; | ||
| declare const getIsAsync: QuansyncFn<boolean, []>; | ||
| export { GET_IS_ASYNC, QuansyncError, getIsAsync, quansync, toGenerator }; | ||
| export type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions }; |
+1
-1
@@ -30,5 +30,5 @@ import type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions } from './types.js'; | ||
| */ | ||
| declare function getIsAsync(): Generator<typeof GET_IS_ASYNC, boolean, unknown>; | ||
| declare const getIsAsync: QuansyncFn<boolean, []>; | ||
| export { GET_IS_ASYNC, QuansyncError, getIsAsync, quansync, toGenerator }; | ||
| export type { QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions }; |
+4
-3
@@ -97,6 +97,7 @@ const GET_IS_ASYNC = Symbol.for("quansync.getIsAsync"); | ||
| } | ||
| function* getIsAsync() { | ||
| return !!(yield GET_IS_ASYNC); | ||
| } | ||
| const getIsAsync = quansync({ | ||
| async: () => Promise.resolve(true), | ||
| sync: () => false | ||
| }); | ||
| export { GET_IS_ASYNC, QuansyncError, getIsAsync, quansync, toGenerator }; |
+1
-1
| { | ||
| "name": "quansync", | ||
| "type": "module", | ||
| "version": "0.2.9", | ||
| "version": "0.2.10", | ||
| "description": "Create sync/async APIs with usable logic", | ||
@@ -6,0 +6,0 @@ "author": "Anthony Fu <anthonyfu117@hotmail.com>", |
275
0.73%23881
-0.1%