mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 09:47:56 +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>
22 lines
467 B
JavaScript
22 lines
467 B
JavaScript
'use strict'
|
|
|
|
var html = require('./compile/html.js')
|
|
var parse = require('./parse.js')
|
|
var postprocess = require('./postprocess.js')
|
|
var preprocess = require('./preprocess.js')
|
|
|
|
function buffer(value, encoding, options) {
|
|
if (typeof encoding !== 'string') {
|
|
options = encoding
|
|
encoding = undefined
|
|
}
|
|
|
|
return html(options)(
|
|
postprocess(
|
|
parse(options).document().write(preprocess()(value, encoding, true))
|
|
)
|
|
)
|
|
}
|
|
|
|
module.exports = buffer
|