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

8 lines (7 loc) 215 B
export default function MemserverResponse(statusCode = 200, data = {}, headers = {}) { return [ statusCode, Object.assign({ "Content-Type": "application/json" }, headers), JSON.stringify(data), ]; }