mirror of
https://github.com/pnpm/pnpm.git
synced 2026-02-02 19:22:52 -05:00
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.
13 lines
295 B
JavaScript
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)
|
|
}
|