UNPKG

memserver

Version:

in-memory database/ORM and http mock server you can run in-browser and node environments. Built for large frontend teams, fast tests and rapid prototyping

6 lines (5 loc) 182 B
export default function(statusCode=200, data={}, headers={}) { return [ statusCode, Object.assign({ 'Content-Type': 'application/json' }, headers), JSON.stringify(data) ]; }