UNPKG

js-wrench

Version:

JS函数库

10 lines (9 loc) 296 B
import { toParam } from '../modules/index' describe('object解析param字符串', () => { it('example_1:toParam([])', () => { expect(toParam([])).toBe('') }) it('example_2:toParam({a:1,b:3,c:"key"})', () => { expect(toParam({ a: 1, b: 3, c: 'key' })).toBe('a=1&b=3&c=key') }) })