UNPKG

braintree-web

Version:

A suite of tools for integrating Braintree in the browser

17 lines (14 loc) 496 B
"use strict"; var BraintreeError = require("./braintree-error"); var sharedErrors = require("./errors"); module.exports = function (instance, methodNames) { methodNames.forEach(function (methodName) { instance[methodName] = function () { throw new BraintreeError({ type: sharedErrors.METHOD_CALLED_AFTER_TEARDOWN.type, code: sharedErrors.METHOD_CALLED_AFTER_TEARDOWN.code, message: methodName + " cannot be called after teardown.", }); }; }); };