permet l'ajout des frameworks et des routes

This commit is contained in:
22107988t
2023-09-25 09:41:55 +02:00
parent 0b9f7d4dfb
commit 361112699c
2787 changed files with 864804 additions and 0 deletions

51
app/node_modules/hyntax/lib/stream-tokenizer.js generated vendored Normal file
View File

@@ -0,0 +1,51 @@
const { Transform } = require('stream')
const tokenize = require('./tokenize')
class StreamTokenizer extends Transform {
constructor (options) {
super(Object.assign(
{},
options,
{
decodeStrings: false,
readableObjectMode: true
}
))
this.currentTokenizerState = undefined
this.setDefaultEncoding('utf8')
}
_transform (chunk, encoding, callback) {
let chunkString = chunk
if (Buffer.isBuffer(chunk)) {
chunkString = chunk.toString()
}
const { state, tokens } = tokenize(
chunkString,
this.currentTokenizerState,
{ isFinalChunk: false }
)
this.currentTokenizerState = state
callback(null, tokens)
}
_flush (callback) {
const tokenizeResults = tokenize(
'',
this.currentTokenizerState,
{ isFinalChunk: true }
)
this.push(tokenizeResults.tokens)
callback()
}
}
module.exports = StreamTokenizer