Initial commit

This commit is contained in:
Developer
2025-04-21 16:03:20 +02:00
commit 2832896157
22874 changed files with 3092801 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# is-bzip2 [![Build Status](https://travis-ci.org/kevva/is-bzip2.svg?branch=master)](https://travis-ci.org/kevva/is-bzip2)
> Check if a Buffer/Uint8Array is a BZIP2 file
## Install
```sh
$ npm install --save is-bzip2
```
## Usage
```js
var isBzip2 = require('is-bzip2');
var read = require('fs').readFileSync;
isBzip2(read('foo.bz2'));
// => true
```
## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License) © [Kevin Mårtensson](https://github.com/kevva)

View File

@@ -0,0 +1,16 @@
'use strict';
/**
* Check if a Buffer/Uint8Array is a BZIP2 file
*
* @param {Buffer} buf
* @api public
*/
module.exports = function (buf) {
if (!buf || buf.length < 3) {
return false;
}
return buf[0] === 66 && buf[1] === 90 && buf[2] === 104;
};

View File

@@ -0,0 +1,66 @@
{
"_from": "is-bzip2@^1.0.0",
"_id": "is-bzip2@1.0.0",
"_inBundle": false,
"_integrity": "sha1-XuWOqlounIDiFAe+3yOuWsCRs/w=",
"_location": "/is-bzip2",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "is-bzip2@^1.0.0",
"name": "is-bzip2",
"escapedName": "is-bzip2",
"rawSpec": "^1.0.0",
"saveSpec": null,
"fetchSpec": "^1.0.0"
},
"_requiredBy": [
"/decompress-tarbz2"
],
"_resolved": "https://registry.npmjs.org/is-bzip2/-/is-bzip2-1.0.0.tgz",
"_shasum": "5ee58eaa5a2e9c80e21407bedf23ae5ac091b3fc",
"_spec": "is-bzip2@^1.0.0",
"_where": "D:\\developments\\teaser-inertia\\nova-components\\NovaLeader\\node_modules\\decompress-tarbz2",
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "https://github.com/kevva"
},
"bugs": {
"url": "https://github.com/kevva/is-bzip2/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Check if a Buffer/Uint8Array is a BZIP2 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-bzip2#readme",
"keywords": [
"archive",
"buffer",
"bzip2",
"check",
"detect",
"type",
"uint8array"
],
"license": "MIT",
"name": "is-bzip2",
"repository": {
"type": "git",
"url": "git+https://github.com/kevva/is-bzip2.git"
},
"scripts": {
"test": "node test/test.js"
},
"version": "1.0.0"
}