![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@nuintun/qrcode
Advanced tools
A pure JavaScript QRCode encode and decode library.
Modify from kazuhikoarase/qrcode-generator and cozmo/jsQR
import { Encoder, QRByte, QRKanji, ErrorCorrectionLevel } from '@nuintun/qrcode';
const qrcode = new Encoder();
qrcode.setEncodingHint(true);
qrcode.setErrorCorrectionLevel(ErrorCorrectionLevel.H);
qrcode.write('你好世界\n');
qrcode.write(new QRByte('hello world\n'));
qrcode.write(new QRKanji('こんにちは世界'));
qrcode.make();
console.log(qrcode.toDataURL());
getModules(): boolean[][]
getModuleCount(): number
setVersion(version: number): void
0
the version will be set automatically.getVersion(): number
setErrorCorrectionLevel(errorCorrectionLevel: ErrorCorrectionLevel): void
getErrorCorrectionLevel(): ErrorCorrectionLevel
setEncodingHint(hasEncodingHint: boolean): void
getEncodingHint(): boolean
write(data: string | QRByte | QRKanji | QRNumeric | QRAlphanumeric): void
QRByte
by default.isDark(row: number, col: number): boolean
make(): void
toDataURL(moduleSize?: number, margin?: number): string
import { Encoder, QRByte } from '@nuintun/qrcode';
const qrcode = new Encoder();
qrcode.setEncodingHint(true);
// Custom your own encode function return bytes and encoding
// The encoding value must a valid ECI value
// Custom ECI only support QRByte mode
// https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/common/CharacterSetECI.java
qrcode.write(
new QRByte('hello world', data => ({
encoding: 26,
bytes: [104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]
}))
);
qrcode.make();
console.log(qrcode.toDataURL());
import { Decoder } from '@nuintun/qrcode';
const qrcode = new Decoder();
qrcode
.scan('https://nuintun.github.io/qrcode/example/qrcode.jpg')
.then(result => {
console.log(result.data);
})
.catch(error => {
console.error(result.data);
});
setOptions(options: { inversionAttempts: 'dontInvert' | 'onlyInvert' | 'attemptBoth' | 'invertFirst' }): void
scan(src: string): Promise<DecoderResult>
decode(data: Uint8ClampedArray, width: number, height: number): DecoderResult
FAQs
A pure JavaScript QRCode encode and decode library.
The npm package @nuintun/qrcode receives a total of 17,592 weekly downloads. As such, @nuintun/qrcode popularity was classified as popular.
We found that @nuintun/qrcode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.