UNPKG

braintree-web

Version:

A suite of tools for integrating Braintree in the browser

14 lines (10 loc) 293 B
"use strict"; module.exports = function (method, body) { if (typeof method !== "string") { throw new Error("Method must be a string"); } if (method.toLowerCase() !== "get" && body != null) { body = typeof body === "string" ? body : JSON.stringify(body); } return body; };