Comparing version 1.0.7 to 1.0.8
@@ -89,2 +89,7 @@ "use strict"; | ||
[ | ||
'wiley', | ||
'https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2022GC010600', | ||
'10.1029/2022GC010600', | ||
], | ||
[ | ||
'zenodo', | ||
@@ -91,0 +96,0 @@ 'https://zenodo.org/badge/latestdoi/169800572', |
@@ -15,10 +15,2 @@ "use strict"; | ||
}; | ||
const doiSubdomain = { | ||
test (url) { | ||
return !!url.hostname.match(/(?:^|\.)doi./) || url.pathname.includes('/doi/'); | ||
}, | ||
parse (url) { | ||
return url.pathname.replace(/\/doi\//, '').replace(/^\//, ''); | ||
} | ||
}; | ||
const elife = { | ||
@@ -60,6 +52,5 @@ test (url) { | ||
doiOrg, | ||
doiSubdomain, | ||
pathParts, | ||
elife, | ||
zenodo, | ||
pathParts | ||
zenodo | ||
]; | ||
@@ -66,0 +57,0 @@ exports.DEFAULT_RESOLVERS = DEFAULT_RESOLVERS; |
@@ -83,2 +83,7 @@ import doi from './index'; | ||
[ | ||
'wiley', | ||
'https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2022GC010600', | ||
'10.1029/2022GC010600', | ||
], | ||
[ | ||
'zenodo', | ||
@@ -85,0 +90,0 @@ 'https://zenodo.org/badge/latestdoi/169800572', |
@@ -10,10 +10,2 @@ import { validatePart } from './validatePart'; | ||
}; | ||
const doiSubdomain = { | ||
test (url) { | ||
return !!url.hostname.match(/(?:^|\.)doi./) || url.pathname.includes('/doi/'); | ||
}, | ||
parse (url) { | ||
return url.pathname.replace(/\/doi\//, '').replace(/^\//, ''); | ||
} | ||
}; | ||
const elife = { | ||
@@ -54,8 +46,7 @@ test (url) { | ||
doiOrg, | ||
doiSubdomain, | ||
pathParts, | ||
elife, | ||
zenodo, | ||
pathParts | ||
zenodo | ||
]; | ||
//# sourceMappingURL=resolvers.js.map |
{ | ||
"name": "doi-utils", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Set of utility functions to help with handling DOI(Digital Object Identifier)", | ||
@@ -5,0 +5,0 @@ "author": "Curvenote Inc. <support@curvenote.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
49513
542