filter-value
Advanced tools
Comparing version 2.0.2-rc.3 to 2.0.2-rc.5
@@ -1,2 +0,2 @@ | ||
/** @license Data-Engine v2.0.2-rc.3 | ||
/** @license Data-Engine v2.0.2-rc.5 | ||
* filter-value.development.js | ||
@@ -108,3 +108,3 @@ * | ||
var staticTypes = ['number', 'string', 'regexp', 'boolean']; | ||
var staticTypes = ['number', 'string', 'boolean']; | ||
@@ -452,3 +452,5 @@ // TODO: check static types | ||
case 'object': | ||
if (Array.isArray(item)) { | ||
if (item === null) { | ||
type = 'null'; | ||
} else if (Array.isArray(item)) { | ||
type = 'array'; | ||
@@ -455,0 +457,0 @@ } else if (item instanceof RegExp) { |
@@ -1,2 +0,2 @@ | ||
/** @license Data-Engine v2.0.2-rc.3 | ||
/** @license Data-Engine v2.0.2-rc.5 | ||
* filter-value.production.min.js | ||
@@ -12,3 +12,3 @@ * | ||
var f=/[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(b){return typeof b}:function(b){return b&&"function"===typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},h=function(){function b(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(a,c,e){c&&b(a.prototype,c);e&&b(a,e);return a}}(),k=["number", | ||
"string","regexp","boolean"],m=function(){function b(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0,e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");l.call(this);this.originaItem=null;this.Name=a;void 0!==e&&(this.Type=e);void 0!==c&&(this.Value=c)}b.prototype.prepareItem=function(a){switch(this.type){case "array":if(Array.isArray(a[a.length- | ||
"string","boolean"],m=function(){function b(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0,e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");l.call(this);this.originaItem=null;this.Name=a;void 0!==e&&(this.Type=e);void 0!==c&&(this.Value=c)}b.prototype.prepareItem=function(a){switch(this.type){case "array":if(Array.isArray(a[a.length- | ||
1]))throw new TypeError("Array in Array isn't supported!");return a.map(function(c){return new b(a.Name,c)});default:return this.staticType?this.RETYPE[this.staticType](a):a}};h(b,[{key:"Name",set:function(a){"string"===typeof a&&(this.name=a)},get:function(){return this.name}},{key:"Type",set:function(a){this.validStaticType(a)&&(this.staticType=a)}},{key:"Value",set:function(a){this.originaItem=a;if(this.type=this.checkValidity(a))this.item=this.prepareItem(a),this.compareFunc=this.TYPES[this.type]; | ||
@@ -18,3 +18,3 @@ else throw new TypeError("item isn't valid filter value, possible types are string, RegExp, number, function, array of types mentioned before.");},get:function(){return this.originaItem}}]);return b}();m.regexEscape=function(b){return b.replace(f,"\\$\x26")}; | ||
b.item.to.$.isGreater(a)};this.TYPES={boolean:this.basicCompare,string:this.basicCompare,number:this.basicCompare,null:this.basicCompare,date:this.dateCompare,array:this.arrayCompare,regexp:this.regexpCompare,func:this.funcCompare,range:this.rangeCompare};this.numberRetype=function(a){return parseFloat(a)};this.stringRetype=function(a){return""+a};this.booleanRetype=function(a){return!!a};this.RETYPE={number:this.numberRetype,string:this.stringRetype,boolean:this.booleanRetype};this.compare=function(a){return b.compareFunc(a)}; | ||
this.checkValidity=function(a){var c=b.checkRangeAbleTypes(a);if(!c)switch("undefined"===typeof a?"undefined":g(a)){case "boolean":c="boolean";break;case "function":c="func";break;case "object":Array.isArray(a)?c="array":a instanceof RegExp?c="regexp":a.from&&a.to&&b.checkRangeAbleTypes(a.from)===b.checkRangeAbleTypes(a.to)&&(c="range")}return c};this.checkRangeAbleTypes=function(a){var b=null;switch("undefined"===typeof a?"undefined":g(a)){case "string":b="string";break;case "number":b="number"; | ||
break;case "object":a instanceof Date&&(b="date")}return b}}var n=Object.freeze({default:m}),p=n&&m||n;module.exports=p.default?p.default:p; | ||
this.checkValidity=function(a){var c=b.checkRangeAbleTypes(a);if(!c)switch("undefined"===typeof a?"undefined":g(a)){case "boolean":c="boolean";break;case "function":c="func";break;case "object":null===a?c="null":Array.isArray(a)?c="array":a instanceof RegExp?c="regexp":a.from&&a.to&&b.checkRangeAbleTypes(a.from)===b.checkRangeAbleTypes(a.to)&&(c="range")}return c};this.checkRangeAbleTypes=function(a){var b=null;switch("undefined"===typeof a?"undefined":g(a)){case "string":b="string";break;case "number":b= | ||
"number";break;case "object":a instanceof Date&&(b="date")}return b}}var n=Object.freeze({default:m}),p=n&&m||n;module.exports=p.default?p.default:p; |
{ | ||
"name": "filter-value", | ||
"description": "Data engine is small data management lib for some sort and filter.", | ||
"version": "2.0.2-rc.3", | ||
"version": "2.0.2-rc.5", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "Data", |
@@ -1,2 +0,2 @@ | ||
/** @license Engine v2.0.2-rc.3 | ||
/** @license Engine v2.0.2-rc.5 | ||
* filter-value.development.js | ||
@@ -110,3 +110,3 @@ * | ||
var staticTypes = ['number', 'string', 'regexp', 'boolean']; | ||
var staticTypes = ['number', 'string', 'boolean']; | ||
@@ -454,3 +454,5 @@ // TODO: check static types | ||
case 'object': | ||
if (Array.isArray(item)) { | ||
if (item === null) { | ||
type = 'null'; | ||
} else if (Array.isArray(item)) { | ||
type = 'array'; | ||
@@ -457,0 +459,0 @@ } else if (item instanceof RegExp) { |
@@ -1,2 +0,2 @@ | ||
/** @license Data-Engine v2.0.2-rc.3 | ||
/** @license Data-Engine v2.0.2-rc.5 | ||
* filter-value.production.min.js | ||
@@ -11,8 +11,8 @@ * | ||
b.getTime()};Date.prototype.$.isGreater=function(b){return this.getTime()>=b.getTime()};Date.prototype.$.isLess=function(b){return this.getTime()<=b.getTime()};var f=/[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(b){return typeof b}:function(b){return b&&"function"===typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},h=function(){function b(a,b){for(var d=0;d<b.length;d++){var c=b[d];c.enumerable=c.enumerable|| | ||
!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(a,c.key,c)}}return function(a,d,c){d&&b(a.prototype,d);c&&b(a,c);return a}}(),k=["number","string","regexp","boolean"],c=function(){function b(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,d=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0,c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");l.call(this); | ||
this.originaItem=null;this.Name=a;void 0!==c&&(this.Type=c);void 0!==d&&(this.Value=d)}b.prototype.prepareItem=function(a){switch(this.type){case "array":if(Array.isArray(a[a.length-1]))throw new TypeError("Array in Array isn't supported!");return a.map(function(d){return new b(a.Name,d)});default:return this.staticType?this.RETYPE[this.staticType](a):a}};h(b,[{key:"Name",set:function(a){"string"===typeof a&&(this.name=a)},get:function(){return this.name}},{key:"Type",set:function(a){this.validStaticType(a)&& | ||
(this.staticType=a)}},{key:"Value",set:function(a){this.originaItem=a;if(this.type=this.checkValidity(a))this.item=this.prepareItem(a),this.compareFunc=this.TYPES[this.type];else throw new TypeError("item isn't valid filter value, possible types are string, RegExp, number, function, array of types mentioned before.");},get:function(){return this.originaItem}}]);return b}();c.regexEscape=function(b){return b.replace(f,"\\$\x26")};var l=function(){var b=this;this.validStaticType=function(a){return k.some(function(b){return b=== | ||
!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(a,c.key,c)}}return function(a,d,c){d&&b(a.prototype,d);c&&b(a,c);return a}}(),k=["number","string","boolean"],c=function(){function b(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,d=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0,c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");l.call(this);this.originaItem= | ||
null;this.Name=a;void 0!==c&&(this.Type=c);void 0!==d&&(this.Value=d)}b.prototype.prepareItem=function(a){switch(this.type){case "array":if(Array.isArray(a[a.length-1]))throw new TypeError("Array in Array isn't supported!");return a.map(function(d){return new b(a.Name,d)});default:return this.staticType?this.RETYPE[this.staticType](a):a}};h(b,[{key:"Name",set:function(a){"string"===typeof a&&(this.name=a)},get:function(){return this.name}},{key:"Type",set:function(a){this.validStaticType(a)&&(this.staticType= | ||
a)}},{key:"Value",set:function(a){this.originaItem=a;if(this.type=this.checkValidity(a))this.item=this.prepareItem(a),this.compareFunc=this.TYPES[this.type];else throw new TypeError("item isn't valid filter value, possible types are string, RegExp, number, function, array of types mentioned before.");},get:function(){return this.originaItem}}]);return b}();c.regexEscape=function(b){return b.replace(f,"\\$\x26")};var l=function(){var b=this;this.validStaticType=function(a){return k.some(function(b){return b=== | ||
a})};this.removeType=function(){b.staticType=null};this.basicCompare=function(a){return b.item===a};this.dateCompare=function(a){return b.item.$.compare(a)};this.regexpCompare=function(a){return b.item.test(""+a)};this.arrayCompare=function(a){return b.item.some(function(b){return b.compare(a)})};this.funcCompare=function(a){return b.item(a)};this.rangeCompare=function(a){return b.item.from.$.isLess(a)&&b.item.to.$.isGreater(a)};this.TYPES={boolean:this.basicCompare,string:this.basicCompare,number:this.basicCompare, | ||
null:this.basicCompare,date:this.dateCompare,array:this.arrayCompare,regexp:this.regexpCompare,func:this.funcCompare,range:this.rangeCompare};this.numberRetype=function(a){return parseFloat(a)};this.stringRetype=function(a){return""+a};this.booleanRetype=function(a){return!!a};this.RETYPE={number:this.numberRetype,string:this.stringRetype,boolean:this.booleanRetype};this.compare=function(a){return b.compareFunc(a)};this.checkValidity=function(a){var d=b.checkRangeAbleTypes(a);if(!d)switch("undefined"=== | ||
typeof a?"undefined":e(a)){case "boolean":d="boolean";break;case "function":d="func";break;case "object":Array.isArray(a)?d="array":a instanceof RegExp?d="regexp":a.from&&a.to&&b.checkRangeAbleTypes(a.from)===b.checkRangeAbleTypes(a.to)&&(d="range")}return d};this.checkRangeAbleTypes=function(a){var b=null;switch("undefined"===typeof a?"undefined":e(a)){case "string":b="string";break;case "number":b="number";break;case "object":a instanceof Date&&(b="date")}return b}},g=Object.freeze({default:c}); | ||
typeof a?"undefined":e(a)){case "boolean":d="boolean";break;case "function":d="func";break;case "object":null===a?d="null":Array.isArray(a)?d="array":a instanceof RegExp?d="regexp":a.from&&a.to&&b.checkRangeAbleTypes(a.from)===b.checkRangeAbleTypes(a.to)&&(d="range")}return d};this.checkRangeAbleTypes=function(a){var b=null;switch("undefined"===typeof a?"undefined":e(a)){case "string":b="string";break;case "number":b="number";break;case "object":a instanceof Date&&(b="date")}return b}},g=Object.freeze({default:c}); | ||
c=g&&c||g;return c.default?c.default:c}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38043
897