The Cusp of Helix

Reference of Intact Case
[hyphenaged]

(string) hyphenaged (asVendorPrefix)

Hyphenate compound words from camelCase/StudlyCaps.

Parameters:

nametypedefaultcaption
asVendorPrefixbooleanfalseTreat as vendor-prefix (CSS).

Returns:

  • (string) — Hyphenaged String.

Author:

  • StewEucen

Since:

  • Version 1.0.0

Aliases:

  • toTrainCase
  • toChainCase
  • toKebabCase
  • toSpinalCase

Examples:

"chainCase".hyphenaged() //=> "chain-case" "VendorPrefix".hyphenaged(true) //=> "-vendor-prefix" "camelCase".hyphenaged(true) //=> "camel-case"