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

tea-helpers

v1.2.5

Published

Tea protocol helper functions

Downloads

22

Readme

helper functions

You are free to choose any of the following methods to implement functionality with the helper functions.

isObject (obj) -> bool

msToHours (ms) -> float

msToMinutes (ms) -> float

msToDays (ms) -> float

daysToMs (hours) -> int

hoursToMs (minutes) -> int

calculateTimeDiffInMinutes (seconds) -> int

calculateTimeDiffInDays (ms) -> str

transformStringToBase64 (str) -> str

removeDateSeconds (date) -> date

arrayToTree (arr) -> dict

isArraysContentSame (arr1, arr2) -> bool

transformArrayOfNumbers (arr) -> number[]

isAllowedLanguage (str) -> bool

transformArrayOfStrings (arr) -> str[]

transformEmptyStringToNull (str) -> str

wait (ms) -> void

isValidUrl (url) -> bool

transformExcelDateToTimestamp (date) -> int

transformFromCents (cents) -> float

transformToCents (dollars) -> int

transformToInt (str) -> int

transformToFloat (str) -> float

quoteQuery (str) -> str

capitalizeLetters (str) -> str

swapObject (obj) -> obj

Each (collection, iteratee) -> void Iterates over elements of collection and invokes iteratee for each element. The iteratee is invoked with three arguments: (value, index|key, collection). Iteratee functions may exit iteration early by explicitly returning false.

EachRight (collection, iteratee) -> void This method is like Each except that it iterates over elements of collection from right to left.

Map (collection, iteratee) -> array Creates an array of values by running each element in collection through iteratee. The iteratee is invoked with three arguments: (value, index|key, collection).

Filter (collection, iteratee) -> array Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The predicate is invoked with three arguments: (value, index|key, collection).

Every (collection, iteratee) -> bool Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate returns falsey. The predicate is invoked with three arguments: (value, index|key, collection).

Some (collection, iteratee) -> bool Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate returns truthy. The predicate is invoked with three arguments: (value, index|key, collection).

Push (collection, value) -> void Adds value to the end of collection.

Reduce (collection, iteratee, accumulator) -> any Reduces collection to a value which is the accumulated result of running each element in collection thru iteratee, where each successive invocation is supplied the return value of the previous. If accumulator is not given, the first element of collection is used as the initial value.