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

sculp-js

v1.19.1

Published

Utils function library for modern javascript

Readme

sculp-js

A Modern JavaScript Utility Library for Web

Node.js CI sculp-js license:MIT codecov

A lightweight utility library written in TypeScript with zero dependencies, supporting ESM, CJS, and UMD formats.

API DocumentationGetting StartedFeatures

✨ Features

  • Type-Safe: Full TypeScript support with comprehensive type definitions
  • Zero Dependencies: Pure native implementation, no external libraries
  • Tree Shaking: Supports selective imports for smaller bundle sizes
  • Multi-Format: ESM, CJS, and UMD builds available
  • Web Focused: Optimized for modern web environments

Core Utilities

  • isString, isNumber, isBoolean, isFunction, isObject, isArray
  • isDate, isRegExp, isUndefined, isNull, isError, isNaN
  • isPrimitive, isSymbol, isBigInt, isPlainObject
  • isEmpty, isNodeList, isValidDate, typeIs
  • Array: arrayEach, arrayEachAsync, arrayInsertBefore, arrayRemove
  • Tree: forEachDeep, mapDeep, findDeep, filterDeep, searchTreeById, flatTree, fuzzySearchTree
  • Object: objectAssign, objectGet, objectHas, cloneDeep, objectPick, objectOmit
  • DOM: addClass, hasClass, removeClass, getStyle, setStyle
  • File: chooseLocalFile, compressImg
  • Clipboard: copyText, fallbackCopyText
  • Download: downloadBlob, downloadURL, downloadData
  • Watermark: genCanvasWM
  • Encode/Decode: weBtoa, weAtob, b64encode, b64decode
  • Validation: isEmail, isPhone, isUrl, isIDNO, isIPv4, isIPv6
  • Date: formatDate, calculateDate, dateToStart, dateToEnd
  • String: stringCamelCase, stringKebabCase, parseQueryParams, stringEscapeHTML
  • Math: add, subtract, multiply, divide, numberAbbr
  • Functional: debounce, throttle, once, wait

🚀 Installation

npm

npm install sculp-js

CDN

<script src="https://unpkg.com/sculp-js"></script>

💡 Usage

import { forEachDeep, cloneDeep } from 'sculp-js';

// Deep traversal of tree structures
const tree = [
  {
    id: 1,
    name: 'Parent 1',
    children: [
      { id: 11, name: 'Child 1' },
      { id: 12, name: 'Child 2', children: [{ id: 121, name: 'Grandchild 1' }] }
    ]
  },
  { id: 2, name: 'Parent 2' }
];

const names = [];
forEachDeep(tree, item => {
  names.push(item.name);
});
// names = ['Parent 1', 'Child 1', 'Child 2', 'Grandchild 1', 'Parent 2']

// Deep cloning of objects
const original = { a: 1, b: { c: 2 } };
const cloned = cloneDeep(original);

📦 Module Formats

Named Imports (Recommended)

// ES Modules - Named imports (tree-shaking friendly)
import { cloneDeep, forEachDeep } from 'sculp-js';

// CommonJS - Named imports
const { cloneDeep, forEachDeep } = require('sculp-js');

Default Import (Full Library)

// ES Modules - Default import
import sculp from 'sculp-js';
const { cloneDeep, forEachDeep } = sculp;

// CommonJS - Default import
const sculp = require('sculp-js');
const { cloneDeep, forEachDeep } = sculp;

Module-Specific Imports

Import specific modules for better tree-shaking and smaller bundle sizes:

// ES Modules - Import specific modules
import array from 'sculp-js/array';
import string from 'sculp-js/string';
import type from 'sculp-js/type';
import date from 'sculp-js/date';
import object from 'sculp-js/object';
import math from 'sculp-js/math';
import validator from 'sculp-js/validator';
// ... and more

// CommonJS - Import specific modules
const array = require('sculp-js/array');
const string = require('sculp-js/string');
const type = require('sculp-js/type');

// Usage examples
import array from 'sculp-js/array';
array.arrayEach([1, 2, 3], val => console.log(val));

import string from 'sculp-js/string';
const camelCase = string.stringCamelCase('hello-world'); // 'helloWorld'

import validator from 'sculp-js/validator';
if (validator.isEmail('[email protected]')) {
  console.log('Valid email');
}

Available Modules

All modules support both named and default exports:

  • sculp-js/array - Array utilities
  • sculp-js/string - String manipulation
  • sculp-js/type - Type checking
  • sculp-js/date - Date formatting
  • sculp-js/object - Object utilities
  • sculp-js/math - Math operations
  • sculp-js/number - Number formatting
  • sculp-js/url - URL parsing
  • sculp-js/qs - Query string parsing
  • sculp-js/path - Path utilities
  • sculp-js/async - Async utilities
  • sculp-js/func - Function utilities
  • sculp-js/random - Random generators
  • sculp-js/validator - Validation functions
  • sculp-js/tree - Tree operations
  • sculp-js/base64 - Base64 encoding
  • sculp-js/unique - Unique ID generators
  • sculp-js/variable - Variable utilities
  • sculp-js/clipboard - Clipboard operations
  • sculp-js/cookie - Cookie management
  • sculp-js/dom - DOM utilities
  • sculp-js/download - Download helpers
  • sculp-js/file - File utilities
  • sculp-js/watermark - Watermark generation
  • sculp-js/tooltip - Tooltip utilities
  • sculp-js/cloneDeep - Deep cloning
  • sculp-js/isEqual - Deep equality
  • sculp-js/unicodeToolkit - Unicode utilities

📄 License

MIT License © 2023-present, chandq