How to use the humanize-string function in humanize-string

To help you get started, we’ve selected a few humanize-string 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 sozialhelden / wheelmap-frontend / src / components / NodeToolbar / AccessibilitySection / AccessibilityDetailsTree.js View on Github external
function formatName(name: string, properties: {}): string {
  const string = properties[`${name}Localized`] || humanizeString(name);
  return string.replace(/^Rating /, '');
}
github doczjs / docz / core / docz-utils / src / mdast.ts View on Github external
const valueFromHeading = (node: any) => {
  const children = get(node, 'children')
  const slug = get(node, 'data.id')

  if (Array.isArray(children)) {
    return flatten(getChildValue(children))
      .filter(Boolean)
      .join(' ')
  }

  return humanize(slug)
}
github garden-io / garden / garden-service / src / docs / config.ts View on Github external
}),
    prefix: "runtime.services",
    placeholder: "",
    exampleName: "my-service",
  })

  const taskOutputsReference = renderTemplateStringReference({
    schema: TaskRuntimeContext.getSchema().keys({
      outputs: getOutputsSchema(desc, "taskOutputsSchema").required(),
    }),
    prefix: "runtime.tasks",
    placeholder: "",
    exampleName: "my-tasks",
  })

  const frontmatterTitle = titleize(humanize(name))
  const template = handlebars.compile(readFileSync(moduleTemplatePath).toString())
  return template({
    frontmatterTitle,
    name,
    docs,
    markdownReference,
    yaml,
    hasOutputs: moduleOutputsReference || serviceOutputsReference || taskOutputsReference,
    moduleOutputsReference,
    serviceOutputsReference,
    taskOutputsReference,
  })
}
github doczjs / docz / core / docz-core / src / lib / Entry.ts View on Github external
private getName(filepath: string, parsed: ParsedData): string {
    const filename = humanize(path.parse(filepath).name)
    return parsed && parsed.name ? parsed.name : filename
  }

humanize-string

Convert a camelized/dasherized/underscored string into a humanized one: `fooBar-Baz_Faz` → `Foo bar baz faz`

MIT
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis

Popular humanize-string functions