devkits-client
v1.0.1
Published
JavaScript client for DevKits REST API — JSON, Base64, JWT, UUID, Hash, Regex, Markdown, Diff, Cron tools
Maintainers
Readme
devkits-client
JavaScript client for the DevKits REST API — JSON formatting, Base64, JWT decoding, UUID generation, hashing, regex testing, Markdown conversion, text diff, and cron parsing.
Installation
npm install devkits-clientQuick Start
const { createClient } = require('devkits-client');
const devkits = createClient(); // free tier: 100 req/day
// Format JSON
const result = await devkits.json.format('{"a":1,"b":2}');
console.log(result.formatted);
// {
// "a": 1,
// "b": 2
// }
// Generate UUID
const { uuids } = await devkits.uuid.generate();
console.log(uuids[0]); // e.g. "550e8400-e29b-41d4-a716-446655440000"
// Encode Base64
const { encoded } = await devkits.base64.encode('Hello, World!');
console.log(encoded); // "SGVsbG8sIFdvcmxkIQ=="
// Decode JWT
const jwt = await devkits.jwt.decode('eyJhbGciOiJIUzI1NiJ9...');
console.log(jwt.payload);
// Hash text
const { hash } = await devkits.hash.generate('password', 'sha256');
console.log(hash);
// Test regex
const { matches } = await devkits.regex.test('\\d+', 'foo 123 bar 456');
console.log(matches); // ["123", "456"]
// Parse cron
const { description } = await devkits.cron.parse('0 9 * * 1-5');
console.log(description); // "At 09:00 AM, Monday through Friday"Pro API Key
Free tier: 100 requests/day per IP. Get a Pro key for unlimited requests.
const devkits = createClient({ apiKey: 'your-pro-api-key' });All Methods
| Method | Description |
|--------|-------------|
| json.format(json, indent?) | Format and validate JSON |
| base64.encode(text) | Encode text to Base64 |
| base64.decode(encoded) | Decode Base64 to text |
| jwt.decode(token) | Decode JWT (no verification) |
| regex.test(pattern, text, flags?) | Test regex pattern |
| url.encode(text) | URL-encode a string |
| url.decode(encoded) | URL-decode a string |
| hash.generate(text, algo?) | Generate MD5/SHA hash |
| uuid.generate(count?) | Generate UUID v4 |
| markdown.toHtml(md) | Convert Markdown to HTML |
| diff.compare(text1, text2) | Compare two texts |
| cron.parse(expression) | Parse cron expression |
| usage() | Check API usage |
API Reference
Full documentation: aiforeverthing.com/api/docs.html
Base URL: https://api.aiforeverthing.com
License
MIT
