11/*!
22 * js-data-schema
3- * @version 1.2.3 - Homepage <https://github.com/js-data/js-data-schema/>
3+ * @version 1.2.4 - Homepage <https://github.com/js-data/js-data-schema/>
44 * @author Jason Dobry <[email protected] > 55 * @copyright (c) 2013-2015 Jason Dobry
66 * @license MIT <https://github.com/js-data/js-data-schema/blob/master/LICENSE>
@@ -732,11 +732,7 @@ return /******/ (function(modules) { // webpackBootstrap
732732 type : value
733733 } ;
734734 } else if ( utils . isObject ( value ) ) {
735- if ( utils . contains ( rules , key ) ) {
736- throw new Error ( "Rule configuration for rule \"" + key + "\" cannot be an object!" ) ;
737- } else {
738- _validateSchema ( value , rules ) ;
739- }
735+ _validateSchema ( value , rules ) ;
740736 }
741737 } ) ;
742738 }
@@ -1339,7 +1335,7 @@ return /******/ (function(modules) { // webpackBootstrap
13391335/* 26 */
13401336/***/ function ( module , exports , __webpack_require__ ) {
13411337
1342- var indexOf = __webpack_require__ ( 42 ) ;
1338+ var indexOf = __webpack_require__ ( 40 ) ;
13431339
13441340 /**
13451341 * If array contains values.
@@ -1356,8 +1352,8 @@ return /******/ (function(modules) { // webpackBootstrap
13561352/***/ function ( module , exports , __webpack_require__ ) {
13571353
13581354 var unique = __webpack_require__ ( 29 ) ;
1359- var filter = __webpack_require__ ( 40 ) ;
1360- var every = __webpack_require__ ( 41 ) ;
1355+ var filter = __webpack_require__ ( 41 ) ;
1356+ var every = __webpack_require__ ( 42 ) ;
13611357 var contains = __webpack_require__ ( 26 ) ;
13621358 var slice = __webpack_require__ ( 36 ) ;
13631359
@@ -1386,7 +1382,7 @@ return /******/ (function(modules) { // webpackBootstrap
13861382/***/ function ( module , exports , __webpack_require__ ) {
13871383
13881384 var unique = __webpack_require__ ( 29 ) ;
1389- var filter = __webpack_require__ ( 40 ) ;
1385+ var filter = __webpack_require__ ( 41 ) ;
13901386 var some = __webpack_require__ ( 43 ) ;
13911387 var contains = __webpack_require__ ( 26 ) ;
13921388 var slice = __webpack_require__ ( 36 ) ;
@@ -1414,7 +1410,7 @@ return /******/ (function(modules) { // webpackBootstrap
14141410/* 29 */
14151411/***/ function ( module , exports , __webpack_require__ ) {
14161412
1417- var filter = __webpack_require__ ( 40 ) ;
1413+ var filter = __webpack_require__ ( 41 ) ;
14181414
14191415 /**
14201416 * @return {array } Array of unique items
@@ -1670,9 +1666,9 @@ return /******/ (function(modules) { // webpackBootstrap
16701666/* 37 */
16711667/***/ function ( module , exports , __webpack_require__ ) {
16721668
1673- var identity = __webpack_require__ ( 46 ) ;
1674- var prop = __webpack_require__ ( 47 ) ;
1675- var deepMatches = __webpack_require__ ( 48 ) ;
1669+ var identity = __webpack_require__ ( 45 ) ;
1670+ var prop = __webpack_require__ ( 46 ) ;
1671+ var deepMatches = __webpack_require__ ( 47 ) ;
16761672
16771673 /**
16781674 * Converts argument into a valid iterator.
@@ -1710,7 +1706,7 @@ return /******/ (function(modules) { // webpackBootstrap
17101706/* 38 */
17111707/***/ function ( module , exports , __webpack_require__ ) {
17121708
1713- var clone = __webpack_require__ ( 45 ) ;
1709+ var clone = __webpack_require__ ( 48 ) ;
17141710 var forOwn = __webpack_require__ ( 19 ) ;
17151711 var kindOf = __webpack_require__ ( 44 ) ;
17161712 var isPlainObject = __webpack_require__ ( 33 ) ;
@@ -1785,6 +1781,40 @@ return /******/ (function(modules) { // webpackBootstrap
17851781/* 40 */
17861782/***/ function ( module , exports , __webpack_require__ ) {
17871783
1784+
1785+
1786+ /**
1787+ * Array.indexOf
1788+ */
1789+ function indexOf ( arr , item , fromIndex ) {
1790+ fromIndex = fromIndex || 0 ;
1791+ if ( arr == null ) {
1792+ return - 1 ;
1793+ }
1794+
1795+ var len = arr . length ,
1796+ i = fromIndex < 0 ? len + fromIndex : fromIndex ;
1797+ while ( i < len ) {
1798+ // we iterate over sparse items since there is no way to make it
1799+ // work properly on IE 7-8. see #64
1800+ if ( arr [ i ] === item ) {
1801+ return i ;
1802+ }
1803+
1804+ i ++ ;
1805+ }
1806+
1807+ return - 1 ;
1808+ }
1809+
1810+ module . exports = indexOf ;
1811+
1812+
1813+
1814+ /***/ } ,
1815+ /* 41 */
1816+ /***/ function ( module , exports , __webpack_require__ ) {
1817+
17881818 var makeIterator = __webpack_require__ ( 37 ) ;
17891819
17901820 /**
@@ -1814,7 +1844,7 @@ return /******/ (function(modules) { // webpackBootstrap
18141844
18151845
18161846/***/ } ,
1817- /* 41 */
1847+ /* 42 */
18181848/***/ function ( module , exports , __webpack_require__ ) {
18191849
18201850 var makeIterator = __webpack_require__ ( 37 ) ;
@@ -1846,40 +1876,6 @@ return /******/ (function(modules) { // webpackBootstrap
18461876
18471877
18481878
1849- /***/ } ,
1850- /* 42 */
1851- /***/ function ( module , exports , __webpack_require__ ) {
1852-
1853-
1854-
1855- /**
1856- * Array.indexOf
1857- */
1858- function indexOf ( arr , item , fromIndex ) {
1859- fromIndex = fromIndex || 0 ;
1860- if ( arr == null ) {
1861- return - 1 ;
1862- }
1863-
1864- var len = arr . length ,
1865- i = fromIndex < 0 ? len + fromIndex : fromIndex ;
1866- while ( i < len ) {
1867- // we iterate over sparse items since there is no way to make it
1868- // work properly on IE 7-8. see #64
1869- if ( arr [ i ] === item ) {
1870- return i ;
1871- }
1872-
1873- i ++ ;
1874- }
1875-
1876- return - 1 ;
1877- }
1878-
1879- module . exports = indexOf ;
1880-
1881-
1882-
18831879/***/ } ,
18841880/* 43 */
18851881/***/ function ( module , exports , __webpack_require__ ) {
@@ -1943,61 +1939,6 @@ return /******/ (function(modules) { // webpackBootstrap
19431939/* 45 */
19441940/***/ function ( module , exports , __webpack_require__ ) {
19451941
1946- var kindOf = __webpack_require__ ( 44 ) ;
1947- var isPlainObject = __webpack_require__ ( 33 ) ;
1948- var mixIn = __webpack_require__ ( 49 ) ;
1949-
1950- /**
1951- * Clone native types.
1952- */
1953- function clone ( val ) {
1954- switch ( kindOf ( val ) ) {
1955- case 'Object' :
1956- return cloneObject ( val ) ;
1957- case 'Array' :
1958- return cloneArray ( val ) ;
1959- case 'RegExp' :
1960- return cloneRegExp ( val ) ;
1961- case 'Date' :
1962- return cloneDate ( val ) ;
1963- default :
1964- return val ;
1965- }
1966- }
1967-
1968- function cloneObject ( source ) {
1969- if ( isPlainObject ( source ) ) {
1970- return mixIn ( { } , source ) ;
1971- } else {
1972- return source ;
1973- }
1974- }
1975-
1976- function cloneRegExp ( r ) {
1977- var flags = '' ;
1978- flags += r . multiline ? 'm' : '' ;
1979- flags += r . global ? 'g' : '' ;
1980- flags += r . ignoreCase ? 'i' : '' ;
1981- return new RegExp ( r . source , flags ) ;
1982- }
1983-
1984- function cloneDate ( date ) {
1985- return new Date ( + date ) ;
1986- }
1987-
1988- function cloneArray ( arr ) {
1989- return arr . slice ( ) ;
1990- }
1991-
1992- module . exports = clone ;
1993-
1994-
1995-
1996-
1997- /***/ } ,
1998- /* 46 */
1999- /***/ function ( module , exports , __webpack_require__ ) {
2000-
20011942
20021943
20031944 /**
@@ -2013,7 +1954,7 @@ return /******/ (function(modules) { // webpackBootstrap
20131954
20141955
20151956/***/ } ,
2016- /* 47 */
1957+ /* 46 */
20171958/***/ function ( module , exports , __webpack_require__ ) {
20181959
20191960
@@ -2033,7 +1974,7 @@ return /******/ (function(modules) { // webpackBootstrap
20331974
20341975
20351976/***/ } ,
2036- /* 48 */
1977+ /* 47 */
20371978/***/ function ( module , exports , __webpack_require__ ) {
20381979
20391980 var forOwn = __webpack_require__ ( 19 ) ;
@@ -2093,6 +2034,61 @@ return /******/ (function(modules) { // webpackBootstrap
20932034
20942035
20952036
2037+ /***/ } ,
2038+ /* 48 */
2039+ /***/ function ( module , exports , __webpack_require__ ) {
2040+
2041+ var kindOf = __webpack_require__ ( 44 ) ;
2042+ var isPlainObject = __webpack_require__ ( 33 ) ;
2043+ var mixIn = __webpack_require__ ( 49 ) ;
2044+
2045+ /**
2046+ * Clone native types.
2047+ */
2048+ function clone ( val ) {
2049+ switch ( kindOf ( val ) ) {
2050+ case 'Object' :
2051+ return cloneObject ( val ) ;
2052+ case 'Array' :
2053+ return cloneArray ( val ) ;
2054+ case 'RegExp' :
2055+ return cloneRegExp ( val ) ;
2056+ case 'Date' :
2057+ return cloneDate ( val ) ;
2058+ default :
2059+ return val ;
2060+ }
2061+ }
2062+
2063+ function cloneObject ( source ) {
2064+ if ( isPlainObject ( source ) ) {
2065+ return mixIn ( { } , source ) ;
2066+ } else {
2067+ return source ;
2068+ }
2069+ }
2070+
2071+ function cloneRegExp ( r ) {
2072+ var flags = '' ;
2073+ flags += r . multiline ? 'm' : '' ;
2074+ flags += r . global ? 'g' : '' ;
2075+ flags += r . ignoreCase ? 'i' : '' ;
2076+ return new RegExp ( r . source , flags ) ;
2077+ }
2078+
2079+ function cloneDate ( date ) {
2080+ return new Date ( + date ) ;
2081+ }
2082+
2083+ function cloneArray ( arr ) {
2084+ return arr . slice ( ) ;
2085+ }
2086+
2087+ module . exports = clone ;
2088+
2089+
2090+
2091+
20962092/***/ } ,
20972093/* 49 */
20982094/***/ function ( module , exports , __webpack_require__ ) {
0 commit comments