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1.0
Stringify your JSON at max speed
github.com/fastify/fast-json-stringify
fastify/fast-json-stringify
fast-json-stringify
/
test
/
sanitize4.test.js
15 lines
(10 loc)
•
249 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'use strict'
const
t =
require
(
'tap'
)
const
build =
require
(
'..'
)
const
payload =
'(throw "pwoned")'
const
stringify =
build
({
required
: [
`"];
${payload}
//`
] }) t.
throws
(
() =>
{
stringify
({}) },
'Error: ""];(throw "pwoned")//" is required!'
)