favoritos
Version:
Favoritos is a JavaScript plugin that adds some HTML5 canvas magic to your favicon. With just a wee bit of code, we can make some really cool effects.
21 lines (18 loc) • 417 B
JavaScript
/**
*
* favoritos
*
* @version 1.1.0
* @author Alexey Istomin
* @email: webistomin@gmail.com
* @license: MIT
*
**/
var getContextGradientEntries = function getContextGradientEntries(backgrounds) {
var arrayLength = backgrounds.length;
var step = 1 / (arrayLength - 1);
return backgrounds.map(function (background, index) {
return [index * step, background];
});
};
export { getContextGradientEntries };