MCPcopy Create free account
hub / github.com/nodejs/node / formdataEscape

Function formdataEscape

deps/undici/src/lib/web/fetch/body.js:108–109  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

106
107 /*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
108 const formdataEscape = (str) =>
109 str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22')
110 const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n')
111
112 // Set action to this step: run the multipart/form-data

Callers 2

extractBodyFunction · 0.85
extractBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected