Skip to content

Commit

Permalink
Export getAdapterName function
Browse files Browse the repository at this point in the history
  • Loading branch information
greguz committed Jun 12, 2023
1 parent d6aadf0 commit b1ce222
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions mutent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,3 +648,8 @@ export declare function update<G extends Generics>(
export declare function ensure<G extends Generics>(
one: One<G["entity"]>
): Mutator<G>;

/**
* Get internal Adapter's name, otherwise returns `"Unknown Adapter"`.
*/
export declare function getAdapterName(obj: any): string;
1 change: 1 addition & 0 deletions mutent.mjs
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion mutent.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit b1ce222

Please sign in to comment.