Add "Promise" for both browser and node.js