Permalink
Browse files

add checks for complete basics

  • Loading branch information...
1 parent 8f8f6d9 commit b4cd8c18487a75ecccf9d8145fc575fa4ecc463d @dominictarr committed Jul 11, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 index.js
View
@@ -1,5 +1,6 @@
var a = require('assertions')
var macgyver = require('macgyver')
+var Stream = require('stream')
function merge (to, from) {
to = to || {}
@@ -11,6 +12,11 @@ function merge (to, from) {
module.exports = function (stream, opts) {
+
+ a.isInstanceof(stream, Stream)
+ a.property(stream,'pipe', a._isFunction())
+ a.property(stream,'destroy', a._isFunction())
+
var mac = macgyver()
var opts = merge(('string' == typeof opts ? {name: opts} : opts) || {}, {name: 'stream'})
var spec = {}

0 comments on commit b4cd8c1

Please sign in to comment.