@fav/path.normalize

0.9.0 • Public • Published

@fav/path.normalize NPM version

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

Install

For installing @fav/path with npm:

$ npm install @fav/path --save

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

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

Usage

When installing @fav/path:

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

path.normalize('/foo/bar//baz/asdf/quux/..');
// => '/foo/bar/baz/asdf'

When installing @fav/path.normalize:

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

normalize('/foo/bar//baz/asdf/quux/..');
// => '/foo/bar/baz/asdf'

API

normalize(path)

Normalizes the given path, resolving '..' and '.' segments.

Arguments
  • path [string] : a path string.
Errors
  • [TypeError] : if path is not a string.

License

Copyright (C) 2016 Takayuki Sato

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.9.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.9.0
    0
  • 0.8.0
    0
  • 0.7.0
    0
  • 0.6.0
    0

Package Sidebar

Install

npm i @fav/path.normalize

Weekly Downloads

0

Version

0.9.0

License

MIT

Last publish

Collaborators

  • sttk