/usr/lib/nodejs/resolve-dir/index.js is in node-resolve-dir 1.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | /*!
* resolve-dir <https://github.com/jonschlinkert/resolve-dir>
*
* Copyright (c) 2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
var path = require('path');
var expand = require('expand-tilde');
var gm = require('global-modules');
module.exports = function resolveDir(dir) {
if (dir.charAt(0) === '~') {
dir = expand(dir);
}
if (dir.charAt(0) === '@') {
dir = path.join(gm, dir.slice(1));
}
return dir;
};
|