miragejs-idmanager
v1.0.3
Published
miragejs custom identityManager
Downloads
7
Readme
miragejs-IdManager
miragejs custom id identityManager
Support with UUID v4 and ObjectId
UUIDv4 manager
new IdManager().uuidManager()
ObjectId Manager
new IdManager().objectIdManager()
Usage
import {createServer,Factory,Model,Serializer} from 'miragejs'
import IdManager from 'miragejs-idmanager'
export function MockServer({environment = 'development'}){
return createServer({
environment,
identityManagers: {
todo: new IdManager().uuidManager(),
user: new IdManager().objectIdManager(),
} as any,
...
})
}