png-validator
Advanced tools
Comparing version 1.1.0 to 2.0.0
{ | ||
"name": "png-validator", | ||
"version": "1.1.0", | ||
"description": "Png validator checks Png files for corruption", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.es.js", | ||
"types": "dist/index.d.ts", | ||
"author": "Sámal Rasmussen", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/samal-rasmussen/png-validator.git" | ||
}, | ||
"homepage": "https://github.com/samal-rasmussen/png-validator", | ||
"keywords": [ | ||
"png", | ||
"png-validator", | ||
"png-validate", | ||
"validator", | ||
"validate", | ||
"valid", | ||
"invalid", | ||
"corruption", | ||
"corrupt", | ||
"correct", | ||
"checker" | ||
], | ||
"sideEffects": false, | ||
"scripts": { | ||
"build": "rollup -c && tsc", | ||
"lint": "eslint . --ext .ts", | ||
"test": "npm run build && tape test/test.js", | ||
"publish-for-real": "npm publish --registry https://registry.npmjs.org/ --access public", | ||
"publish-dry-run": "npm publish --registry https://registry.npmjs.org/ --access public --dry-run" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "5.0.0", | ||
"@typescript-eslint/parser": "5.0.0", | ||
"eslint": "8.0.1", | ||
"rollup": "2.58.0", | ||
"rollup-plugin-delete": "2.0.0", | ||
"rollup-plugin-terser": "7.0.2", | ||
"rollup-plugin-typescript2": "0.30.0", | ||
"tape": "5.3.1", | ||
"typescript": "4.4.4" | ||
} | ||
"name": "png-validator", | ||
"version": "2.0.0", | ||
"description": "Png validator checks Png files for corruption", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./index.d.ts", | ||
"import": "./index.js" | ||
} | ||
}, | ||
"files": [ | ||
"index.js", | ||
"index.d.ts", | ||
"index.d.ts.map" | ||
], | ||
"author": "Sámal Rasmussen", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/samal-rasmussen/png-validator.git" | ||
}, | ||
"homepage": "https://github.com/samal-rasmussen/png-validator", | ||
"keywords": [ | ||
"png", | ||
"png-validator", | ||
"png-validate", | ||
"png-validation", | ||
"validator", | ||
"validate", | ||
"validation", | ||
"valid", | ||
"invalid", | ||
"corruption", | ||
"corrupt", | ||
"correct", | ||
"correction", | ||
"checker" | ||
], | ||
"sideEffects": false, | ||
"scripts": { | ||
"build": "dts-buddy", | ||
"check": "tsc -w", | ||
"test": "node --test", | ||
"publish": "npm publish --registry https://registry.npmjs.org/ --access public" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "20.9.0", | ||
"dts-buddy": "0.4.0", | ||
"typescript": "5.2.2" | ||
} | ||
} |
@@ -1,3 +0,2 @@ | ||
Png Validator | ||
--- | ||
## Png Validator | ||
@@ -10,17 +9,11 @@ Checks Png files for corruption. | ||
Only 2.5 kb minified and uncompressed. | ||
Zero dependencies and only 2.6 kb after minification. | ||
Available as an npm package: https://www.npmjs.com/package/png-validator | ||
Usage | ||
--- | ||
## Usage | ||
Png Validator is built both as a cjs and es bundle, so you can use it in the backend and frontend. | ||
There is only a single function exposed called `pngValidator` that takes a single parameter, which is an Uint8Array with the raw Png file data. It will throw an error if the file is _not_ valid. | ||
There is only a single function exposed called `pngValidator` that takes a single parameter, which is a Uint8Array with the raw Png file data. It will throw an error if the file is _not_ valid. | ||
``` | ||
// node | ||
const pngValidator = require('png-validator'); | ||
// browser / bundler | ||
import { pngValidator } from 'png-validator'; | ||
@@ -36,1 +29,3 @@ | ||
``` | ||
From version 2.0 on there is only an esm version of Png Validator. Use v. 1.1 if you need commonjs. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
281
Yes
10666
6
30
1