# Necessary plugins
[use]
plugin = basics
plugin = analytics
# Flow configuration
[JSONParse]
legacy = false
separator = $
[expand]
path = value
size = 1
cacheName = prefixes
[expand/assign]
path = value
value = get('value).split('/').filter(i=>i.match(/^10./)).pop()
[expand/assign]
path = url
value = fix('https://api.crossref.org/prefixes', self.value).join('/')
[expand/URLFetch]
target = result
url = get('url')
json = true
timeout = 30000
noerror = true
[expand/replace]
path = id
value = get('id')
path = value
value = get('result.message.name', 'n/a')
[dump]
indent = env('indent', false)