Skip to content

Factory WIP#96

Open
brianleroux wants to merge 2 commits intomainfrom
factory
Open

Factory WIP#96
brianleroux wants to merge 2 commits intomainfrom
factory

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