Skip to content

Commit

Permalink
es5 compatible
Browse files Browse the repository at this point in the history
version bump
  • Loading branch information
rzcoder committed Jan 24, 2019
1 parent 5fba405 commit 8fda923
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-rsa",
"version": "1.0.2",
"version": "1.0.3",
"description": "Node.js RSA library",
"main": "src/NodeRSA.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ module.exports._ = {
* themselves.
*/
module.exports.trimSurroundingText = function (data, opening, closing) {
let trimStartIndex = 0;
let trimEndIndex = data.length;
var trimStartIndex = 0;
var trimEndIndex = data.length;

let openingBoundaryIndex = data.indexOf(opening);
var openingBoundaryIndex = data.indexOf(opening);
if (openingBoundaryIndex >= 0) {
trimStartIndex = openingBoundaryIndex + opening.length;
}

let closingBoundaryIndex = data.indexOf(closing, openingBoundaryIndex);
var closingBoundaryIndex = data.indexOf(closing, openingBoundaryIndex);
if (closingBoundaryIndex >= 0) {
trimEndIndex = closingBoundaryIndex;
}
Expand Down

0 comments on commit 8fda923

Please sign in to comment.