open-nomad/ui/app/helpers/qp-serialize.js
2020-05-19 17:28:23 -07:00

17 lines
419 B
JavaScript

import { helper } from '@ember/component/helper';
import { serialize } from 'nomad-ui/utils/qp-serialize';
/**
* Query Param Serialize
*
* Usage: {{qp-serialize array}}
*
* Turns an array of values into a safe url encoded query param
* value. This serialization is used throughout the app for facets.
*/
export function qpSerialize([values]) {
return serialize(values);
}
export default helper(qpSerialize);