index.d.ts 542 B

1234567891011121314151617181920
  1. /**
  2. Convert a camelized string into a lowercased one with a custom separator: `unicornRainbow` → `unicorn_rainbow`.
  3. @param string - The camelcase string to decamelize.
  4. @param separator - The separator to use to put in between the words from `string`. Default: `'_'`.
  5. @example
  6. ```
  7. import decamelize = require('decamelize');
  8. decamelize('unicornRainbow');
  9. //=> 'unicorn_rainbow'
  10. decamelize('unicornRainbow', '-');
  11. //=> 'unicorn-rainbow'
  12. ```
  13. */
  14. declare function decamelize(string: string, separator?: string): string;
  15. export = decamelize;