Skip to content

Commit 9320776

Browse files
JSHint
1 parent 6b913d6 commit 9320776

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

lib/read.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ function read$RefFile($ref, options) {
102102

103103
$ref.type = 'fs';
104104
return new Promise(function(resolve, reject) {
105+
var file;
105106
try {
106-
var file = decodeURI($ref.path);
107+
file = decodeURI($ref.path);
107108
}
108109
catch (err) {
109110
reject(ono.uri(err, 'Malformed URI: %s', $ref.path));

lib/util.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ exports.debug = debug('json-schema-ref-parser');
1818
*/
1919
exports.cwd = function cwd() {
2020
return process.browser ? location.href : process.cwd() + '/';
21-
}
21+
};
2222

2323
/**
2424
* Determines whether the given path is a URL.
@@ -28,7 +28,7 @@ exports.cwd = function cwd() {
2828
*/
2929
exports.isUrl = function isUrl(path) {
3030
return protocolPattern.test(path);
31-
}
31+
};
3232

3333
/**
3434
* Returns the hash (URL fragment), if any, of the given path.
@@ -42,7 +42,7 @@ exports.getHash = function getHash(path) {
4242
return path.substr(hashIndex);
4343
}
4444
return '';
45-
}
45+
};
4646

4747
/**
4848
* Removes the hash (URL fragment), if any, from the given path.
@@ -56,7 +56,7 @@ exports.stripHash = function stripHash(path) {
5656
path = path.substr(0, hashIndex);
5757
}
5858
return path;
59-
}
59+
};
6060

6161
/**
6262
* Returns the file extension of the given path.
@@ -70,7 +70,7 @@ exports.extname = function extname(path) {
7070
return path.substr(lastDot).toLowerCase();
7171
}
7272
return '';
73-
}
73+
};
7474

7575
/**
7676
* Asynchronously invokes the given callback function with the given parameters.
@@ -95,4 +95,4 @@ exports.doCallback = function doCallback(callback, err, params) {
9595
function invokeCallback() {
9696
callback.apply(null, args);
9797
}
98-
}
98+
};

0 commit comments

Comments
 (0)