UNPKG

@itrocks/storage

Version:

Transforms model objects to and from storage systems

20 lines 617 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Sort = void 0; exports.sort = sort; const sort_1 = require("@itrocks/sort"); const option_1 = require("./option"); class Sort extends option_1.Option { properties; constructor(properties) { super(); this.properties = properties.map(property => ((typeof property === 'string') && '!-'.includes(property[0])) ? new sort_1.Reverse(property.slice(1)) : property); } } exports.Sort = Sort; function sort(properties) { return new Sort(properties); } //# sourceMappingURL=sort.js.map