Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factory WIP #96

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Factory WIP #96

wants to merge 2 commits into from

Conversation

brianleroux
Copy link
Member

Common feedback that folks want a scoped factory constructor for begin/data. Usage as follows:

let { Table, factory } = require('@begin/data')

// constructor style
let cats = new Table('cats')
await cats.set({ meow: 'hi' })

// factory style
let [cats, dogs] = factory('cats', 'dogs')
await Promise.all([
  cats.set({ hi: 'meow' }),
  dogs.set({ hi: 'woof' })
])

@tbeseda
Copy link
Member

tbeseda commented Sep 27, 2021

Coming from other libraries, I like having this option, and the usage looks great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants