Skip to content

Commit

Permalink
🎉 Remove external dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusU committed Mar 12, 2018
1 parent 07ff544 commit c26ed51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion index.js
@@ -1,11 +1,15 @@
var isArrayBuffer = require('is-array-buffer-x')
var toString = Object.prototype.toString

var isModern = (
typeof Buffer.alloc === 'function' &&
typeof Buffer.allocUnsafe === 'function' &&
typeof Buffer.from === 'function'
)

function isArrayBuffer (input) {
return toString.call(input).slice(8, -1) === 'ArrayBuffer'
}

function fromArrayBuffer (obj, byteOffset, length) {
byteOffset >>>= 0

Expand Down
5 changes: 1 addition & 4 deletions package.json
Expand Up @@ -12,8 +12,5 @@
"keywords": [
"buffer",
"buffer from"
],
"dependencies": {
"is-array-buffer-x": "^1.0.13"
}
]
}

0 comments on commit c26ed51

Please sign in to comment.