How to use the inflected.parameterize function in inflected

To help you get started, we’ve selected a few inflected 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 DefinitelyTyped / DefinitelyTyped / inflected / inflected-tests.ts View on Github external
Inflector.ordinal(1002)   // => 'nd'
Inflector.ordinal(1003)   // => 'rd'
Inflector.ordinal(-11)    // => 'th'
Inflector.ordinal(-1021)  // => 'st'

Inflector.ordinalize(1)      // => '1st'
Inflector.ordinalize(2)      // => '2nd'
Inflector.ordinalize(1002)   // => '1002nd'
Inflector.ordinalize(1003)   // => '1003rd'
Inflector.ordinalize(-11)    // => '-11th'
Inflector.ordinalize(-1021)  // => '-1021st'

Inflector.transliterate('Ærøskøbing')  // => 'AEroskobing'

Inflector.parameterize('Donald E. Knuth')                      // => 'donald-e-knuth'
Inflector.parameterize('Donald E. Knuth', { separator: '+' })  // => 'donald+e+knuth'
github openspending / os-packager / app / services / utils.js View on Github external
function convertToSlug(string) {
  var ret = inflector.parameterize(
    inflector.transliterate('' + (string || '')));
  if (ret === '') {
    return 'slug';
  }
  return ret;
}
github ForestAdmin / forest-express / src / utils / string.js View on Github external
exports.parameterize = (value) => (value ? Inflector.parameterize(value.trim()) : '');
github neinteractiveliterature / intercode / app / javascript / EventsApp / buildEventUrl.js View on Github external
export default function buildEventUrl(event) {
  return `/events/${event.id}-${parameterize(event.title)}`;
}