default values

This commit is contained in:
Igor Klopov 2016-08-13 19:12:35 +03:00
parent be5494a575
commit 8e8f9e6ae9

View File

@ -3,10 +3,10 @@ import { hostArch, hostPlatform } from './system.js'; // eslint-disable-line no-
import patchesJson from '../patches/patches.json';
import semver from 'semver';
export function need ({ nodeRange, platform, arch } = {}) {
nodeRange = system.abiToNodeRange(nodeRange) || 'latest';
platform = platform || hostPlatform;
arch = arch || hostArch;
export function need ({
nodeRange = 'latest', platform = hostPlatform, arch = hostArch
} = {}) {
nodeRange = system.abiToNodeRange(nodeRange);
// TODO CROSSCOMPILATION
if (platform !== hostPlatform) {