UNPKG

counterfact

Version:

a library for building a fake REST API for testing

11 lines (10 loc) 303 B
export function printObjectWithoutQuotes(entries) { return `{\n${entries .map(([key, value]) => `${key}: ${value}`) .join(",\n")}\n}`; } export function printObject(entries) { return `{\n${entries .map(([key, value]) => `"${key}": ${value}`) .join(",\n")}\n}`; }