mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-17 07:43:38 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
41
node_modules/fs-access/index.js
generated
vendored
Normal file
41
node_modules/fs-access/index.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
'use strict';
|
||||
var fs = require('fs');
|
||||
var nullCheck = require('null-check');
|
||||
|
||||
var access = module.exports = function (pth, mode, cb) {
|
||||
if (typeof pth !== 'string') {
|
||||
throw new TypeError('path must be a string');
|
||||
}
|
||||
|
||||
if (typeof mode === 'function') {
|
||||
cb = mode;
|
||||
mode = access.F_OK;
|
||||
} else if (typeof cb !== 'function') {
|
||||
throw new TypeError('callback must be a function');
|
||||
}
|
||||
|
||||
if (!nullCheck(pth, cb)) {
|
||||
return;
|
||||
}
|
||||
|
||||
mode = mode | 0;
|
||||
|
||||
if (mode === access.F_OK) {
|
||||
fs.stat(pth, cb);
|
||||
}
|
||||
};
|
||||
|
||||
access.sync = function (pth, mode) {
|
||||
nullCheck(pth);
|
||||
|
||||
mode = mode === undefined ? access.F_OK : mode | 0;
|
||||
|
||||
if (mode === access.F_OK) {
|
||||
fs.statSync(pth);
|
||||
}
|
||||
};
|
||||
|
||||
access.F_OK = 0;
|
||||
access.R_OK = 4;
|
||||
access.W_OK = 2;
|
||||
access.X_OK = 1;
|
||||
21
node_modules/fs-access/license
generated
vendored
Normal file
21
node_modules/fs-access/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
42
node_modules/fs-access/package.json
generated
vendored
Normal file
42
node_modules/fs-access/package.json
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "fs-access",
|
||||
"version": "1.0.1",
|
||||
"description": "Node.js 0.12 fs.access() & fs.accessSync() ponyfill",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/fs-access",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"built-in",
|
||||
"core",
|
||||
"ponyfill",
|
||||
"polyfill",
|
||||
"shim",
|
||||
"fs",
|
||||
"access",
|
||||
"stat",
|
||||
"mode",
|
||||
"permission",
|
||||
"user",
|
||||
"process",
|
||||
"check"
|
||||
],
|
||||
"dependencies": {
|
||||
"null-check": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"os-tmpdir": "^1.0.0"
|
||||
}
|
||||
}
|
||||
51
node_modules/fs-access/readme.md
generated
vendored
Normal file
51
node_modules/fs-access/readme.md
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# fs-access [](https://travis-ci.org/sindresorhus/fs-access)
|
||||
|
||||
> Node.js 0.12 [`fs.access()`](https://nodejs.org/api/fs.html#fs_fs_access_path_mode_callback) & [`fs.accessSync()`](https://nodejs.org/api/fs.html#fs_fs_accesssync_path_mode) [ponyfill](https://ponyfill.com)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save fs-access
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var fsAccess = require('fs-access');
|
||||
|
||||
fsAccess('unicorn.txt', function (err) {
|
||||
if (err) {
|
||||
console.error('no access');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('access');
|
||||
});
|
||||
```
|
||||
|
||||
```js
|
||||
var fsAccess = require('fs-access');
|
||||
|
||||
try {
|
||||
fsAccess.sync('unicorn.txt');
|
||||
console.log('access');
|
||||
} catch (err) {
|
||||
console.error('no access');
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
See the [`fs.access()` & `fs.accessSync()` docs](https://nodejs.org/api/fs.html#fs_fs_access_path_mode_callback).
|
||||
|
||||
Mode flags are on the `fsAccess` instance instead of `fs`.
|
||||
|
||||
Only the `F_OK` mode is supported for now. [Help welcome for additional modes.](https://github.com/sindresorhus/fs-access/issues/1)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
Reference in New Issue
Block a user