UNPKG
har-to-k6
Version:
latest (0.14.15)
0.14.15
0.14.14
0.14.13
0.14.12
0.14.11
0.14.10
0.14.9
0.14.8
0.14.7
0.14.6
0.14.5
0.14.4
0.14.3
0.14.0
0.13.1
0.13.0
0.12.0
0.11.0
0.10.1
0.10.0
0.9.1
0.9.0
0.8.0
0.7.0
0.6.0
0.5.0
0.4.0
0.3.3
0.3.2
0.3.1
0.3.0
0.2.0
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
Convert LI-HAR to k6 script
github.com/grafana/har-to-k6
grafana/har-to-k6
har-to-k6
/
src
/
render
/
object
/
index.js
19 lines
(16 loc)
•
262 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const
indent =
require
(
'../indent'
)
const
items =
require
(
'./items'
)
function
object
(
specs
) {
const
content =
items
(specs)
if
(content) {
return
(
''
+
`{
${indent(content)}
}`
) }
else
{
return
`{}`
} }
module
.
exports
= object