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

Improve Syntax #27

Closed
ecowden opened this issue Jan 29, 2017 · 1 comment
Closed

Improve Syntax #27

ecowden opened this issue Jan 29, 2017 · 1 comment
Assignees
Milestone

Comments

@ecowden
Copy link
Owner

ecowden commented Jan 29, 2017

The weird callback thing is just ugly. Instead, consider something cleaner:

const pluto = require('pluto')
const bind = pluto()

const myInstance = {}
pluto.bind('myInstance').toInstance(myInstance) // and other bindings

const promise = pluto.get('myInstance') // get(...) must return a promise to support async

promise.then( (result) => {
  t.is(result, myInstance)
})
@ecowden ecowden added this to the v1.0 milestone Jan 29, 2017
@ecowden ecowden self-assigned this Jan 29, 2017
@ecowden
Copy link
Owner Author

ecowden commented Jan 29, 2017

Fixed on one-oh-redesign branch.

@ecowden ecowden closed this as completed Jan 29, 2017
@ecowden ecowden mentioned this issue Jan 29, 2017
ecowden added a commit that referenced this issue Feb 4, 2017
Fixes #15, fixes #25, fixes #26, fixes #27, fixes #28, fixes #29.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant