New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@gesslar/toolkit

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gesslar/toolkit

A collection of utilities for Node.js and browser environments.

latest
Source
npmnpm
Version
4.4.0
Version published
Weekly downloads
559
-33.92%
Maintainers
1
Weekly downloads
 
Created
Source

@gesslar/toolkit

CodeQL, Linting, Testing

A collection of utilities for Node.js and browser environments, including file and directory abstractions, terminal utilities, validation helpers, and data manipulation functions.

Included Classes

Browser

These classes exist and function within the browser, or browser-like environment, such as a Tauri app.

NameDescription
CollectionArray, Map, Set, and other collection manipulation methods
DataPrimitive manipulation and type identification
DisposerLifecycle management for disposable resources
HTMLHTML loading and sanitization utilities
NotifyEvent system wrapper for DOM events
PromisedPromise utilities for settling, filtering, and extracting values from promise results
SassCustom Error class with enhanced features
TantrumAggregateError implementation
TimeTiming operations and promise-based delays with cancellation support
TypeString-based type management (exported as TypeSpec in browser)
UtilGeneral utility functions
ValidValidation and assertion methods

Node.js

Includes all browser functionality plus Node.js-specific modules for file I/O, logging, and system operations.

NameDescription
CacheCache management for file I/O operations
DirectoryObjectDirectory metadata and operations including path resolution, existence checks, and traversal
FileObjectFile system wrapper for file operations
FileSystemBase class for file system operations with static utilities
GlogLogging framework
NotifyEvent system wrapper for Node.js events
SassCustom Error class with enhanced features
TantrumAggregateError implementation
TermTerminal formatting and output utilities
UtilGeneral utility functions (Node-enhanced version)
ValidValidation and assertion methods
WatcherFile and directory change watcher with debounce protection

Installation

npm i @gesslar/toolkit

Usage

Toolkit is environment aware and automatically detects whether it is being used in a web browser or in Node.js. You can optionally specify the node or browser variant explicitly.

Browser-like

TypeScript editors do not pick up types from jsDelivr. If you want inline types without installing from npm, use the esm.sh ?dts URL or install the package locally for development and use the CDN at runtime.

jsDelivr (runtime only)

https://cdn.jsdelivr.net/npm/@gesslar/toolkit

esm.sh (runtime, types)

https://esm.sh/@gesslar/toolkit
https://esm.sh/@gesslar/toolkit?dts` (serves `.d.ts` for editors)

Node.js

import * as TK from "@gesslar/toolkit"
import {Data, FileObject, Cache} from "@gesslar/toolkit"
import {Data, FileObject} from "@gesslar/toolkit/node"
import { Data, Collection, Util } from '@gesslar/toolkit/browser'

The browser version includes: Collection, Data, Disposer, HTML, Notify, Sass, Tantrum, Type (TypeSpec), Util, and Valid. Node-only modules (Cache, DirectoryObject, FileObject, FileSystem, Glog, Term) are not available in the browser version.

Vendor Bundle

Pre-built bundles are included for environments without a build pipeline, such as webviews (VS Code, Tauri, Electron) or plain HTML pages. No bundler required.

ES module

<script type="module">
  import {Data, Collection} from "./node_modules/@gesslar/toolkit/vendor/toolkit.esm.js"
</script>

Or import via the package export:

import {Data, Collection} from "@gesslar/toolkit/vendor"

UMD (global script)

<script src="./node_modules/@gesslar/toolkit/vendor/toolkit.umd.js"></script>
<script>
  const {Data, Collection} = Toolkit
</script>

The vendor bundles contain the same browser-compatible utilities listed above, fully self-contained with zero external dependencies.

Post Partum

If you made it this far, please understand that I have absolutely zero scruples when it comes to breaking changes. Primarily, the audience for this library is myself. Consequently, anything that relies on the contents of this library will dutifully crash and I'll have to refactor those things then. It's like playing nicky nicky nine doors. But with myself. And there's a lazy bomb waiting for me. That I planted. For me. And the bomb just explodes poop.

You're of course welcome to use my library! It's pretty robust. Uhhh, but maybe lock in the version until you see if something is gonna poop all over you. I make robots make my PR notifications and generally they're very good at firing off klaxons about my fetish for breaking changes, so you should be all right if you're paying attention. 🤷🏻

Sincerely, Senator Yabba of the Dabba (Doo)

License

toolkit is released into the public domain under the Unlicense.

This package includes or depends on third-party components under their own licenses:

DependencyLicense
@gesslar/coloursUnlicense
ajvMIT
DOMPurifyApache-2.0 / MPL-2.0
json5MIT
supports-colorMIT
yamlISC

Keywords

toolkit

FAQs

Package last updated on 17 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts