Skip to content

Commit

Permalink
fixed ESLint complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-coleman committed Jun 26, 2017
1 parent da231b9 commit a14076f
Show file tree
Hide file tree
Showing 4 changed files with 3,805 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"env": {
"node": true,
"mocha": true,
"es6": true
"es6": true,
"browser": true
},

// Extra plugins required
Expand Down
31 changes: 17 additions & 14 deletions jsonata.js
Original file line number Diff line number Diff line change
Expand Up @@ -3138,13 +3138,15 @@ var jsonata = (function() {
return undefined;
}
// Use btoa in a browser, or Buffer in Node.js
// eslint-disable-next-line
var btoa = typeof window !== 'undefined' ? /* istanbul ignore next */ window.btoa : function(str) {
// Simply doing `new Buffer` at this point causes Browserify to pull
// in the entire Buffer browser library, which is large and unnecessary.
// Using `global.Buffer` defeats this.
return new global.Buffer(str, 'binary').toString('base64');
};

var btoa = typeof window !== 'undefined' ?
/* istanbul ignore next */ window.btoa :
function(str) {
// Simply doing `new Buffer` at this point causes Browserify to pull
// in the entire Buffer browser library, which is large and unnecessary.
// Using `global.Buffer` defeats this.
return new global.Buffer(str, 'binary').toString('base64');
};
return btoa(str);
}

Expand All @@ -3159,13 +3161,14 @@ var jsonata = (function() {
return undefined;
}
// Use btoa in a browser, or Buffer in Node.js
// eslint-disable-next-line
var atob = typeof window !== 'undefined' ? /* istanbul ignore next */ window.atob : function(str) {
// Simply doing `new Buffer` at this point causes Browserify to pull
// in the entire Buffer browser library, which is large and unnecessary.
// Using `global.Buffer` defeats this.
return new global.Buffer(str, 'base64').toString('binary');
};
var atob = typeof window !== 'undefined' ?
/* istanbul ignore next */ window.atob :
function(str) {
// Simply doing `new Buffer` at this point causes Browserify to pull
// in the entire Buffer browser library, which is large and unnecessary.
// Using `global.Buffer` defeats this.
return new global.Buffer(str, 'base64').toString('binary');
};
return atob(str);
}

Expand Down
Loading

0 comments on commit a14076f

Please sign in to comment.