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

@encfy/core

v0.2.0

Published

Pure TypeScript text tools: encoding, hashing, text transformation, generators, Brazilian document validation and PDF generation. Zero dependencies, works in browsers, Node.js and Deno.

Readme

@encfy/core

Pure TypeScript text and PDF tools with zero runtime dependencies. Works in browsers, Node.js (>= 18), Deno and Bun.

This package powers the free tools on encfy.com and the local tools of the Encfy MCP Server. Everything here is pure computation: no I/O, no state, no network.

npm install @encfy/core
# or
pnpm add @encfy/core

Usage

import { base64Encode, sha256, slugify, validateCpf, uuidV4 } from "@encfy/core";

base64Encode("Olá");            // "T2zDoQ=="
await sha256("abc");            // "ba7816bf..."
slugify("Olá Mundo!");          // "ola-mundo"
validateCpf("529.982.247-25");  // { valid: true, formatted: "529.982.247-25", ... }
uuidV4();                       // "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"

Modules

| Module | Functions | |---|---| | encoding | base64Encode/Decode, urlEncode/Decode, htmlEntitiesEncode/Decode, morseEncode/Decode, natoEncode/Decode, rot, rot13, rot47, hexEncode/Decode, binaryEncode/Decode, removeDiacritics | | hashing | md5 (sync), sha1, sha256, sha384, sha512 (Web Crypto, async), hash(algorithm, input) | | text | slugify, changeCase (upper, lower, title, sentence, camel, pascal, snake, kebab, constant, alternating, inverse), trimText, dedupLines, sortLines, reverseLines, shuffleLines, stripHtml, reverseText, upsideDownText, addPrefixSuffix, addLineNumbers, countText, extractNumbers/Emails/Urls | | generators | uuidV4, uuidV4Batch, isUuid, timestampToDate, dateToTimestamp, minutesToHours, hoursToMinutes, hexToRgb, rgbToHex, parseRgb, rgbToHsl, hslToRgb, parseColor, randomHexColor, randomString | | pdf | createPdf (sync, deterministic), createEncryptedPdf (AES-256, async), pdfPageDimensions, PDF_PAGE_SIZES | | validation | validateCpf, isValidCpf, formatCpf, generateCpf, validateCnpj (numeric and alphanumeric), isValidCnpj, formatCnpj, generateCnpj, formatCep, isValidCepFormat, isValidEmail |

PDF

Generate blank pages, lined / graph / dot-grid paper, plain text, form fields, files of an exact size and password-protected files — handy as fixtures for upload, parser and preview tests. Ready-made files are published at encfy.com/tools/pdf/sample-pdf-files/.

import { createPdf, createEncryptedPdf } from "@encfy/core";

createPdf();                                              // 1 blank A4 page
createPdf({ size: "letter", orientation: "landscape", pages: 10 });
createPdf({ pattern: "grid", spacingMm: 5, color: "#c8c8c8" });
createPdf({ text: ["First page", "Second page"], pageNumbers: true });
createPdf({ fields: [{ type: "text", name: "email" }, { type: "checkbox", name: "accept" }] });
createPdf({ padToBytes: 10 * 1024 * 1024 });              // exactly 10 MB, still valid
await createEncryptedPdf({ userPassword: "secret" });     // AES-256 (PDF 2.0 / R6)
await createEncryptedPdf({ userPassword: "", ownerPassword: "owner", permissions: { print: false, copy: false } });

createPdf returns a Uint8Array and always produces the same bytes for the same options. createEncryptedPdf uses random salts and keys unless you pass a seed (only for public fixtures, since it makes the key predictable). Text uses the built-in Helvetica font, so characters outside Windows-1252 become ?.

Free vs premium

Everything in this package is free and MIT-licensed. Tools that need server-side secrets or external data (HMAC, UUID v7, QR codes, JSON/CSV/YAML/XML conversion, CEP lookup, CPF/CNPJ enrichment) live in the Encfy REST API.

Development

pnpm install
pnpm --filter @encfy/core test
pnpm --filter @encfy/core build

License

MIT © Maicon Schmitz / Encfy