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

yourhelpers

v0.3.4

Published

Your helpers - methods and types to help you

Downloads

41

Readme

Your Helpers @deprecated (use ts-liba)

Installation

  npm i yourhelpers

Documentation

types

type Arr<T = any> = T[] | readonly T[]

Array

reverse

  reverse<A extends Arr>(arr: A)

reduce

  reduce<T, Acc>(arr: Arr<T>, initialValue: Acc, func: Func<[Acc, T, number], Acc>)

sum

  sum<T extends Arr<number>>(arr: T)

map

  map<T, R>(arr: Arr<T>, func: Func<[T, number, Arr<T>], R>)

join

  join<T extends Arr<Primitive>, S extends string = ''>(arr: T, separator = '' as S)

includes

  includes<T extends Arr, V>(arr: T, value: V)

merge

  merge<A extends Arr, B extends Arr>(arrA: A, arrB: B)

range

  range(from: number, to: number)

isArray

  isArray<T>(value: T)

combine

  combine<A, B, C extends number>(arrA: A[], arrB: B[], count = 1 as Number.Uint<C>)

first

  first<T extends Arr>(arr: T)

last

  last<T extends Arr>(arr: T)

byIndex

  byIndex<A extends Arr, I extends number>(arr: A, index: I)

indexOf

  indexOf<A extends Arr, T>(arr: A, item: T)

Number

abs

  abs(num: number)

Object

byKey

  byKey<O extends Record<string, any>, T extends string, K = Object.DotKey<O, T>>(obj: O, key: T)

keys

  keys<O extends object>(obj: O)

values

  values<O extends object>(obj: O)

entries

  entries<O extends object>(obj: O)

String

substring

  substring<S extends string, I extends number>(str: S, i: Number.Uint<I>)

contains

  contains(str: string, needle: string | string[])

pad

  pad<S extends string, Sub extends string, N extends number>(str: S, substr: Sub, count = 1 as Number.Uint<N>)

padStart

  padStart<S extends string, Sub extends string, N extends number>(str: S, substr: Sub, count = 1 as Number.Uint<N>)

padEnd

  padEnd<S extends string, Sub extends string, N extends number>(str: S, substr: Sub, count = 1 as Number.Uint<N>)

repeat

  repeat<S extends string, N extends number>(str: S, count: Number.Uint<N>)

charCount

  charCount<
    Str extends string,
    Obj extends object = { [K in String.Split<Str>[number]]: number },
    Char extends keyof Obj = keyof Obj,
    Return extends Obj | Obj[Char] = Exclude<keyof Obj, Char> extends never ? Obj : Obj[Char],
  >(str: Str, needle?: Char)

capitalize

  capitalize<T extends string>(str: T)

camelCase

  camelCase<S extends string, D extends string = ' '>(str: S, delimiter = ' ' as D)

split

  split<T extends string, D extends string = ''>(str: T, delimiter = '' as D)

utils

curry

  curry<Fn extends Func<any, any>>(func: Fn)