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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@radicjs/utils

v0.4.0

Published

utils package

Readme

@radicjs/utils

Installation

npm i @radicjs/utils
yarn add @radicjs/utils

Declaration

export {
    camelCase, cloneDeep, constant, debounce, flatten, get,
    has, identity, isArguments, isArrayLike, isArrayLikeObject,
    isBuffer, isLength, isMap, isPlainObject, isSet, isTypedArray,
    kebabCase, keys, keysIn, last, lowerCase, merge, now,
    pad, set, snakeCase, startCase, stubFalse, toFinite,
    toInteger, toNumber, toString, unset, upperCase, words
} from 'lodash';
export * from '@radicjs/type-check';

declare function defaults<T>(obj: Partial<T>, ...defaults: Partial<T>[]): T;
declare function copy<T>(object: T): T;
declare function deepClone<T extends any = any>(obj: any, hash?: any): T;
declare function mergeDeep(source?: any, target?: any): any;
declare function dotize(obj: any, prefix?: any): any;
declare const objectify: (obj: any, [k, v]: [any, any]) => any;

declare function strRandom(length?: number): string;
declare function strEnsureLeft(str: string, left: string): string;
declare function strEnsureRight(str: string, right: string): string;
declare function strStripLeft(str: string, left: string): string;
declare function strStripRight(str: string, right: string): string;
declare function ucfirst(string: string): string;
declare function lcfirst(string: string): string;
declare function parameters(str: string, params: Record<string, string>): string;
declare function escapeStringRegexp(string: string): string;
declare function strIs(pattern: string, value: string, ignoreCase?: boolean): boolean;
declare function uuid(): string;
declare function guid(): string;

declare class Toposort {
    edges: any[];
    Toposort: typeof Toposort;
        add(item: string, deps?: string | string[]): this;
        sort(): any[];
        clear(): this;
}

type Constructor<Type = any> = new (...args: any[]) => Type;
type TupleToFunction<T extends any[], R = void> = (...args: T) => R;
type PathValue<T, P extends string> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? Rest extends string ? PathValue<T[K], Rest> : never : never : P extends keyof T ? T[P] : never;
type DotNotation<T, Prefix extends string = ''> = {
    [K in keyof T & string]: T[K] extends Record<string, any> ? DotNotation<T[K], `${Prefix}${K}.`> | `${Prefix}${K}` : `${Prefix}${K}`;
}[keyof T & string];
type DeepPartial<T> = T extends object ? {
    [P in keyof T]?: DeepPartial<T[P]>;
} : T;

declare function wait(ms: number, cycles?: number): Promise<void>;
export { type Constructor, type DeepPartial, type DotNotation, type PathValue, Toposort, type TupleToFunction, copy, deepClone, defaults, dotize, escapeStringRegexp, guid, lcfirst, mergeDeep, objectify, parameters, strEnsureLeft, strEnsureRight, strIs, strRandom, strStripLeft, strStripRight, ucfirst, uuid, wait };

Size

  • Total: 92.26 kB
  • Gzip: 33.92 kB

Coverage

St|File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--|--------------|---------|----------|---------|---------|------------------------- 🟡|All files | 69.37 | 39.13 | 60 | 69.28 |
🟢| Toposort.ts| 90.9 | 85.71 | 75 | 90.69 |42,50,151-153 🟢| camelCase.ts| 100 | 100 | 100 | 100 | 🟢| cloneDeep.ts| 100 | 100 | 0 | 100 | 🟢| kebabCase.ts| 100 | 100 | 100 | 100 | 🟢| kindOf.ts| 100 | 100 | 100 | 100 | 🟢| merge.ts| 100 | 100 | 0 | 100 | 🔴| obj.ts| 29.41 | 2.77 | 12.5 | 28.57 |14,43,54-66,77-127 🟢| snakeCase.ts| 100 | 100 | 100 | 100 | 🟢| startCase.ts| 100 | 100 | 100 | 100 | 🟢| str.ts| 80.43 | 63.63 | 71.42 | 81.81 |100-101,112-115,127-129 🟢| wait.ts| 100 | 100 | 100 | 100 |

License:

MIT License

Author:

Robin Radic

Repository:

GitHub - robinradic/radicjs