Last active
August 29, 2015 14:05
-
-
Save L2L2L/52e20a1e9d250f37f17b to your computer and use it in GitHub Desktop.
Replacement for all write and read method for Buffer's instance objects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Use strict"; | |
Buffer.prototype.read = function(index, dataType, offfset, end){ | |
offset = offset||0; | |
end = end||this.length; | |
return (this["read"+dataType](index, offset, end)); | |
} | |
Buffer.prototype.write = function(index, dataType, offfset, end){ | |
offset = offset||0; | |
end = end||this.length; | |
return (this["write"+dataType](index, offset, end)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I aim to contribute to node through C/C++ add-on. This is one of the things I will create an add on for to hard code it in node.