UNPKG

@deepkit/core

Version:
29 lines 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.capitalize = exports.indent = void 0; function __assignType(fn, args) { fn.__type = args; return fn; } /* * Deepkit Framework * Copyright (C) 2021 Deepkit UG, Marc J. Schmidt * * This program is free software: you can redistribute it and/or modify * it under the terms of the MIT License. * * You should have received a copy of the MIT License along with this program. */ function indent(indentation, prefix = '') { return __assignType((str = '') => { return ' '.repeat(indentation) + str.replace(/\n/g, '\n' + (' '.repeat(indentation)) + prefix); }, ['str', () => "", '', 'P&2!>""/#']); } exports.indent = indent; indent.__type = ['indentation', 'prefix', () => "", 'indent', 'P\'2!&2">#"/$']; function capitalize(string) { return string.charAt(0).toUpperCase() + string.slice(1); } exports.capitalize = capitalize; capitalize.__type = ['string', 'capitalize', 'P&2!&/"']; //# sourceMappingURL=string.js.map