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

hearty-helper

v1.0.4

Published

Hearty helper is a small libraray that gives helper function like number formatter, date formatter, Object check , etc.

Downloads

14

Readme

hearty-helper NPM version

Hearty helper is a small libraray that can provide small helper functions like getting Url parameters, get Session Id, is Object, checking if Empty Object, get Size of Object, etc,.

Installation

npm i npm i hearty-helper

Usage

var heartyhelper = require('hearty-helper')

geturlParams(url)

Receives the url from input and will return all the parameters passed into one object


    var inputString = 'http://srinivasnarayansetty.com?originCountry=IN&type=R&date=15/10/2018&version=1.1&ADT=1&CHD=0&INF=0&class=Economy&source=webpage'
 
    heartyhelper.geturlParams(inputString)
    Output: {
        originCountry:IN
        type:R
        date:15/10/2018
        version:1.1
        ADT:1
        CHD:0
        INF:0
        class:Economy
        source:webpage
    }
  

getSessionId(key)

Receives the session key and returns the sessionId with given key.If session diesn't exists,it creates random id and set into session storage


    var input = 'cb_tab'

    heartyhelper.getSessionId(input)
    Output: 'MbNhIUq2HhwgTGCyINGPXg8SgnlwWf'

isObject(obj)

Receives Object as input and returns if the provided input is pure object or not


    var input = []
    
    heartyhelper.isObject(input)
    Output: false

getSizeOfObject(obj)

Receives Object as input and returns size of the object input, If the input is not object, it returns null


    var input = { id: 'MbNhIUq2HhwgTGCyINGPXg8SgnlwWf' }
    
    heartyhelper.getSizeOfObject(input)
    Output: 1

isObjectEmpty

Receives Object as input and returns if input Object is empty or not


    var input = { id: 'MbNhIUq2HhwgTGCyINGPXg8SgnlwWf' }

    heartyhelper.isObjectEmpty(input)
    Output: false

isJson

Receives Object as input and returns if input is JSON or not


    var input = "{ "id": 1 , "name":"srinivas"}"

    heartyhelper.isJson(input)
    Output: true

isAlphanumeric

Receives String as input and returns if string is aplha numaric or not


    var input = 'sssdee333@'

    heartyhelper.isAlphanumeric(input)
    Output: false

removeSpaces

Receives String as input and returns string by removing all the spaces


    var input = 'hello all welcome to npm'

    heartyhelper.removeSpaces(input)
    Output: 'helloallwelcometonpm'

getRandomString

Receives length of random string needed as input and returns random string with given input length


    var input = 10

    heartyhelper.getRandomString(input)
    Output: 'Y0X21OHdUB'

getRandomNumber

Returns random number of length 13 without providing any input


    //no input required

    heartyhelper.getRandomNumber()
    Output: 1539077573404

setCookie

Receives parameters for cookie such as cookiee name, value, and expiry date. It sets into mentioned domain.If no domain name is provided, cookie will be set '/' domain.


    var input : { cname: 'b2bRefeeral', cvalue: 1, expires: parseInt(1) }

    heartyhelper.setCookie(input)
    Output: it sets cookie with given params

getCookie

Receives cookie name from input and returns the value of the cookie


    var input = 'cname'

    heartyhelper.getCookie(input)
    Output: 'fghbfhfhf22228789'

sendHttpRequest

Receives required parameters for sending http request such as reuqest type, data, url, callback, ASYNC and sends the http request and returns the response


    var input = ('POST',{'id:1,name:'srinivas'},'http://srinivasnarayansetty.com/getData',setBotResponse,true)
    
    heartyhelper.sendHttpRequest(input)
    Output: responseText, status code

Demo

Demo @hearty-helper | https://tonicdev.com/npm/hearty-helper

Author

Srinivas N [[email protected]]

Licence

MIT @Srinivas_N