Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camelize handles / improperly #78

Open
maciejmyslinski opened this issue Apr 8, 2019 · 0 comments
Open

camelize handles / improperly #78

maciejmyslinski opened this issue Apr 8, 2019 · 0 comments

Comments

@maciejmyslinski
Copy link

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);
      })
    );
  });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant