From b1ce222942425286feb90c2130db9b196f10532c Mon Sep 17 00:00:00 2001 From: greguz Date: Mon, 12 Jun 2023 17:30:05 +0200 Subject: [PATCH] Export getAdapterName function --- mutent.d.ts | 5 +++++ mutent.mjs | 1 + mutent.spec.mjs | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mutent.d.ts b/mutent.d.ts index dc620f9..9be2be4 100644 --- a/mutent.d.ts +++ b/mutent.d.ts @@ -648,3 +648,8 @@ export declare function update( export declare function ensure( one: One ): Mutator; + +/** + * Get internal Adapter's name, otherwise returns `"Unknown Adapter"`. + */ +export declare function getAdapterName(obj: any): string; diff --git a/mutent.mjs b/mutent.mjs index d80f26f..86451f2 100644 --- a/mutent.mjs +++ b/mutent.mjs @@ -1,3 +1,4 @@ +export { getAdapterName } from './lib/adapter.mjs' export { Entity } from './lib/entity.mjs' export { MutentError } from './lib/error.mjs' export * from './lib/mutators.mjs' diff --git a/mutent.spec.mjs b/mutent.spec.mjs index 04ead20..1c8a9df 100644 --- a/mutent.spec.mjs +++ b/mutent.spec.mjs @@ -380,7 +380,7 @@ test('store:opaque', async t => { .create({ id: 1 }) .pipe(async function * (iterable, context) { t.is(context.opaque, 'hello world') - yield* iterable + yield * iterable }) .unwrap({ mutent: {