You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
322 B
14 lines
322 B
7 years ago
|
const resemble = require('./resemble');
|
||
|
|
||
|
module.exports = async function(image1, image2) {
|
||
|
return new Promise(function(resolve, reject) {
|
||
|
resemble(image1).compareTo(image2).onComplete(function(data) {
|
||
|
if (data.error) {
|
||
|
reject(data.error);
|
||
|
} else {
|
||
|
resolve(data);
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
};
|