1- //! api-check version 7.5.3 built with ♥ by Kent C. Dodds <[email protected] > (http://kent.doddsfamily.us) (ó ì_í)=óò=(ì_í ò) 1+ //! api-check version 7.5.4 built with ♥ by Kent C. Dodds <[email protected] > (http://kent.doddsfamily.us) (ó ì_í)=óò=(ì_í ò) 22
33( function webpackUniversalModuleDefinition ( root , factory ) {
44 if ( typeof exports === 'object' && typeof module === 'object' )
@@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap
9191 var apiCheckApis = getApiCheckApis ( ) ;
9292
9393 module . exports = getApiCheckInstance ;
94- module . exports . VERSION = ( "7.5.3 " ) ;
94+ module . exports . VERSION = ( "7.5.4 " ) ;
9595 module . exports . utils = apiCheckUtil ;
9696 module . exports . globalConfig = {
9797 verbose : false ,
@@ -108,8 +108,8 @@ return /******/ (function(modules) { // webpackBootstrap
108108 } ) ;
109109
110110 function getApiCheckInstance ( ) {
111- var config = arguments [ 0 ] === undefined ? { } : arguments [ 0 ] ;
112- var extraCheckers = arguments [ 1 ] === undefined ? { } : arguments [ 1 ] ;
111+ var config = arguments . length <= 0 || arguments [ 0 ] === undefined ? { } : arguments [ 0 ] ;
112+ var extraCheckers = arguments . length <= 1 || arguments [ 1 ] === undefined ? { } : arguments [ 1 ] ;
113113
114114 /* eslint complexity:[2, 6] */
115115 if ( apiCheckApiCheck && arguments . length ) {
@@ -233,37 +233,37 @@ return /******/ (function(modules) { // webpackBootstrap
233233 }
234234
235235 function getErrorMessage ( api , args ) {
236- var messages = arguments [ 2 ] === undefined ? [ ] : arguments [ 2 ] ;
237- var output = arguments [ 3 ] === undefined ? { } : arguments [ 3 ] ;
236+ var messages = arguments . length <= 2 || arguments [ 2 ] === undefined ? [ ] : arguments [ 2 ] ;
237+ var output = arguments . length <= 3 || arguments [ 3 ] === undefined ? { } : arguments [ 3 ] ;
238238
239239 var gOut = apiCheck . config . output || { } ;
240240 var prefix = getPrefix ( ) ;
241241 var suffix = getSuffix ( ) ;
242242 var url = getUrl ( ) ;
243243 var message = 'apiCheck failed! ' + messages . join ( ', ' ) ;
244244 var passedAndShouldHavePassed = '\n\n' + buildMessageFromApiAndArgs ( api , args ) ;
245- return ( '' + prefix + ' ' + message + ' ' + suffix + ' ' + ( url || '' ) + '' + passedAndShouldHavePassed ) . trim ( ) ;
245+ return ( prefix + ' ' + message + ' ' + suffix + ' ' + ( url || '' ) + passedAndShouldHavePassed ) . trim ( ) ;
246246
247247 function getPrefix ( ) {
248248 var p = output . onlyPrefix ;
249249 if ( ! p ) {
250- p = ( '' + ( gOut . prefix || '' ) + ' ' + ( output . prefix || '' ) ) . trim ( ) ;
250+ p = ( ( gOut . prefix || '' ) + ' ' + ( output . prefix || '' ) ) . trim ( ) ;
251251 }
252252 return p ;
253253 }
254254
255255 function getSuffix ( ) {
256256 var s = output . onlySuffix ;
257257 if ( ! s ) {
258- s = ( '' + ( output . suffix || '' ) + ' ' + ( gOut . suffix || '' ) ) . trim ( ) ;
258+ s = ( ( output . suffix || '' ) + ' ' + ( gOut . suffix || '' ) ) . trim ( ) ;
259259 }
260260 return s ;
261261 }
262262
263263 function getUrl ( ) {
264264 var u = output . url ;
265265 if ( ! u ) {
266- u = gOut . docsBaseUrl && output . urlSuffix && ( '' + gOut . docsBaseUrl + '' + output . urlSuffix ) . trim ( ) ;
266+ u = gOut . docsBaseUrl && output . urlSuffix && ( '' + gOut . docsBaseUrl + output . urlSuffix ) . trim ( ) ;
267267 }
268268 return u ;
269269 }
@@ -322,7 +322,7 @@ return /******/ (function(modules) { // webpackBootstrap
322322 }
323323 var types = 'type' + ( useS ? 's' : '' ) ;
324324 var newLine = n + n ;
325- return 'You passed:' + n + '' + passedArgs + '' + newLine + ( 'With the ' + types + ':' + n + '' + argTypes + '' + newLine ) + ( 'The API calls for:' + n + '' + apiTypes ) ;
325+ return 'You passed:' + n + passedArgs + newLine + ( 'With the ' + types + ':' + n + argTypes + newLine ) + ( 'The API calls for:' + n + apiTypes ) ;
326326 }
327327 }
328328
@@ -379,7 +379,7 @@ return /******/ (function(modules) { // webpackBootstrap
379379 } else if ( argFailed && checker . isOptional ) {
380380 argIndex -- ;
381381 } else {
382- messages . push ( '' + t ( argName ) + ' passed' ) ;
382+ messages . push ( t ( argName ) + ' passed' ) ;
383383 }
384384 }
385385 return failed ? messages : [ ] ;
@@ -563,7 +563,7 @@ return /******/ (function(modules) { // webpackBootstrap
563563
564564 'use strict' ;
565565
566- function _defineProperty ( obj , key , value ) { return Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; }
566+ function _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 ; }
567567
568568 var stringify = __webpack_require__ ( 2 ) ;
569569 var checkerHelpers = {
@@ -685,21 +685,21 @@ return /******/ (function(modules) { // webpackBootstrap
685685 if ( copy . length === 1 ) {
686686 join = ' ' ;
687687 }
688- return copy . join ( join ) + ( '' + ( copy . length ? join + finalJoin : '' ) + '' + last ) ;
688+ return copy . join ( join ) + ( '' + ( copy . length ? join + finalJoin : '' ) + last ) ;
689689 }
690690
691691 function getError ( name , location , checkerType ) {
692692 if ( typeof checkerType === 'function' ) {
693693 checkerType = checkerType ( { short : true } ) ;
694694 }
695695 var stringType = typeof checkerType !== 'object' ? checkerType : stringify ( checkerType ) ;
696- return new Error ( '' + nAtL ( name , location ) + ' must be ' + t ( stringType ) ) ;
696+ return new Error ( nAtL ( name , location ) + ' must be ' + t ( stringType ) ) ;
697697 }
698698
699699 function nAtL ( name , location ) {
700700 var tName = t ( name || 'value' ) ;
701701 var tLocation = ! location ? '' : ' at ' + t ( location ) ;
702- return '' + tName + '' + tLocation ;
702+ return '' + tName + tLocation ;
703703 }
704704
705705 function t ( thing ) {
@@ -819,13 +819,13 @@ return /******/ (function(modules) { // webpackBootstrap
819819 if ( typeof checkerCopy . type === 'object' ) {
820820 checkerCopy . type = copy ( checkerCopy . type ) ; // make our own copy of this
821821 } else if ( typeof checkerCopy . type === 'function' ) {
822- checkerCopy . type = function ( ) {
823- return checker . type . apply ( checker , arguments ) ;
824- } ;
825- } else {
826- checkerCopy . type += ' (optional)' ;
827- return ;
828- }
822+ checkerCopy . type = function ( ) {
823+ return checker . type . apply ( checker , arguments ) ;
824+ } ;
825+ } else {
826+ checkerCopy . type += ' (optional)' ;
827+ return ;
828+ }
829829 checkerCopy . type . __apiCheckData = copy ( checker . type . __apiCheckData ) || { } ; // and this
830830 checkerCopy . type . __apiCheckData . optional = true ;
831831 }
@@ -1081,7 +1081,7 @@ return /******/ (function(modules) { // webpackBootstrap
10811081 shapeTypes [ prop ] = getCheckerDisplay ( checker ) ;
10821082 } ) ;
10831083 function type ( ) {
1084- var options = arguments [ 0 ] === undefined ? { } : arguments [ 0 ] ;
1084+ var options = arguments . length <= 0 || arguments [ 0 ] === undefined ? { } : arguments [ 0 ] ;
10851085
10861086 var ret = { } ;
10871087 var terse = options . terse ;
@@ -1138,7 +1138,7 @@ return /******/ (function(modules) { // webpackBootstrap
11381138 name = name || '' ;
11391139 each ( shape , function ( checker , prop ) {
11401140 if ( val . hasOwnProperty ( prop ) || ! checker . isOptional ) {
1141- shapePropError = checker ( val [ prop ] , prop , '' + location + '' + name , val ) ;
1141+ shapePropError = checker ( val [ prop ] , prop , '' + location + name , val ) ;
11421142 return ! isError ( shapePropError ) ;
11431143 }
11441144 } ) ;
@@ -1163,7 +1163,7 @@ return /******/ (function(modules) { // webpackBootstrap
11631163 return allowedProperties . indexOf ( prop ) === - 1 ;
11641164 } ) ;
11651165 if ( extraProps . length ) {
1166- return new Error ( '' + nAtL ( name , location ) + ' cannot have extra properties: ' + t ( extraProps . join ( '`, `' ) ) + '.' + ( 'It is limited to ' + t ( allowedProperties . join ( '`, `' ) ) ) ) ;
1166+ return new Error ( nAtL ( name , location ) + ' cannot have extra properties: ' + t ( extraProps . join ( '`, `' ) ) + '.' + ( 'It is limited to ' + t ( allowedProperties . join ( '`, `' ) ) ) ) ;
11671167 }
11681168 } , { type : strictType , shortType : 'strict shape' } , disabled ) ;
11691169
@@ -1275,7 +1275,9 @@ return /******/ (function(modules) { // webpackBootstrap
12751275 }
12761276
12771277 function anyCheckGetter ( ) {
1278- return setupChecker ( function anyCheckerDefinition ( ) { } , { type : 'any' } , disabled ) ;
1278+ return setupChecker ( function anyCheckerDefinition ( ) {
1279+ // don't do anything
1280+ } , { type : 'any' } , disabled ) ;
12791281 }
12801282
12811283 function nullCheckGetter ( ) {
@@ -1324,8 +1326,6 @@ return /******/ (function(modules) { // webpackBootstrap
13241326 }
13251327 }
13261328
1327- // don't do anything
1328-
13291329/***/ }
13301330/******/ ] )
13311331} ) ;
0 commit comments