UNPKG

254 BPlain TextView Raw
1/**
2 * Exchanges two values.
3 * @param x an object (updated)
4 * @param k a key
5 * @param l another key
6 * @returns x
7 */
8function swap$(x: object, k: string, l: string): object {
9 var t = x[k]; x[k] = x[l]; x[l] = t;
10 return x;
11}
12export default swap$;