2
2
'use strict' ;
3
3
4
4
var eachProps = require ( 'each-props' ) ;
5
- var isPlainObject = require ( 'is-plain-object' ) ;
5
+ var isPlainObject = require ( 'is-plain-object' ) . isPlainObject ;
6
6
7
7
module . exports = function ( src , dst , fromto , converter , reverse ) {
8
8
@@ -226,7 +226,7 @@ function isObject(v) {
226
226
return Object . prototype . toString . call ( v ) === '[object Object]' ;
227
227
}
228
228
229
- } , { "each-props" :4 , "is-plain-object" :7 } ] , 2 :[ function ( require , module , exports ) {
229
+ } , { "each-props" :4 , "is-plain-object" :8 } ] , 2 :[ function ( require , module , exports ) {
230
230
/*!
231
231
* array-each <https://github.com/jonschlinkert/array-each>
232
232
*
@@ -368,7 +368,46 @@ function isObject(v) {
368
368
}
369
369
370
370
371
- } , { "is-plain-object" :7 , "object.defaults/immutable" :9 } ] , 5 :[ function ( require , module , exports ) {
371
+ } , { "is-plain-object" :5 , "object.defaults/immutable" :10 } ] , 5 :[ function ( require , module , exports ) {
372
+ /*!
373
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
374
+ *
375
+ * Copyright (c) 2014-2017, Jon Schlinkert.
376
+ * Released under the MIT License.
377
+ */
378
+
379
+ 'use strict' ;
380
+
381
+ var isObject = require ( 'isobject' ) ;
382
+
383
+ function isObjectObject ( o ) {
384
+ return isObject ( o ) === true
385
+ && Object . prototype . toString . call ( o ) === '[object Object]' ;
386
+ }
387
+
388
+ module . exports = function isPlainObject ( o ) {
389
+ var ctor , prot ;
390
+
391
+ if ( isObjectObject ( o ) === false ) return false ;
392
+
393
+ // If has modified constructor
394
+ ctor = o . constructor ;
395
+ if ( typeof ctor !== 'function' ) return false ;
396
+
397
+ // If has modified prototype
398
+ prot = ctor . prototype ;
399
+ if ( isObjectObject ( prot ) === false ) return false ;
400
+
401
+ // If constructor does not have an Object-specific method
402
+ if ( prot . hasOwnProperty ( 'isPrototypeOf' ) === false ) {
403
+ return false ;
404
+ }
405
+
406
+ // Most likely a plain Object
407
+ return true ;
408
+ } ;
409
+
410
+ } , { "isobject" :9 } ] , 6 :[ function ( require , module , exports ) {
372
411
/*!
373
412
* for-in <https://github.com/jonschlinkert/for-in>
374
413
*
@@ -386,7 +425,7 @@ module.exports = function forIn(obj, fn, thisArg) {
386
425
}
387
426
} ;
388
427
389
- } , { } ] , 6 :[ function ( require , module , exports ) {
428
+ } , { } ] , 7 :[ function ( require , module , exports ) {
390
429
/*!
391
430
* for-own <https://github.com/jonschlinkert/for-own>
392
431
*
@@ -407,35 +446,34 @@ module.exports = function forOwn(obj, fn, thisArg) {
407
446
} ) ;
408
447
} ;
409
448
410
- } , { "for-in" :5 } ] , 7 :[ function ( require , module , exports ) {
449
+ } , { "for-in" :6 } ] , 8 :[ function ( require , module , exports ) {
450
+ 'use strict' ;
451
+
452
+ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
453
+
411
454
/*!
412
455
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
413
456
*
414
457
* Copyright (c) 2014-2017, Jon Schlinkert.
415
458
* Released under the MIT License.
416
459
*/
417
460
418
- 'use strict' ;
419
-
420
- var isObject = require ( 'isobject' ) ;
421
-
422
- function isObjectObject ( o ) {
423
- return isObject ( o ) === true
424
- && Object . prototype . toString . call ( o ) === '[object Object]' ;
461
+ function isObject ( o ) {
462
+ return Object . prototype . toString . call ( o ) === '[object Object]' ;
425
463
}
426
464
427
- module . exports = function isPlainObject ( o ) {
465
+ function isPlainObject ( o ) {
428
466
var ctor , prot ;
429
467
430
- if ( isObjectObject ( o ) === false ) return false ;
468
+ if ( isObject ( o ) === false ) return false ;
431
469
432
470
// If has modified constructor
433
471
ctor = o . constructor ;
434
- if ( typeof ctor !== 'function' ) return false ;
472
+ if ( ctor === undefined ) return true ;
435
473
436
474
// If has modified prototype
437
475
prot = ctor . prototype ;
438
- if ( isObjectObject ( prot ) === false ) return false ;
476
+ if ( isObject ( prot ) === false ) return false ;
439
477
440
478
// If constructor does not have an Object-specific method
441
479
if ( prot . hasOwnProperty ( 'isPrototypeOf' ) === false ) {
@@ -444,9 +482,11 @@ module.exports = function isPlainObject(o) {
444
482
445
483
// Most likely a plain Object
446
484
return true ;
447
- } ;
485
+ }
448
486
449
- } , { "isobject" :8 } ] , 8 :[ function ( require , module , exports ) {
487
+ exports . isPlainObject = isPlainObject ;
488
+
489
+ } , { } ] , 9 :[ function ( require , module , exports ) {
450
490
/*!
451
491
* isobject <https://github.com/jonschlinkert/isobject>
452
492
*
@@ -460,7 +500,7 @@ module.exports = function isObject(val) {
460
500
return val != null && typeof val === 'object' && Array . isArray ( val ) === false ;
461
501
} ;
462
502
463
- } , { } ] , 9 :[ function ( require , module , exports ) {
503
+ } , { } ] , 10 :[ function ( require , module , exports ) {
464
504
'use strict' ;
465
505
466
506
var slice = require ( 'array-slice' ) ;
@@ -482,7 +522,7 @@ module.exports = function immutableDefaults() {
482
522
return defaults . apply ( null , [ { } ] . concat ( args ) ) ;
483
523
} ;
484
524
485
- } , { "./mutable" :10 , "array-slice" :3 } ] , 10 :[ function ( require , module , exports ) {
525
+ } , { "./mutable" :11 , "array-slice" :3 } ] , 11 :[ function ( require , module , exports ) {
486
526
'use strict' ;
487
527
488
528
var each = require ( 'array-each' ) ;
@@ -519,5 +559,5 @@ module.exports = function defaults(target, objects) {
519
559
return target ;
520
560
} ;
521
561
522
- } , { "array-each" :2 , "array-slice" :3 , "for-own" :6 , "isobject" :8 } ] } , { } , [ 1 ] ) ( 1 )
562
+ } , { "array-each" :2 , "array-slice" :3 , "for-own" :7 , "isobject" :9 } ] } , { } , [ 1 ] ) ( 1 )
523
563
} ) ;
0 commit comments