Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
code style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aem committed Apr 29, 2017
1 parent eecaa9d commit 430bc8a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const rimraf = BB.promisify(require('rimraf'))
const readdirAsync = BB.promisify(require('fs').readdir)

module.exports = extract
function extract(spec, dest, opts) {
function extract (spec, dest, opts) {
opts = optCheck(opts)
spec = typeof spec === 'string' ? npa(spec, opts.where) : spec
const startTime = Date.now()
Expand Down Expand Up @@ -63,7 +63,7 @@ function extract(spec, dest, opts) {

}

function extractByDigest(start, spec, dest, opts) {
function extractByDigest (start, spec, dest, opts) {
const xtractor = extractStream(dest, opts)
const cached = cacache.get.stream.byDigest(opts.cache, opts.integrity, opts)
return pipe(cached, xtractor).then(() => {
Expand All @@ -72,7 +72,7 @@ function extractByDigest(start, spec, dest, opts) {
}

let fetch
function extractByManifest(start, spec, dest, opts) {
function extractByManifest (start, spec, dest, opts) {
const xtractor = extractStream(dest, opts)
return BB.resolve(null).then(() => {
if (!fetch) {
Expand All @@ -84,14 +84,14 @@ function extractByManifest(start, spec, dest, opts) {
})
}

function cleanUpCached(dest, cachePath, integrity, opts) {
function cleanUpCached (dest, cachePath, integrity, opts) {
return BB.join(
rimraf(dest),
cacache.rm.content(cachePath, integrity, opts)
)
}

function checkOverwrite(extractOverwrite, spec, dest) {
function checkOverwrite (extractOverwrite, spec, dest) {
return new BB((resolve, reject) => {
if (!extractOverwrite) {
readdirAsync(dest)
Expand Down

0 comments on commit 430bc8a

Please sign in to comment.