1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
Subject: remove buffer-from package
author: Bastien Roucariès <rouca@debian.org>
Could use Buffer.from
Forwarded: no
Index: node-concat-stream/index.js
===================================================================
--- node-concat-stream.orig/index.js
+++ node-concat-stream/index.js
@@ -1,6 +1,6 @@
var Writable = require('stream').Writable
var inherits = require('inherits')
-var bufferFrom = require('buffer-from')
+var bufferFrom = Buffer.from
if (typeof Uint8Array === 'undefined') {
var U8 = require('typedarray').Uint8Array
Index: node-concat-stream/test/buffer.js
===================================================================
--- node-concat-stream.orig/test/buffer.js
+++ node-concat-stream/test/buffer.js
@@ -2,7 +2,7 @@ var concat = require('../')
var test = require('tape')
var TA = require('typedarray')
var U8 = typeof Uint8Array !== 'undefined' ? Uint8Array : TA.Uint8Array
-var bufferFrom = require('buffer-from')
+var bufferFrom = Buffer.from
test('buffer stream', function (t) {
t.plan(2)
Index: node-concat-stream/test/infer.js
===================================================================
--- node-concat-stream.orig/test/infer.js
+++ node-concat-stream/test/infer.js
@@ -1,6 +1,6 @@
var concat = require('../')
var test = require('tape')
-var bufferFrom = require('buffer-from')
+var bufferFrom = Buffer.from
test('type inference works as expected', function(t) {
var stream = concat()
Index: node-concat-stream/test/string.js
===================================================================
--- node-concat-stream.orig/test/string.js
+++ node-concat-stream/test/string.js
@@ -2,7 +2,7 @@ var concat = require('../')
var test = require('tape')
var TA = require('typedarray')
var U8 = typeof Uint8Array !== 'undefined' ? Uint8Array : TA.Uint8Array
-var bufferFrom = require('buffer-from')
+var bufferFrom = Buffer.from
test('string -> buffer stream', function (t) {
t.plan(2)
Index: node-concat-stream/test/typedarray.js
===================================================================
--- node-concat-stream.orig/test/typedarray.js
+++ node-concat-stream/test/typedarray.js
@@ -2,7 +2,7 @@ var concat = require('../')
var test = require('tape')
var TA = require('typedarray')
var U8 = typeof Uint8Array !== 'undefined' ? Uint8Array : TA.Uint8Array
-var bufferFrom = require('buffer-from')
+var bufferFrom = Buffer.from
test('typed array stream', function (t) {
t.plan(2)
Index: node-concat-stream/package.json
===================================================================
--- node-concat-stream.orig/package.json
+++ node-concat-stream/package.json
@@ -28,7 +28,6 @@
},
"license": "MIT",
"dependencies": {
- "buffer-from": "^1.0.0",
"inherits": "^2.0.3",
"typedarray": "^0.0.6"
},
|