node.inflection
node.inflection copied to clipboard
camelize handles `/` improperly
Hey! I just found inflection.camelize('/')
return ::
I consider it a bug since camelize should only care about underscore chars.
Once confirmed by an author that it's a bug, I'm happy to implement a fix.
Here is a code I used to encounter a bug:
const inflection = require('inflection');
const fc = require('fast-check');
describe('inflection', () => {
it('camelizes properly', () => {
fc.assert(
fc.property(fc.string(), fc.context(), (text, context) => {
const camelized = inflection.camelize(text);
context.log(camelized);
expect(camelized.length).toBeLessThanOrEqual(text.length);
})
);
});
});