Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Inflector.foreignKey('Message') // => 'message_id'
Inflector.foreignKey('Message', false) // => 'messageid'
Inflector.ordinal(1) // => 'st'
Inflector.ordinal(2) // => 'nd'
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'
Inflector.classify('posts') // => 'Post'
Inflector.dasherize('puni_puni') // => 'puni-puni'
Inflector.foreignKey('Message') // => 'message_id'
Inflector.foreignKey('Message', false) // => 'messageid'
Inflector.ordinal(1) // => 'st'
Inflector.ordinal(2) // => 'nd'
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'
Inflector.dasherize('puni_puni') // => 'puni-puni'
Inflector.foreignKey('Message') // => 'message_id'
Inflector.foreignKey('Message', false) // => 'messageid'
Inflector.ordinal(1) // => 'st'
Inflector.ordinal(2) // => 'nd'
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'
Inflector.dasherize('puni_puni') // => 'puni-puni'
Inflector.foreignKey('Message') // => 'message_id'
Inflector.foreignKey('Message', false) // => 'messageid'
Inflector.ordinal(1) // => 'st'
Inflector.ordinal(2) // => 'nd'
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'
Inflector.classify('egg_and_hams') // => 'EggAndHam'
Inflector.classify('posts') // => 'Post'
Inflector.dasherize('puni_puni') // => 'puni-puni'
Inflector.foreignKey('Message') // => 'message_id'
Inflector.foreignKey('Message', false) // => 'messageid'
Inflector.ordinal(1) // => 'st'
Inflector.ordinal(2) // => 'nd'
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'