Sha256: d73f186b767b8f5c892820a1fa7b3aeba0eab738adad9477760db1903cfab88f
Contents?: true
Size: 530 Bytes
Versions: 1
Compression:
Stored size: 530 Bytes
Contents
import { toArray } from "./utils"; export default function (params, evolver = Object.create(null)) { const query = Object.keys(params) .map(key => [key, params[key]]) .map(([key, value]) => [key, Object.prototype.hasOwnProperty.call(evolver, key) ? evolver[key](value) : value]) .filter(([key, value]) => value != null) .map(([key, value]) => toArray(value).map(v => `${key}=${v}`).join('&')) .join('&'); return query.length ? `?${query}` : ''; } ; //# sourceMappingURL=query.js.map
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
waves_lib-0.1.0 | js/node_modules/@waves/node-api-js/es/tools/query.js |