Socket
Socket
Sign inDemoInstall

qrim

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

2

build/qrim.module.js

@@ -6,3 +6,3 @@ /**

* @source https://github.com/stevinz/qrim
* @version v1.0.0
* @version v1.0.1
* @author stevinz (module) https://github.com/stevinz/qrcodejs

@@ -9,0 +9,0 @@ * @author 19z (UTF-8) https://github.com/19z/qrcodejs-fixUTF8

{
"name": "qrim",
"version": "1.0.0",
"version": "1.0.1",
"description": "Stylized JavaScript QR Code image generator with UTF8 support.",

@@ -5,0 +5,0 @@ "module": "src/index.js",

@@ -6,2 +6,23 @@ # Qrim

## Install
- Option 1: Copy file `qrim.module.js`, import from file...
```javascript
import { QRCode } from 'qrim.module.js';
```
- Option 2: Install from [npm](https://www.npmjs.com/package/qrim), import from 'qrim'...
```
npm install qrim
```
```javascript
import { QRCode } from 'qrim';
```
- Option 3: Import directly from CDN...
```javascript
import { QRCode } from 'https://unpkg.com/qrim/build/qrim.module.js';
```
## Usage

@@ -15,6 +36,4 @@ ```javascript

// Call options:
// = new QRCode(HTMLElement, String);
// = new QRCode(HTMLElement, Params Object);
const qr = new QRCode(document.getElementById("qrcode"), "http://www.code.com");
const el = document.getElementById("qrcode");
const qr = new QRCode(el, "http://www.code.com");

@@ -27,5 +46,3 @@ </script>

```javascript
import { QRCode } from 'qrim';
const qr = new QRCode(document.getElementById("qrcode"), {
const qr = new QRCode(el, {
text: "http://www.domain.com", // text to generate

@@ -45,6 +62,6 @@ size: 1024, // image dimensions

```javascript
// Generate a code from new text
// make new code from new text
qr.makeCode("http://www.newcode.com");
// ...or generate a code from updated parameters
// ...or make new code from updated parameters
const params = {

@@ -51,0 +68,0 @@ text: "http://www.newcode.com",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc