# Puffy Core > Zero-dependency ES6 utility library for JavaScript/Node.js. 14 modules covering collections, conversion, crypto, dates, database IDs, error handling, functional programming, logging, math, objects, strings, time, URLs, and validation. All functions available in both camelCase and snake_case (e.g., `catchErrors` and `catch_errors`). Requires Node.js >= 13. Install: `npm i puffy-core` ESM (import individual functions from a specific module): ```js import { catchErrors, wrapErrors } from 'puffy-core/error' import { batch, uniq } from 'puffy-core/collection' ``` CJS (destructure from main entry): ```js const { error: { catchErrors, wrapErrors }, collection: { batch, uniq } } = require('puffy-core') ``` ## Core Modules - [error](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/error.txt): Functional error handling with [errors, data] tuples — catchErrors, wrapErrors, wrapErrorsFn, wrapCustomErrors, mergeErrors, getErrorMetadata, required, PuffyResponse - [func](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/func.txt): Function chaining with automatic error propagation — chainAsync, chainSync - [collection](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/collection.txt): Array utilities — batch, uniq, sortBy, seed, headTail, levelUp, flatten, flattenUniq - [obj](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/obj.txt): Object utilities — merge, diff, same, exists, existsAny, existsAll, isEmpty, isObj, getType, mirror, setProperty, getProperty, extractFlattenedJSON - [converter](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/converter.txt): Type and case conversion — addZero, nbrToCurrency, s2cCase, c2sCase, objectC2Scase, objectS2Ccase, toNumber, toBoolean, toObj, toArray - [crypto](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/crypto.txt): Encoding conversion and JWT decoding — encoder (curried 3-stage), jwtDecode - [date](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/date.txt): Date arithmetic, formatting, timezones — addDays, addMonths, addYears, addHours, addMinutes, addSeconds, formatDate, getTimeDiff, toTz - [math](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/math.txt): Statistics and random numbers — avg, stdDev, median, percentile (curried), getRandomNumber, getRandomNumbers - [string](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/string.txt): String utilities — plural, justifyLeft, safeStringify (BigInt-safe JSON) - [db](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/db.txt): Monotonically increasing BigInt ID generation — newId - [time](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/time.txt): Cancellable async delays and time measurement — delay, Timer ## Optional - [logger](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/logger.txt): Structured JSON logging — log - [url](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/url.txt): URL parsing with convenience properties — getUrlParts - [validate](https://raw.githubusercontent.com/nicolasdao/puffy-core/master/llms/validate.txt): Input validation — validateUrl, validateEmail, validateDate, validateSpecialChar