UNPKG

respond-framework

Version:
18 lines (17 loc) 401 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; const createQueryKey = ({ skip, project, ...query } = {}) => JSON.stringify(sort(query)); var _default = exports.default = createQueryKey; const sort = (obj = {}) => { const keys = Object.keys(obj); const next = {}; keys.sort().forEach(key => next[key] = obj[key]); return next; };