processRelationPath.js 354 B

123456789101112131415161718192021
  1. "use strict";
  2. var utils = require('../../api/utils');
  3. var browserPath = utils.browserPath;
  4. var posix = browserPath();
  5. function processRelationPath(self, relation) {
  6. var from = self.is;
  7. var to = relation;
  8. if (to[0] === '.') {
  9. to = "../".concat(to);
  10. }
  11. var _p = posix.join(from, to);
  12. return _p;
  13. }
  14. module.exports = processRelationPath;