Skip to content

ragingwind/pathize-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pathize-url Build Status

Parse URL and return it as result of path.parse

Install

$ npm install --save pathize-url

Usage

const pathizeUrl = require('pathize-url');

pathizeUrl('http://ragingwind.me/blogs/assets/profile.png');
//=>
{
	root: 'ragingwind.me',  // host, hostname
	dir: 'blogs/assets',    // dir name of pathname, first seperate will be removed
	base: 'profile.png',    // the last of the path
	ext: '.png',            // ext of the last of the path
	name: 'profile',        // the name of the last of the path
	url: [Object]           // parsed object from url.parse
}

API

pathizeUrl(url)

input

Type: string

URL to parse.

License

MIT © ragingwind

About

Parse URL and return it as result of path.parse

Resources

License

Stars

Watchers

Forks

Packages

No packages published