mirror of
https://github.com/nodejs/node.git
synced 2025-05-08 12:49:23 +00:00

Greatly simplify how ESLint and its plugins are installed. PR-URL: https://github.com/nodejs/node/pull/53413 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
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))
|
|
)
|
|
)
|
|
}
|