UNPKG

solidity-docgen

Version:

Documentation generator for Solidity smart contracts.

25 lines 737 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.eq = exports.formatVariable = exports.joinLines = exports.trim = void 0; function trim(text) { if (typeof text === 'string') { return text.trim(); } } exports.trim = trim; function joinLines(text) { if (typeof text === 'string') { return text.replace(/[\r\n]+/g, ' '); } } exports.joinLines = joinLines; /** * Format a variable as its type followed by its name, if available. */ function formatVariable(v) { return [v.typeName?.typeDescriptions.typeString].concat(v.name || []).join(' '); } exports.formatVariable = formatVariable; const eq = (a, b) => a === b; exports.eq = eq; //# sourceMappingURL=helpers.js.map