Files
nomad/ui/app/helpers/qp-serialize.js
2023-08-10 17:27:29 -05:00

22 lines
498 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
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);