UNPKG

321 BJavaScriptView Raw
1'use strict';
2var fails = require('../internals/fails');
3
4module.exports = function (METHOD_NAME, argument) {
5 var method = [][METHOD_NAME];
6 return !method || !fails(function () {
7 // eslint-disable-next-line no-useless-call,no-throw-literal
8 method.call(null, argument || function () { throw 1; }, 1);
9 });
10};