first commit
This commit is contained in:
23
build/node_modules/is-tar/README.md
generated
vendored
Normal file
23
build/node_modules/is-tar/README.md
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# is-tar [](https://travis-ci.org/kevva/is-tar)
|
||||
|
||||
> Check if a Buffer/Uint8Array is a TAR file
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save is-tar
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var isTar = require('is-tar');
|
||||
var read = require('fs').readFileSync;
|
||||
|
||||
isTar(read('file.tar'));
|
||||
// => true
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Kevin Mårtensson](https://github.com/kevva)
|
||||
16
build/node_modules/is-tar/index.js
generated
vendored
Normal file
16
build/node_modules/is-tar/index.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Check if a Buffer/Uint8Array is a TAR file
|
||||
*
|
||||
* @param {Buffer} buf
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports = function (buf) {
|
||||
if (!buf || buf.length < 262) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return buf[257] === 117 && buf[258] === 115 && buf[259] === 116 && buf[260] === 97 && buf[261] === 114;
|
||||
};
|
||||
69
build/node_modules/is-tar/package.json
generated
vendored
Normal file
69
build/node_modules/is-tar/package.json
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"is-tar@1.0.0",
|
||||
"/Users/asciidisco/Desktop/asciidisco.com/build"
|
||||
]
|
||||
],
|
||||
"_from": "is-tar@1.0.0",
|
||||
"_id": "is-tar@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-L2suF5LB9bs2UZrKqdZcDSb+hT0=",
|
||||
"_location": "/is-tar",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "is-tar@1.0.0",
|
||||
"name": "is-tar",
|
||||
"escapedName": "is-tar",
|
||||
"rawSpec": "1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/decompress-tar"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-tar/-/is-tar-1.0.0.tgz",
|
||||
"_spec": "1.0.0",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
|
||||
"author": {
|
||||
"name": "Kevin Mårtensson",
|
||||
"email": "kevinmartensson@gmail.com",
|
||||
"url": "https://github.com/kevva"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kevva/is-tar/issues"
|
||||
},
|
||||
"description": "Check if a Buffer/Uint8Array is a TAR file",
|
||||
"devDependencies": {
|
||||
"ava": "0.0.4",
|
||||
"read-chunk": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/kevva/is-tar#readme",
|
||||
"keywords": [
|
||||
"archive",
|
||||
"buffer",
|
||||
"check",
|
||||
"detect",
|
||||
"tar",
|
||||
"type",
|
||||
"uint8array"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "is-tar",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kevva/is-tar.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test/test.js"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
||||
Reference in New Issue
Block a user