Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

png-validator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

png-validator - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

index.d.ts

95

package.json
{
"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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc