How to use the @ditojs/utils.hyphenate function in @ditojs/utils

To help you get started, we’ve selected a few @ditojs/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ditojs / dito / packages / admin / src / types / TypeMarkup.vue View on Github external
isActive?.(attrs) &&
            (ignoreActive == null || !ignoreActive())
          ),
          onClick: () => onClick
            ? onClick(command, attrs)
            : command(attrs)
        })
      }

      const settings = this.schema[settingsName]
      if (settings) {
        for (const [key, description] of Object.entries(descriptions)) {
          const settingName = ['undo', 'redo'].includes(key) ? 'history' : key
          const setting = settings[settingName]
          const name = underscore(key)
          const icon = hyphenate(key)
          if (setting) {
            if (description === true) {
              addButton({ name, icon })
            } else if (isObject(description)) {
              const { attr, values, ignoreActive, onClick } = description
              if (attr) {
                if (isArray(values) && isArray(setting)) {
                  // Support heading level attrs:
                  for (const value of values) {
                    if (setting.includes(value)) {
                      addButton({
                        name,
                        icon: `${icon}-${value}`,
                        attrs: { [attr]: value },
                        ignoreActive,
                        onClick
github ditojs / dito / packages / admin / src / types / DitoList.vue View on Github external
getCellClass(cell) {
      return `dito-cell-${hyphenate(cell.name)}`
    },
github ditojs / dito / packages / server / src / api / RestGenerator.js View on Github external
function normalize(name, plural = false) {
  return hyphenate(plural ? pluralize.plural(name) : name)
}
github ditojs / dito / packages / server / src / app / Application.js View on Github external
normalizePath(path) {
    return this.config.app.normalizePaths ? hyphenate(path) : path
  }
github ditojs / dito / packages / admin / src / types / TypeList.vue View on Github external
getCellClass(cell) {
      return `dito-cell-${hyphenate(cell.name)}`
    },
github ditojs / dito / packages / ui / src / components / Trigger.vue View on Github external
popupClass() {
      const classes = {
        [`dito-popup-${hyphenate(this.placement)}`]: true
      }
      if (this.customClass) {
        classes[this.customClass] = true
      }
      return classes
    },
github ditojs / dito / packages / admin / src / components / DitoTableHead.vue View on Github external
getColumnClass(column) {
      return `dito-column-${hyphenate(column.name)}`
    },
github ditojs / dito / packages / server / src / storage / Storage.js View on Github external
static register(storageClass) {
    const type = (
      storageClass.type ||
      hyphenate(storageClass.name.match(/^(.*?)(?:Storage|)$/)[1])
    )
    storageClass.type = type
    storageClasses[type] = storageClass
  }