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

fingerspot-easylink-ts

v1.0.0

Published

Modern TypeScript SDK for communicating with multiple Fingerspot biometric devices

Readme

Fingerspot EasyLink SDK

A TypeScript/JavaScript library for communicating with multiple Fingerspot biometric devices over HTTP.

Installation

npm install fingerspot-easylink

Usage

TypeScript

import FingerspotEasyLink, { DeviceConfig, UserData, DeviceResponse } from 'fingerspot-easylink';

// Configure multiple devices
const devices: DeviceConfig[] = [
    {
        serverIP: '192.168.1.100',
        serverPort: '8080',
        deviceSN: 'DEVICE001'
    },
    {
        serverIP: '192.168.1.101',
        serverPort: '8080',
        deviceSN: 'DEVICE002'
    }
];

// Initialize SDK with multiple devices
const sdk = new FingerspotEasyLink({
    devices,
    configPath: 'device.ini'  // Optional
});

// Example: Working with multiple devices
async function manageDevices(): Promise<void> {
    try {
        // Get list of all registered devices
        const deviceList = sdk.getDevices();
        console.log('Registered devices:', deviceList);

        // Work with specific device
        const device1 = sdk.getDevice('DEVICE001');
        const device2 = sdk.getDevice('DEVICE002');

        // Get users from both devices
        const [users1, users2] = await Promise.all([
            device1.getUsers(),
            device2.getUsers()
        ]);

        console.log('Device 1 users:', users1.data);
        console.log('Device 2 users:', users2.data);

        // Add new device at runtime
        sdk.addDevice({
            serverIP: '192.168.1.102',
            serverPort: '8080',
            deviceSN: 'DEVICE003'
        });

        // Remove device
        sdk.removeDevice('DEVICE003');

    } catch (error) {
        console.error('Error:', error.message);
    }
}

JavaScript

const FingerspotEasyLink = require('fingerspot-easylink');

const sdk = new FingerspotEasyLink({
    devices: [
        {
            serverIP: '192.168.1.100',
            serverPort: '8080',
            deviceSN: 'DEVICE001'
        },
        {
            serverIP: '192.168.1.101',
            serverPort: '8080',
            deviceSN: 'DEVICE002'
        }
    ]
});

async function manageDevices() {
    try {
        const device = sdk.getDevice('DEVICE001');
        const users = await device.getUsers();
        console.log('Users:', users.data);
    } catch (error) {
        console.error('Error:', error.message);
    }
}

Features

Multi-Device Management

  • Support for multiple devices simultaneously
  • Dynamic device addition/removal
  • Individual device operations
  • Shared configuration management

Device Operations (Per Device)

  • Get device information
  • Set/Get device time
  • Restart device
  • User management
  • Template management
  • Scan log management

API Reference

Types

interface DeviceConfig {
    serverIP: string;
    serverPort: string;
    deviceSN: string;
}

interface SDKConfig {
    devices: DeviceConfig[];
    configPath?: string;
}

Multi-Device Management

// Get all registered devices
const deviceList = sdk.getDevices();

// Get specific device
const device = sdk.getDevice('DEVICE001');

// Add new device
sdk.addDevice({
    serverIP: '192.168.1.100',
    serverPort: '8080',
    deviceSN: 'DEVICE001'
});

// Remove device
sdk.removeDevice('DEVICE001');

Device Operations

// Get device instance
const device = sdk.getDevice('DEVICE001');

// Get device information
const info = await device.getDeviceInfo();

// Get device time
const time = await device.getDeviceTime();

// Set device time
await device.setDeviceTime(Date.now());

// Restart device
await device.restartDevice();

User Management (Per Device)

const device = sdk.getDevice('DEVICE001');

// Get all users
const users = await device.getUsers();

// Get specific user
const user = await device.getUserByPin('1234');

// Add new user
await device.addUser({
    pin: '1234',
    name: 'John Doe',
    password: '123456',
    privilege: 0
});

// Update user
await device.updateUser('1234', {
    name: 'John Smith',
    password: 'newpass'
});

// Delete user
await device.deleteUser('1234');

Template Management (Per Device)

const device = sdk.getDevice('DEVICE001');

// Get user templates
const templates = await device.getUserTemplates('1234');

// Upload template
await device.uploadTemplate({
    pin: '1234',
    finger_idx: 0,
    template: 'TEMPLATE_DATA'
});

// Delete template
await device.deleteTemplate('1234', 0);

Scan Log Management (Per Device)

const device = sdk.getDevice('DEVICE001');

// Get scan logs
const logs = await device.getScanLogs(
    '2023-09-01', // start date (optional)
    '2023-09-30'  // end date (optional)
);

// Clear scan logs
await device.clearScanLogs();

Error Handling

The library uses Promise-based error handling with type-safe responses:

try {
    const device = sdk.getDevice('DEVICE001');
    const response = await device.getUsers();
    if (response.code === 0) {
        // Success
        console.log(response.data);
    } else {
        // API error
        console.error(response.message);
    }
} catch (error) {
    // Network or other error
    console.error('Operation failed:', error.message);
}

License

MIT