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-ts-inspect

v0.2.0

Published

A TypeScript inspection and logging utility library

Readme

@art-suite/art-core-ts-inspect

Easy, powerful tools for inspecting data at runtime to accelerate development.

Why This Module?

Runtime data inspection is essential for accelerating development, but standard logging approaches often require code rewriting and produce output that's hard to read or reuse. Developers need functional logging that integrates seamlessly into expressions, clean inspection of complex object hierarchies, and output that can be copy-pasted for use elsewhere.

  • Functional logging: The log function returns the last value passed in, so it can be used inline inside expressions without breaking code flow
  • Clean object inspection: Beautiful, readable output for complex object hierarchies that makes understanding runtime data at a glance much easier
  • Copy-paste friendly: Logged output is legal JavaScript that can be directly used elsewhere
  • Multiple output formats: Standard, unquoted, and formatted inspection options for different use cases

Example Installation and Use (Required)

Install with npm:

npm install @art-suite/art-core-ts-inspect

Basic usage:

import { log, formattedInspect } from "@art-suite/art-core-ts-inspect";

// Functional logging - returns the last value
const result = log("Processing user:", user); // logs and returns user
const processed = processUser(log("Input:", user)); // logs inline, continues processing

// Multiple arguments
log("User ID:", userId, "Profile:", profile); // logs all, returns profile

// Different log levels
log.warn("Warning:", warningMessage); // returns warningMessage
log.error("Error occurred:", error); // returns error

// Unquoted output for cleaner object inspection
log.unquoted("User object:", user); // cleaner, more readable output

// Formatted inspection for complex objects
const formatted = formattedInspect(complexObject);
console.log(formatted);

Functional Overview

Core Logging Functions

  • log(...args) — Logs all arguments and returns the last one
  • log.warn(...args) — Logs with console.warn and returns the last argument
  • log.error(...args) — Logs with console.error and returns the last argument
  • log.unquoted(...args) — Logs with cleaner, unquoted output and returns the last argument

Inspection Utilities

  • formattedInspect(value) — Returns a formatted string representation of any value

TypeScript Types

  • LogFunction — Type for the functional logging interface

Key Features

Functional Programming Style

The logging functions are designed for functional programming patterns, allowing you to inspect data without breaking expression chains:

// Instead of:
const user = getUser();
console.log("User:", user);
const processed = processUser(user);

// You can do:
const processed = processUser(log("User:", getUser()));

Inline Expression Logging

The log function returns the last value passed to it, making it perfect for inline debugging:

const a = 123;
const b = 345;
return a + log("this is b", b);
// Output: "this is b 345"
// Returns: 468 (123 + 345)

This allows you to add logging without restructuring your code or creating temporary variables.

Clean Object Inspection

The log.unquoted function provides cleaner output for complex objects:

const user = {
  id: 123,
  name: "John Doe",
  preferences: {
    theme: "dark",
    notifications: true,
  },
};

log.unquoted("User:", user);
// Output is clean, readable, and copy-paste friendly

Copy-Paste Friendly Output

Standard logging output is valid JavaScript that can be directly copied and used:

const data = { foo: "bar", nested: { value: 42 } };
log("Data:", data);
// Output can be copied and pasted directly into code

Human-Readable Inspection

The log.unquoted function removes symbol noise to make output more human-readable, perfect for production code where you want precise but friendly output:

const user = {
  id: 123,
  name: "John Doe",
  preferences: {
    theme: "dark",
    notifications: true,
  },
};

log.unquoted("User:", user);
// Clean, human-friendly output without excessive quotes and symbols

Color Logging Support

All logging functions support color output for enhanced readability:

  • Standard log() uses colors for better visual distinction
  • log.unquoted() provides colored, clean output
  • Colors are automatically detected and used in terminal environments

API Documentation Reference

For detailed information on all exported functions and their parameters, please refer to the TypeScript typings and JSDoc comments within the source code.