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

Reverse jiff.patch arg order #19

Open
briancavalier opened this issue Jun 19, 2014 · 2 comments
Open

Reverse jiff.patch arg order #19

briancavalier opened this issue Jun 19, 2014 · 2 comments

Comments

@briancavalier
Copy link
Member

Total breaking API change, but here's why it could be very nice:

var patched = patches.reduce(function(data, patch) {
    return jiff.patch(patch, data);
}, data);

becomes:

var patched = patches.reduce(jiff.patch, data);
@unscriptable
Copy link
Member

💥

@LinusU
Copy link

LinusU commented Mar 18, 2015

+1 I actually think it makes more sense to specify it in the order data, patch even without the added benefit of reduce compatibility.

To me it's like saying take this data and apply this patch instead of take this patch and apply it to this data. Since the result is the new data the former makes more sense. Just my 2 cents...

The current version is 0.7.0 and according to semver you're allowed to basically do whatever you want while on 0.x. I think that making this change and bumping to 1.0.0 would be awesome.

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