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

Rename Traits #74

Open
f2prateek opened this issue Feb 3, 2015 · 1 comment
Open

Rename Traits #74

f2prateek opened this issue Feb 3, 2015 · 1 comment

Comments

@f2prateek
Copy link
Contributor

We need a nicer way of renaming special properties that can be defined my multiple keys.

For instance, .created() returns the value of either created or createdAt. This causes inconsistent behaviour.

identify.traits({ createdAt: 'created_at' });
// Ignores created completely
var created = identify.created();
// uses either created or createdAt, whichever is available.
@sperand-io
Copy link
Contributor

When we address this, we should address the following at the same time:

If you use the method name, that will work to get the value, but with an insidious side effect:

identify.traits({ created: 'created_at' });
// uses either created or createdAt, whichever is available.
// but... will leave createdAt there :/

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

2 participants