( name: string, options?: object )
| 6 | import createUser from './user'; |
| 7 | |
| 8 | export default async function create( |
| 9 | name: string, |
| 10 | options?: object |
| 11 | ): Promise<any> { |
| 12 | switch (name) { |
| 13 | case 'account': |
| 14 | return createAccount(options); |
| 15 | case 'auth': |
| 16 | return createAuth(options); |
| 17 | case 'channel': |
| 18 | return createChannel(options); |
| 19 | case 'message': |
| 20 | return createMessage(options); |
| 21 | case 'thread': |
| 22 | return createThread(options); |
| 23 | case 'user': |
| 24 | return createUser(options); |
| 25 | default: |
| 26 | return Promise.reject(new Error(`Unknown factory name: ${name}`)); |
| 27 | } |
| 28 | } |
nothing calls this directly
no test coverage detected