is-local-path

0.1.6 • Public • Published

is-local-path

Test whether a path is local.

npm version npm license Travis David npm downloads

Installation

npm install is-local-path

Usage

var isLocalPath = require('is-local-path');
 
isLocalPath('/path/to/file.ext')); // true
isLocalPath('/path/to/directory')); // true
isLocalPath('./relative/path')); // true
isLocalPath('../relative/path')); // true
 
isLocalPath('http://host.com/path/to/file.ext')); // false
isLocalPath('data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D')); // false

API


isLocalPath ( string )

Tests whether a string is a local path.

Arguments

  • string - A string to test.

Readme

Keywords

none

Package Sidebar

Install

npm i is-local-path

Weekly Downloads

12,987

Version

0.1.6

License

MIT

Last publish

Collaborators

  • panosoft