UNPKG

hades-cli

Version:
18 lines (17 loc) 468 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _ = require("lodash"); /** * Convert a string to Kebab Case. * * @example * 'Foo Bar'.toSnakeCase() // Will return `foo-bar`. * 'fooBar'.toSnakeCase() // Will return `foo-bar`. * '--FOO-BAR--'.toSnakeCase() // Will return `foo-bar`. * * @returns {string} * The Kebab Case string. */ String.prototype.toKebabCase = function () { return _.kebabCase(this); };