JS: Promise.resolve

By Xah Lee. Date: .
work in progress
Promise.resolve(x)

returns either a new promise resolved with the passed argument, or the argument itself if the argument is a promise produced by this constructor.