All Projects → jonschlinkert → Is Absolute

jonschlinkert / Is Absolute

Licence: mit
Returns true if a filepath is absolute. The original path-is-absolute.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Is Absolute

svg-path-bbox
SVG paths bounding box calculator
Stars: ✭ 17 (-10.53%)
Mutual labels:  path
is-relative
Returns `true` if a file path appears to be relative. Moved from the "relative" lib.
Stars: ✭ 13 (-31.58%)
Mutual labels:  path
Android Nosql
Lightweight, simple structured NoSQL database for Android
Stars: ✭ 284 (+1394.74%)
Mutual labels:  path
plugins
Elder.js plugins and community plugins.
Stars: ✭ 80 (+321.05%)
Mutual labels:  path
requireg
Resolve and require local & global modules in node.js like a boss
Stars: ✭ 45 (+136.84%)
Mutual labels:  path
get-installed-path
Get locally or globally installation path of given package name.
Stars: ✭ 39 (+105.26%)
Mutual labels:  path
relative-path
Portable relative UTF-8 paths for Rust.
Stars: ✭ 54 (+184.21%)
Mutual labels:  path
Etree
parse and generate XML easily in go
Stars: ✭ 763 (+3915.79%)
Mutual labels:  path
readdir
Recursively read a directory, blazing fast. Use with picomatch or micromatch to match globs.
Stars: ✭ 37 (+94.74%)
Mutual labels:  path
Xvg
🔬 debug SVG paths in the browser
Stars: ✭ 258 (+1257.89%)
Mutual labels:  path
is-valid-glob
Return true if a value is a valid glob pattern string, or array of glob patterns.
Stars: ✭ 21 (+10.53%)
Mutual labels:  path
relative
Easily calculate the relative path from file A to file B in Node.js project. Will calculate correctly from a file to a directory, file to file, directory to file, and directory to directory.
Stars: ✭ 34 (+78.95%)
Mutual labels:  path
react-svg-curve
React components to draw different types of curves with svg
Stars: ✭ 42 (+121.05%)
Mutual labels:  path
Pathslider
Numerical slider that follows a Bezier path
Stars: ✭ 15 (-21.05%)
Mutual labels:  path
React Mt Svg Lines
A React.js wrapper component to animate the line stroke in SVGs
Stars: ✭ 344 (+1710.53%)
Mutual labels:  path
file-icon-cli
Get the icon of a file or app as a PNG image (macOS)
Stars: ✭ 73 (+284.21%)
Mutual labels:  path
PathBuilder
SwiftUI result builder for Path
Stars: ✭ 48 (+152.63%)
Mutual labels:  path
Macsvg
macSVG - An open-source macOS app for designing HTML5 SVG (Scalable Vector Graphics) art and animation with a WebKit web view ➤➤➤
Stars: ✭ 789 (+4052.63%)
Mutual labels:  path
Glsl Pathtracer
A GLSL Path Tracer
Stars: ✭ 634 (+3236.84%)
Mutual labels:  path
Pathmenu
Path 4.2 menu using CoreAnimation in Swift. Inspired by AwesomeMenu(https://github.com/levey/AwesomeMenu).
Stars: ✭ 256 (+1247.37%)
Mutual labels:  path

is-absolute NPM version NPM monthly downloads NPM total downloads Linux Build Status

Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native path.isAbolute.

Install

Install with npm:

$ npm install --save is-absolute

Originally based on the isAbsolute utility method in express.

Usage

var isAbsolute = require('is-absolute');

isAbsolute('a/b/c.js');
//=> 'false'
isAbsolute('/a/b/c.js');
//=> 'true'

Explicitly test windows paths

isAbsolute.posix('/foo/bar');
isAbsolute.posix('/user/docs/Letter.txt');
//=> true

isAbsolute.posix('foo/bar');
//=> false

Explicitly test windows paths

var isAbsolute = require('is-absolute');

isAbsolute.win32('c:\\');
isAbsolute.win32('//C://user\\docs\\Letter.txt');
isAbsolute.win32('\\\\unc\\share');
isAbsolute.win32('\\\\unc\\share\\foo');
isAbsolute.win32('\\\\unc\\share\\foo\\');
isAbsolute.win32('\\\\unc\\share\\foo\\bar');
isAbsolute.win32('\\\\unc\\share\\foo\\bar\\');
isAbsolute.win32('\\\\unc\\share\\foo\\bar\\baz');
//=> true

isAbsolute.win32('a:foo/a/b/c/d');
isAbsolute.win32(':\\');
isAbsolute.win32('foo\\bar\\baz');
isAbsolute.win32('foo\\bar\\baz\\');
//=> false

About

Related projects

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Contributors

Commits Contributor
35 jonschlinkert
1 es128
1 shinnn
1 Sobak

Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on July 13, 2017.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].