@rlaurente/nobe
v0.0.25-beta
Published
NOBackEnd - The next level api mocking library for frontend developers. Data persistent mocking api for MVP apps rapid development.
Downloads
31
Maintainers
Readme
@rlaurente/nobe
NOBackEnd - The next level api mocking library for frontend developers. Data persistent mocking api for MVP apps rapid development.
Demo, Docs will be publish soon
Install
npm install @rlaurente/nobe
API
init(...)
init(options: { url: string; workspace?: string; branch?: string; wipe?: boolean; }) => Promise<{ is_success: boolean; }>
| Param | Type |
| ------------- | ---------------------------------------------------------------------------------- |
| options
| { url: string; workspace?: string; branch?: string; wipe?: boolean; } |
Returns: Promise<{ is_success: boolean; }>
switchBranch(...)
switchBranch(options: { branch_name: string; }) => Promise<{ is_success: boolean; }>
| Param | Type |
| ------------- | ------------------------------------- |
| options
| { branch_name: string; } |
Returns: Promise<{ is_success: boolean; }>
get(...)
get(options: { key: string; }) => Promise<any>
| Param | Type |
| ------------- | ----------------------------- |
| options
| { key: string; } |
Returns: Promise<any>
set(...)
set(options: { key: string; data: any; }) => Promise<boolean>
| Param | Type |
| ------------- | ---------------------------------------- |
| options
| { key: string; data: any; } |
Returns: Promise<boolean>
request(...)
request(options: { path: string; type: string; data?: any; headers?: any; }) => Promise<any>
| Param | Type |
| ------------- | ----------------------------------------------------------------------- |
| options
| { path: string; type: string; data?: any; headers?: any; } |
Returns: Promise<any>
mock(...)
mock(options: { path: string; handler: any; }) => void
| Param | Type |
| ------------- | -------------------------------------------- |
| options
| { path: string; handler: any; } |
apply()
apply() => Promise<boolean>
Returns: Promise<boolean>