1 Zeile
Kein EOL
110 KiB
Text
1 Zeile
Kein EOL
110 KiB
Text
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///dist/api-check.min.js","webpack:///webpack/bootstrap 0063d8845a3f72305aa5","webpack:///./index.js","webpack:///../~/json-stringify-safe/stringify.js","webpack:///./api-check-util.js","webpack:///./api-check.js","webpack:///./checkers.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","Object","defineProperty","value","_apiCheck","_apiCheck2","getSerialize","fn","decycle","seen","keys","key","getPath","ret","indexOf","push","index","path","unshift","join","stringify","spaces","JSON","_defineProperty","enumerable","configurable","writable","copy","type","typeOf","daCopy","undefined","each","val","Array","isArray","RegExp","getCheckerDisplay","checker","options","display","short","shortType","getCheckerType","displayName","name","_ref","__apiCheckData","typeTypes","arrayify","iterator","context","eachArry","eachObj","hasOwn","prototype","hasOwnProperty","length","i","isError","Error","list","arry","finalJoin","slice","last","pop","getError","location","checkerType","stringType","nAtL","t","tName","tLocation","thing","undef","setupChecker","properties","disabled","getNoop","isNoop","prop","notRequired","getRequiredVersion","notNullable","addNullable","notOptional","addOptional","requiredChecker","isOptional","copyProps","originalChecker","optionalCheck","optional","fixType","nullableCheck","isNullable","nullable","checkerCopy","apply","arguments","src","dest","noop","checkerHelpers","getApiCheckInstance","apiCheck","api","args","output","config","globalConfig","apiTypes","argTypes","passed","message","failed","checkApiCheckApi","messages","checkEnoughArgs","checkApiWithArgs","returnObject","getTypes","getErrorMessage","checkApiArgs","isArrayOrArgs","prefix","errors","apiCheckApis","handleErrorMessage","getApiCheck","shouldThrow","result","console","warn","getPrefix","onlyPrefix","gOut","trim","getSuffix","s","onlySuffix","suffix","getUrl","u","url","docsBaseUrl","urlSuffix","passedAndShouldHavePassed","buildMessageFromApiAndArgs","replaceFunctionWithName","replacedItems","getObjectString","types","generateMessage","n","useS","newLine","passedArgs","_getTypes","map","specified","terse","verbose","addHelpers","arg","getArgDisplay","extraCheckers","apiCheckApiCheck","getApiCheckInstanceCheckers","additionalProperties","throw","utils","apiCheckUtil","wrapper","checkers","getCheckers","checkerIndex","argIndex","res","lastChecker","argName","argFailed","skipPreviousChecker","getCheckerErrorMessage","checkerTypeType","apiCheckDataChecker","shape","string","bool","asFunc","func","withProperties","asShape","wrongShape","oneOfType","checkerHelp","getCheckerHelp","help","requiredArgs","filter","a","gottenArgs","hasKeys","getDisplayIfNotGotten","getDisplay","cName","constructor","argDisplay","v","k","getApiCheckApis","os","checkerFnChecker","strict","objectOf","typeOrArrayOf","any","VERSION","internalChecker","typeOfCheckGetter","lType","toLowerCase","funcCheckGetter","functionChecker","apiError","shapeChecker","notFunction","objectCheckGetter","nullType","objectNullOkChecker","objectChecker","nullOk","instanceCheckGetter","classToCheck","oneOfCheckGetter","enums","enum","enm","some","oneOfTypeCheckGetter","typeCheckers","checkersDisplay","arrayOfCheckGetter","shortCheckerDisplay","array","every","item","objectOfCheckGetter","checkerDisplay","notObject","object","allTypesSuccess","typeOrArrayOfCheckGetter","arrayOf","getShapeCheckGetter","shapeCheckGetter","nonObject","modifyTypeDisplayToHelpOut","theRet","required","addHelper","property","objectMessage","stringMessage","error","toUpperCase","parentRequired","strictType","shapeTypes","isObject","shapePropError","shapeError","allowedProperties","extraProps","getRequiredIfNotChecker","all","otherProps","propChecker","props","ifProps","description","getTypeForShapeChild","propName","propExists","iteration","otherPropsExist","otherProp","ifNot","onlyIf","othersPresent","requiredIfNot","argumentsCheckerGetter","number","anyCheckGetter","nullCheckGetter","rangeCheckGetter","min","max","lessThanCheckGetter","greaterThanCheckGetter","emptyObjectCheckGetter","emptyObject","instanceOf","oneOf","range","lessThan","greaterThan","null","_require"],"mappings":";CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,OAAAH,GACA,gBAAAC,SACAA,QAAA,SAAAD,IAEAD,EAA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AA6B,OAARA,GAAgBhC,OAAOS,KAAKuB,GAAKwB,OACxDU,EAAStB,EAAMuB,EAAUxC,GADlC,SAGEA,QAAOmD,GA7ab,OACEuK,MAAOzB,EAAkB,SACzB/B,KAAM+B,EAAkB,WACxByE,OAAQzE,EAAkB,UAC1BhC,OAAQgC,EAAkB,UAC1B7B,KAAMgC,IACN4B,OAAQvB,IAER0E,YAAaD,IAEbE,WAAYtE,EACZuE,MAAOrE,EACPxC,UAAW6C,EAEXc,QAASX,EACT5B,SAAUiC,EACVhC,cAAeqC,EAEfoD,MAAOT,EACPU,SAAUP,EACVQ,YAAaP,EAEbjH,MAAOoE,IACPnJ,KAAMwL,IAEN3E,IAAK6E,IACLc,OAAMb,KAtCV,GAAMpR,GAAYhC,EAAQ,GNw1BrBkU,EMn1BClU,EAAQ,GAHZyC,EAAMyR,EAANzR,OAAQG,EAAIsR,EAAJtR,KAAML,EAAI2R,EAAJ3R,KAAMU,EAAiBiR,EAAjBjR,kBAAmBsB,EAAO2P,EAAP3P,QACvCV,EAAQqQ,EAARrQ,SAAUY,EAAIyP,EAAJzP,KAAMM,EAAQmP,EAARnP,SAAUI,EAAI+O,EAAJ/O,KAAMC,EAAC8O,EAAD9O,EAAGiC,EAAc6M,EAAd7M,eACnC7B,EAAK0O,EAAL1O,MAEKC,EAAgB4B,EAAhB5B,aAEDmG,EAAWjM,EAAOD,QAAUmM,GAClClM,GAAOD,QAAQmM,YAAcA","file":"dist/api-check.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"apiCheck\"] = factory();\n\telse\n\t\troot[\"apiCheck\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","//! api-check version 7.5.5 built with ♥ by Kent C. Dodds <kent@doddsfamily.us> (http://kent.doddsfamily.us) (ó ì_í)=óò=(ì_í ò)\n\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"apiCheck\"] = factory();\n\telse\n\t\troot[\"apiCheck\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _apiCheck = __webpack_require__(3);\n\t\n\tvar _apiCheck2 = _interopRequireDefault(_apiCheck);\n\n\texports['default'] = _apiCheck2['default'];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = stringify;\n\t\n\tfunction getSerialize (fn, decycle) {\n\t var seen = [], keys = [];\n\t decycle = decycle || function(key, value) {\n\t return '[Circular ' + getPath(value, seen, keys) + ']'\n\t };\n\t return function(key, value) {\n\t var ret = value;\n\t if (typeof value === 'object' && value) {\n\t if (seen.indexOf(value) !== -1)\n\t ret = decycle(key, value);\n\t else {\n\t seen.push(value);\n\t keys.push(key);\n\t }\n\t }\n\t if (fn) ret = fn(key, ret);\n\t return ret;\n\t }\n\t}\n\t\n\tfunction getPath (value, seen, keys) {\n\t var index = seen.indexOf(value);\n\t var path = [ keys[index] ];\n\t for (index--; index >= 0; index--) {\n\t if (seen[index][ path[0] ] === value) {\n\t value = seen[index];\n\t path.unshift(keys[index]);\n\t }\n\t }\n\t return '~' + path.join('.');\n\t}\n\t\n\tfunction stringify(obj, fn, spaces, decycle) {\n\t return JSON.stringify(obj, getSerialize(fn, decycle), spaces);\n\t}\n\t\n\tstringify.getSerialize = getSerialize;\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\t\n\tvar stringify = __webpack_require__(1);\n\tvar checkerHelpers = {\n\t addOptional: addOptional, getRequiredVersion: getRequiredVersion, setupChecker: setupChecker, addNullable: addNullable\n\t};\n\t\n\tmodule.exports = {\n\t each: each, copy: copy, typeOf: typeOf, arrayify: arrayify, getCheckerDisplay: getCheckerDisplay,\n\t isError: isError, list: list, getError: getError, nAtL: nAtL, t: t, undef: undef, checkerHelpers: checkerHelpers,\n\t noop: noop\n\t};\n\t\n\tfunction copy(obj) {\n\t var type = typeOf(obj);\n\t var daCopy = undefined;\n\t if (type === 'array') {\n\t daCopy = [];\n\t } else if (type === 'object') {\n\t daCopy = {};\n\t } else {\n\t return obj;\n\t }\n\t each(obj, function (val, key) {\n\t daCopy[key] = val; // cannot single-line this because we don't want to abort the each\n\t });\n\t return daCopy;\n\t}\n\t\n\tfunction typeOf(obj) {\n\t if (Array.isArray(obj)) {\n\t return 'array';\n\t } else if (obj instanceof RegExp) {\n\t return 'object';\n\t } else {\n\t return typeof obj;\n\t }\n\t}\n\t\n\tfunction getCheckerDisplay(checker, options) {\n\t /* eslint complexity:[2, 7] */\n\t var display = undefined;\n\t var short = options && options.short;\n\t if (short && checker.shortType) {\n\t display = checker.shortType;\n\t } else if (!short && typeof checker.type === 'object' || checker.type === 'function') {\n\t display = getCheckerType(checker, options);\n\t } else {\n\t display = getCheckerType(checker, options) || checker.displayName || checker.name;\n\t }\n\t return display;\n\t}\n\t\n\tfunction getCheckerType(_ref, options) {\n\t var type = _ref.type;\n\t\n\t if (typeof type === 'function') {\n\t var __apiCheckData = type.__apiCheckData;\n\t var typeTypes = type(options);\n\t type = _defineProperty({\n\t __apiCheckData: __apiCheckData\n\t }, __apiCheckData.type, typeTypes);\n\t }\n\t return type;\n\t}\n\t\n\tfunction arrayify(obj) {\n\t if (!obj) {\n\t return [];\n\t } else if (Array.isArray(obj)) {\n\t return obj;\n\t } else {\n\t return [obj];\n\t }\n\t}\n\t\n\tfunction each(obj, iterator, context) {\n\t if (Array.isArray(obj)) {\n\t return eachArry(obj, iterator, context);\n\t } else {\n\t return eachObj(obj, iterator, context);\n\t }\n\t}\n\t\n\tfunction eachObj(obj, iterator, context) {\n\t var ret = undefined;\n\t var hasOwn = Object.prototype.hasOwnProperty;\n\t /* eslint prefer-const:0 */ // some weird eslint bug?\n\t for (var key in obj) {\n\t if (hasOwn.call(obj, key)) {\n\t ret = iterator.call(context, obj[key], key, obj);\n\t if (ret === false) {\n\t return ret;\n\t }\n\t }\n\t }\n\t return true;\n\t}\n\t\n\tfunction eachArry(obj, iterator, context) {\n\t var ret = undefined;\n\t var length = obj.length;\n\t for (var i = 0; i < length; i++) {\n\t ret = iterator.call(context, obj[i], i, obj);\n\t if (ret === false) {\n\t return ret;\n\t }\n\t }\n\t return true;\n\t}\n\t\n\tfunction isError(obj) {\n\t return obj instanceof Error;\n\t}\n\t\n\tfunction list(arry, join, finalJoin) {\n\t arry = arrayify(arry);\n\t var copy = arry.slice();\n\t var last = copy.pop();\n\t if (copy.length === 1) {\n\t join = ' ';\n\t }\n\t return copy.join(join) + ('' + (copy.length ? join + finalJoin : '') + last);\n\t}\n\t\n\tfunction getError(name, location, checkerType) {\n\t if (typeof checkerType === 'function') {\n\t checkerType = checkerType({ short: true });\n\t }\n\t var stringType = typeof checkerType !== 'object' ? checkerType : stringify(checkerType);\n\t return new Error(nAtL(name, location) + ' must be ' + t(stringType));\n\t}\n\t\n\tfunction nAtL(name, location) {\n\t var tName = t(name || 'value');\n\t var tLocation = !location ? '' : ' at ' + t(location);\n\t return '' + tName + tLocation;\n\t}\n\t\n\tfunction t(thing) {\n\t return '`' + thing + '`';\n\t}\n\t\n\tfunction undef(thing) {\n\t return typeof thing === 'undefined';\n\t}\n\t\n\t/**\n\t * This will set up the checker with all of the defaults that most checkers want like required by default and an\n\t * optional version\n\t *\n\t * @param {Function} checker - the checker to setup with properties\n\t * @param {Object} properties - properties to add to the checker\n\t * @param {boolean} disabled - when set to true, this will set the checker to a no-op function\n\t * @returns {Function} checker - the setup checker\n\t */\n\tfunction setupChecker(checker, properties, disabled) {\n\t /* eslint complexity:[2, 9] */\n\t if (disabled) {\n\t // swap out the checker for its own copy of noop\n\t checker = getNoop();\n\t checker.isNoop = true;\n\t }\n\t\n\t if (typeof checker.type === 'string') {\n\t checker.shortType = checker.type;\n\t }\n\t\n\t // assign all properties given\n\t each(properties, function (prop, name) {\n\t return checker[name] = prop;\n\t });\n\t\n\t if (!checker.displayName) {\n\t checker.displayName = 'apiCheck ' + t(checker.shortType || checker.type || checker.name) + ' type checker';\n\t }\n\t\n\t if (!checker.notRequired) {\n\t checker = getRequiredVersion(checker, disabled);\n\t }\n\t\n\t if (!checker.notNullable) {\n\t addNullable(checker, disabled);\n\t }\n\t\n\t if (!checker.notOptional) {\n\t addOptional(checker, disabled);\n\t }\n\t\n\t return checker;\n\t}\n\t\n\tfunction getRequiredVersion(checker, disabled) {\n\t var requiredChecker = disabled ? getNoop() : function requiredChecker(val, name, location, obj) {\n\t if (undef(val) && !checker.isOptional) {\n\t var tLocation = location ? ' in ' + t(location) : '';\n\t var type = getCheckerDisplay(checker, { short: true });\n\t var stringType = typeof type !== 'object' ? type : stringify(type);\n\t return new Error('Required ' + t(name) + ' not specified' + tLocation + '. Must be ' + t(stringType));\n\t } else {\n\t return checker(val, name, location, obj);\n\t }\n\t };\n\t copyProps(checker, requiredChecker);\n\t requiredChecker.originalChecker = checker;\n\t return requiredChecker;\n\t}\n\t\n\tfunction addOptional(checker, disabled) {\n\t var optionalCheck = disabled ? getNoop() : function optionalCheck(val, name, location, obj) {\n\t if (!undef(val)) {\n\t return checker(val, name, location, obj);\n\t }\n\t };\n\t // inherit all properties on the original checker\n\t copyProps(checker, optionalCheck);\n\t\n\t optionalCheck.isOptional = true;\n\t optionalCheck.displayName = checker.displayName + ' (optional)';\n\t optionalCheck.originalChecker = checker;\n\t\n\t // the magic line that allows you to add .optional to the end of the checkers\n\t checker.optional = optionalCheck;\n\t\n\t fixType(checker, checker.optional);\n\t}\n\t\n\tfunction addNullable(checker, disabled) {\n\t var nullableCheck = disabled ? getNoop() : function nullableCheck(val, name, location, obj) {\n\t if (val !== null) {\n\t return checker(val, name, location, obj);\n\t }\n\t };\n\t // inherit all properties on the original checker\n\t copyProps(checker, nullableCheck);\n\t\n\t nullableCheck.isNullable = true;\n\t nullableCheck.displayName = checker.displayName + ' (nullable)';\n\t nullableCheck.originalChecker = checker;\n\t\n\t // the magic line that allows you to add .nullable to the end of the checkers\n\t checker.nullable = nullableCheck;\n\t\n\t fixType(checker, checker.nullable);\n\t if (!checker.notOptional) {\n\t addOptional(checker.nullable, disabled);\n\t }\n\t}\n\t\n\tfunction fixType(checker, checkerCopy) {\n\t // fix type, because it's not a straight copy...\n\t // the reason is we need to specify type.__apiCheckData.optional as true for the terse/verbose option.\n\t // we also want to add \"(optional)\" to the types with a string\n\t if (typeof checkerCopy.type === 'object') {\n\t checkerCopy.type = copy(checkerCopy.type); // make our own copy of this\n\t } else if (typeof checkerCopy.type === 'function') {\n\t checkerCopy.type = function () {\n\t return checker.type.apply(checker, arguments);\n\t };\n\t } else {\n\t checkerCopy.type += ' (optional)';\n\t return;\n\t }\n\t checkerCopy.type.__apiCheckData = copy(checker.type.__apiCheckData) || {}; // and this\n\t checkerCopy.type.__apiCheckData.optional = true;\n\t}\n\t\n\t// UTILS\n\t\n\tfunction copyProps(src, dest) {\n\t each(Object.keys(src), function (key) {\n\t return dest[key] = src[key];\n\t });\n\t}\n\t\n\tfunction noop() {}\n\t\n\tfunction getNoop() {\n\t /* eslint no-shadow:0 */\n\t /* istanbul ignore next */\n\t return function noop() {};\n\t}\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar stringify = __webpack_require__(1);\n\tvar apiCheckUtil = __webpack_require__(2);\n\tvar each = apiCheckUtil.each;\n\tvar isError = apiCheckUtil.isError;\n\tvar t = apiCheckUtil.t;\n\tvar arrayify = apiCheckUtil.arrayify;\n\tvar getCheckerDisplay = apiCheckUtil.getCheckerDisplay;\n\tvar typeOf = apiCheckUtil.typeOf;\n\tvar getError = apiCheckUtil.getError;\n\t\n\tvar checkers = __webpack_require__(4);\n\tvar apiCheckApis = getApiCheckApis();\n\t\n\tmodule.exports = getApiCheckInstance;\n\tmodule.exports.VERSION = (\"7.5.5\");\n\tmodule.exports.utils = apiCheckUtil;\n\tmodule.exports.globalConfig = {\n\t verbose: false,\n\t disabled: false\n\t};\n\t\n\tvar apiCheckApiCheck = getApiCheckInstance({\n\t output: { prefix: 'apiCheck' }\n\t});\n\tmodule.exports.internalChecker = apiCheckApiCheck;\n\t\n\teach(checkers, function (checker, name) {\n\t return module.exports[name] = checker;\n\t});\n\t\n\tfunction getApiCheckInstance() {\n\t var config = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t var extraCheckers = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\t\n\t /* eslint complexity:[2, 6] */\n\t if (apiCheckApiCheck && arguments.length) {\n\t apiCheckApiCheck['throw'](apiCheckApis.getApiCheckInstanceCheckers, arguments, {\n\t prefix: 'creating an apiCheck instance'\n\t });\n\t }\n\t\n\t var additionalProperties = {\n\t 'throw': getApiCheck(true),\n\t warn: getApiCheck(false),\n\t getErrorMessage: getErrorMessage,\n\t handleErrorMessage: handleErrorMessage,\n\t config: {\n\t output: config.output || {\n\t prefix: '',\n\t suffix: '',\n\t docsBaseUrl: ''\n\t },\n\t verbose: config.verbose || false,\n\t disabled: config.disabled || false\n\t },\n\t utils: apiCheckUtil\n\t };\n\t\n\t each(additionalProperties, function (wrapper, name) {\n\t return apiCheck[name] = wrapper;\n\t });\n\t\n\t var disabled = apiCheck.disabled || module.exports.globalConfig.disabled;\n\t each(checkers.getCheckers(disabled), function (checker, name) {\n\t return apiCheck[name] = checker;\n\t });\n\t each(extraCheckers, function (checker, name) {\n\t return apiCheck[name] = checker;\n\t });\n\t\n\t return apiCheck;\n\t\n\t /**\n\t * This is the instance function. Other things are attached to this see additional properties above.\n\t * @param {Array} api - the checkers to check with\n\t * @param {Array} args - the args to check\n\t * @param {Object} output - output options\n\t * @returns {Object} - if this has a failed = true property, then it failed\n\t */\n\t function apiCheck(api, args, output) {\n\t /* eslint complexity:[2, 8] */\n\t if (apiCheck.config.disabled || module.exports.globalConfig.disabled) {\n\t return {\n\t apiTypes: {}, argTypes: {},\n\t passed: true, message: '',\n\t failed: false\n\t }; // empty version of what is normally returned\n\t }\n\t checkApiCheckApi(arguments);\n\t if (!Array.isArray(api)) {\n\t api = [api];\n\t args = [args];\n\t } else {\n\t // turn arguments into an array\n\t args = Array.prototype.slice.call(args);\n\t }\n\t var messages = checkEnoughArgs(api, args);\n\t if (!messages.length) {\n\t // this is where we actually go perform the checks.\n\t messages = checkApiWithArgs(api, args);\n\t }\n\t\n\t var returnObject = getTypes(api, args);\n\t returnObject.args = args;\n\t if (messages.length) {\n\t returnObject.message = apiCheck.getErrorMessage(api, args, messages, output);\n\t returnObject.failed = true;\n\t returnObject.passed = false;\n\t } else {\n\t returnObject.message = '';\n\t returnObject.failed = false;\n\t returnObject.passed = true;\n\t }\n\t return returnObject;\n\t }\n\t\n\t /**\n\t * checkApiCheckApi, should be read like: check apiCheck api. As in, check the api for apiCheck :-)\n\t * @param {Array} checkApiArgs - args provided to apiCheck function\n\t */\n\t function checkApiCheckApi(checkApiArgs) {\n\t var api = checkApiArgs[0];\n\t var args = checkApiArgs[1];\n\t var isArrayOrArgs = Array.isArray(args) || args && typeof args === 'object' && typeof args.length === 'number';\n\t\n\t if (Array.isArray(api) && !isArrayOrArgs) {\n\t throw new Error(getErrorMessage(api, [args], ['If an array is provided for the api, an array must be provided for the args as well.'], { prefix: 'apiCheck' }));\n\t }\n\t // dog fooding here\n\t var errors = checkApiWithArgs(apiCheckApis.checkApiCheckApi, checkApiArgs);\n\t if (errors.length) {\n\t var message = apiCheck.getErrorMessage(apiCheckApis.checkApiCheckApi, checkApiArgs, errors, {\n\t prefix: 'apiCheck'\n\t });\n\t apiCheck.handleErrorMessage(message, true);\n\t }\n\t }\n\t\n\t function getApiCheck(shouldThrow) {\n\t return function apiCheckWrapper(api, args, output) {\n\t var result = apiCheck(api, args, output);\n\t apiCheck.handleErrorMessage(result.message, shouldThrow);\n\t return result; // wont get here if an error is thrown\n\t };\n\t }\n\t\n\t function handleErrorMessage(message, shouldThrow) {\n\t if (shouldThrow && message) {\n\t throw new Error(message);\n\t } else if (message) {\n\t /* eslint no-console:0 */\n\t console.warn(message);\n\t }\n\t }\n\t\n\t function getErrorMessage(api, args) {\n\t var messages = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2];\n\t var output = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];\n\t\n\t var gOut = apiCheck.config.output || {};\n\t var prefix = getPrefix();\n\t var suffix = getSuffix();\n\t var url = getUrl();\n\t var message = 'apiCheck failed! ' + messages.join(', ');\n\t var passedAndShouldHavePassed = '\\n\\n' + buildMessageFromApiAndArgs(api, args);\n\t return (prefix + ' ' + message + ' ' + suffix + ' ' + (url || '') + passedAndShouldHavePassed).trim();\n\t\n\t function getPrefix() {\n\t var p = output.onlyPrefix;\n\t if (!p) {\n\t p = ((gOut.prefix || '') + ' ' + (output.prefix || '')).trim();\n\t }\n\t return p;\n\t }\n\t\n\t function getSuffix() {\n\t var s = output.onlySuffix;\n\t if (!s) {\n\t s = ((output.suffix || '') + ' ' + (gOut.suffix || '')).trim();\n\t }\n\t return s;\n\t }\n\t\n\t function getUrl() {\n\t var u = output.url;\n\t if (!u) {\n\t u = gOut.docsBaseUrl && output.urlSuffix && ('' + gOut.docsBaseUrl + output.urlSuffix).trim();\n\t }\n\t return u;\n\t }\n\t }\n\t\n\t function buildMessageFromApiAndArgs(api, args) {\n\t var _getTypes = getTypes(api, args);\n\t\n\t var apiTypes = _getTypes.apiTypes;\n\t var argTypes = _getTypes.argTypes;\n\t\n\t var copy = Array.prototype.slice.call(args || []);\n\t var replacedItems = [];\n\t replaceFunctionWithName(copy);\n\t var passedArgs = getObjectString(copy);\n\t argTypes = getObjectString(argTypes);\n\t apiTypes = getObjectString(apiTypes);\n\t\n\t return generateMessage();\n\t\n\t // functions\n\t\n\t function replaceFunctionWithName(obj) {\n\t each(obj, function (val, name) {\n\t /* eslint complexity:[2, 6] */\n\t if (replacedItems.indexOf(val) === -1) {\n\t // avoid recursive problems\n\t replacedItems.push(val);\n\t if (typeof val === 'object') {\n\t replaceFunctionWithName(obj);\n\t } else if (typeof val === 'function') {\n\t obj[name] = val.displayName || val.name || 'anonymous function';\n\t }\n\t }\n\t });\n\t }\n\t\n\t function getObjectString(types) {\n\t if (!types || !types.length) {\n\t return 'nothing';\n\t } else if (types && types.length === 1) {\n\t types = types[0];\n\t }\n\t return stringify(types, null, 2);\n\t }\n\t\n\t function generateMessage() {\n\t var n = '\\n';\n\t var useS = true;\n\t if (args && args.length === 1) {\n\t if (typeof args[0] === 'object' && args[0] !== null) {\n\t useS = !!Object.keys(args[0]).length;\n\t } else {\n\t useS = false;\n\t }\n\t }\n\t var types = 'type' + (useS ? 's' : '');\n\t var newLine = n + n;\n\t return 'You passed:' + n + passedArgs + newLine + ('With the ' + types + ':' + n + argTypes + newLine) + ('The API calls for:' + n + apiTypes);\n\t }\n\t }\n\t\n\t function getTypes(api, args) {\n\t api = arrayify(api);\n\t args = arrayify(args);\n\t var apiTypes = api.map(function (checker, index) {\n\t var specified = module.exports.globalConfig.hasOwnProperty('verbose');\n\t return getCheckerDisplay(checker, {\n\t terse: specified ? !module.exports.globalConfig.verbose : !apiCheck.config.verbose,\n\t obj: args[index],\n\t addHelpers: true\n\t });\n\t });\n\t var argTypes = args.map(function (arg) {\n\t return getArgDisplay(arg, []);\n\t });\n\t return { argTypes: argTypes, apiTypes: apiTypes };\n\t }\n\t}\n\t\n\t// STATELESS FUNCTIONS\n\t\n\t/**\n\t * This is where the magic happens for actually checking the arguments with the api.\n\t * @param {Array} api - checkers\n\t * @param {Array} args - and arguments object\n\t * @returns {Array} - the error messages\n\t */\n\tfunction checkApiWithArgs(api, args) {\n\t /* eslint complexity:[2, 7] */\n\t var messages = [];\n\t var failed = false;\n\t var checkerIndex = 0;\n\t var argIndex = 0;\n\t var arg = undefined,\n\t checker = undefined,\n\t res = undefined,\n\t lastChecker = undefined,\n\t argName = undefined,\n\t argFailed = undefined,\n\t skipPreviousChecker = undefined;\n\t /* jshint -W084 */\n\t while ((checker = api[checkerIndex++]) && argIndex < args.length) {\n\t arg = args[argIndex++];\n\t argName = 'Argument ' + argIndex + (checker.isOptional ? ' (optional)' : '');\n\t res = checker(arg, 'value', argName);\n\t argFailed = isError(res);\n\t lastChecker = checkerIndex >= api.length;\n\t skipPreviousChecker = checkerIndex > 1 && api[checkerIndex - 1].isOptional;\n\t if (argFailed && lastChecker || argFailed && !lastChecker && !checker.isOptional && !skipPreviousChecker) {\n\t failed = true;\n\t messages.push(getCheckerErrorMessage(res, checker, arg));\n\t } else if (argFailed && checker.isOptional) {\n\t argIndex--;\n\t } else {\n\t messages.push(t(argName) + ' passed');\n\t }\n\t }\n\t return failed ? messages : [];\n\t}\n\t\n\tcheckerTypeType.type = 'function with __apiCheckData property and `${function.type}` property';\n\tfunction checkerTypeType(checkerType, name, location) {\n\t var apiCheckDataChecker = checkers.shape({\n\t type: checkers.string,\n\t optional: checkers.bool\n\t });\n\t var asFunc = checkers.func.withProperties({ __apiCheckData: apiCheckDataChecker });\n\t var asShape = checkers.shape({ __apiCheckData: apiCheckDataChecker });\n\t var wrongShape = checkers.oneOfType([asFunc, asShape])(checkerType, name, location);\n\t if (isError(wrongShape)) {\n\t return wrongShape;\n\t }\n\t if (typeof checkerType !== 'function' && !checkerType.hasOwnProperty(checkerType.__apiCheckData.type)) {\n\t return getError(name, location, checkerTypeType.type);\n\t }\n\t}\n\t\n\tfunction getCheckerErrorMessage(res, checker, val) {\n\t var checkerHelp = getCheckerHelp(checker, val);\n\t checkerHelp = checkerHelp ? ' - ' + checkerHelp : '';\n\t return res.message + checkerHelp;\n\t}\n\t\n\tfunction getCheckerHelp(_ref, val) {\n\t var help = _ref.help;\n\t\n\t if (!help) {\n\t return '';\n\t }\n\t if (typeof help === 'function') {\n\t help = help(val);\n\t }\n\t return help;\n\t}\n\t\n\tfunction checkEnoughArgs(api, args) {\n\t var requiredArgs = api.filter(function (a) {\n\t return !a.isOptional;\n\t });\n\t if (args.length < requiredArgs.length) {\n\t return ['Not enough arguments specified. Requires `' + requiredArgs.length + '`, you passed `' + args.length + '`'];\n\t } else {\n\t return [];\n\t }\n\t}\n\t\n\tfunction getArgDisplay(arg, gottenArgs) {\n\t /* eslint complexity:[2, 7] */\n\t var cName = arg && arg.constructor && arg.constructor.name;\n\t var type = typeOf(arg);\n\t if (type === 'function') {\n\t if (hasKeys()) {\n\t var properties = stringify(getDisplayIfNotGotten());\n\t return cName + ' (with properties: ' + properties + ')';\n\t }\n\t return cName;\n\t }\n\t\n\t if (arg === null) {\n\t return 'null';\n\t }\n\t\n\t if (type !== 'array' && type !== 'object') {\n\t return type;\n\t }\n\t\n\t if (hasKeys()) {\n\t return getDisplayIfNotGotten();\n\t }\n\t\n\t return cName;\n\t\n\t // utility functions\n\t function hasKeys() {\n\t return arg && Object.keys(arg).length;\n\t }\n\t\n\t function getDisplayIfNotGotten() {\n\t if (gottenArgs.indexOf(arg) !== -1) {\n\t return '[Circular]';\n\t }\n\t gottenArgs.push(arg);\n\t return getDisplay(arg, gottenArgs);\n\t }\n\t}\n\t\n\tfunction getDisplay(obj, gottenArgs) {\n\t var argDisplay = {};\n\t each(obj, function (v, k) {\n\t return argDisplay[k] = getArgDisplay(v, gottenArgs);\n\t });\n\t return argDisplay;\n\t}\n\t\n\tfunction getApiCheckApis() {\n\t var os = checkers.string.optional;\n\t\n\t var checkerFnChecker = checkers.func.withProperties({\n\t type: checkers.oneOfType([checkers.string, checkerTypeType]).optional,\n\t displayName: checkers.string.optional,\n\t shortType: checkers.string.optional,\n\t notOptional: checkers.bool.optional,\n\t notRequired: checkers.bool.optional\n\t });\n\t\n\t var getApiCheckInstanceCheckers = [checkers.shape({\n\t output: checkers.shape({\n\t prefix: checkers.string.optional,\n\t suffix: checkers.string.optional,\n\t docsBaseUrl: checkers.string.optional\n\t }).strict.optional,\n\t verbose: checkers.bool.optional,\n\t disabled: checkers.bool.optional\n\t }).strict.optional, checkers.objectOf(checkerFnChecker).optional];\n\t\n\t var checkApiCheckApi = [checkers.typeOrArrayOf(checkerFnChecker), checkers.any.optional, checkers.shape({\n\t prefix: os, suffix: os, urlSuffix: os, // appended case\n\t onlyPrefix: os, onlySuffix: os, url: os // override case\n\t }).strict.optional];\n\t\n\t return {\n\t checkerFnChecker: checkerFnChecker,\n\t getApiCheckInstanceCheckers: getApiCheckInstanceCheckers,\n\t checkApiCheckApi: checkApiCheckApi\n\t };\n\t}\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar stringify = __webpack_require__(1);\n\t\n\tvar _require = __webpack_require__(2);\n\t\n\tvar typeOf = _require.typeOf;\n\tvar each = _require.each;\n\tvar copy = _require.copy;\n\tvar getCheckerDisplay = _require.getCheckerDisplay;\n\tvar isError = _require.isError;\n\tvar arrayify = _require.arrayify;\n\tvar list = _require.list;\n\tvar getError = _require.getError;\n\tvar nAtL = _require.nAtL;\n\tvar t = _require.t;\n\tvar checkerHelpers = _require.checkerHelpers;\n\tvar undef = _require.undef;\n\tvar setupChecker = checkerHelpers.setupChecker;\n\t\n\tvar checkers = module.exports = getCheckers();\n\tmodule.exports.getCheckers = getCheckers;\n\t\n\tfunction getCheckers(disabled) {\n\t return {\n\t array: typeOfCheckGetter('Array'),\n\t bool: typeOfCheckGetter('Boolean'),\n\t number: typeOfCheckGetter('Number'),\n\t string: typeOfCheckGetter('String'),\n\t func: funcCheckGetter(),\n\t object: objectCheckGetter(),\n\t\n\t emptyObject: emptyObjectCheckGetter(),\n\t\n\t instanceOf: instanceCheckGetter,\n\t oneOf: oneOfCheckGetter,\n\t oneOfType: oneOfTypeCheckGetter,\n\t\n\t arrayOf: arrayOfCheckGetter,\n\t objectOf: objectOfCheckGetter,\n\t typeOrArrayOf: typeOrArrayOfCheckGetter,\n\t\n\t range: rangeCheckGetter,\n\t lessThan: lessThanCheckGetter,\n\t greaterThan: greaterThanCheckGetter,\n\t\n\t shape: getShapeCheckGetter(),\n\t args: argumentsCheckerGetter(),\n\t\n\t any: anyCheckGetter(),\n\t 'null': nullCheckGetter()\n\t\n\t };\n\t\n\t function typeOfCheckGetter(type) {\n\t var lType = type.toLowerCase();\n\t return setupChecker(function typeOfCheckerDefinition(val, name, location) {\n\t if (typeOf(val) !== lType) {\n\t return getError(name, location, type);\n\t }\n\t }, { type: type }, disabled);\n\t }\n\t\n\t function funcCheckGetter() {\n\t var type = 'Function';\n\t var functionChecker = setupChecker(function functionCheckerDefinition(val, name, location) {\n\t if (typeOf(val) !== 'function') {\n\t return getError(name, location, type);\n\t }\n\t }, { type: type }, disabled);\n\t\n\t functionChecker.withProperties = function getWithPropertiesChecker(properties) {\n\t var apiError = checkers.objectOf(checkers.func)(properties, 'properties', 'apiCheck.func.withProperties');\n\t if (isError(apiError)) {\n\t throw apiError;\n\t }\n\t var shapeChecker = checkers.shape(properties, true);\n\t shapeChecker.type.__apiCheckData.type = 'func.withProperties';\n\t\n\t return setupChecker(function functionWithPropertiesChecker(val, name, location) {\n\t var notFunction = checkers.func(val, name, location);\n\t if (isError(notFunction)) {\n\t return notFunction;\n\t }\n\t return shapeChecker(val, name, location);\n\t }, { type: shapeChecker.type, shortType: 'func.withProperties' }, disabled);\n\t };\n\t return functionChecker;\n\t }\n\t\n\t function objectCheckGetter() {\n\t var type = 'Object';\n\t var nullType = 'Object (null ok)';\n\t var objectNullOkChecker = setupChecker(function objectNullOkCheckerDefinition(val, name, location) {\n\t if (typeOf(val) !== 'object') {\n\t return getError(name, location, nullType);\n\t }\n\t }, { type: nullType }, disabled);\n\t\n\t var objectChecker = setupChecker(function objectCheckerDefinition(val, name, location) {\n\t if (val === null || isError(objectNullOkChecker(val, name, location))) {\n\t return getError(name, location, objectChecker.type);\n\t }\n\t }, { type: type, nullOk: objectNullOkChecker }, disabled);\n\t\n\t return objectChecker;\n\t }\n\t\n\t function instanceCheckGetter(classToCheck) {\n\t return setupChecker(function instanceCheckerDefinition(val, name, location) {\n\t if (!(val instanceof classToCheck)) {\n\t return getError(name, location, classToCheck.name);\n\t }\n\t }, { type: classToCheck.name }, disabled);\n\t }\n\t\n\t function oneOfCheckGetter(enums) {\n\t var type = {\n\t __apiCheckData: { optional: false, type: 'enum' },\n\t 'enum': enums\n\t };\n\t var shortType = 'oneOf[' + enums.map(function (enm) {\n\t return stringify(enm);\n\t }).join(', ') + ']';\n\t return setupChecker(function oneOfCheckerDefinition(val, name, location) {\n\t if (!enums.some(function (enm) {\n\t return enm === val;\n\t })) {\n\t return getError(name, location, shortType);\n\t }\n\t }, { type: type, shortType: shortType }, disabled);\n\t }\n\t\n\t function oneOfTypeCheckGetter(typeCheckers) {\n\t var checkersDisplay = typeCheckers.map(function (checker) {\n\t return getCheckerDisplay(checker, { short: true });\n\t });\n\t var shortType = 'oneOfType[' + checkersDisplay.join(', ') + ']';\n\t function type(options) {\n\t if (options && options.short) {\n\t return shortType;\n\t }\n\t return typeCheckers.map(function (checker) {\n\t return getCheckerDisplay(checker, options);\n\t });\n\t }\n\t type.__apiCheckData = { optional: false, type: 'oneOfType' };\n\t return setupChecker(function oneOfTypeCheckerDefinition(val, name, location) {\n\t if (!typeCheckers.some(function (checker) {\n\t return !isError(checker(val, name, location));\n\t })) {\n\t return getError(name, location, shortType);\n\t }\n\t }, { type: type, shortType: shortType }, disabled);\n\t }\n\t\n\t function arrayOfCheckGetter(checker) {\n\t var shortCheckerDisplay = getCheckerDisplay(checker, { short: true });\n\t var shortType = 'arrayOf[' + shortCheckerDisplay + ']';\n\t\n\t function type(options) {\n\t if (options && options.short) {\n\t return shortType;\n\t }\n\t return getCheckerDisplay(checker, options);\n\t }\n\t type.__apiCheckData = { optional: false, type: 'arrayOf' };\n\t\n\t return setupChecker(function arrayOfCheckerDefinition(val, name, location) {\n\t if (isError(checkers.array(val)) || !val.every(function (item) {\n\t return !isError(checker(item));\n\t })) {\n\t return getError(name, location, shortType);\n\t }\n\t }, { type: type, shortType: shortType }, disabled);\n\t }\n\t\n\t function objectOfCheckGetter(checker) {\n\t var checkerDisplay = getCheckerDisplay(checker, { short: true });\n\t var shortType = 'objectOf[' + checkerDisplay + ']';\n\t\n\t function type(options) {\n\t if (options && options.short) {\n\t return shortType;\n\t }\n\t return getCheckerDisplay(checker, options);\n\t }\n\t type.__apiCheckData = { optional: false, type: 'objectOf' };\n\t\n\t return setupChecker(function objectOfCheckerDefinition(val, name, location) {\n\t var notObject = checkers.object(val, name, location);\n\t if (isError(notObject)) {\n\t return notObject;\n\t }\n\t var allTypesSuccess = each(val, function (item, key) {\n\t if (isError(checker(item, key, name))) {\n\t return false;\n\t }\n\t });\n\t if (!allTypesSuccess) {\n\t return getError(name, location, shortType);\n\t }\n\t }, { type: type, shortType: shortType }, disabled);\n\t }\n\t\n\t function typeOrArrayOfCheckGetter(checker) {\n\t var checkerDisplay = getCheckerDisplay(checker, { short: true });\n\t var shortType = 'typeOrArrayOf[' + checkerDisplay + ']';\n\t\n\t function type(options) {\n\t if (options && options.short) {\n\t return shortType;\n\t }\n\t return getCheckerDisplay(checker, options);\n\t }\n\t\n\t type.__apiCheckData = { optional: false, type: 'typeOrArrayOf' };\n\t return setupChecker(function typeOrArrayOfDefinition(val, name, location, obj) {\n\t if (isError(checkers.oneOfType([checker, checkers.arrayOf(checker)])(val, name, location, obj))) {\n\t return getError(name, location, shortType);\n\t }\n\t }, { type: type, shortType: shortType }, disabled);\n\t }\n\t\n\t function getShapeCheckGetter() {\n\t function shapeCheckGetter(shape, nonObject) {\n\t var shapeTypes = {};\n\t each(shape, function (checker, prop) {\n\t shapeTypes[prop] = getCheckerDisplay(checker);\n\t });\n\t function type() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t var ret = {};\n\t var terse = options.terse;\n\t var obj = options.obj;\n\t var addHelpers = options.addHelpers;\n\t\n\t var parentRequired = options.required;\n\t each(shape, function (checker, prop) {\n\t /* eslint complexity:[2, 6] */\n\t var specified = obj && obj.hasOwnProperty(prop);\n\t var required = undef(parentRequired) ? !checker.isOptional : parentRequired;\n\t if (!terse || (specified || !checker.isOptional)) {\n\t ret[prop] = getCheckerDisplay(checker, { terse: terse, obj: obj && obj[prop], required: required, addHelpers: addHelpers });\n\t }\n\t if (addHelpers) {\n\t modifyTypeDisplayToHelpOut(ret, prop, specified, checker, required);\n\t }\n\t });\n\t return ret;\n\t\n\t function modifyTypeDisplayToHelpOut(theRet, prop, specified, checker, required) {\n\t if (!specified && required && !checker.isOptional) {\n\t var item = 'ITEM';\n\t if (checker.type && checker.type.__apiCheckData) {\n\t item = checker.type.__apiCheckData.type.toUpperCase();\n\t }\n\t addHelper('missing', 'MISSING THIS ' + item, ' <-- YOU ARE MISSING THIS');\n\t } else if (specified) {\n\t var error = checker(obj[prop], prop, null, obj);\n\t if (isError(error)) {\n\t addHelper('error', 'THIS IS THE PROBLEM: ' + error.message, ' <-- THIS IS THE PROBLEM: ' + error.message);\n\t }\n\t }\n\t\n\t function addHelper(property, objectMessage, stringMessage) {\n\t if (typeof theRet[prop] === 'string') {\n\t theRet[prop] += stringMessage;\n\t } else {\n\t theRet[prop].__apiCheckData[property] = objectMessage;\n\t }\n\t }\n\t }\n\t }\n\t\n\t type.__apiCheckData = { strict: false, optional: false, type: 'shape' };\n\t var shapeChecker = setupChecker(function shapeCheckerDefinition(val, name, location) {\n\t /* eslint complexity:[2, 6] */\n\t var isObject = !nonObject && checkers.object(val, name, location);\n\t if (isError(isObject)) {\n\t return isObject;\n\t }\n\t var shapePropError = undefined;\n\t location = location ? location + (name ? '/' : '') : '';\n\t name = name || '';\n\t each(shape, function (checker, prop) {\n\t if (val.hasOwnProperty(prop) || !checker.isOptional) {\n\t shapePropError = checker(val[prop], prop, '' + location + name, val);\n\t return !isError(shapePropError);\n\t }\n\t });\n\t if (isError(shapePropError)) {\n\t return shapePropError;\n\t }\n\t }, { type: type, shortType: 'shape' }, disabled);\n\t\n\t function strictType() {\n\t return type.apply(undefined, arguments);\n\t }\n\t\n\t strictType.__apiCheckData = copy(shapeChecker.type.__apiCheckData);\n\t strictType.__apiCheckData.strict = true;\n\t shapeChecker.strict = setupChecker(function strictShapeCheckerDefinition(val, name, location) {\n\t var shapeError = shapeChecker(val, name, location);\n\t if (isError(shapeError)) {\n\t return shapeError;\n\t }\n\t var allowedProperties = Object.keys(shape);\n\t var extraProps = Object.keys(val).filter(function (prop) {\n\t return allowedProperties.indexOf(prop) === -1;\n\t });\n\t if (extraProps.length) {\n\t return new Error(nAtL(name, location) + ' cannot have extra properties: ' + t(extraProps.join('`, `')) + '.' + ('It is limited to ' + t(allowedProperties.join('`, `'))));\n\t }\n\t }, { type: strictType, shortType: 'strict shape' }, disabled);\n\t\n\t return shapeChecker;\n\t }\n\t\n\t shapeCheckGetter.ifNot = function ifNot(otherProps, propChecker) {\n\t if (!Array.isArray(otherProps)) {\n\t otherProps = [otherProps];\n\t }\n\t var description = undefined;\n\t if (otherProps.length === 1) {\n\t description = 'specified only if ' + otherProps[0] + ' is not specified';\n\t } else {\n\t description = 'specified only if none of the following are specified: [' + list(otherProps, ', ', 'and ') + ']';\n\t }\n\t var shortType = 'ifNot[' + otherProps.join(', ') + ']';\n\t var type = getTypeForShapeChild(propChecker, description, shortType);\n\t return setupChecker(function ifNotChecker(prop, propName, location, obj) {\n\t var propExists = obj && obj.hasOwnProperty(propName);\n\t var otherPropsExist = otherProps.some(function (otherProp) {\n\t return obj && obj.hasOwnProperty(otherProp);\n\t });\n\t if (propExists === otherPropsExist) {\n\t return getError(propName, location, type);\n\t } else if (propExists) {\n\t return propChecker(prop, propName, location, obj);\n\t }\n\t }, { notRequired: true, type: type, shortType: shortType }, disabled);\n\t };\n\t\n\t shapeCheckGetter.onlyIf = function onlyIf(otherProps, propChecker) {\n\t otherProps = arrayify(otherProps);\n\t var description = undefined;\n\t if (otherProps.length === 1) {\n\t description = 'specified only if ' + otherProps[0] + ' is also specified';\n\t } else {\n\t description = 'specified only if all of the following are specified: [' + list(otherProps, ', ', 'and ') + ']';\n\t }\n\t var shortType = 'onlyIf[' + otherProps.join(', ') + ']';\n\t var type = getTypeForShapeChild(propChecker, description, shortType);\n\t return setupChecker(function onlyIfCheckerDefinition(prop, propName, location, obj) {\n\t var othersPresent = otherProps.every(function (property) {\n\t return obj.hasOwnProperty(property);\n\t });\n\t if (!othersPresent) {\n\t return getError(propName, location, type);\n\t } else {\n\t return propChecker(prop, propName, location, obj);\n\t }\n\t }, { type: type, shortType: shortType }, disabled);\n\t };\n\t\n\t shapeCheckGetter.requiredIfNot = function shapeRequiredIfNot(otherProps, propChecker) {\n\t if (!Array.isArray(otherProps)) {\n\t otherProps = [otherProps];\n\t }\n\t return getRequiredIfNotChecker(false, otherProps, propChecker);\n\t };\n\t\n\t shapeCheckGetter.requiredIfNot.all = function shapeRequiredIfNotAll(otherProps, propChecker) {\n\t if (!Array.isArray(otherProps)) {\n\t throw new Error('requiredIfNot.all must be passed an array');\n\t }\n\t return getRequiredIfNotChecker(true, otherProps, propChecker);\n\t };\n\t\n\t function getRequiredIfNotChecker(all, otherProps, propChecker) {\n\t var props = t(otherProps.join(', '));\n\t var ifProps = 'if ' + (all ? 'all of' : 'at least one of');\n\t var description = 'specified ' + ifProps + ' these are not specified: ' + props + ' (otherwise it\\'s optional)';\n\t var shortType = 'requiredIfNot' + (all ? '.all' : '') + '[' + otherProps.join(', ') + '}]';\n\t var type = getTypeForShapeChild(propChecker, description, shortType);\n\t return setupChecker(function shapeRequiredIfNotDefinition(prop, propName, location, obj) {\n\t var propExists = obj && obj.hasOwnProperty(propName);\n\t var iteration = all ? 'every' : 'some';\n\t var otherPropsExist = otherProps[iteration](function (otherProp) {\n\t return obj && obj.hasOwnProperty(otherProp);\n\t });\n\t if (!otherPropsExist && !propExists) {\n\t return getError(propName, location, type);\n\t } else if (propExists) {\n\t return propChecker(prop, propName, location, obj);\n\t }\n\t }, { type: type, notRequired: true }, disabled);\n\t }\n\t\n\t return shapeCheckGetter;\n\t\n\t function getTypeForShapeChild(propChecker, description, shortType) {\n\t function type(options) {\n\t if (options && options.short) {\n\t return shortType;\n\t }\n\t return getCheckerDisplay(propChecker);\n\t }\n\t type.__apiCheckData = { optional: false, type: 'ifNot', description: description };\n\t return type;\n\t }\n\t }\n\t\n\t function argumentsCheckerGetter() {\n\t var type = 'function arguments';\n\t return setupChecker(function argsCheckerDefinition(val, name, location) {\n\t if (Array.isArray(val) || isError(checkers.object(val)) || isError(checkers.number(val.length))) {\n\t return getError(name, location, type);\n\t }\n\t }, { type: type }, disabled);\n\t }\n\t\n\t function anyCheckGetter() {\n\t return setupChecker(function anyCheckerDefinition() {\n\t // don't do anything\n\t }, { type: 'any' }, disabled);\n\t }\n\t\n\t function nullCheckGetter() {\n\t var type = 'null';\n\t return setupChecker(function nullChecker(val, name, location) {\n\t if (val !== null) {\n\t return getError(name, location, type);\n\t }\n\t }, { type: type }, disabled);\n\t }\n\t\n\t function rangeCheckGetter(min, max) {\n\t var type = 'Range (' + min + ' - ' + max + ')';\n\t return setupChecker(function rangeChecker(val, name, location) {\n\t if (typeof val !== 'number' || val < min || val > max) {\n\t return getError(name, location, type);\n\t }\n\t }, { type: type }, disabled);\n\t }\n\t\n\t function lessThanCheckGetter(min) {\n\t var type = 'lessThan[' + min + ']';\n\t return setupChecker(function lessThanChecker(val, name, location) {\n\t if (typeof val !== 'number' || val > min) {\n\t return getError(name, location, type);\n\t }\n\t }, { type: type }, disabled);\n\t }\n\t\n\t function greaterThanCheckGetter(max) {\n\t var type = 'greaterThan[' + max + ']';\n\t return setupChecker(function greaterThanChecker(val, name, location) {\n\t if (typeof val !== 'number' || val < max) {\n\t return getError(name, location, type);\n\t }\n\t }, { type: type }, disabled);\n\t }\n\t\n\t function emptyObjectCheckGetter() {\n\t var type = 'empty object';\n\t return setupChecker(function emptyObjectChecker(val, name, location) {\n\t if (typeOf(val) !== 'object' || val === null || Object.keys(val).length) {\n\t return getError(name, location, type);\n\t }\n\t }, { type: type }, disabled);\n\t }\n\t}\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** dist/api-check.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 0063d8845a3f72305aa5\n **/","import apiCheckFactory from './api-check';\n\nexport default apiCheckFactory;\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./index.js\n **/","module.exports = stringify;\n\nfunction getSerialize (fn, decycle) {\n var seen = [], keys = [];\n decycle = decycle || function(key, value) {\n return '[Circular ' + getPath(value, seen, keys) + ']'\n };\n return function(key, value) {\n var ret = value;\n if (typeof value === 'object' && value) {\n if (seen.indexOf(value) !== -1)\n ret = decycle(key, value);\n else {\n seen.push(value);\n keys.push(key);\n }\n }\n if (fn) ret = fn(key, ret);\n return ret;\n }\n}\n\nfunction getPath (value, seen, keys) {\n var index = seen.indexOf(value);\n var path = [ keys[index] ];\n for (index--; index >= 0; index--) {\n if (seen[index][ path[0] ] === value) {\n value = seen[index];\n path.unshift(keys[index]);\n }\n }\n return '~' + path.join('.');\n}\n\nfunction stringify(obj, fn, spaces, decycle) {\n return JSON.stringify(obj, getSerialize(fn, decycle), spaces);\n}\n\nstringify.getSerialize = getSerialize;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ../~/json-stringify-safe/stringify.js\n ** module id = 1\n ** module chunks = 0\n **/","const stringify = require('json-stringify-safe');\nconst checkerHelpers = {\n addOptional, getRequiredVersion, setupChecker, addNullable\n};\n\nmodule.exports = {\n each, copy, typeOf, arrayify, getCheckerDisplay,\n isError, list, getError, nAtL, t, undef, checkerHelpers,\n noop\n};\n\nfunction copy(obj) {\n const type = typeOf(obj);\n let daCopy;\n if (type === 'array') {\n daCopy = [];\n } else if (type === 'object') {\n daCopy = {};\n } else {\n return obj;\n }\n each(obj, (val, key) => {\n daCopy[key] = val; // cannot single-line this because we don't want to abort the each\n });\n return daCopy;\n}\n\n\nfunction typeOf(obj) {\n if (Array.isArray(obj)) {\n return 'array';\n } else if (obj instanceof RegExp) {\n return 'object';\n } else {\n return typeof obj;\n }\n}\n\nfunction getCheckerDisplay(checker, options) {\n /* eslint complexity:[2, 7] */\n let display;\n const short = options && options.short;\n if (short && checker.shortType) {\n display = checker.shortType;\n } else if (!short && typeof checker.type === 'object' || checker.type === 'function') {\n display = getCheckerType(checker, options);\n } else {\n display = getCheckerType(checker, options) || checker.displayName || checker.name;\n }\n return display;\n}\n\nfunction getCheckerType({type}, options) {\n if (typeof type === 'function') {\n const __apiCheckData = type.__apiCheckData;\n const typeTypes = type(options);\n type = {\n __apiCheckData,\n [__apiCheckData.type]: typeTypes\n };\n }\n return type;\n}\n\nfunction arrayify(obj) {\n if (!obj) {\n return [];\n } else if (Array.isArray(obj)) {\n return obj;\n } else {\n return [obj];\n }\n}\n\n\nfunction each(obj, iterator, context) {\n if (Array.isArray(obj)) {\n return eachArry(obj, iterator, context);\n } else {\n return eachObj(obj, iterator, context);\n }\n}\n\nfunction eachObj(obj, iterator, context) {\n let ret;\n const hasOwn = Object.prototype.hasOwnProperty;\n /* eslint prefer-const:0 */ // some weird eslint bug?\n for (let key in obj) {\n if (hasOwn.call(obj, key)) {\n ret = iterator.call(context, obj[key], key, obj);\n if (ret === false) {\n return ret;\n }\n }\n }\n return true;\n}\n\nfunction eachArry(obj, iterator, context) {\n let ret;\n const length = obj.length;\n for (let i = 0; i < length; i++) {\n ret = iterator.call(context, obj[i], i, obj);\n if (ret === false) {\n return ret;\n }\n }\n return true;\n}\n\nfunction isError(obj) {\n return obj instanceof Error;\n}\n\nfunction list(arry, join, finalJoin) {\n arry = arrayify(arry);\n const copy = arry.slice();\n const last = copy.pop();\n if (copy.length === 1) {\n join = ' ';\n }\n return copy.join(join) + `${copy.length ? join + finalJoin : ''}${last}`;\n}\n\n\nfunction getError(name, location, checkerType) {\n if (typeof checkerType === 'function') {\n checkerType = checkerType({short: true});\n }\n const stringType = typeof checkerType !== 'object' ? checkerType : stringify(checkerType);\n return new Error(`${nAtL(name, location)} must be ${t(stringType)}`);\n}\n\nfunction nAtL(name, location) {\n const tName = t(name || 'value');\n let tLocation = !location ? '' : ' at ' + t(location);\n return `${tName}${tLocation}`;\n}\n\nfunction t(thing) {\n return '`' + thing + '`';\n}\n\nfunction undef(thing) {\n return typeof thing === 'undefined';\n}\n\n\n/**\n * This will set up the checker with all of the defaults that most checkers want like required by default and an\n * optional version\n *\n * @param {Function} checker - the checker to setup with properties\n * @param {Object} properties - properties to add to the checker\n * @param {boolean} disabled - when set to true, this will set the checker to a no-op function\n * @returns {Function} checker - the setup checker\n */\nfunction setupChecker(checker, properties, disabled) {\n /* eslint complexity:[2, 9] */\n if (disabled) { // swap out the checker for its own copy of noop\n checker = getNoop();\n checker.isNoop = true;\n }\n\n if (typeof checker.type === 'string') {\n checker.shortType = checker.type;\n }\n\n // assign all properties given\n each(properties, (prop, name) => checker[name] = prop);\n\n if (!checker.displayName) {\n checker.displayName = `apiCheck ${t(checker.shortType || checker.type || checker.name)} type checker`;\n }\n\n\n if (!checker.notRequired) {\n checker = getRequiredVersion(checker, disabled);\n }\n\n if (!checker.notNullable) {\n addNullable(checker, disabled);\n }\n\n if (!checker.notOptional) {\n addOptional(checker, disabled);\n }\n\n return checker;\n}\n\nfunction getRequiredVersion(checker, disabled) {\n const requiredChecker = disabled ? getNoop() : function requiredChecker(val, name, location, obj) {\n if (undef(val) && !checker.isOptional) {\n let tLocation = location ? ` in ${t(location)}` : '';\n const type = getCheckerDisplay(checker, {short: true});\n const stringType = typeof type !== 'object' ? type : stringify(type);\n return new Error(`Required ${t(name)} not specified${tLocation}. Must be ${t(stringType)}`);\n } else {\n return checker(val, name, location, obj);\n }\n };\n copyProps(checker, requiredChecker);\n requiredChecker.originalChecker = checker;\n return requiredChecker;\n}\n\nfunction addOptional(checker, disabled) {\n const optionalCheck = disabled ? getNoop() : function optionalCheck(val, name, location, obj) {\n if (!undef(val)) {\n return checker(val, name, location, obj);\n }\n };\n // inherit all properties on the original checker\n copyProps(checker, optionalCheck);\n\n optionalCheck.isOptional = true;\n optionalCheck.displayName = checker.displayName + ' (optional)';\n optionalCheck.originalChecker = checker;\n\n\n // the magic line that allows you to add .optional to the end of the checkers\n checker.optional = optionalCheck;\n\n fixType(checker, checker.optional);\n}\n\nfunction addNullable(checker, disabled) {\n const nullableCheck = disabled ? getNoop() : function nullableCheck(val, name, location, obj) {\n if (val !== null) {\n return checker(val, name, location, obj);\n }\n };\n // inherit all properties on the original checker\n copyProps(checker, nullableCheck);\n\n nullableCheck.isNullable = true;\n nullableCheck.displayName = checker.displayName + ' (nullable)';\n nullableCheck.originalChecker = checker;\n\n // the magic line that allows you to add .nullable to the end of the checkers\n checker.nullable = nullableCheck;\n\n fixType(checker, checker.nullable);\n if (!checker.notOptional) {\n addOptional(checker.nullable, disabled);\n }\n}\n\nfunction fixType(checker, checkerCopy) {\n // fix type, because it's not a straight copy...\n // the reason is we need to specify type.__apiCheckData.optional as true for the terse/verbose option.\n // we also want to add \"(optional)\" to the types with a string\n if (typeof checkerCopy.type === 'object') {\n checkerCopy.type = copy(checkerCopy.type); // make our own copy of this\n } else if (typeof checkerCopy.type === 'function') {\n checkerCopy.type = function() {\n return checker.type(...arguments);\n };\n } else {\n checkerCopy.type += ' (optional)';\n return;\n }\n checkerCopy.type.__apiCheckData = copy(checker.type.__apiCheckData) || {}; // and this\n checkerCopy.type.__apiCheckData.optional = true;\n}\n\n\n// UTILS\n\nfunction copyProps(src, dest) {\n each(Object.keys(src), key => dest[key] = src[key]);\n}\n\nfunction noop() {\n}\n\nfunction getNoop() {\n /* eslint no-shadow:0 */\n /* istanbul ignore next */\n return function noop() {\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./api-check-util.js\n **/","const stringify = require('json-stringify-safe');\nconst apiCheckUtil = require('./api-check-util');\nconst {each, isError, t, arrayify, getCheckerDisplay, typeOf, getError} = apiCheckUtil;\nconst checkers = require('./checkers');\nconst apiCheckApis = getApiCheckApis();\n\nmodule.exports = getApiCheckInstance;\nmodule.exports.VERSION = VERSION;\nmodule.exports.utils = apiCheckUtil;\nmodule.exports.globalConfig = {\n verbose: false,\n disabled: false\n};\n\nconst apiCheckApiCheck = getApiCheckInstance({\n output: {prefix: 'apiCheck'}\n});\nmodule.exports.internalChecker = apiCheckApiCheck;\n\n\neach(checkers, (checker, name) => module.exports[name] = checker);\n\nfunction getApiCheckInstance(config = {}, extraCheckers = {}) {\n /* eslint complexity:[2, 6] */\n if (apiCheckApiCheck && arguments.length) {\n apiCheckApiCheck.throw(apiCheckApis.getApiCheckInstanceCheckers, arguments, {\n prefix: 'creating an apiCheck instance'\n });\n }\n\n const additionalProperties = {\n throw: getApiCheck(true),\n warn: getApiCheck(false),\n getErrorMessage,\n handleErrorMessage,\n config: {\n output: config.output || {\n prefix: '',\n suffix: '',\n docsBaseUrl: ''\n },\n verbose: config.verbose || false,\n disabled: config.disabled || false\n },\n utils: apiCheckUtil\n };\n\n each(additionalProperties, (wrapper, name) => apiCheck[name] = wrapper);\n\n const disabled = apiCheck.disabled || module.exports.globalConfig.disabled;\n each(checkers.getCheckers(disabled), (checker, name) => apiCheck[name] = checker);\n each(extraCheckers, (checker, name) => apiCheck[name] = checker);\n\n return apiCheck;\n\n\n /**\n * This is the instance function. Other things are attached to this see additional properties above.\n * @param {Array} api - the checkers to check with\n * @param {Array} args - the args to check\n * @param {Object} output - output options\n * @returns {Object} - if this has a failed = true property, then it failed\n */\n function apiCheck(api, args, output) {\n /* eslint complexity:[2, 8] */\n if (apiCheck.config.disabled || module.exports.globalConfig.disabled) {\n return {\n apiTypes: {}, argTypes: {},\n passed: true, message: '',\n failed: false\n }; // empty version of what is normally returned\n }\n checkApiCheckApi(arguments);\n if (!Array.isArray(api)) {\n api = [api];\n args = [args];\n } else {\n // turn arguments into an array\n args = Array.prototype.slice.call(args);\n }\n let messages = checkEnoughArgs(api, args);\n if (!messages.length) {\n // this is where we actually go perform the checks.\n messages = checkApiWithArgs(api, args);\n }\n\n const returnObject = getTypes(api, args);\n returnObject.args = args;\n if (messages.length) {\n returnObject.message = apiCheck.getErrorMessage(api, args, messages, output);\n returnObject.failed = true;\n returnObject.passed = false;\n } else {\n returnObject.message = '';\n returnObject.failed = false;\n returnObject.passed = true;\n }\n return returnObject;\n }\n\n /**\n * checkApiCheckApi, should be read like: check apiCheck api. As in, check the api for apiCheck :-)\n * @param {Array} checkApiArgs - args provided to apiCheck function\n */\n function checkApiCheckApi(checkApiArgs) {\n const api = checkApiArgs[0];\n const args = checkApiArgs[1];\n const isArrayOrArgs = Array.isArray(args) || (args && typeof args === 'object' && typeof args.length === 'number');\n\n if (Array.isArray(api) && !isArrayOrArgs) {\n throw new Error(getErrorMessage(api, [args],\n ['If an array is provided for the api, an array must be provided for the args as well.'],\n {prefix: 'apiCheck'}\n ));\n }\n // dog fooding here\n const errors = checkApiWithArgs(apiCheckApis.checkApiCheckApi, checkApiArgs);\n if (errors.length) {\n const message = apiCheck.getErrorMessage(apiCheckApis.checkApiCheckApi, checkApiArgs, errors, {\n prefix: 'apiCheck'\n });\n apiCheck.handleErrorMessage(message, true);\n }\n }\n\n\n function getApiCheck(shouldThrow) {\n return function apiCheckWrapper(api, args, output) {\n const result = apiCheck(api, args, output);\n apiCheck.handleErrorMessage(result.message, shouldThrow);\n return result; // wont get here if an error is thrown\n };\n }\n\n function handleErrorMessage(message, shouldThrow) {\n if (shouldThrow && message) {\n throw new Error(message);\n } else if (message) {\n /* eslint no-console:0 */\n console.warn(message);\n }\n }\n\n function getErrorMessage(api, args, messages = [], output = {}) {\n const gOut = apiCheck.config.output || {};\n const prefix = getPrefix();\n const suffix = getSuffix();\n const url = getUrl();\n const message = `apiCheck failed! ${messages.join(', ')}`;\n const passedAndShouldHavePassed = '\\n\\n' + buildMessageFromApiAndArgs(api, args);\n return `${prefix} ${message} ${suffix} ${url || ''}${passedAndShouldHavePassed}`.trim();\n\n function getPrefix() {\n let p = output.onlyPrefix;\n if (!p) {\n p = `${gOut.prefix || ''} ${output.prefix || ''}`.trim();\n }\n return p;\n }\n\n function getSuffix() {\n let s = output.onlySuffix;\n if (!s) {\n s = `${output.suffix || ''} ${gOut.suffix || ''}`.trim();\n }\n return s;\n }\n\n function getUrl() {\n let u = output.url;\n if (!u) {\n u = gOut.docsBaseUrl && output.urlSuffix && `${gOut.docsBaseUrl}${output.urlSuffix}`.trim();\n }\n return u;\n }\n }\n\n function buildMessageFromApiAndArgs(api, args) {\n let {apiTypes, argTypes} = getTypes(api, args);\n const copy = Array.prototype.slice.call(args || []);\n const replacedItems = [];\n replaceFunctionWithName(copy);\n const passedArgs = getObjectString(copy);\n argTypes = getObjectString(argTypes);\n apiTypes = getObjectString(apiTypes);\n\n return generateMessage();\n\n\n // functions\n\n function replaceFunctionWithName(obj) {\n each(obj, (val, name) => {\n /* eslint complexity:[2, 6] */\n if (replacedItems.indexOf(val) === -1) { // avoid recursive problems\n replacedItems.push(val);\n if (typeof val === 'object') {\n replaceFunctionWithName(obj);\n } else if (typeof val === 'function') {\n obj[name] = val.displayName || val.name || 'anonymous function';\n }\n }\n });\n }\n\n function getObjectString(types) {\n if (!types || !types.length) {\n return 'nothing';\n } else if (types && types.length === 1) {\n types = types[0];\n }\n return stringify(types, null, 2);\n }\n\n function generateMessage() {\n const n = '\\n';\n let useS = true;\n if (args && args.length === 1) {\n if (typeof args[0] === 'object' && args[0] !== null) {\n useS = !!Object.keys(args[0]).length;\n } else {\n useS = false;\n }\n }\n const types = `type${useS ? 's' : ''}`;\n const newLine = n + n;\n return `You passed:${n}${passedArgs}${newLine}` +\n `With the ${types}:${n}${argTypes}${newLine}` +\n `The API calls for:${n}${apiTypes}`;\n }\n }\n\n function getTypes(api, args) {\n api = arrayify(api);\n args = arrayify(args);\n const apiTypes = api.map((checker, index) => {\n const specified = module.exports.globalConfig.hasOwnProperty('verbose');\n return getCheckerDisplay(checker, {\n terse: specified ? !module.exports.globalConfig.verbose : !apiCheck.config.verbose,\n obj: args[index],\n addHelpers: true\n });\n });\n const argTypes = args.map((arg) => getArgDisplay(arg, []));\n return {argTypes, apiTypes};\n }\n\n}\n\n\n// STATELESS FUNCTIONS\n\n/**\n * This is where the magic happens for actually checking the arguments with the api.\n * @param {Array} api - checkers\n * @param {Array} args - and arguments object\n * @returns {Array} - the error messages\n */\nfunction checkApiWithArgs(api, args) {\n /* eslint complexity:[2, 7] */\n const messages = [];\n let failed = false;\n let checkerIndex = 0;\n let argIndex = 0;\n let arg, checker, res, lastChecker, argName, argFailed, skipPreviousChecker;\n /* jshint -W084 */\n while ((checker = api[checkerIndex++]) && (argIndex < args.length)) {\n arg = args[argIndex++];\n argName = 'Argument ' + argIndex + (checker.isOptional ? ' (optional)' : '');\n res = checker(arg, 'value', argName);\n argFailed = isError(res);\n lastChecker = checkerIndex >= api.length;\n skipPreviousChecker = checkerIndex > 1 && api[checkerIndex - 1].isOptional;\n if ((argFailed && lastChecker) || (argFailed && !lastChecker && !checker.isOptional && !skipPreviousChecker)) {\n failed = true;\n messages.push(getCheckerErrorMessage(res, checker, arg));\n } else if (argFailed && checker.isOptional) {\n argIndex--;\n } else {\n messages.push(`${t(argName)} passed`);\n }\n }\n return failed ? messages : [];\n}\n\n\ncheckerTypeType.type = 'function with __apiCheckData property and `${function.type}` property';\nfunction checkerTypeType(checkerType, name, location) {\n const apiCheckDataChecker = checkers.shape({\n type: checkers.string,\n optional: checkers.bool\n });\n const asFunc = checkers.func.withProperties({__apiCheckData: apiCheckDataChecker});\n const asShape = checkers.shape({__apiCheckData: apiCheckDataChecker});\n const wrongShape = checkers.oneOfType([\n asFunc, asShape\n ])(checkerType, name, location);\n if (isError(wrongShape)) {\n return wrongShape;\n }\n if (typeof checkerType !== 'function' && !checkerType.hasOwnProperty(checkerType.__apiCheckData.type)) {\n return getError(name, location, checkerTypeType.type);\n }\n}\n\nfunction getCheckerErrorMessage(res, checker, val) {\n let checkerHelp = getCheckerHelp(checker, val);\n checkerHelp = checkerHelp ? ' - ' + checkerHelp : '';\n return res.message + checkerHelp;\n}\n\nfunction getCheckerHelp({help}, val) {\n if (!help) {\n return '';\n }\n if (typeof help === 'function') {\n help = help(val);\n }\n return help;\n}\n\n\nfunction checkEnoughArgs(api, args) {\n const requiredArgs = api.filter(a => !a.isOptional);\n if (args.length < requiredArgs.length) {\n return [\n 'Not enough arguments specified. Requires `' + requiredArgs.length + '`, you passed `' + args.length + '`'\n ];\n } else {\n return [];\n }\n}\n\nfunction getArgDisplay(arg, gottenArgs) {\n /* eslint complexity:[2, 7] */\n const cName = arg && arg.constructor && arg.constructor.name;\n const type = typeOf(arg);\n if (type === 'function') {\n if (hasKeys()) {\n const properties = stringify(getDisplayIfNotGotten());\n return cName + ' (with properties: ' + properties + ')';\n }\n return cName;\n }\n\n if (arg === null) {\n return 'null';\n }\n\n if (type !== 'array' && type !== 'object') {\n return type;\n }\n\n if (hasKeys()) {\n return getDisplayIfNotGotten();\n }\n\n return cName;\n\n // utility functions\n function hasKeys() {\n return arg && Object.keys(arg).length;\n }\n\n function getDisplayIfNotGotten() {\n if (gottenArgs.indexOf(arg) !== -1) {\n return '[Circular]';\n }\n gottenArgs.push(arg);\n return getDisplay(arg, gottenArgs);\n }\n}\n\nfunction getDisplay(obj, gottenArgs) {\n const argDisplay = {};\n each(obj, (v, k) => argDisplay[k] = getArgDisplay(v, gottenArgs));\n return argDisplay;\n}\n\nfunction getApiCheckApis() {\n const os = checkers.string.optional;\n\n const checkerFnChecker = checkers.func.withProperties({\n type: checkers.oneOfType([checkers.string, checkerTypeType]).optional,\n displayName: checkers.string.optional,\n shortType: checkers.string.optional,\n notOptional: checkers.bool.optional,\n notRequired: checkers.bool.optional\n });\n\n const getApiCheckInstanceCheckers = [\n checkers.shape({\n output: checkers.shape({\n prefix: checkers.string.optional,\n suffix: checkers.string.optional,\n docsBaseUrl: checkers.string.optional\n }).strict.optional,\n verbose: checkers.bool.optional,\n disabled: checkers.bool.optional\n }).strict.optional,\n checkers.objectOf(checkerFnChecker).optional\n ];\n\n const checkApiCheckApi = [\n checkers.typeOrArrayOf(checkerFnChecker),\n checkers.any.optional,\n checkers.shape({\n prefix: os, suffix: os, urlSuffix: os, // appended case\n onlyPrefix: os, onlySuffix: os, url: os // override case\n }).strict.optional\n ];\n\n return {\n checkerFnChecker,\n getApiCheckInstanceCheckers,\n checkApiCheckApi\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./api-check.js\n **/","const stringify = require('json-stringify-safe');\nconst {\n typeOf, each, copy, getCheckerDisplay, isError,\n arrayify, list, getError, nAtL, t, checkerHelpers,\n undef\n } = require('./api-check-util');\nconst {setupChecker} = checkerHelpers;\n\nconst checkers = module.exports = getCheckers();\nmodule.exports.getCheckers = getCheckers;\n\nfunction getCheckers(disabled) {\n return {\n array: typeOfCheckGetter('Array'),\n bool: typeOfCheckGetter('Boolean'),\n number: typeOfCheckGetter('Number'),\n string: typeOfCheckGetter('String'),\n func: funcCheckGetter(),\n object: objectCheckGetter(),\n\n emptyObject: emptyObjectCheckGetter(),\n\n instanceOf: instanceCheckGetter,\n oneOf: oneOfCheckGetter,\n oneOfType: oneOfTypeCheckGetter,\n\n arrayOf: arrayOfCheckGetter,\n objectOf: objectOfCheckGetter,\n typeOrArrayOf: typeOrArrayOfCheckGetter,\n\n range: rangeCheckGetter,\n lessThan: lessThanCheckGetter,\n greaterThan: greaterThanCheckGetter,\n\n shape: getShapeCheckGetter(),\n args: argumentsCheckerGetter(),\n\n any: anyCheckGetter(),\n null: nullCheckGetter()\n\n };\n\n function typeOfCheckGetter(type) {\n const lType = type.toLowerCase();\n return setupChecker(function typeOfCheckerDefinition(val, name, location) {\n if (typeOf(val) !== lType) {\n return getError(name, location, type);\n }\n }, {type}, disabled);\n }\n\n function funcCheckGetter() {\n const type = 'Function';\n const functionChecker = setupChecker(function functionCheckerDefinition(val, name, location) {\n if (typeOf(val) !== 'function') {\n return getError(name, location, type);\n }\n }, {type}, disabled);\n\n functionChecker.withProperties = function getWithPropertiesChecker(properties) {\n const apiError = checkers.objectOf(checkers.func)(properties, 'properties', 'apiCheck.func.withProperties');\n if (isError(apiError)) {\n throw apiError;\n }\n const shapeChecker = checkers.shape(properties, true);\n shapeChecker.type.__apiCheckData.type = 'func.withProperties';\n\n return setupChecker(function functionWithPropertiesChecker(val, name, location) {\n const notFunction = checkers.func(val, name, location);\n if (isError(notFunction)) {\n return notFunction;\n }\n return shapeChecker(val, name, location);\n }, {type: shapeChecker.type, shortType: 'func.withProperties'}, disabled);\n };\n return functionChecker;\n }\n\n function objectCheckGetter() {\n const type = 'Object';\n const nullType = 'Object (null ok)';\n const objectNullOkChecker = setupChecker(function objectNullOkCheckerDefinition(val, name, location) {\n if (typeOf(val) !== 'object') {\n return getError(name, location, nullType);\n }\n }, {type: nullType}, disabled);\n\n const objectChecker = setupChecker(function objectCheckerDefinition(val, name, location) {\n if (val === null || isError(objectNullOkChecker(val, name, location))) {\n return getError(name, location, objectChecker.type);\n }\n }, {type, nullOk: objectNullOkChecker}, disabled);\n\n return objectChecker;\n }\n\n\n function instanceCheckGetter(classToCheck) {\n return setupChecker(function instanceCheckerDefinition(val, name, location) {\n if (!(val instanceof classToCheck)) {\n return getError(name, location, classToCheck.name);\n }\n }, {type: classToCheck.name}, disabled);\n }\n\n function oneOfCheckGetter(enums) {\n const type = {\n __apiCheckData: {optional: false, type: 'enum'},\n enum: enums\n };\n const shortType = `oneOf[${enums.map(enm => stringify(enm)).join(', ')}]`;\n return setupChecker(function oneOfCheckerDefinition(val, name, location) {\n if (!enums.some(enm => enm === val)) {\n return getError(name, location, shortType);\n }\n }, {type, shortType}, disabled);\n }\n\n function oneOfTypeCheckGetter(typeCheckers) {\n const checkersDisplay = typeCheckers.map((checker) => getCheckerDisplay(checker, {short: true}));\n const shortType = `oneOfType[${checkersDisplay.join(', ')}]`;\n function type(options) {\n if (options && options.short) {\n return shortType;\n }\n return typeCheckers.map((checker) => getCheckerDisplay(checker, options));\n }\n type.__apiCheckData = {optional: false, type: 'oneOfType'};\n return setupChecker(function oneOfTypeCheckerDefinition(val, name, location) {\n if (!typeCheckers.some(checker => !isError(checker(val, name, location)))) {\n return getError(name, location, shortType);\n }\n }, {type, shortType}, disabled);\n }\n\n function arrayOfCheckGetter(checker) {\n const shortCheckerDisplay = getCheckerDisplay(checker, {short: true});\n const shortType = `arrayOf[${shortCheckerDisplay}]`;\n\n function type(options) {\n if (options && options.short) {\n return shortType;\n }\n return getCheckerDisplay(checker, options);\n }\n type.__apiCheckData = {optional: false, type: 'arrayOf'};\n\n return setupChecker(function arrayOfCheckerDefinition(val, name, location) {\n if (isError(checkers.array(val)) || !val.every((item) => !isError(checker(item)))) {\n return getError(name, location, shortType);\n }\n }, {type, shortType}, disabled);\n }\n\n function objectOfCheckGetter(checker) {\n const checkerDisplay = getCheckerDisplay(checker, {short: true});\n const shortType = `objectOf[${checkerDisplay}]`;\n\n function type(options) {\n if (options && options.short) {\n return shortType;\n }\n return getCheckerDisplay(checker, options);\n }\n type.__apiCheckData = {optional: false, type: 'objectOf'};\n\n return setupChecker(function objectOfCheckerDefinition(val, name, location) {\n const notObject = checkers.object(val, name, location);\n if (isError(notObject)) {\n return notObject;\n }\n const allTypesSuccess = each(val, (item, key) => {\n if (isError(checker(item, key, name))) {\n return false;\n }\n });\n if (!allTypesSuccess) {\n return getError(name, location, shortType);\n }\n }, {type, shortType}, disabled);\n }\n\n function typeOrArrayOfCheckGetter(checker) {\n const checkerDisplay = getCheckerDisplay(checker, {short: true});\n const shortType = `typeOrArrayOf[${checkerDisplay}]`;\n\n function type(options) {\n if (options && options.short) {\n return shortType;\n }\n return getCheckerDisplay(checker, options);\n }\n\n type.__apiCheckData = {optional: false, type: 'typeOrArrayOf'};\n return setupChecker(function typeOrArrayOfDefinition(val, name, location, obj) {\n if (isError(checkers.oneOfType([checker, checkers.arrayOf(checker)])(val, name, location, obj))) {\n return getError(name, location, shortType);\n }\n }, {type, shortType}, disabled);\n }\n\n function getShapeCheckGetter() {\n function shapeCheckGetter(shape, nonObject) {\n const shapeTypes = {};\n each(shape, (checker, prop) => {\n shapeTypes[prop] = getCheckerDisplay(checker);\n });\n function type(options = {}) {\n const ret = {};\n const {terse, obj, addHelpers} = options;\n const parentRequired = options.required;\n each(shape, (checker, prop) => {\n /* eslint complexity:[2, 6] */\n const specified = obj && obj.hasOwnProperty(prop);\n const required = undef(parentRequired) ? !checker.isOptional : parentRequired;\n if (!terse || (specified || !checker.isOptional)) {\n ret[prop] = getCheckerDisplay(checker, {terse, obj: obj && obj[prop], required, addHelpers});\n }\n if (addHelpers) {\n modifyTypeDisplayToHelpOut(ret, prop, specified, checker, required);\n }\n });\n return ret;\n\n function modifyTypeDisplayToHelpOut(theRet, prop, specified, checker, required) {\n if (!specified && required && !checker.isOptional) {\n let item = 'ITEM';\n if (checker.type && checker.type.__apiCheckData) {\n item = checker.type.__apiCheckData.type.toUpperCase();\n }\n addHelper('missing', `MISSING THIS ${item}`, ' <-- YOU ARE MISSING THIS');\n } else if (specified) {\n const error = checker(obj[prop], prop, null, obj);\n if (isError(error)) {\n addHelper('error', `THIS IS THE PROBLEM: ${error.message}`, ` <-- THIS IS THE PROBLEM: ${error.message}`);\n }\n }\n\n function addHelper(property, objectMessage, stringMessage) {\n if (typeof theRet[prop] === 'string') {\n theRet[prop] += stringMessage;\n } else {\n theRet[prop].__apiCheckData[property] = objectMessage;\n }\n }\n }\n }\n\n type.__apiCheckData = {strict: false, optional: false, type: 'shape'};\n const shapeChecker = setupChecker(function shapeCheckerDefinition(val, name, location) {\n /* eslint complexity:[2, 6] */\n const isObject = !nonObject && checkers.object(val, name, location);\n if (isError(isObject)) {\n return isObject;\n }\n let shapePropError;\n location = location ? location + (name ? '/' : '') : '';\n name = name || '';\n each(shape, (checker, prop) => {\n if (val.hasOwnProperty(prop) || !checker.isOptional) {\n shapePropError = checker(val[prop], prop, `${location}${name}`, val);\n return !isError(shapePropError);\n }\n });\n if (isError(shapePropError)) {\n return shapePropError;\n }\n }, {type, shortType: 'shape'}, disabled);\n\n function strictType() {\n return type(...arguments);\n }\n\n strictType.__apiCheckData = copy(shapeChecker.type.__apiCheckData);\n strictType.__apiCheckData.strict = true;\n shapeChecker.strict = setupChecker(function strictShapeCheckerDefinition(val, name, location) {\n const shapeError = shapeChecker(val, name, location);\n if (isError(shapeError)) {\n return shapeError;\n }\n const allowedProperties = Object.keys(shape);\n const extraProps = Object.keys(val).filter(prop => allowedProperties.indexOf(prop) === -1);\n if (extraProps.length) {\n return new Error(\n `${nAtL(name, location)} cannot have extra properties: ${t(extraProps.join('`, `'))}.` +\n `It is limited to ${t(allowedProperties.join('`, `'))}`\n );\n }\n }, {type: strictType, shortType: 'strict shape'}, disabled);\n\n return shapeChecker;\n }\n\n shapeCheckGetter.ifNot = function ifNot(otherProps, propChecker) {\n if (!Array.isArray(otherProps)) {\n otherProps = [otherProps];\n }\n let description;\n if (otherProps.length === 1) {\n description = `specified only if ${otherProps[0]} is not specified`;\n } else {\n description = `specified only if none of the following are specified: [${list(otherProps, ', ', 'and ')}]`;\n }\n const shortType = `ifNot[${otherProps.join(', ')}]`;\n const type = getTypeForShapeChild(propChecker, description, shortType);\n return setupChecker(function ifNotChecker(prop, propName, location, obj) {\n const propExists = obj && obj.hasOwnProperty(propName);\n const otherPropsExist = otherProps.some(otherProp => obj && obj.hasOwnProperty(otherProp));\n if (propExists === otherPropsExist) {\n return getError(propName, location, type);\n } else if (propExists) {\n return propChecker(prop, propName, location, obj);\n }\n }, {notRequired: true, type, shortType}, disabled);\n };\n\n shapeCheckGetter.onlyIf = function onlyIf(otherProps, propChecker) {\n otherProps = arrayify(otherProps);\n let description;\n if (otherProps.length === 1) {\n description = `specified only if ${otherProps[0]} is also specified`;\n } else {\n description = `specified only if all of the following are specified: [${list(otherProps, ', ', 'and ')}]`;\n }\n const shortType = `onlyIf[${otherProps.join(', ')}]`;\n const type = getTypeForShapeChild(propChecker, description, shortType);\n return setupChecker(function onlyIfCheckerDefinition(prop, propName, location, obj) {\n const othersPresent = otherProps.every(property => obj.hasOwnProperty(property));\n if (!othersPresent) {\n return getError(propName, location, type);\n } else {\n return propChecker(prop, propName, location, obj);\n }\n }, {type, shortType}, disabled);\n };\n\n shapeCheckGetter.requiredIfNot = function shapeRequiredIfNot(otherProps, propChecker) {\n if (!Array.isArray(otherProps)) {\n otherProps = [otherProps];\n }\n return getRequiredIfNotChecker(false, otherProps, propChecker);\n };\n\n shapeCheckGetter.requiredIfNot.all = function shapeRequiredIfNotAll(otherProps, propChecker) {\n if (!Array.isArray(otherProps)) {\n throw new Error('requiredIfNot.all must be passed an array');\n }\n return getRequiredIfNotChecker(true, otherProps, propChecker);\n };\n\n function getRequiredIfNotChecker(all, otherProps, propChecker) {\n const props = t(otherProps.join(', '));\n const ifProps = `if ${all ? 'all of' : 'at least one of'}`;\n const description = `specified ${ifProps} these are not specified: ${props} (otherwise it's optional)`;\n const shortType = `requiredIfNot${all ? '.all' : ''}[${otherProps.join(', ')}}]`;\n const type = getTypeForShapeChild(propChecker, description, shortType);\n return setupChecker(function shapeRequiredIfNotDefinition(prop, propName, location, obj) {\n const propExists = obj && obj.hasOwnProperty(propName);\n const iteration = all ? 'every' : 'some';\n const otherPropsExist = otherProps[iteration](function(otherProp) {\n return obj && obj.hasOwnProperty(otherProp);\n });\n if (!otherPropsExist && !propExists) {\n return getError(propName, location, type);\n } else if (propExists) {\n return propChecker(prop, propName, location, obj);\n }\n }, {type, notRequired: true}, disabled);\n }\n\n return shapeCheckGetter;\n\n function getTypeForShapeChild(propChecker, description, shortType) {\n function type(options) {\n if (options && options.short) {\n return shortType;\n }\n return getCheckerDisplay(propChecker);\n }\n type.__apiCheckData = {optional: false, type: 'ifNot', description};\n return type;\n }\n }\n\n function argumentsCheckerGetter() {\n const type = 'function arguments';\n return setupChecker(function argsCheckerDefinition(val, name, location) {\n if (Array.isArray(val) || isError(checkers.object(val)) || isError(checkers.number(val.length))) {\n return getError(name, location, type);\n }\n }, {type}, disabled);\n }\n\n function anyCheckGetter() {\n return setupChecker(function anyCheckerDefinition() {\n // don't do anything\n }, {type: 'any'}, disabled);\n }\n\n function nullCheckGetter() {\n const type = 'null';\n return setupChecker(function nullChecker(val, name, location) {\n if (val !== null) {\n return getError(name, location, type);\n }\n }, {type}, disabled);\n }\n\n function rangeCheckGetter(min, max) {\n const type = `Range (${min} - ${max})`;\n return setupChecker(function rangeChecker(val, name, location) {\n if (typeof val !== 'number' || val < min || val > max) {\n return getError(name, location, type);\n }\n }, {type}, disabled);\n }\n\n function lessThanCheckGetter(min) {\n const type = `lessThan[${min}]`;\n return setupChecker(function lessThanChecker(val, name, location) {\n if (typeof val !== 'number' || val > min) {\n return getError(name, location, type);\n }\n }, {type}, disabled);\n }\n\n function greaterThanCheckGetter(max) {\n const type = `greaterThan[${max}]`;\n return setupChecker(function greaterThanChecker(val, name, location) {\n if (typeof val !== 'number' || val < max) {\n return getError(name, location, type);\n }\n }, {type}, disabled);\n }\n\n function emptyObjectCheckGetter() {\n const type = 'empty object';\n return setupChecker(function emptyObjectChecker(val, name, location) {\n if (typeOf(val) !== 'object' || val === null || Object.keys(val).length) {\n return getError(name, location, type);\n }\n }, {type}, disabled);\n }\n\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./checkers.js\n **/"],"sourceRoot":""} |