Skip to content

Fix buffer warning #21

@bastien-roucaries

Description

@bastien-roucaries

Could you apply the following patch ?

ommit 8ef945dad2a3c5223bf92f1431c6899380593c29 (HEAD -> patched)
Author: Bastien Roucariès <rouca@debian.org>
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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions