1 2 3 4 5 6 7 8 9 10 11 12 | 2 1 129 129 129 2 | 'use strict'; var buffer = require('./buffer'); function typedBuffer(binString, buffType, type) { // buffType is either 'binary' or 'base64' var buff = new buffer(binString, buffType); buff.type = type; // non-standard, but used for consistency with the browser return buff; } module.exports = typedBuffer; |