m-path

0.0.1 • Public • Published

m-path

npm total download npm version License

インストール - Install

$ npm i -S m-path

使い方 - Usage

Functions

  }
  this.getPlatform = function() {…}
--
  };
  this.isWindows = function() {…}
--
  };
  this.getPathseparator = function() {…}
--
  };
  this.pathSplit = function(path) {…}
--
  };
  this.pathJoin = function(ary) {…}

NodeJS

Code

Result

require('m-path');
  require("m-util");
  var hr = "_".uRepeat(20);
  var m_path = require("./index.js");

console.log(hr); console.log('getPlatform():', m_path.getPlatform()); console.log('isWindows():', m_path.isWindows()); console.log('getPathseparator():', m_path.getPathseparator());

console.log(hr); console.log('pathSplit():', m_path.pathSplit("./path/path2/path3")); console.log('pathSplit():', m_path.pathSplit("path/path2/path3"));

console.log(hr); console.log('pathJoin():', m_path.pathJoin(['.', 'path', 'path2', 'path3'])); console.log('pathJoin():', m_path.pathJoin(['path', 'path2', 'path3']));

}).call(this);

# node example.js
____________________
getPlatform(): darwin
isWindows(): false
getPathseparator(): /
____________________
pathSplit(): [ '.', 'path', 'path2', 'path3' ]
pathSplit(): [ 'path', 'path2', 'path3' ]
____________________
pathJoin(): ./path/path2/path3
pathJoin(): path/path2/path3
  

ライセンス - License

MIT License

作者 - Author

Readme

Keywords

Package Sidebar

Install

npm i m-path

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • m-shibata