Use arrow functions for callbacks

This commit is contained in:
MICHAEL JACKSON
2017-11-08 10:14:46 -08:00
parent a8ab0b7dab
commit b614f8646d
14 changed files with 71 additions and 78 deletions

View File

@ -22,7 +22,7 @@ function fetchPackageInfo(packageName) {
headers: {
Accept: 'application/json'
}
}).then(function(res) {
}).then(res => {
return res.status === 404 ? null : res.json()
})
}
@ -31,7 +31,7 @@ const PackageNotFound = 'PackageNotFound'
// This mutex prevents multiple concurrent requests to
// the registry for the same package info.
const fetchMutex = createMutex(function(packageName, callback) {
const fetchMutex = createMutex((packageName, callback) => {
fetchPackageInfo(packageName).then(
function(value) {
if (value == null) {