Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

data-sort

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-sort - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

9

cjs/data-sort.development.js

@@ -1,2 +0,2 @@

/** @license Data-Engine v3.0.0
/** @license Data-Engine v3.0.1
* data-sort.development.js

@@ -76,3 +76,3 @@ *

get: function () {
return this.getData();
return this.data;
}

@@ -225,3 +225,3 @@ }, {

_this.data = [];
return;
return [];
}

@@ -232,2 +232,3 @@ _this.data = data;

}
return _this.data;
};

@@ -329,3 +330,3 @@

this.getData = function () {
return _this.data;
return _this.Data;
};

@@ -332,0 +333,0 @@ };

@@ -1,2 +0,2 @@

/** @license Data-Engine v3.0.0
/** @license Data-Engine v3.0.1
* data-sort.production.min.js

@@ -9,7 +9,7 @@ *

*/
'use strict';var f=function(){function a(b,a){for(var c=0;c<a.length;c++){var d=a[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(b,d.key,d)}}return function(b,c,e){c&&a(b.prototype,c);e&&a(b,e);return b}}(),h=function(){function a(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},c=b.data,e=b.primaryKey,d=b.sortFunction;b=b.direction;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");g.call(this);
this.Direction=b;this.sortFunc=this.defaultSort;this.SortFunction=d;this.PrimaryKey=e;this.Data=c}f(a,[{key:"Data",set:function(a){this.setData(a)},get:function(){return this.getData()}},{key:"SortFunction",set:function(a){this.setSortFunction(a)}},{key:"Direction",set:function(a){this.direction="boolean"===typeof a?a:!0},get:function(){return this.direction}},{key:"PrimaryKey",set:function(a){this.setPrimaryKey(a)},get:function(){return this.primaryKey}}]);return a}();
function g(){var a=this;this.primaryKey=null;this.direction=!0;this.data=[];this.currentName=null;this.setData=function(b){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!0;Array.isArray(b)?(a.data=b,c&&a.sortData()):a.data=[]};this.setSortFunction=function(b){"function"===typeof b&&(a.sortFunc=b,a.isCustomFunction=!0)};this.setPrimaryKey=function(b){!a.isCustomFunction&&"string"===typeof b&&0<b.length&&(a.primaryKey=b,null===a.currentName&&(a.currentName=b),a.setOwnSortFunction())};
this.removePrimaryKey=function(){a.primaryKey=null;a.setOwnSortFunction()};this.setDefaultSort=function(){a.isCustomFunction=!1;a.setOwnSortFunction()};this.comparePrimaryKey=function(b,c){b=b[a.primaryKey];c=c[a.primaryKey];return b===c?0:b>c===a.direction?1:-1};this.compare=function(b,c){b=b[a.currentName];c=c[a.currentName];return b===c?0:b>c===a.direction?1:-1};this.sortBy=function(b){if(a.currentName===b)return a.reverseData();a.currentName=b;a.setOwnSortFunction();return a.sortData()};this.setOwnSortFunction=
function(){var b=a.primaryKey,c=a.currentName;a.isCustomFunction||(a.sortFunc=null!==b&&b!==c?a.defaultSortWithKey:a.defaultSort)};this.defaultSortWithKey=function(b,c){var e=b[a.currentName],d=c[a.currentName];return e===d?a.comparePrimaryKey(b,c):e>d===a.direction?1:-1};this.defaultSort=function(b,c){return a.compare(b,c)};this.sortData=function(){a.currentName&&(a.data=a.data.sort(a.sortFunc));return a.data};this.reverseData=function(){a.data=a.data.reverse();return a.data};this.getData=function(){return a.data}}
var k=Object.freeze({default:h}),l=k&&h||k;module.exports=l["default"]?l["default"]:l;
'use strict';var f=function(){function a(a,c){for(var b=0;b<c.length;b++){var d=c[b];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,e){c&&a(b.prototype,c);e&&a(b,e);return b}}(),h=function(){function a(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},c=b.data,e=b.primaryKey,d=b.sortFunction;b=b.direction;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");g.call(this);
this.Direction=b;this.sortFunc=this.defaultSort;this.SortFunction=d;this.PrimaryKey=e;this.Data=c}f(a,[{key:"Data",set:function(a){this.setData(a)},get:function(){return this.data}},{key:"SortFunction",set:function(a){this.setSortFunction(a)}},{key:"Direction",set:function(a){this.direction="boolean"===typeof a?a:!0},get:function(){return this.direction}},{key:"PrimaryKey",set:function(a){this.setPrimaryKey(a)},get:function(){return this.primaryKey}}]);return a}();
function g(){var a=this;this.primaryKey=null;this.direction=!0;this.data=[];this.currentName=null;this.setData=function(b){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!0;if(!Array.isArray(b))return a.data=[],[];a.data=b;c&&a.sortData();return a.data};this.setSortFunction=function(b){"function"===typeof b&&(a.sortFunc=b,a.isCustomFunction=!0)};this.setPrimaryKey=function(b){!a.isCustomFunction&&"string"===typeof b&&0<b.length&&(a.primaryKey=b,null===a.currentName&&(a.currentName=b),
a.setOwnSortFunction())};this.removePrimaryKey=function(){a.primaryKey=null;a.setOwnSortFunction()};this.setDefaultSort=function(){a.isCustomFunction=!1;a.setOwnSortFunction()};this.comparePrimaryKey=function(b,c){b=b[a.primaryKey];c=c[a.primaryKey];return b===c?0:b>c===a.direction?1:-1};this.compare=function(b,c){b=b[a.currentName];c=c[a.currentName];return b===c?0:b>c===a.direction?1:-1};this.sortBy=function(b){if(a.currentName===b)return a.reverseData();a.currentName=b;a.setOwnSortFunction();return a.sortData()};
this.setOwnSortFunction=function(){var b=a.primaryKey,c=a.currentName;a.isCustomFunction||(a.sortFunc=null!==b&&b!==c?a.defaultSortWithKey:a.defaultSort)};this.defaultSortWithKey=function(b,c){var e=b[a.currentName],d=c[a.currentName];return e===d?a.comparePrimaryKey(b,c):e>d===a.direction?1:-1};this.defaultSort=function(b,c){return a.compare(b,c)};this.sortData=function(){a.currentName&&(a.data=a.data.sort(a.sortFunc));return a.data};this.reverseData=function(){a.data=a.data.reverse();return a.data};
this.getData=function(){return a.Data}}var k=Object.freeze({default:h}),l=k&&h||k;module.exports=l["default"]?l["default"]:l;
{
"name": "data-sort",
"description": "Data engine is small data management lib for some sort and filter.",
"version": "3.0.0",
"version": "3.0.1",
"keywords": [

@@ -6,0 +6,0 @@ "Data",

@@ -1,2 +0,2 @@

/** @license Engine v3.0.0
/** @license Engine v3.0.1
* data-sort.development.js

@@ -78,3 +78,3 @@ *

get: function () {
return this.getData();
return this.data;
}

@@ -227,3 +227,3 @@ }, {

_this.data = [];
return;
return [];
}

@@ -234,2 +234,3 @@ _this.data = data;

}
return _this.data;
};

@@ -331,3 +332,3 @@

this.getData = function () {
return _this.data;
return _this.Data;
};

@@ -334,0 +335,0 @@ };

@@ -1,2 +0,2 @@

/** @license Data-Engine v3.0.0
/** @license Data-Engine v3.0.1
* data-sort.production.min.js

@@ -9,7 +9,7 @@ *

*/
'use strict';(function(f,d){"object"===typeof exports&&"undefined"!==typeof module?module.exports=d():"function"===typeof define&&define.amd?define(d):f.Sort=d()})(this,function(){var f=function(){function a(b,a){for(var c=0;c<a.length;c++){var e=a[c];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(b,e.key,e)}}return function(b,c,d){c&&a(b.prototype,c);d&&a(b,d);return b}}(),d=function(){function a(){var b=0<arguments.length&&void 0!==arguments[0]?
arguments[0]:{},c=b.data,d=b.primaryKey,e=b.sortFunction;b=b.direction;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");h.call(this);this.Direction=b;this.sortFunc=this.defaultSort;this.SortFunction=e;this.PrimaryKey=d;this.Data=c}f(a,[{key:"Data",set:function(a){this.setData(a)},get:function(){return this.getData()}},{key:"SortFunction",set:function(a){this.setSortFunction(a)}},{key:"Direction",set:function(a){this.direction="boolean"===typeof a?a:!0},get:function(){return this.direction}},
{key:"PrimaryKey",set:function(a){this.setPrimaryKey(a)},get:function(){return this.primaryKey}}]);return a}(),h=function(){var a=this;this.primaryKey=null;this.direction=!0;this.data=[];this.currentName=null;this.setData=function(b){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!0;Array.isArray(b)?(a.data=b,c&&a.sortData()):a.data=[]};this.setSortFunction=function(b){"function"===typeof b&&(a.sortFunc=b,a.isCustomFunction=!0)};this.setPrimaryKey=function(b){!a.isCustomFunction&&"string"===
typeof b&&0<b.length&&(a.primaryKey=b,null===a.currentName&&(a.currentName=b),a.setOwnSortFunction())};this.removePrimaryKey=function(){a.primaryKey=null;a.setOwnSortFunction()};this.setDefaultSort=function(){a.isCustomFunction=!1;a.setOwnSortFunction()};this.comparePrimaryKey=function(b,c){b=b[a.primaryKey];c=c[a.primaryKey];return b===c?0:b>c===a.direction?1:-1};this.compare=function(b,c){b=b[a.currentName];c=c[a.currentName];return b===c?0:b>c===a.direction?1:-1};this.sortBy=function(b){if(a.currentName===
'use strict';(function(f,d){"object"===typeof exports&&"undefined"!==typeof module?module.exports=d():"function"===typeof define&&define.amd?define(d):f.Sort=d()})(this,function(){var f=function(){function a(a,c){for(var b=0;b<c.length;b++){var e=c[b];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(a,e.key,e)}}return function(b,c,d){c&&a(b.prototype,c);d&&a(b,d);return b}}(),d=function(){function a(){var b=0<arguments.length&&void 0!==arguments[0]?
arguments[0]:{},c=b.data,d=b.primaryKey,e=b.sortFunction;b=b.direction;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");h.call(this);this.Direction=b;this.sortFunc=this.defaultSort;this.SortFunction=e;this.PrimaryKey=d;this.Data=c}f(a,[{key:"Data",set:function(a){this.setData(a)},get:function(){return this.data}},{key:"SortFunction",set:function(a){this.setSortFunction(a)}},{key:"Direction",set:function(a){this.direction="boolean"===typeof a?a:!0},get:function(){return this.direction}},
{key:"PrimaryKey",set:function(a){this.setPrimaryKey(a)},get:function(){return this.primaryKey}}]);return a}(),h=function(){var a=this;this.primaryKey=null;this.direction=!0;this.data=[];this.currentName=null;this.setData=function(b){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!0;if(!Array.isArray(b))return a.data=[],[];a.data=b;c&&a.sortData();return a.data};this.setSortFunction=function(b){"function"===typeof b&&(a.sortFunc=b,a.isCustomFunction=!0)};this.setPrimaryKey=function(b){!a.isCustomFunction&&
"string"===typeof b&&0<b.length&&(a.primaryKey=b,null===a.currentName&&(a.currentName=b),a.setOwnSortFunction())};this.removePrimaryKey=function(){a.primaryKey=null;a.setOwnSortFunction()};this.setDefaultSort=function(){a.isCustomFunction=!1;a.setOwnSortFunction()};this.comparePrimaryKey=function(b,c){b=b[a.primaryKey];c=c[a.primaryKey];return b===c?0:b>c===a.direction?1:-1};this.compare=function(b,c){b=b[a.currentName];c=c[a.currentName];return b===c?0:b>c===a.direction?1:-1};this.sortBy=function(b){if(a.currentName===
b)return a.reverseData();a.currentName=b;a.setOwnSortFunction();return a.sortData()};this.setOwnSortFunction=function(){var b=a.primaryKey,c=a.currentName;a.isCustomFunction||(a.sortFunc=null!==b&&b!==c?a.defaultSortWithKey:a.defaultSort)};this.defaultSortWithKey=function(b,c){var d=b[a.currentName],e=c[a.currentName];return d===e?a.comparePrimaryKey(b,c):d>e===a.direction?1:-1};this.defaultSort=function(b,c){return a.compare(b,c)};this.sortData=function(){a.currentName&&(a.data=a.data.sort(a.sortFunc));
return a.data};this.reverseData=function(){a.data=a.data.reverse();return a.data};this.getData=function(){return a.data}},g=Object.freeze({default:d});d=g&&d||g;return d["default"]?d["default"]:d});
return a.data};this.reverseData=function(){a.data=a.data.reverse();return a.data};this.getData=function(){return a.Data}},g=Object.freeze({default:d});d=g&&d||g;return d["default"]?d["default"]:d});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc