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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cashcodejs

v1.2.0

Published

CashCode Bill Validator

Downloads

6

Readme

CashCode Bill Validator

npm package for cashcode bill validator

Get device status

// Show device errors
device.on('error', (error)=>{
    console.log("Device error:", error);
});

// Show request from user
device.on('request', (req)=>{
    console.log("Request:", req);
});

// Show device response
device.on('response', (res)=>{
    console.log("Response:", res);
});

// Show device current status
device.on('status', (sts)=>{
    console.log("Status:", sts);
});

Get device real-time data

// Trigger when device powerup
device.on('powerup', function () {
    console.log('Device power up');
});

// Trigger when device powerdown
device.on('powerup', function () {
    console.log('Device power up');
});

// Trigger when device reset
device.on('reset', function () {
    console.log('Device reset');
});

// Trigger when device initialized
device.on('initialize', ()=>{
    console.log("Device initialize");
});

// Trigger when device on idling
device.on("idling", ()=>{
    console.log("Device on idling state");
});

// Trigger when cassette removed
device.on('cassetteRemoved', ()=>{
    console.log("Cassette removed");
});

// Trigger when cassette full
device.on('cassetteFull', ()=>{
    console.log("Cassette full");
});

// Trigger when device on hold
device.on('hold', ()=>{
    console.log("Device on hold");
});

Handel device cash accept process

// Trigger when cash accept
device.on('escrow', async(cash)=>{
    console.log("Amount:", cash.amount);
});

// Trigger when cash return
device.on('returned', (cash)=>{
    console.log('Cash returned:', cash.amount);
});

// Trigger when cash stacked
device.on('stacked', (cash)=>{
    console.log('Cash stacked:', cash.amount);
});

// Trigger when cash rejected
device.on("reject", ()=>{
    console.log("chash Rejected ");
});

// Reject cash
await device.retrieve();

// Stack cash
await device.stack();

Device handle disable event

device.on('disabled', async()=>{
    await device.end();
});

Device handle enable event

await device.start();