Array.prototype.encodeUtf8 renamed to node.encodeUtf8(array)
authorRyan <ry@tinyclouds.org>
Mon, 20 Jul 2009 16:19:13 +0000 (18:19 +0200)
committerRyan <ry@tinyclouds.org>
Mon, 20 Jul 2009 16:19:13 +0000 (18:19 +0200)
src/util.js

index 0c33692..da1666a 100644 (file)
@@ -20,8 +20,8 @@ node.inherits = function (ctor, superCtor) {
 };
 
 // This is useful for dealing with raw encodings.
-Array.prototype.encodeUtf8 = function () {
-  return String.fromCharCode.apply(String, this);
+node.encodeUtf8 = function (array) {
+  return String.fromCharCode.apply(String, array);
 };
 
 node.cat = function(location, encoding, callback) {