0.9.0 • Published 8 years ago

@fav/path.parse v0.9.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

@fav/path.parse NPM version

Provides same behaviors of path.parse module for all versions of node.js

Install

For installing @fav/path with npm:

$ npm install @fav/path --save

For installing only @fav/path.parse with npm:

$ npm install @fav/path.parse --save

Usage

When installing @fav/path:

const path = require('@fav/path');

path.parse('/path/to/file.txt');
// => {
//      root: '/',
//      dir: '/path/to',
//      base: 'file.txt',
//      ext: '.txt',
//      name: 'file'
//    }

When installing @fav/path.parse:

const parse = require('@fav/path.parse');

parse('/path/to/file.txt');
// => {
//      root: '/',
//      dir: '/path/to',
//      base: 'file.txt',
//      ext: '.txt',
//      name: 'file'
//    }

API

parse(path)

Parses the path string and returns the result object which has the path elements as its properties. The properties are as follows:

Arguments
Errors

License

Copyright (C) 2016 Takayuki Sato

This program is free software under MIT License. See the file LICENSE in this distribution for more details.

0.9.0

8 years ago

0.8.0

8 years ago

0.7.0

8 years ago