data-filter
Advanced tools
Comparing version 2.0.0-rc.13 to 2.0.0
@@ -1,2 +0,2 @@ | ||
/** @license Data-Engine v2.0.0-rc.13 | ||
/** @license Data-Engine v2.0.0 | ||
* data-filter.development.js | ||
@@ -3,0 +3,0 @@ * |
@@ -1,2 +0,2 @@ | ||
/** @license Data-Engine v2.0.0-rc.13 | ||
/** @license Data-Engine v2.0.0 | ||
* data-filter.production.min.js | ||
@@ -3,0 +3,0 @@ * |
{ | ||
"name": "data-filter", | ||
"description": "Data engine is small data management lib for some sort and filter.", | ||
"version": "2.0.0-rc.13", | ||
"version": "2.0.0", | ||
"keywords": [ | ||
@@ -49,4 +49,4 @@ "Data", | ||
"loose-envify": "^1.1.0", | ||
"filter-value": "^2.0.0-rc.13", | ||
"data-sort": "^2.0.0-rc.13" | ||
"filter-value": "^2.0.0", | ||
"data-sort": "^2.0.0" | ||
}, | ||
@@ -53,0 +53,0 @@ "browserify": { |
@@ -1,2 +0,2 @@ | ||
/** @license Engine v2.0.0-rc.13 | ||
/** @license Engine v2.0.0 | ||
* data-filter.development.js | ||
@@ -501,18 +501,2 @@ * | ||
/* eslint-disable */ | ||
function logf() { | ||
var _console; | ||
(_console = console).log.apply(_console, arguments); | ||
} | ||
function noop() {} | ||
var log = noop; | ||
{ | ||
log = logf; | ||
} | ||
/** | ||
@@ -524,2 +508,3 @@ * Sort engine, just basic sort provider | ||
*/ | ||
var Sort = function () { | ||
@@ -542,3 +527,2 @@ /** | ||
log('constructor'); | ||
this.currentName = null; | ||
@@ -678,4 +662,2 @@ this.sortFunc = this.defaultSort; | ||
log('setData', 'should sort', shouldSort); | ||
log(data); | ||
_this.data = data; | ||
@@ -689,3 +671,2 @@ if (shouldSort) { | ||
this.setSortFunction = function (func) { | ||
log('setSortFunction', func); | ||
if (typeof func === 'function') { | ||
@@ -698,7 +679,5 @@ _this.sortFunc = func; | ||
this.setPrimaryKey = function (key) { | ||
log('setPrimaryKey', key); | ||
if (_this.isCustomFunction) { | ||
return; | ||
} | ||
log('primaryKey Continue'); | ||
if (typeof key === 'string' && key.length > 0) { | ||
@@ -714,3 +693,2 @@ _this.primaryKey = key; | ||
this.removePrimaryKey = function () { | ||
log('remove primary key'); | ||
_this.primaryKey = ''; | ||
@@ -723,3 +701,2 @@ if (!_this.isCustomFunction) { | ||
this.setDefaultSort = function () { | ||
log('setting default sort'); | ||
_this.isCustomFunction = false; | ||
@@ -741,3 +718,2 @@ _this.setSortFunction(); | ||
this.sortBy = function (name) { | ||
log('sorting by ', name); | ||
if (_this.currentName === name) { | ||
@@ -774,3 +750,2 @@ return _this.reverseData(); | ||
this.sortData = function () { | ||
log('sort data', _this.currentName); | ||
if (_this.currentName) { | ||
@@ -783,3 +758,2 @@ _this.data = _this.data.sort(_this.sortFunc); | ||
this.reverseData = function () { | ||
log('reverse data'); | ||
_this.data = _this.data.reverse(); | ||
@@ -786,0 +760,0 @@ return _this.data; |
@@ -1,2 +0,2 @@ | ||
/** @license Data-Engine v2.0.0-rc.13 | ||
/** @license Data-Engine v2.0.0 | ||
* data-filter.production.min.js | ||
@@ -3,0 +3,0 @@ * |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2
51099
1196
Updateddata-sort@^2.0.0
Updatedfilter-value@^2.0.0