Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Llamas committed Dec 17, 2013
1 parent 28a9a2b commit 78edc70
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/parse.js
Expand Up @@ -55,7 +55,7 @@ module.exports = function (data, options, handlers, control){

var escapeString = function (key, c, code){
if (escapingUnicode && unicodeRemaining){
unicode = (unicode<<4) + hex (c);
unicode = (unicode << 4) + hex (c);
if (--unicodeRemaining) return key;
escape = false;
escapingUnicode = false;
Expand Down Expand Up @@ -109,7 +109,7 @@ module.exports = function (data, options, handlers, control){
};
}

for (var i=~~control.resume, ii=data.length; i<ii; i++){
for (var i=~~control.resume; i<data.length; i++){
if (control.abort) return;
if (control.pause){
//The next index is always the start of a new line, it's a like a fresh
Expand Down
6 changes: 3 additions & 3 deletions lib/read.js
Expand Up @@ -29,7 +29,7 @@ var expand = function (o, str, options, cb){
var t;
var n;

for (var i=0, ii=str.length; i<ii; i++){
for (var i=0; i<str.length; i++){
c = str[i];

if (cp === "$" && c === "{"){
Expand Down Expand Up @@ -90,7 +90,7 @@ var namespaceValue = function (p, key){
var n = key.split (".");
var str;

for (var i=0, ii=n.length-1; i<ii; i++){
for (var i=0; i<n.length-1; i++){
str = n[i];
if (p[str] === undefined) return;
p = p[str];
Expand All @@ -103,7 +103,7 @@ var namespace = function (p, key, value){
var n = key.split (".");
var str;

for (var i=0, ii=n.length-1; i<ii; i++){
for (var i=0; i<n.length-1; i++){
str = n[i];
if (p[str] === undefined){
p[str] = {};
Expand Down
6 changes: 3 additions & 3 deletions lib/stringify.js
Expand Up @@ -13,7 +13,7 @@ var stringifyComment = function (comment, meta, options){
var code;
var str = options._comment;

for (var i=0, ii=comment.length; i<ii; i++){
for (var i=0; i<comment.length; i++){
c = comment[i];
code = comment.charCodeAt (i);

Expand All @@ -36,7 +36,7 @@ var stringifyKey = function (s, meta, options){
var code;
var str = "";

for (var i=0, ii=s.length; i<ii; i++){
for (var i=0; i<s.length; i++){
c = s[i];
code = s.charCodeAt (i);
str += escape (c, code, meta, options);
Expand All @@ -50,7 +50,7 @@ var stringifyValue = function (s, meta, options){
var code;
var str = "";

for (var i=0, ii=s.length; i<ii; i++){
for (var i=0; i<s.length; i++){
c = s[i];
code = s.charCodeAt (i);

Expand Down

0 comments on commit 78edc70

Please sign in to comment.