mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-12 13:41:40 +00:00
update
This commit is contained in:
1
node_modules/is-relative-path/.npmignore
generated
vendored
Normal file
1
node_modules/is-relative-path/.npmignore
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
node_modules
|
8
node_modules/is-relative-path/.travis.yml
generated
vendored
Normal file
8
node_modules/is-relative-path/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.10"
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
sudo: false
|
16
node_modules/is-relative-path/Readme.md
generated
vendored
Normal file
16
node_modules/is-relative-path/Readme.md
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
### is-relative-path [](https://npmjs.org/package/is-relative-path) [](https://npmjs.org/package/is-relative-path)
|
||||
|
||||
> Sometimes I just want to scream
|
||||
|
||||
`npm install is-relative-path`
|
||||
|
||||
### Usage
|
||||
|
||||
```js
|
||||
var isRelative = require('is-relative-path');
|
||||
|
||||
isRelative('../'); // true
|
||||
isRelative('/'); // false
|
||||
```
|
||||
|
||||
|
13
node_modules/is-relative-path/index.js
generated
vendored
Normal file
13
node_modules/is-relative-path/index.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
var util = require('util');
|
||||
|
||||
/**
|
||||
* @param {String} filename
|
||||
* @return {Boolean}
|
||||
*/
|
||||
module.exports = function (filename) {
|
||||
if (typeof filename !== 'string') {
|
||||
throw new TypeError('Path must be a string. Received ' + util.inspect(filename));
|
||||
}
|
||||
|
||||
return filename[0] === '.';
|
||||
};
|
65
node_modules/is-relative-path/package.json
generated
vendored
Normal file
65
node_modules/is-relative-path/package.json
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"is-relative-path@1.0.2",
|
||||
"/Users/tatiana/selfdefined"
|
||||
]
|
||||
],
|
||||
"_from": "is-relative-path@1.0.2",
|
||||
"_id": "is-relative-path@1.0.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-CRtGoNZ8HtD+hfH4z93gBrslHUY=",
|
||||
"_location": "/is-relative-path",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "is-relative-path@1.0.2",
|
||||
"name": "is-relative-path",
|
||||
"escapedName": "is-relative-path",
|
||||
"rawSpec": "1.0.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/filing-cabinet"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-relative-path/-/is-relative-path-1.0.2.tgz",
|
||||
"_spec": "1.0.2",
|
||||
"_where": "/Users/tatiana/selfdefined",
|
||||
"author": {
|
||||
"name": "Joel Kemp",
|
||||
"email": "joel@mrjoelkemp.com",
|
||||
"url": "http://www.mrjoelkemp.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/mrjoelkemp/is-relative-path/issues"
|
||||
},
|
||||
"description": "Whether or not a given path is relative",
|
||||
"devDependencies": {
|
||||
"jscs": "~3.0.3",
|
||||
"mocha": "~2.4.5"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"homepage": "https://github.com/mrjoelkemp/is-relative-path",
|
||||
"jscsConfig": {
|
||||
"preset": "airbnb"
|
||||
},
|
||||
"keywords": [
|
||||
"relative",
|
||||
"path"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "is-relative-path",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mrjoelkemp/is-relative-path.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jscs test index.js && mocha"
|
||||
},
|
||||
"version": "1.0.2"
|
||||
}
|
33
node_modules/is-relative-path/test/test.js
generated
vendored
Normal file
33
node_modules/is-relative-path/test/test.js
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
var assert = require('assert');
|
||||
var isRelative = require('../');
|
||||
|
||||
describe('is-relative-path', function () {
|
||||
it('returns true if the given path is relative', function () {
|
||||
assert.ok(isRelative('../'));
|
||||
assert.ok(isRelative('../foo.js'));
|
||||
assert.ok(isRelative('../../foo.js'));
|
||||
assert.ok(isRelative('./foo.js'));
|
||||
assert.ok(isRelative('./foo'));
|
||||
assert.ok(isRelative('./'));
|
||||
assert.ok(isRelative('../../../../'));
|
||||
});
|
||||
|
||||
it('returns false if the given path is not relative', function () {
|
||||
assert.ok(!isRelative('/'));
|
||||
assert.ok(!isRelative('/foo.js'));
|
||||
assert.ok(!isRelative('foo.js'));
|
||||
assert.ok(!isRelative('foo'));
|
||||
assert.ok(!isRelative('foo/bar/car/baz.js'));
|
||||
});
|
||||
|
||||
it('throws TypeError if the given path is not a string', function () {
|
||||
assert.throws(isRelative.bind(null, undefined), TypeError);
|
||||
assert.throws(isRelative.bind(null, null), TypeError);
|
||||
assert.throws(isRelative.bind(null, false), TypeError);
|
||||
assert.throws(isRelative.bind(null, true), TypeError);
|
||||
assert.throws(isRelative.bind(null, 0), TypeError);
|
||||
assert.throws(isRelative.bind(null, 1), TypeError);
|
||||
assert.throws(isRelative.bind(null, []), TypeError);
|
||||
assert.throws(isRelative.bind(null, {}), TypeError);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user