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

Rethink public API #4

Open
frostney opened this issue Jan 7, 2016 · 2 comments
Open

Rethink public API #4

frostney opened this issue Jan 7, 2016 · 2 comments

Comments

@frostney
Copy link
Contributor

frostney commented Jan 7, 2016

Currently, the API is based upon the change-case libraries.
I think changing the API from changeCaseObject.camelCase(obj) to changeCaseObject(obj).toCamelCase() feels more in-line with native JavaScript methods such as toString, toLowerCase, toUpperCase, etc.

@stevenvachon
Copy link

@frostney I think it's better to keep it as is, so that we can do this:

import {camelCase} from 'change-case-object';
camelCase(obj);
const {camelCase} = require('change-case-object');
camelCase(obj);

@MaffooBristol
Copy link

I think it'd be nice to be able to do either. I initially assumed it'd be cco(obj).toFoo() too, had to check the docs to get the correct form.

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

3 participants