mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-22 14:04:44 +00:00
.
This commit is contained in:
parent
beb1329f9f
commit
2b95e76931
7736 changed files with 1874747 additions and 51184 deletions
28
node_modules/parse5/lib/serializer/serializer_stream.js
generated
vendored
Normal file
28
node_modules/parse5/lib/serializer/serializer_stream.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
'use strict';
|
||||
|
||||
var ReadableStream = require('stream').Readable,
|
||||
inherits = require('util').inherits,
|
||||
Serializer = require('./index');
|
||||
|
||||
var SerializerStream = module.exports = function (node, options) {
|
||||
ReadableStream.call(this);
|
||||
|
||||
this.serializer = new Serializer(node, options);
|
||||
|
||||
Object.defineProperty(this.serializer, 'html', {
|
||||
//NOTE: To make `+=` concat operator work properly we define
|
||||
//getter which always returns empty string
|
||||
get: function () {
|
||||
return '';
|
||||
},
|
||||
set: this.push.bind(this)
|
||||
});
|
||||
};
|
||||
|
||||
inherits(SerializerStream, ReadableStream);
|
||||
|
||||
//Readable stream implementation
|
||||
SerializerStream.prototype._read = function () {
|
||||
this.serializer.serialize();
|
||||
this.push(null);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue