mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-10 05:35:05 +08:00
DISABLE_THIRD_PARTY_CHECK=NPM update R=jacktfranklin@chromium.org Bug: none Change-Id: I41b7006f336b9465677cc7434abd70a732c58221 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692907 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
20 lines
457 B
JavaScript
20 lines
457 B
JavaScript
export default buffer
|
|
|
|
import compiler from './compile/html.mjs'
|
|
import parser from './parse.mjs'
|
|
import postprocess from './postprocess.mjs'
|
|
import preprocessor from './preprocess.mjs'
|
|
|
|
function buffer(value, encoding, options) {
|
|
if (typeof encoding !== 'string') {
|
|
options = encoding
|
|
encoding = undefined
|
|
}
|
|
|
|
return compiler(options)(
|
|
postprocess(
|
|
parser(options).document().write(preprocessor()(value, encoding, true))
|
|
)
|
|
)
|
|
}
|