I need to check if entry with specific ID exists in the database using Sequelize in Node.js
function isIdUnique (id) { db.Profile.count({ where: { id:
I found the answer by @alecxe to be unreliable in some instances, so I tweaked the logic:
function isIdUnique (id, done) { db.Profile.count({ where: { id: id } }) .then(count => { return (count > 0) ? true : false }); }