Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 617403c

Browse files
committed
remove typedarray-to-buffer
1 parent 9806bdd commit 617403c

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

‎index.js‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
/* global Blob, FileReader */
22

3-
// arraybuffer -> buffer without copy
4-
var toBuffer = require('typedarray-to-buffer')
5-
63
module.exports = function blobToBuffer (blob, cb) {
74
if (typeof Blob === 'undefined' || !(blob instanceof Blob)) {
85
throw new Error('first argument must be a Blob')
@@ -16,7 +13,7 @@ module.exports = function blobToBuffer (blob, cb) {
1613
function onLoadEnd (e) {
1714
reader.removeEventListener('loadend', onLoadEnd, false)
1815
if (e.error) cb(e.error)
19-
else cb(null, toBuffer(reader.result))
16+
else cb(null, newBuffer(reader.result))
2017
}
2118

2219
reader.addEventListener('loadend', onLoadEnd, false)

‎package.json‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
"bugs": {
77
"url": "https://github.com/feross/blob-to-buffer/issues"
88
},
9-
"dependencies": {
10-
"typedarray-to-buffer": "^3.0.1"
11-
},
9+
"dependencies": {},
1210
"devDependencies": {
1311
"standard": "^5.0.0",
1412
"tape": "^4.0.0",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /