crocks
Version:
A collection of well known Algebraic Datatypes for your utter enjoyment.
16 lines (10 loc) • 317 B
JavaScript
/** @license ISC License (c) copyright 2016 original and current authors */
/** @author Ian Hofmann-Hicks (evil) */
var isFunction = require('../core/isFunction')
function read(m) {
if(!(m && isFunction(m.read))) {
throw new TypeError('read: Writer required')
}
return m.read()
}
module.exports = read