See pre-releases 4.0.0-0
and 4.0.0-1
to the commit history.
Features
- Add
threshold
option. (#16) - Drop default export in favor or named export.
Breaking changes
This release contains two breaking changes:
Switch from default export to named export
To migrate, just change all yiq
imports:
- import yiq from 'yiq';
+ import { yiq } from 'yiq';
Or, if you are using CommonJS:
- const yiq = require('yiq');
+ const { yiq } = require('yiq');
Check the #17 pull request to learn more.
New YiqOptions
interface
Thanks to @m1010j!
Previously, the options
object was only used to define custom colors:
interface YiqOptions {
black: string;
white: string;
}
Now, with the addition of the threshold option, the YiqOptions
interface was changed to:
interface YiqOptions {
colors?: {
light: string;
dark: string;
};
threshold?: number;
}
Please note that the color option names were also changed, from black
to dark
and white
to light
.
Check the #16 pull request to learn more.