0.1.6 • Published 8 years ago

is-local-path v0.1.6

Weekly downloads
11,885
License
MIT
Repository
github
Last release
8 years ago

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.