A lightweight TypeScript SDK for common developer utilities: QR codes, email validation, IP geolocation, URL shortening, and text processing.
Zero dependencies. Works in Node.js, Deno, Bun, and edge runtimes.
npm install @nopkt/devtoolsimport { DevTools } from "@nopkt/devtools";
const tools = new DevTools();
// Generate a QR code
const qr = await tools.qrcode.generate("https://example.com", { format: "svg" });
// Validate an email
const result = await tools.email.validate("user@example.com");
console.log(result.valid, result.disposable);
// IP geolocation
const geo = await tools.ip.lookup("8.8.8.8");
console.log(geo.country, geo.city);
// Shorten a URL
const short = await tools.url.shorten("https://example.com/very/long/path");
console.log(short.shortUrl);
// Text utilities
const { html } = await tools.text.markdown("# Hello World");
const { hash } = await tools.text.hash("secret", "sha256");Use only what you need:
import { QRCode, EmailValidator, IPGeo } from "@nopkt/devtools";
const qr = new QRCode("https://qrcode-api.gps949.workers.dev");
const email = new EmailValidator("https://email-validator-api.gps949.workers.dev");
const ip = new IPGeo("https://ip-geo-api.gps949.workers.dev");generate(text, options?)— Generate QR code (svg/png/base64/matrix)svg(text, options?)— Get raw SVG stringbulk(items)— Generate up to 50 QR codes
validate(email)— Check validity, MX records, disposable detectionbulk(emails)— Validate up to 100 emails
me()— Geolocate caller's IPlookup(ip)— Geolocate specific IPbulk(ips)— Look up 20 IPs
shorten(url, options?)— Create short URL with optional custom sluginfo(slug)— Get click analyticsbulk(urls)— Shorten up to 25 URLs
markdown(text)— Convert Markdown to HTMLhash(text, algo?)— SHA-256/SHA-1/MD5base64Encode(text)/base64Decode(text)slugify(text)— URL-friendly slugwordcount(text)— Word count + reading timeextractUrls(text)/extractEmails(text)
MIT