npm module:  backwards compatibilify your callback functions while migrating apis to promises