Connect data

This commit is contained in:
brunosimon
2016-06-05 01:14:23 +02:00
parent b61ddb5967
commit c8d111cf5c
10 changed files with 261 additions and 164 deletions
+34
View File
@@ -0,0 +1,34 @@
'use strict'
// Dependencies
let path = require( 'path' )
class Paths
{
constructor()
{
this.separator = path.sep
}
normalize( _path )
{
if( _path === '.' || _path === '' )
return '.';
let normalized_path = './' + path.normalize( _path )
return normalized_path
}
parse( _path )
{
let normalized_path = this.normalize( _path ),
parsed_path = path.parse( normalized_path )
return parsed_path
}
}
let paths = new Paths()
module.exports = paths