HEX
Server: nginx/1.24.0
System: Linux nowruzgan 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64
User: babak (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/dev/nowruzgan/rest/node_modules/machinepack-strings/machines/to-kebab-case.js
module.exports = {


  friendlyName: 'To kebab-case',


  description: 'Convert a string to kebab-case (dashes instead of spaces/underscores/varying capitalization).',


  sync: true,


  cacheable: true,


  inputs: {

    string: {
      friendlyName: 'String',
      example: 'fooBar_baz bong___',
      description: 'The string to convert.',
      required: true
    }

  },


  exits: {

    success: {
      outputDescription: 'The kebab-cased (i.e. dash-delimited) string, lower-cased, with underscores and spaces removed.',
      example: 'foo-bar-baz-bong',
    }

  },


  fn: function (inputs, exits) {
    var _ = require('lodash');
    return exits.success(_.kebabCase(inputs.string));
  }

};