From 1809f37e5ac23b946085c5a86d9c0a10a8b00974 Mon Sep 17 00:00:00 2001 From: Gilles Piou Date: Fri, 6 Jul 2018 16:52:25 +0800 Subject: [PATCH] Use Buffer.from() (#8) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 5fc3b52..0eb0d1b 100755 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ module.exports = function(options) { contents = file.contents.toString("utf8"); contents = pp.preprocess(contents, context, extension); - file.contents = new Buffer(contents); + file.contents = Buffer.from(contents); callback(null, file); }