Files
pnpm/lib/cmd/link.js
Zoltan Kochan 9bc97e76d4 style: use more ES6 syntax
Use lebab to transpile ES5 code to ES6.
Use eslint to fix styling issues afterwards.
Run all js in strict mode to allow let/const
in Node 4.
2016-08-23 21:12:01 +03:00

13 lines
295 B
JavaScript

'use strict'
const link = require('../api/link')
module.exports = (input, opts) => {
if (!input || !input.length) {
return link.linkToGlobal(opts)
}
if (input[0].indexOf('.') === 0) {
return link.linkFromRelative(input[0], opts)
}
return link.linkFromGlobal(input[0], opts)
}