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

Extend chaining method names to include base and quote #6

Open
wjcrowcroft opened this issue Jan 2, 2012 · 0 comments
Open

Extend chaining method names to include base and quote #6

wjcrowcroft opened this issue Jan 2, 2012 · 0 comments

Comments

@wjcrowcroft
Copy link
Member

In money.js, you can chain methods like this:

fx(1000).from("EUR").to("USD"); // 1.2945

These could be aliased as base and quote, for consistency with the naming convention in currency pairs and exchange rate calculations

So they would also be available like this:

fx(1000).base("EUR").quote("USD"); // 1.2945

But only if it doesn't bloat the code too much.

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