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

@art-suite/art-core-types

v0.3.3

Published

The Standard Library for JavaScript that aught to be.

Readme

@art-suite/art-core-types

A comprehensive utility library for type checking and object introspection with a functional approach.

Features

  • Extensive type checking for primitive and complex types
  • Cross-frame compatible type detection
  • Deep object traversal and transformation
  • Value comparison utilities with custom object support
  • Object structure conversion for various formats

Installation

npm install @art-suite/art-core-types

API Overview

Type Checking

Core functions for precise type detection:

// Basic type checks
isArray(obj: any): boolean
isString(obj: any): boolean
isNumber(obj: any): boolean
isBoolean(obj: any): boolean
isFunction(obj: any): boolean
isObject(obj: any): boolean
isDate(obj: any): boolean
isRegExp(obj: any): boolean
isError(obj: any): boolean
isPromise(obj: any): boolean

// Advanced type checks
isPlainObject(v: any): boolean          // True for simple key-value objects
isPlainArray(obj: any): boolean         // True for standard arrays
isArrayIterable(source: any): boolean   // True if object has a length property
isNonNegativeInt(x: any): boolean       // True for integers >= 0
isClass(obj: any): boolean              // True for class constructors
isExtendedClass(obj: any): boolean      // True for classes that extend another class

// Special types
isArrayBuffer(obj: any): boolean        // True for ArrayBuffer objects
isTypedArray(obj: any): boolean         // True for typed arrays (Uint8Array etc.)
isArguments(o: any): boolean            // True for arguments objects
isBrowserObject(obj: any): boolean      // True for DOM elements and browser objects

// Cross-frame compatible checks
isPlainObjectFast(v: any): boolean      // faster than isPlainObject
// Works great as long as Node doesn't have multiple contexts
// i.e. multiple different instances of Object

Object Property Inspection

Functions for checking object properties:

// Property existence checks
hasProperties(o: any): boolean          // True if object has any properties (including inherited)
hasOwnProperties(o: any): boolean       // True if object has any own properties
isEmptyObject(obj: any): boolean        // True if object has no properties

// Inheritance checks
getSuper(o: object | Function): object | Function      // Gets parent object
getSuperclass(klass: Function): Function | undefined   // Gets superclass of a class
isDirectPrototypeOf(o: any, prototype: any): boolean   // Checks direct prototype relationship

Value Comparison

Functions for comparing values with custom object support:

// Comparison operators
gt(a: any, b: any): boolean    // Greater than with object support
gte(a: any, b: any): boolean   // Greater than or equal with object support
lt(a: any, b: any): boolean    // Less than with object support
lte(a: any, b: any): boolean   // Less than or equal with object support

JSON & Structure Conversion

Utilities for converting between different structure formats:

// JSON compatibility
isJsonAtomicType(a: any): boolean    // True for string, number, boolean, null
isJsonType(a: any): boolean          // True for any JSON-compatible type

Value Presence

Functions for checking if values are present or empty:

// Presence checks
present(obj: any, returnIfNotPresent?: any): any     // Returns obj if present, else returnIfNotPresent
stringIsPresent(str: string): boolean                // True if string has content (not just whitespace)

Examples

Type Checking

import {
  isFunction,
  isPlainObject,
  isPromise,
} from "@art-suite/art-core-types";

// Basic type checking
isFunction(() => {}); // true
isFunction(function () {}); // true
isFunction(class MyClass {}); // true
isFunction("not a function"); // false

// Advanced object checking
isPlainObject({}); // true
isPlainObject(new Date()); // false
isPlainObject(Object.create(null)); // true

// Async type detection
isPromise(Promise.resolve()); // true
isPromise(new Promise((r) => r())); // true
isPromise({ then: () => {} }); // false (needs more than just 'then')

License

MIT