forked from enviPath/enviPy
Current Dev State
This commit is contained in:
9
static/js/ketcher2/node_modules/tildify/index.js
generated
vendored
Normal file
9
static/js/ketcher2/node_modules/tildify/index.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
var path = require('path');
|
||||
var osHomedir = require('os-homedir');
|
||||
var home = osHomedir();
|
||||
|
||||
module.exports = function (str) {
|
||||
str = path.normalize(str) + path.sep;
|
||||
return (str.indexOf(home) === 0 ? str.replace(home + path.sep, '~' + path.sep) : str).slice(0, -1);
|
||||
};
|
||||
Reference in New Issue
Block a user