Skip to content

Commit

Permalink
only require typedarray if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
max-mapper committed Apr 4, 2015
1 parent e508401 commit a4b2ea2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
var Writable = require('readable-stream').Writable
var inherits = require('inherits')
var TA = require('typedarray')
var U8 = typeof Uint8Array !== 'undefined' ? Uint8Array : TA.Uint8Array

if (typeof Uint8Array === 'undefined') {
var U8 = require('typedarray').Uint8Array
} else {
var U8 = Uint8Array
}

function ConcatStream(opts, cb) {
if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb)
Expand Down

0 comments on commit a4b2ea2

Please sign in to comment.