-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #15
- Loading branch information
Showing
7 changed files
with
142 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/*! | ||
* js-data-schema | ||
* @version 1.2.3 - Homepage <https://github.com/js-data/js-data-schema/> | ||
* @version 1.2.4 - Homepage <https://github.com/js-data/js-data-schema/> | ||
* @author Jason Dobry <[email protected]> | ||
* @copyright (c) 2013-2015 Jason Dobry | ||
* @license MIT <https://github.com/js-data/js-data-schema/blob/master/LICENSE> | ||
|
@@ -732,11 +732,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
type: value | ||
}; | ||
} else if (utils.isObject(value)) { | ||
if (utils.contains(rules, key)) { | ||
throw new Error("Rule configuration for rule \"" + key + "\" cannot be an object!"); | ||
} else { | ||
_validateSchema(value, rules); | ||
} | ||
_validateSchema(value, rules); | ||
} | ||
}); | ||
} | ||
|
@@ -1339,7 +1335,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
/* 26 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
var indexOf = __webpack_require__(42); | ||
var indexOf = __webpack_require__(40); | ||
|
||
/** | ||
* If array contains values. | ||
|
@@ -1356,8 +1352,8 @@ return /******/ (function(modules) { // webpackBootstrap | |
/***/ function(module, exports, __webpack_require__) { | ||
|
||
var unique = __webpack_require__(29); | ||
var filter = __webpack_require__(40); | ||
var every = __webpack_require__(41); | ||
var filter = __webpack_require__(41); | ||
var every = __webpack_require__(42); | ||
var contains = __webpack_require__(26); | ||
var slice = __webpack_require__(36); | ||
|
||
|
@@ -1386,7 +1382,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
/***/ function(module, exports, __webpack_require__) { | ||
|
||
var unique = __webpack_require__(29); | ||
var filter = __webpack_require__(40); | ||
var filter = __webpack_require__(41); | ||
var some = __webpack_require__(43); | ||
var contains = __webpack_require__(26); | ||
var slice = __webpack_require__(36); | ||
|
@@ -1414,7 +1410,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
/* 29 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
var filter = __webpack_require__(40); | ||
var filter = __webpack_require__(41); | ||
|
||
/** | ||
* @return {array} Array of unique items | ||
|
@@ -1670,9 +1666,9 @@ return /******/ (function(modules) { // webpackBootstrap | |
/* 37 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
var identity = __webpack_require__(46); | ||
var prop = __webpack_require__(47); | ||
var deepMatches = __webpack_require__(48); | ||
var identity = __webpack_require__(45); | ||
var prop = __webpack_require__(46); | ||
var deepMatches = __webpack_require__(47); | ||
|
||
/** | ||
* Converts argument into a valid iterator. | ||
|
@@ -1710,7 +1706,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
/* 38 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
var clone = __webpack_require__(45); | ||
var clone = __webpack_require__(48); | ||
var forOwn = __webpack_require__(19); | ||
var kindOf = __webpack_require__(44); | ||
var isPlainObject = __webpack_require__(33); | ||
|
@@ -1785,6 +1781,40 @@ return /******/ (function(modules) { // webpackBootstrap | |
/* 40 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
|
||
|
||
/** | ||
* Array.indexOf | ||
*/ | ||
function indexOf(arr, item, fromIndex) { | ||
fromIndex = fromIndex || 0; | ||
if (arr == null) { | ||
return -1; | ||
} | ||
|
||
var len = arr.length, | ||
i = fromIndex < 0 ? len + fromIndex : fromIndex; | ||
while (i < len) { | ||
// we iterate over sparse items since there is no way to make it | ||
// work properly on IE 7-8. see #64 | ||
if (arr[i] === item) { | ||
return i; | ||
} | ||
|
||
i++; | ||
} | ||
|
||
return -1; | ||
} | ||
|
||
module.exports = indexOf; | ||
|
||
|
||
|
||
/***/ }, | ||
/* 41 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
var makeIterator = __webpack_require__(37); | ||
|
||
/** | ||
|
@@ -1814,7 +1844,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
|
||
|
||
/***/ }, | ||
/* 41 */ | ||
/* 42 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
var makeIterator = __webpack_require__(37); | ||
|
@@ -1846,40 +1876,6 @@ return /******/ (function(modules) { // webpackBootstrap | |
|
||
|
||
|
||
/***/ }, | ||
/* 42 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
|
||
|
||
/** | ||
* Array.indexOf | ||
*/ | ||
function indexOf(arr, item, fromIndex) { | ||
fromIndex = fromIndex || 0; | ||
if (arr == null) { | ||
return -1; | ||
} | ||
|
||
var len = arr.length, | ||
i = fromIndex < 0 ? len + fromIndex : fromIndex; | ||
while (i < len) { | ||
// we iterate over sparse items since there is no way to make it | ||
// work properly on IE 7-8. see #64 | ||
if (arr[i] === item) { | ||
return i; | ||
} | ||
|
||
i++; | ||
} | ||
|
||
return -1; | ||
} | ||
|
||
module.exports = indexOf; | ||
|
||
|
||
|
||
/***/ }, | ||
/* 43 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
@@ -1943,61 +1939,6 @@ return /******/ (function(modules) { // webpackBootstrap | |
/* 45 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
var kindOf = __webpack_require__(44); | ||
var isPlainObject = __webpack_require__(33); | ||
var mixIn = __webpack_require__(49); | ||
|
||
/** | ||
* Clone native types. | ||
*/ | ||
function clone(val){ | ||
switch (kindOf(val)) { | ||
case 'Object': | ||
return cloneObject(val); | ||
case 'Array': | ||
return cloneArray(val); | ||
case 'RegExp': | ||
return cloneRegExp(val); | ||
case 'Date': | ||
return cloneDate(val); | ||
default: | ||
return val; | ||
} | ||
} | ||
|
||
function cloneObject(source) { | ||
if (isPlainObject(source)) { | ||
return mixIn({}, source); | ||
} else { | ||
return source; | ||
} | ||
} | ||
|
||
function cloneRegExp(r) { | ||
var flags = ''; | ||
flags += r.multiline ? 'm' : ''; | ||
flags += r.global ? 'g' : ''; | ||
flags += r.ignoreCase ? 'i' : ''; | ||
return new RegExp(r.source, flags); | ||
} | ||
|
||
function cloneDate(date) { | ||
return new Date(+date); | ||
} | ||
|
||
function cloneArray(arr) { | ||
return arr.slice(); | ||
} | ||
|
||
module.exports = clone; | ||
|
||
|
||
|
||
|
||
/***/ }, | ||
/* 46 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
|
||
|
||
/** | ||
|
@@ -2013,7 +1954,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
|
||
|
||
/***/ }, | ||
/* 47 */ | ||
/* 46 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
|
||
|
@@ -2033,7 +1974,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
|
||
|
||
/***/ }, | ||
/* 48 */ | ||
/* 47 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
var forOwn = __webpack_require__(19); | ||
|
@@ -2093,6 +2034,61 @@ return /******/ (function(modules) { // webpackBootstrap | |
|
||
|
||
|
||
/***/ }, | ||
/* 48 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
var kindOf = __webpack_require__(44); | ||
var isPlainObject = __webpack_require__(33); | ||
var mixIn = __webpack_require__(49); | ||
|
||
/** | ||
* Clone native types. | ||
*/ | ||
function clone(val){ | ||
switch (kindOf(val)) { | ||
case 'Object': | ||
return cloneObject(val); | ||
case 'Array': | ||
return cloneArray(val); | ||
case 'RegExp': | ||
return cloneRegExp(val); | ||
case 'Date': | ||
return cloneDate(val); | ||
default: | ||
return val; | ||
} | ||
} | ||
|
||
function cloneObject(source) { | ||
if (isPlainObject(source)) { | ||
return mixIn({}, source); | ||
} else { | ||
return source; | ||
} | ||
} | ||
|
||
function cloneRegExp(r) { | ||
var flags = ''; | ||
flags += r.multiline ? 'm' : ''; | ||
flags += r.global ? 'g' : ''; | ||
flags += r.ignoreCase ? 'i' : ''; | ||
return new RegExp(r.source, flags); | ||
} | ||
|
||
function cloneDate(date) { | ||
return new Date(+date); | ||
} | ||
|
||
function cloneArray(arr) { | ||
return arr.slice(); | ||
} | ||
|
||
module.exports = clone; | ||
|
||
|
||
|
||
|
||
/***/ }, | ||
/* 49 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.