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

react-armstrong-count

v0.2.2

Published

This is a ReactJS library for implementing counters in React applications

Readme

react-armstrong-count

Demo

Demo

Get Started

This is a light-weight and easy-to-use module created for React developers to solve the pains of debugging and setting up counters for their applications

Installation

npm install react-armstrong-count

or with yarn

yarn add react-armstrong-count

Usage

import React, { useState } from 'react';
import Armstrong from 'react-armstrong-count';

const TestPack = () => {

  const[val, setVal] = useState('')
  const[sBol, setBol] = useState('')

  const getCount = c => setVal(c)
 const handleSBol = () => setBol('start')

    return (

        <>

         <Armstrong inter={1} startBol={sBol} stopTime={10} getCount={getCount} iValue={5}>

        <section style={{display:'flex',height:'100vh',alignItems:'center',justifyContent:'center', flexFlow:'column', background:'#c0c0c000'}}>


                    <h1>{val}</h1>

                        <div style={{
                            background:'red',
                            width:`${val}rem`, 
                            textAlign:'center',
                            padding: '1rem',
                            color: 'white',

                        }}>
                            { Number(val) * 2 }
                    
                        </div>

                    <button style={{
                        padding: '2rem',
                        marginTop: '3rem',
                        background: 'limegreen',
                        color: 'white',
                        border: 'none',
                        outline: 'none',
                        borderRadius: '3rem',
                        width: '10rem',
                        fontSize: '1.45rem',
                     }} onClick={handleSBol}>Start</button>   
    </section>
        
 </Armstrong>

        </>

    );
}
 
export default TestPack;

Props

inter:

This number value represents the Interval of the counter, it takes single values like 1 for One second, 2 for Two seconds etc

startBol:

This prop must recieve a String value of 'start' for the counter to start

stopTime:

This prop recieves a number value, which is the value at which the counter stops

getCount:

This props takes a callback function, which recieves the count value(s) and can be safely used to setState(or useState) in the concerned Component

iValue:

This is the initial value the counter should start, if not Specified is default to Zero(0)

Contribution

  1. Fork it!

  2. Create your feature branch: git checkout -b feature-name

  3. Commit your changes: git commit -am 'Some commit message'

  4. Push to the branch: git push origin feature-name

  5. Submit a pull request 😉😉

How Can I Thank You ?

Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or Any Social Media? And talk about it within your friends and event or workshop ? Spread the word!

Dont forget to follow me on Twitter

Thanks! NC Armstrong

License

This project is licensed under the MIT License