is-absolute
Advanced tools
Comparing version 0.1.5 to 0.1.7
22
index.js
/*! | ||
* is-absolute <https:\\github.com/jonschlinkert/is-absolute> | ||
* is-absolute <https://github.com/jonschlinkert/is-absolute> | ||
* | ||
* Copyright (c) 2014 Jon Schlinkert, contributors. | ||
* Licensed under the MIT License | ||
* Copyright (c) 2014-2015, Jon Schlinkert. | ||
* Licensed under the MIT License. | ||
*/ | ||
@@ -12,18 +12,2 @@ | ||
/** | ||
* **Example:** | ||
* | ||
* ```js | ||
* isAbsolute('a/b/c.js'); | ||
* //=> 'false' | ||
* | ||
* isAbsolute('C://a/b/c.js'); | ||
* //=> 'true' | ||
* ``` | ||
* | ||
* @param {String} `filepath` | ||
* @return {Boolean} | ||
* @api public | ||
*/ | ||
module.exports = function isAbsolute(filepath) { | ||
@@ -30,0 +14,0 @@ if ('/' === filepath[0]) { |
{ | ||
"name": "is-absolute", | ||
"description": "Return true if a file path is absolute.", | ||
"version": "0.1.5", | ||
"version": "0.1.7", | ||
"homepage": "https://github.com/jonschlinkert/is-absolute", | ||
@@ -17,8 +17,22 @@ "author": { | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/jonschlinkert/is-absolute/blob/master/LICENSE-MIT" | ||
} | ||
"license": { | ||
"type": "MIT", | ||
"url": "https://github.com/jonschlinkert/is-absolute/blob/master/LICENSE" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"main": "index.js", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha" | ||
}, | ||
"dependencies": { | ||
"is-relative": "^0.1.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "*" | ||
}, | ||
"keywords": [ | ||
@@ -39,19 +53,3 @@ "absolute", | ||
"url" | ||
], | ||
"main": "index.js", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha -R spec" | ||
}, | ||
"devDependencies": { | ||
"chai": "^1.9.1", | ||
"mocha": "*", | ||
"verb": ">= 0.2.6", | ||
"verb-tag-jscomments": ">= 0.2.0" | ||
}, | ||
"dependencies": { | ||
"is-relative": "^0.1.0" | ||
} | ||
] | ||
} |
@@ -1,2 +0,2 @@ | ||
# is-absolute [![NPM version](https://badge.fury.io/js/is-absolute.png)](http://badge.fury.io/js/is-absolute) | ||
# is-absolute [![NPM version](https://badge.fury.io/js/is-absolute.svg)](http://badge.fury.io/js/is-absolute) [![Build Status](https://travis-ci.org/jonschlinkert/is-absolute.svg)](https://travis-ci.org/jonschlinkert/is-absolute) | ||
@@ -7,7 +7,6 @@ > Return true if a file path is absolute. | ||
## Install | ||
Install with [npm](npmjs.org): | ||
## Install with [npm](npmjs.org) | ||
```bash | ||
npm i is-absolute --save-dev | ||
npm i is-absolute --save | ||
``` | ||
@@ -19,21 +18,25 @@ | ||
var isAbsolute = require('is-absolute'); | ||
console.log(isAbsolute('abc')); | ||
//=> ['a', 'b', 'c']; | ||
console.log(isAbsolute('a/b/c.js')); | ||
//=> 'false'; | ||
``` | ||
## API | ||
## Running tests | ||
Install dev dependencies. | ||
**Example:** | ||
```bash | ||
npm i -d && npm test | ||
``` | ||
```js | ||
isAbsolute('a/b/c.js'); | ||
//=> 'false' | ||
isAbsolute('C://a/b/c.js'); | ||
//=> 'true' | ||
``` | ||
## Contributing | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-absolute/issues) | ||
* `filepath` {String} | ||
* `return` {Boolean} | ||
## Other projects | ||
* [is-relative](https://github.com/jonschlinkert/is-relative): Returns `true` if the path appears to be relative. | ||
* [is-dotfile](https://github.com/regexps/is-dotfile): Return true if a file path is (or has) a dotfile. | ||
* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. | ||
* [cwd](https://github.com/jonschlinkert/cwd): Node.js util for easily getting the current working directory of a project based on package.json or the given path. | ||
* [git-config-path](https://github.com/jonschlinkert/git-config-path): Resolve the path to the user's global .gitconfig. | ||
## Author | ||
@@ -47,3 +50,3 @@ | ||
## License | ||
Copyright (c) 2014 Jon Schlinkert, contributors. | ||
Copyright (c) 2014-2015 Jon Schlinkert | ||
Released under the MIT license | ||
@@ -53,2 +56,2 @@ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 06, 2014._ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 05, 2015._ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
1
54
0
4478
4
23