MCPcopy
hub / github.com/NervJS/taro / stringify

Function stringify

packages/taro-platform-harmony-cpp/src/runtime/framework/page.ts:47–55  ·  view source on GitHub ↗
(obj?: Record<string, unknown>)

Source from the content-addressed store, hash-verified

45}
46
47export function stringify (obj?: Record<string, unknown>) {
48 if (obj == null) {
49 return ''
50 }
51 const path = Object.keys(obj).map((key) => {
52 return key + '=' + obj[key]
53 }).join('&')
54 return path === '' ? path : '?' + path
55}
56
57export function getPath (id: string, options?: Record<string, unknown>): string {
58 const idx = id.indexOf('?')

Callers 1

getPathFunction · 0.70

Calls 2

mapMethod · 0.65
keysMethod · 0.45

Tested by

no test coverage detected