]> zoso.dev Git - buffer.git/commitdiff
declare i inline
authorDaniel Cousens <github@dcousens.com>
Tue, 11 Aug 2015 14:29:25 +0000 (00:29 +1000)
committerDaniel Cousens <github@dcousens.com>
Tue, 11 Aug 2015 14:29:25 +0000 (00:29 +1000)
index.js

index b5f4588d3e811fe2a5d5c95c5e68b41c54419d4f..77d0f470758d94bc262ead59b324c984c4ef3718 100644 (file)
--- a/index.js
+++ b/index.js
@@ -1406,9 +1406,8 @@ function utf8ToBytes (string, units) {
   var length = string.length
   var leadSurrogate = null
   var bytes = []
-  var i = 0
 
-  for (; i < length; i++) {
+  for (var i = 0; i < length; i++) {
     codePoint = string.charCodeAt(i)
 
     // is surrogate component