npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@anyline/anyline-js

v55.9.0

Published

Anyline Web SDK

Readme

Anyline Web SDK

npm version License

Anyline Web SDK enables OCR and barcode scanning directly in the browser.

Live Demo | Documentation | API Reference

Supported Use Cases

  • Barcode - QR Code, Data Matrix, Aztec, PDF417, Code 128, EAN, UPC, and more
  • ID Scanning - MRZ (passports, ID cards) and driving licenses
  • Tire & Automotive - VIN, TIN, tire size, license plates
  • Meters - Analog, digital, and dial meters
  • OCR - Shipping containers and custom OCR

See the documentation for the full list of supported formats and regions.

Installation

npm install @anyline/anyline-js

Or via CDN:

<script src="https://cdn.jsdelivr.net/npm/@anyline/anyline-js/anyline.js"></script>

Quick Start

HTML:

<div id="scanner-root" style="width: 100%; height: 100vh;"></div>

TypeScript/JavaScript:

import { init } from '@anyline/anyline-js';

// Initialize the scanner
const anyline = init({
  // Your Anyline license key (obtain at anyline.com/request/contact)
  license: 'YOUR_LICENSE_KEY',
  // DOM element where the scanner will be mounted
  element: document.getElementById('scanner-root'),
  // Preset for the scan type (see documentation for all presets)
  preset: 'vin',
});

// Handle scan results
anyline.onResult = ({ result }) => {
  console.log('Scanned:', result);
};

// Start the camera and begin scanning
anyline.startScanning().catch((error) => {
  console.error('Failed to start:', error);
});

// Clean up resources when done
window.addEventListener('beforeunload', () => {
  anyline.dispose();
});

Note: Web SDK requires HTTPS (except localhost) and camera permissions. The browser will prompt the user to allow camera access.

For available presets and configuration options, see the Getting Started Guide.

Self-Hosting Assets

By default, the SDK loads assets from Anyline's CDN. To self-host these assets for better performance or to comply with network restrictions:

  1. Copy the anylinejs/ folder to your web server
  2. Set the anylinePath option to point to the folder location
const anyline = init({
  license: 'YOUR_LICENSE_KEY',
  element: document.getElementById('scanner-root'),
  preset: 'vin',
  anylinePath: '/path/to/anylinejs',
});

See Performance Optimization for CDN configuration and caching details.

Documentation

Try it Locally

The package includes a demo application. To run it:

  1. Request a test license for your domain
  2. Edit your hosts file to route your domain to localhost (licenses are domain-restricted)
  3. Run the demo:
npm run demo
  1. Visit http://yourdomain.com:8080/demo

For smartphone testing, use npm run demo:network (HTTPS on port 8443).

Package Contents

  • anylinejs/ - Assets for self-hosting
  • docs/ - API documentation
  • types/ - TypeScript type definitions
  • anyline.js - Main SDK library
  • LICENSE.md - Third-party license agreements

Resources

License

This SDK requires a commercial license from Anyline. Request a trial license to get started.

See LICENSE.md for third-party license agreements.