is-local-path
v0.1.6
Published
Test whether a path is local.
Downloads
50,533
Readme
is-local-path
Test whether a path is local.
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.