UNPKG

jsmodern

Version:

An extension to existing JavaScript, influenced by other great languages such as Rust, Dart, Java, Golang, etc.

11 lines 359 B
import { postCase, preCase } from './to-case.js'; export const toStartCase = { label: 'toStartCase', fn: function stringToStartCase() { const ctx = this; if (!ctx.length) return ''; return postCase(preCase(ctx).replace(/\b[a-zA-z]/gi, s => s.toUpperCase()), ' '); }, }; //# sourceMappingURL=to-start-case.js.map