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

Allow to extend the deltaE methods #287

Merged
merged 1 commit into from
Feb 20, 2023
Merged

Allow to extend the deltaE methods #287

merged 1 commit into from
Feb 20, 2023

Conversation

latin-1
Copy link
Contributor

@latin-1 latin-1 commented Feb 20, 2023

import Color from "colorjs.io";
Color.deltaEMethods.deltaECustom = (color, sample) => { ... };
import {deltaEMethods} from "colorjs.io/fn";
deltaEMethods.deltaECustom = (color, sample) => { ... };

import deltaEITP from "./deltaEITP.js";
import deltaEOK from "./deltaEOK.js";

export { deltaE76, deltaECMC, deltaE2000, deltaEJz, deltaEITP, deltaEOK };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export { deltaE76, deltaECMC, deltaE2000, deltaEJz, deltaEITP, deltaEOK };
// We want both a default export so it can be extended
// as well as individual named exports
export {
deltaE76,
deltaECMC,
deltaE2000,
deltaEJz,
deltaEITP,
deltaEOK
};

@LeaVerou
Copy link
Member

This seems ok (and is running this time!). Thanks!

@LeaVerou LeaVerou merged commit e939c7c into color-js:main Feb 20, 2023
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

Successfully merging this pull request may close these issues.

2 participants