earljs
Version:
Ergonomic, modern and type-safe assertion library
11 lines (10 loc) • 355 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatString = void 0;
function formatString(value, options) {
if (options.inline && value.length > options.maxLineLength - 2) {
return JSON.stringify(value.slice(0, 7) + '...');
}
return JSON.stringify(value);
}
exports.formatString = formatString;
;