Hello community,
i want to use color-thief.js, which is a script that returns the dominant color of an image, in my javascript code. I imported it using the instructions found in the documentation but when i try to use it the compiler says that it is not a function. what am i doing wrong? Should i use module.exports?
var ColorThief = require('/color-thief.js');
var colorThief = new ColorThief();
Thank you in advance
Edit
Sorry for the title but i accidentaly posted it with the title incomplete and i cannot find how to fix it