(v: JSONValue)
| 204 | * |
| 205 | */ |
| 206 | export function encode_array(v: JSONValue) { |
| 207 | if (!Array.isArray(v)) throw new Error('rison.encode_array expects an array argument'); |
| 208 | const r = unwrap(encode_table[typeof v](v)); |
| 209 | return r.substring(2, r.length - 1); |
| 210 | } |
| 211 | |
| 212 | /** |
| 213 | * rison-encode and uri-encode a javascript structure |