@buildingsblock/core
Advanced tools
Comparing version 0.2.0-alpha.3 to 0.2.0-alpha.4
@@ -24,4 +24,6 @@ "use strict"; | ||
}); | ||
exports.default = void 0; | ||
exports.default = exports.toSort = void 0; | ||
var _toCamelCase = _interopRequireDefault(require("to-camel-case")); | ||
var _stratas = _interopRequireDefault(require("./stratas")); | ||
@@ -35,3 +37,14 @@ | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var toSort = function toSort(sortBy) { | ||
var str = sortBy.toLowerCase(); | ||
var index = sortBy.lastIndexOf('_'); | ||
var property = (0, _toCamelCase.default)(str.slice(0, index)); | ||
var order = str.slice(index + 1, sortBy.length) === 'asc' ? 1 : -1; | ||
return _defineProperty({}, property, order); | ||
}; | ||
exports.toSort = toSort; | ||
var _default = {}; | ||
exports.default = _default; |
@@ -6,12 +6,8 @@ "use strict"; | ||
}); | ||
exports.default = exports.toSort = exports.toFixed = exports.max = exports.min = exports.average = void 0; | ||
exports.default = exports.toFixed = exports.max = exports.min = exports.average = void 0; | ||
var _decimal = _interopRequireDefault(require("decimal.js")); | ||
var _toCamelCase = _interopRequireDefault(require("to-camel-case")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
@@ -51,13 +47,3 @@ | ||
exports.toFixed = toFixed; | ||
var toSort = function toSort(sortBy) { | ||
var str = sortBy.toLowerCase(); | ||
var index = sortBy.lastIndexOf('_'); | ||
var property = (0, _toCamelCase.default)(str.slice(0, index)); | ||
var order = str.slice(index + 1, sortBy.length) === 'asc' ? 1 : -1; | ||
return _defineProperty({}, property, order); | ||
}; | ||
exports.toSort = toSort; | ||
var _default = {}; | ||
exports.default = _default; |
{ | ||
"name": "@buildingsblock/core", | ||
"version": "0.2.0-alpha.3", | ||
"version": "0.2.0-alpha.4", | ||
"description": "Core code base for Eli", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
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
68810