Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « graceful-readlink « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7e9fc70f0ac25112945e1b3a44ed99c627c2b108 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
var fs = require('fs')
  , lstat = fs.lstatSync;

exports.readlinkSync = function (p) {
  if (lstat(p).isSymbolicLink()) {
    return fs.readlinkSync(p);
  } else {
    return p;
  }
};