Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict'
const duck = require('protoduck')
const Fetcher = duck.define(['spec', 'opts', 'manifest'], {
packument: ['spec', 'opts'],
manifest: ['spec', 'opts'],
tarball: ['spec', 'opts'],
fromManifest: ['manifest', 'spec', 'opts'],
clearMemoized () {}
}, { name: 'Fetcher' })
module.exports = Fetcher
module.exports.packument = packument
function packument (spec, opts) {
const fetcher = getFetcher(spec.type)
return fetcher.packument(spec, opts)
}
module.exports.manifest = manifest
function manifest (spec, opts) {