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

@akamfoad/qr

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@akamfoad/qr - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

21

dist/cjs/qr.d.ts

@@ -43,3 +43,2 @@ declare class QRBitBuffer {

getBestMaskPattern(): number;
createMovieClip(target_mc: any, instance_name: any, depth: any): any;
setupTimingPattern(): void;

@@ -57,6 +56,18 @@ setupPositionAdjustPattern(): void;

declare const ErrorCorrectLevel: {
L: number;
M: number;
Q: number;
H: number;
/**
* Allows recovery of up to 7% data loss
*/
L: 1;
/**
* Allows recovery of up to 15% data loss
*/
M: 0;
/**
* Allows recovery of up to 25% data loss
*/
Q: 3;
/**
* Allows recovery of up to 30% data loss
*/
H: 2;
};

@@ -63,0 +74,0 @@

{
"name": "@akamfoad/qr",
"version": "0.3.0",
"version": "0.4.0",
"license": "MIT",

@@ -8,3 +8,3 @@ "description": "Fully typed QRCode encoding implementation in JavaScript with no dependencies!",

"bugs": "https://github.com/akamfoad/qr/issues",
"repository": "github:akamfoad/qr",
"repository": "https://github.com/akamfoad/qr",
"keywords": [

@@ -47,31 +47,17 @@ "qrcode",

"prepare": "tsup && husky install",
"size": "size-limit",
"analyze": "size-limit --why",
"docs": "typedoc --out typedocs src/index.ts"
},
"size-limit": [
{
"path": "dist/qr.cjs.production.min.js",
"limit": "10 KB"
},
{
"path": "dist/qr.esm.js",
"limit": "10 KB"
}
],
"devDependencies": {
"@size-limit/preset-small-lib": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"eslint": "^8.49.0",
"eslint-plugin-prettier": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"eslint": "^8.54.0",
"eslint-plugin-prettier": "^5.0.1",
"husky": "^8.0.0",
"lint-staged": "^14.0.1",
"prettier": "^3.0.3",
"size-limit": "^9.0.0",
"tsup": "^7.2.0",
"typedoc": "^0.25.1",
"lint-staged": "^15.1.0",
"prettier": "^3.1.0",
"tsup": "^8.0.0",
"typedoc": "^0.25.3",
"typescript": "^5.2.2",
"vitest": "^0.34.4"
"vitest": "^0.34.6"
}
}
}
export const ErrorCorrectLevel = {
L: 1,
M: 0,
Q: 3,
H: 2,
/**
* Allows recovery of up to 7% data loss
*/
L: 1 as const,
/**
* Allows recovery of up to 15% data loss
*/
M: 0 as const,
/**
* Allows recovery of up to 25% data loss
*/
Q: 3 as const,
/**
* Allows recovery of up to 30% data loss
*/
H: 2 as const,
};

@@ -161,35 +161,2 @@ import BitByte from './8BitByte';

// FIXME where is this used? outside maybe? Try to find out
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
createMovieClip(target_mc, instance_name, depth) {
if (this.modules === null) {
throw new Error('this.modules is null');
}
const qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);
const cs = 1;
this.make();
for (let row = 0; row < this.modules.length; row++) {
const y = row * cs;
for (let col = 0; col < this.modules[row].length; col++) {
const x = col * cs;
const dark = this.modules[row][col];
if (dark) {
qr_mc.beginFill(0, 100);
qr_mc.moveTo(x, y);
qr_mc.lineTo(x + cs, y);
qr_mc.lineTo(x + cs, y + cs);
qr_mc.lineTo(x, y + cs);
qr_mc.endFill();
}
}
}
return qr_mc;
}
setupTimingPattern() {

@@ -196,0 +163,0 @@ if (this.modules === null) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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