New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CacheStream.getCache returns empty array in Node.js v14 #194
Comments
curbengh
changed the title
ChachStream.getCache returns empty array in Node.js v14
CacheStream.getCache returns empty array in Node.js v14
Apr 24, 2020
Can you attach a sample code? Following code works for me in Node 14, const { CacheStream } = require('hexo-util');
const { createReadStream } = require('fs')
const stream = new CacheStream();
createReadStream('testfile').pipe(stream)
stream.on('finish', () => {
console.log(stream.getCache().toString());
stream.destroy();
}); |
Last night, I added I think this issue caused by destroy method. |
Confirmed that the issue could be fixed by #195. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
refs: hexojs/hexo#4260
Node.js v14 the hexo-util@ChachStream.getCache returns an empty array.
In Node.js v14 has many changes about stream. I think this issue caused by these changes.
The text was updated successfully, but these errors were encountered: