'use strict';

module.exports = function(bin){
  let data = {};
  data.fin = !!(bin[0] >>> 7);
  data.reserves = ((bin[0] >>> 4) - (data.fin ? 8 : 0));
  data.opts = bin[0] - (data.fin ? 128 : 0) - data.reserves;
  data.masked = !!(bin[1] >>> 7);

  console.log(data);

  return data;
};

'use strict';

module.exports = function(){

};

--- 
+++ 
@@ -1,5 +1,13 @@
 'use strict';
 
-module.exports = function(){
+module.exports = function(bin){
+  let data = {};
+  data.fin = !!(bin[0] >>> 7);
+  data.reserves = ((bin[0] >>> 4) - (data.fin ? 8 : 0));
+  data.opts = bin[0] - (data.fin ? 128 : 0) - data.reserves;
+  data.masked = !!(bin[1] >>> 7);
 
+  console.log(data);
+
+  return data;
 };
Add decoding of first byte and mask.
