This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const monthsToRenderTempalte = [ | |
{ | |
key: 'month-slot-1', | |
state: {}, | |
}, | |
{ | |
key: 'month-slot-2', | |
state: {}, | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bindFactory = injectable => (...binds) => injectable(Object.assign({}, ...(binds || [{}]))); | |
const service = args => ({myArgs: () => args}); | |
const bindableService = bindFactory(service); | |
console.log(bindableService().myArgs()); | |
const withSomeArgs = bindableService.bind(null, {a: 'apple;'}); | |
console.log(withSomeArgs().myArgs()); |