New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

is-apng

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-apng - npm Package Compare versions

Comparing version

to
1.1.2

2

dist/index.js

@@ -1,1 +0,1 @@

(function(n,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self,n.isApng=t())})(this,function(){"use strict";const n=new TextEncoder,t={animationControlChunk:n.encode("acTL"),imageDataChunk:n.encode("IDAT")};function r(e){if(!e||!(typeof Buffer<"u"&&Buffer.isBuffer(e)||e instanceof Uint8Array)||e.length<16||!(e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71&&e[4]===13&&e[5]===10&&e[6]===26&&e[7]===10))return!1;e=e.subarray(8);let u=!1,i=0,o=0;for(let f=0;f<e.length;f++)if(e[f]===t.animationControlChunk[i]?(i++,i===t.animationControlChunk.length&&(u=!0)):i=0,e[f]===t.imageDataChunk[o]){if(o++,o===t.imageDataChunk.length)return u}else o=0;return!1}return r});
(function(n,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self,n.isApng=t())})(this,function(){"use strict";const n=new TextEncoder,t={animationControlChunk:n.encode("acTL"),imageDataChunk:n.encode("IDAT")};function f(e){if(!e||!(typeof Buffer<"u"&&Buffer.isBuffer(e)||e instanceof Uint8Array)||e.length<16||!(e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71&&e[4]===13&&e[5]===10&&e[6]===26&&e[7]===10))return!1;e=e.subarray(8);let a=!1,i=0,o=0;for(let u=0;u<e.length;u++)if(!a&&(e[u]===t.animationControlChunk[i]||i>0&&((i=0)||e[u]===t.animationControlChunk[i]))&&(i++,i===t.animationControlChunk.length&&(a=!0)),(e[u]===t.imageDataChunk[o]||o>0&&((o=0)||e[u]===t.imageDataChunk[o]))&&(o++,o===t.imageDataChunk.length))return a;return!1}return f});
{
"name": "is-apng",
"version": "1.1.1",
"version": "1.1.2",
"description": "Check if a Buffer/Uint8Array is a APNG (Animated PNG) image",

@@ -75,3 +75,3 @@ "license": "MIT",

"lint:fix": "eslint ./src/ --fix",
"build:watch": "cross-env NODE_ENV=development rollup --config rollup.config.js --watch --sourcemap inline",
"build:watch": "cross-env NODE_ENV=development rollup --config rollup.config.js --sourcemap inline --watch",
"build:dev": "cross-env NODE_ENV=development rollup --config rollup.config.js --sourcemap inline",

@@ -78,0 +78,0 @@ "build": "cross-env NODE_ENV=production rollup --config rollup.config.js",

@@ -42,3 +42,3 @@ # is-apng &nbsp;&nbsp;[![Latest GitHub release][release-image]][release-url] [![Latest NPM version][npm-image]][npm-url] [![Build Status][ci-image]][ci-url]

Url for latest version: `https://unpkg.com/is-apng`<br>
Url for specific version: `https://unpkg.com/is-apng@1.1.1/dist/index.js`
Url for specific version: `https://unpkg.com/is-apng@1.1.2/dist/index.js`

@@ -57,3 +57,3 @@ ```html

Url for latest version: `https://unpkg.com/is-apng/dist/index.mjs`<br>
Url for specific version: `https://unpkg.com/is-apng@1.1.1/dist/index.mjs`
Url for specific version: `https://unpkg.com/is-apng@1.1.2/dist/index.mjs`

@@ -60,0 +60,0 @@ ```html

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet