1
1
/*!
2
2
* js-data-firebase
3
- * @version 2.1.0 - Homepage <http://www.js-data.io/docs/dsfirebaseadapter>
3
+ * @version 2.1.1 - Homepage <http://www.js-data.io/docs/dsfirebaseadapter>
4
4
* @author Jason Dobry <[email protected] >
5
5
* @copyright (c) 2014-2015 Jason Dobry
6
6
* @license MIT <https://github.com/js-data/js-data-firebase/blob/master/LICENSE>
@@ -172,11 +172,14 @@ return /******/ (function(modules) { // webpackBootstrap
172
172
if ( containedName ) {
173
173
( function ( ) {
174
174
var __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
175
+ __options [ 'with' ] = options [ 'with' ] . slice ( ) ;
175
176
__options = DSUtils . _ ( relationDef , __options ) ;
176
177
DSUtils . remove ( __options [ 'with' ] , containedName ) ;
177
178
DSUtils . forEach ( __options [ 'with' ] , function ( relation , i ) {
178
179
if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
179
180
__options [ 'with' ] [ i ] = relation . substr ( containedName . length + 1 ) ;
181
+ } else {
182
+ __options [ 'with' ] [ i ] = '' ;
180
183
}
181
184
} ) ;
182
185
@@ -513,7 +516,7 @@ return /******/ (function(modules) { // webpackBootstrap
513
516
/* 3 */
514
517
/***/ function ( module , exports , __webpack_require__ ) {
515
518
516
- var forOwn = __webpack_require__ ( 6 ) ;
519
+ var forOwn = __webpack_require__ ( 8 ) ;
517
520
518
521
/**
519
522
* Get object values
@@ -535,7 +538,7 @@ return /******/ (function(modules) { // webpackBootstrap
535
538
/* 4 */
536
539
/***/ function ( module , exports , __webpack_require__ ) {
537
540
538
- var makeIterator = __webpack_require__ ( 7 ) ;
541
+ var makeIterator = __webpack_require__ ( 6 ) ;
539
542
540
543
/**
541
544
* Array map
@@ -563,7 +566,7 @@ return /******/ (function(modules) { // webpackBootstrap
563
566
/* 5 */
564
567
/***/ function ( module , exports , __webpack_require__ ) {
565
568
566
- var filter = __webpack_require__ ( 8 ) ;
569
+ var filter = __webpack_require__ ( 7 ) ;
567
570
568
571
/**
569
572
* @return {array } Array of unique items
@@ -594,34 +597,9 @@ return /******/ (function(modules) { // webpackBootstrap
594
597
/* 6 */
595
598
/***/ function ( module , exports , __webpack_require__ ) {
596
599
597
- var hasOwn = __webpack_require__ ( 9 ) ;
598
- var forIn = __webpack_require__ ( 10 ) ;
599
-
600
- /**
601
- * Similar to Array/forEach but works over object properties and fixes Don't
602
- * Enum bug on IE.
603
- * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
604
- */
605
- function forOwn ( obj , fn , thisObj ) {
606
- forIn ( obj , function ( val , key ) {
607
- if ( hasOwn ( obj , key ) ) {
608
- return fn . call ( thisObj , obj [ key ] , key , obj ) ;
609
- }
610
- } ) ;
611
- }
612
-
613
- module . exports = forOwn ;
614
-
615
-
616
-
617
-
618
- /***/ } ,
619
- /* 7 */
620
- /***/ function ( module , exports , __webpack_require__ ) {
621
-
622
- var identity = __webpack_require__ ( 11 ) ;
623
- var prop = __webpack_require__ ( 12 ) ;
624
- var deepMatches = __webpack_require__ ( 13 ) ;
600
+ var identity = __webpack_require__ ( 9 ) ;
601
+ var prop = __webpack_require__ ( 10 ) ;
602
+ var deepMatches = __webpack_require__ ( 11 ) ;
625
603
626
604
/**
627
605
* Converts argument into a valid iterator.
@@ -656,10 +634,10 @@ return /******/ (function(modules) { // webpackBootstrap
656
634
657
635
658
636
/***/ } ,
659
- /* 8 */
637
+ /* 7 */
660
638
/***/ function ( module , exports , __webpack_require__ ) {
661
639
662
- var makeIterator = __webpack_require__ ( 7 ) ;
640
+ var makeIterator = __webpack_require__ ( 6 ) ;
663
641
664
642
/**
665
643
* Array filter
@@ -688,107 +666,32 @@ return /******/ (function(modules) { // webpackBootstrap
688
666
689
667
690
668
/***/ } ,
691
- /* 9 */
692
- /***/ function ( module , exports , __webpack_require__ ) {
693
-
694
-
695
-
696
- /**
697
- * Safer Object.hasOwnProperty
698
- */
699
- function hasOwn ( obj , prop ) {
700
- return Object . prototype . hasOwnProperty . call ( obj , prop ) ;
701
- }
702
-
703
- module . exports = hasOwn ;
704
-
705
-
706
-
707
-
708
- /***/ } ,
709
- /* 10 */
669
+ /* 8 */
710
670
/***/ function ( module , exports , __webpack_require__ ) {
711
671
712
- var hasOwn = __webpack_require__ ( 9 ) ;
713
-
714
- var _hasDontEnumBug ,
715
- _dontEnums ;
716
-
717
- function checkDontEnum ( ) {
718
- _dontEnums = [
719
- 'toString' ,
720
- 'toLocaleString' ,
721
- 'valueOf' ,
722
- 'hasOwnProperty' ,
723
- 'isPrototypeOf' ,
724
- 'propertyIsEnumerable' ,
725
- 'constructor'
726
- ] ;
727
-
728
- _hasDontEnumBug = true ;
729
-
730
- for ( var key in { 'toString' : null } ) {
731
- _hasDontEnumBug = false ;
732
- }
733
- }
672
+ var hasOwn = __webpack_require__ ( 12 ) ;
673
+ var forIn = __webpack_require__ ( 13 ) ;
734
674
735
675
/**
736
676
* Similar to Array/forEach but works over object properties and fixes Don't
737
677
* Enum bug on IE.
738
678
* based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
739
679
*/
740
- function forIn ( obj , fn , thisObj ) {
741
- var key , i = 0 ;
742
- // no need to check if argument is a real object that way we can use
743
- // it for arrays, functions, date, etc.
744
-
745
- //post-pone check till needed
746
- if ( _hasDontEnumBug == null ) checkDontEnum ( ) ;
747
-
748
- for ( key in obj ) {
749
- if ( exec ( fn , obj , key , thisObj ) === false ) {
750
- break ;
751
- }
752
- }
753
-
754
-
755
- if ( _hasDontEnumBug ) {
756
- var ctor = obj . constructor ,
757
- isProto = ! ! ctor && obj === ctor . prototype ;
758
-
759
- while ( key = _dontEnums [ i ++ ] ) {
760
- // For constructor, if it is a prototype object the constructor
761
- // is always non-enumerable unless defined otherwise (and
762
- // enumerated above). For non-prototype objects, it will have
763
- // to be defined on this object, since it cannot be defined on
764
- // any prototype objects.
765
- //
766
- // For other [[DontEnum]] properties, check if the value is
767
- // different than Object prototype value.
768
- if (
769
- ( key !== 'constructor' ||
770
- ( ! isProto && hasOwn ( obj , key ) ) ) &&
771
- obj [ key ] !== Object . prototype [ key ]
772
- ) {
773
- if ( exec ( fn , obj , key , thisObj ) === false ) {
774
- break ;
775
- }
776
- }
680
+ function forOwn ( obj , fn , thisObj ) {
681
+ forIn ( obj , function ( val , key ) {
682
+ if ( hasOwn ( obj , key ) ) {
683
+ return fn . call ( thisObj , obj [ key ] , key , obj ) ;
777
684
}
778
- }
779
- }
780
-
781
- function exec ( fn , obj , key , thisObj ) {
782
- return fn . call ( thisObj , obj [ key ] , key , obj ) ;
685
+ } ) ;
783
686
}
784
687
785
- module . exports = forIn ;
688
+ module . exports = forOwn ;
786
689
787
690
788
691
789
692
790
693
/***/ } ,
791
- /* 11 */
694
+ /* 9 */
792
695
/***/ function ( module , exports , __webpack_require__ ) {
793
696
794
697
@@ -806,7 +709,7 @@ return /******/ (function(modules) { // webpackBootstrap
806
709
807
710
808
711
/***/ } ,
809
- /* 12 */
712
+ /* 10 */
810
713
/***/ function ( module , exports , __webpack_require__ ) {
811
714
812
715
@@ -826,10 +729,10 @@ return /******/ (function(modules) { // webpackBootstrap
826
729
827
730
828
731
/***/ } ,
829
- /* 13 */
732
+ /* 11 */
830
733
/***/ function ( module , exports , __webpack_require__ ) {
831
734
832
- var forOwn = __webpack_require__ ( 6 ) ;
735
+ var forOwn = __webpack_require__ ( 8 ) ;
833
736
var isArray = __webpack_require__ ( 14 ) ;
834
737
835
738
function containsMatch ( array , pattern ) {
@@ -886,6 +789,106 @@ return /******/ (function(modules) { // webpackBootstrap
886
789
887
790
888
791
792
+ /***/ } ,
793
+ /* 12 */
794
+ /***/ function ( module , exports , __webpack_require__ ) {
795
+
796
+
797
+
798
+ /**
799
+ * Safer Object.hasOwnProperty
800
+ */
801
+ function hasOwn ( obj , prop ) {
802
+ return Object . prototype . hasOwnProperty . call ( obj , prop ) ;
803
+ }
804
+
805
+ module . exports = hasOwn ;
806
+
807
+
808
+
809
+
810
+ /***/ } ,
811
+ /* 13 */
812
+ /***/ function ( module , exports , __webpack_require__ ) {
813
+
814
+ var hasOwn = __webpack_require__ ( 12 ) ;
815
+
816
+ var _hasDontEnumBug ,
817
+ _dontEnums ;
818
+
819
+ function checkDontEnum ( ) {
820
+ _dontEnums = [
821
+ 'toString' ,
822
+ 'toLocaleString' ,
823
+ 'valueOf' ,
824
+ 'hasOwnProperty' ,
825
+ 'isPrototypeOf' ,
826
+ 'propertyIsEnumerable' ,
827
+ 'constructor'
828
+ ] ;
829
+
830
+ _hasDontEnumBug = true ;
831
+
832
+ for ( var key in { 'toString' : null } ) {
833
+ _hasDontEnumBug = false ;
834
+ }
835
+ }
836
+
837
+ /**
838
+ * Similar to Array/forEach but works over object properties and fixes Don't
839
+ * Enum bug on IE.
840
+ * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
841
+ */
842
+ function forIn ( obj , fn , thisObj ) {
843
+ var key , i = 0 ;
844
+ // no need to check if argument is a real object that way we can use
845
+ // it for arrays, functions, date, etc.
846
+
847
+ //post-pone check till needed
848
+ if ( _hasDontEnumBug == null ) checkDontEnum ( ) ;
849
+
850
+ for ( key in obj ) {
851
+ if ( exec ( fn , obj , key , thisObj ) === false ) {
852
+ break ;
853
+ }
854
+ }
855
+
856
+
857
+ if ( _hasDontEnumBug ) {
858
+ var ctor = obj . constructor ,
859
+ isProto = ! ! ctor && obj === ctor . prototype ;
860
+
861
+ while ( key = _dontEnums [ i ++ ] ) {
862
+ // For constructor, if it is a prototype object the constructor
863
+ // is always non-enumerable unless defined otherwise (and
864
+ // enumerated above). For non-prototype objects, it will have
865
+ // to be defined on this object, since it cannot be defined on
866
+ // any prototype objects.
867
+ //
868
+ // For other [[DontEnum]] properties, check if the value is
869
+ // different than Object prototype value.
870
+ if (
871
+ ( key !== 'constructor' ||
872
+ ( ! isProto && hasOwn ( obj , key ) ) ) &&
873
+ obj [ key ] !== Object . prototype [ key ]
874
+ ) {
875
+ if ( exec ( fn , obj , key , thisObj ) === false ) {
876
+ break ;
877
+ }
878
+ }
879
+ }
880
+ }
881
+ }
882
+
883
+ function exec ( fn , obj , key , thisObj ) {
884
+ return fn . call ( thisObj , obj [ key ] , key , obj ) ;
885
+ }
886
+
887
+ module . exports = forIn ;
888
+
889
+
890
+
891
+
889
892
/***/ } ,
890
893
/* 14 */
891
894
/***/ function ( module , exports , __webpack_require__ ) {
0 commit comments