Skip to content
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

Fix buffer warning #21

Open
bastien-roucaries opened this issue Sep 1, 2021 · 0 comments
Open

Fix buffer warning #21

bastien-roucaries opened this issue Sep 1, 2021 · 0 comments

Comments

@bastien-roucaries
Copy link

Could you apply the following patch ?

ommit 8ef945dad2a3c5223bf92f1431c6899380593c29 (HEAD -> patched)
Author: Bastien Roucariès <[email protected]>
Date:   Wed Sep 1 18:51:22 2021 +0000

    Fix buffer deprecation
    
    Replace by correct API
    
    Forwarded

diff --git a/test/multi-byte.js b/test/multi-byte.js
index 7ad4d57..a753098 100644
--- a/test/multi-byte.js
+++ b/test/multi-byte.js
@@ -3,7 +3,7 @@ var unpack = require('../');
 var fs = require('fs');
 
 var src = fs.readFileSync(__dirname + '/files/utf-8.js', 'utf8');
-var buf = new Buffer(src);
+var buf = new Buffer.from(src);
 
 test('multi-byte characters', function (t) {
     t.plan(6);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant