first commit

This commit is contained in:
s.golasch
2023-08-01 13:49:46 +02:00
commit 1fc239fd54
20238 changed files with 3112246 additions and 0 deletions

43
build/node_modules/is-cwebp-readable/README.md generated vendored Normal file
View File

@@ -0,0 +1,43 @@
# is-cwebp-readable
[![NPM version](https://img.shields.io/npm/v/is-cwebp-readable.svg)](https://www.npmjs.com/package/is-cwebp-readable)
[![Build Status](https://travis-ci.org/shinnn/is-cwebp-readable.svg?branch=master)](https://travis-ci.org/shinnn/is-cwebp-readable)
[![Build status](https://ci.appveyor.com/api/projects/status/lrfe3hgtupsg45l1?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/is-cwebp-readable)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/is-cwebp-readable.svg)](https://coveralls.io/github/shinnn/is-cwebp-readable)
[![Dependency Status](https://david-dm.org/shinnn/is-cwebp-readable.svg)](https://david-dm.org/shinnn/is-cwebp-readable)
[![devDependency Status](https://david-dm.org/shinnn/is-cwebp-readable/dev-status.svg)](https://david-dm.org/shinnn/is-cwebp-readable#info=devDependencies)
Check if a Buffer/Uint8Array is available for [cwebp](https://developers.google.com/speed/webp/docs/cwebp) image source
```javascript
const fs = require('fs');
const isCwebpReadable = require('is-cwebp-readable');
isCwebpReadable(fs.readFileSync('fixture.png')); //=> true
isCwebpReadable(fs.readFileSync('fixture.bmp')); //=> false
```
## Installation
[Use npm.](https://docs.npmjs.com/cli/install)
```sh
npm install is-cwebp-readable
```
## API
```javascript
const isCwebpReadable = require('is-cwebp-readable');
```
### isCwebpReadable(*buf*)
*buf*: [`Buffer`](https://nodejs.org/api/buffer.html#buffer_class_buffer) or [`Uint8Array`](https://www.khronos.org/registry/typedarray/specs/latest/#TYPEDARRAYS)
Return: `Boolean`
It returns `true` if the data is [PNG](https://wikipedia.org/wiki/Portable_Network_Graphics), [JPEG](https://wikipedia.org/wiki/JPEG), [TIFF](https://wikipedia.org/wiki/Tagged_Image_File_Format), or [WebP](https://wikipedia.org/wiki/WebP), otherwise `false`.
## License
[Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/deed)

15
build/node_modules/is-cwebp-readable/index.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
'use strict';
const fileType = require('file-type');
module.exports = function isCwebpReadable(buf) {
const type = fileType(buf);
if (!type) {
return false;
}
const ext = type.ext;
return ext === 'png' || ext === 'jpg' || ext === 'tif' || ext === 'webp';
};

80
build/node_modules/is-cwebp-readable/package.json generated vendored Normal file
View File

@@ -0,0 +1,80 @@
{
"_from": "is-cwebp-readable@^2.0.1",
"_id": "is-cwebp-readable@2.0.1",
"_inBundle": false,
"_integrity": "sha1-r7k7DAq9CiUQEBauM66ort+SbSY=",
"_location": "/is-cwebp-readable",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "is-cwebp-readable@^2.0.1",
"name": "is-cwebp-readable",
"escapedName": "is-cwebp-readable",
"rawSpec": "^2.0.1",
"saveSpec": null,
"fetchSpec": "^2.0.1"
},
"_requiredBy": [
"/imagemin-webp"
],
"_resolved": "https://registry.npmjs.org/is-cwebp-readable/-/is-cwebp-readable-2.0.1.tgz",
"_shasum": "afb93b0c0abd0a25101016ae33aea8aedf926d26",
"_spec": "is-cwebp-readable@^2.0.1",
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build/node_modules/imagemin-webp",
"author": {
"name": "Shinnosuke Watanabe",
"url": "https://github.com/shinnn"
},
"bugs": {
"url": "https://github.com/shinnn/is-cwebp-readable/issues"
},
"bundleDependencies": false,
"dependencies": {
"file-type": "^4.3.0"
},
"deprecated": false,
"description": "Check if a Buffer/Uint8Array is available for cwebp image source",
"devDependencies": {
"@shinnn/eslint-config-node": "^3.0.0",
"eslint": "^3.19.0",
"istanbul": "^0.4.5",
"tap-spec": "^4.1.1",
"tape": "^4.6.3"
},
"eslintConfig": {
"extends": "@shinnn/node"
},
"files": [
"index.js"
],
"homepage": "https://github.com/shinnn/is-cwebp-readable#readme",
"keywords": [
"buffer",
"uint8array",
"type",
"file",
"detect",
"image",
"jpg",
"jpeg",
"png",
"tif",
"tiff",
"webp",
"cwebp"
],
"license": "CC0-1.0",
"name": "is-cwebp-readable",
"repository": {
"type": "git",
"url": "git+https://github.com/shinnn/is-cwebp-readable.git"
},
"scripts": {
"bench": "node -p \"require('chalk').yellow('NOTE: Smaller is better.\\n')\" && node benchmark/array-index-of.js && node benchmark/array-includes.js && node benchmark/keys.js && node benchmark/logical-or.js && node benchmark/regexp-test.js && node benchmark/set.js && node -p \"''\"",
"coverage": "istanbul cover test.js",
"pretest": "eslint --fix --format=codeframe benchmark index.js test.js",
"test": "node --throw-deprecation --track-heap-objects test.js | tap-spec"
},
"version": "2.0.1"
}