Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function encode(filter) {
var query;
if (filter) {
var text = filter[0];
if (isSymbol(text)) {
console.log("is symbol");
query = Json_encode.object_(/* :: */[
/* tuple */[
"symbol",
text
],
/* [] */0
]);
} else {
query = Json_encode.object_(/* :: */[
/* tuple */[
"title",
text
],
/* :: */[
/* tuple */[
"subtitle",
text