mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-14 07:06:17 +00:00
12 lines
294 B
JavaScript
12 lines
294 B
JavaScript
|
'use strict'
|
||
|
module.exports = isRegistry
|
||
|
|
||
|
function isRegistry (req) {
|
||
|
if (req == null) return false
|
||
|
// modern metadata
|
||
|
if ('registry' in req) return req.registry
|
||
|
// legacy metadata
|
||
|
if (req.type === 'range' || req.type === 'version' || req.type === 'tag') return true
|
||
|
return false
|
||
|
}
|