Skip to content

Commit

Permalink
Merge 0fb2a29 into 5f750a9
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewCallis committed Jun 26, 2021
2 parents 5f750a9 + 0fb2a29 commit 5921006
Show file tree
Hide file tree
Showing 25 changed files with 11,897 additions and 3,225 deletions.
21 changes: 21 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"browsers": [
"last 1 version",
"not ie 11",
"not samsung 13",
"not dead"
]
},
"modules": false,
"debug": true,
"useBuiltIns": false, // "usage",
"corejs": 3
}
]
]
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.nyc_output
coverage
demo/
browser/
22 changes: 9 additions & 13 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"plugin:node/recommended",
"plugin:optimize-regex/all",
"plugin:ramda/recommended",
"plugin:security/recommended",
"plugin:unicorn/recommended"
"plugin:security/recommended"
],
"plugins": [
"ava",
Expand All @@ -17,7 +16,6 @@
"optimize-regex",
"ramda",
"security",
"unicorn",
"xss"
],
"env": {
Expand All @@ -27,7 +25,12 @@
},
"globals": {},
"parserOptions": {
"ecmaVersion": 2021
"sourceType": "module",
"ecmaVersion": 2021,
"ecmaFeatures": {
"jsx": true
},
"requireConfigFile": false
},
"rules": {
"import/no-extraneous-dependencies": [
Expand All @@ -45,6 +48,7 @@
"import/no-dynamic-require": 0,
"max-classes-per-file": 0,
"max-len": 0,
"no-bitwise": 0,
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-inferred-method-name/no-inferred-method-name": "error",
"no-param-reassign": 0,
Expand All @@ -57,14 +61,6 @@
"optimize-regex/optimize-regex": "warn",
"security/detect-non-literal-fs-filename": 0,
"security/detect-non-literal-require": 0,
"security/detect-object-injection": 0,
"unicorn/catch-error-name": 0,
"unicorn/filename-case": 0,
"unicorn/no-for-loop": 0,
"unicorn/no-fn-reference-in-iterator": 0,
"unicorn/no-null": 0,
"unicorn/no-reduce": 0,
"unicorn/no-useless-undefined": 0,
"unicorn/prevent-abbreviations": 0
"security/detect-object-injection": 0
}
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.15.3
v14.16.0
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js:
- "10"
- "12"
- "14"

Expand All @@ -12,6 +11,7 @@ cache:
- "$HOME/.npm"

script:
- npm install -g coveralls
- npm run lint
- npm run validate --prod
- npm run test && nyc report --reporter=text-lcov | coveralls
Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ const pixel = image.getPixel(0, 0);

# API Reference

## Classes

<dl>
<dt><a href="#ImagePNG">ImagePNG</a></dt>
<dd><p>PNG Decoder</p>
</dd>
</dl>

## Functions

<dl>
<dt><a href="#debug">debug()</a> : <code>function</code></dt>
<dd></dd>
</dl>

<a name="ImagePNG"></a>

## ImagePNG
Expand All @@ -55,6 +70,7 @@ PNG Decoder
- [Chunk Specifications (LibPNG)](http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html)
- [Chunk Specifications (W3C)](https://www.w3.org/TR/PNG-Chunks.html)
- [PNGs containing a chunk with length 0xffffffff](http://www.simplesystems.org/libpng/FFFF/)
- [PNG files can be animated via network latency](https://news.ycombinator.com/item?id=27579759)
- [TweakPNG](https://github.com/jsummers/tweakpng)

**Properties**
Expand Down Expand Up @@ -451,7 +467,7 @@ Creates a new ImagePNG from file data.

| Param | Type | Description |
| --- | --- | --- |
| data | <code>Buffer</code> | The data of the image to process. |
| data | <code>Array</code> \| <code>ArrayBuffer</code> \| <code>Buffer</code> \| <code>DataBuffer</code> \| <code>Int8Array</code> \| <code>Int16Array</code> \| <code>number</code> \| <code>string</code> \| <code>Uint8Array</code> \| <code>Uint32Array</code> | The data of the image to process. |

<a name="ImagePNG.fromBuffer"></a>

Expand All @@ -465,6 +481,10 @@ Creates a new ImagePNG from a DataBuffer.
| --- | --- | --- |
| buffer | <code>DataBuffer</code> | The DataBuffer of the image to process. |

<a name="debug"></a>

## debug() : <code>function</code>
**Kind**: global function

* * *

Expand Down

0 comments on commit 5921006

Please sign in to comment.