You need to bring your own Promise polyfill.
handle
(String): The handle of the product
(Object): JSON representation of the product
import { getProduct } from 'preamble-ajax';
getProduct('black-t-shirt');
// → { id: 1, handle: 'black-t-shirt', ... }
options
(Object)
(Object): JSON representation of the product added
import { addCart } from 'preamble-ajax';
addCart({
id: 1234567,
quantity: 1,
properties: {
'Foo': 'Bar'
}
});