Skip to content

4.9.0

API

API v4.9.0 — Credit, Avatar, Barcode.

  • Added endpoint GET /credit: generates fictitious Luhn-valid credit card numbers. Supports four brands (visa, mastercard, amex, discover) with correct IIN prefixes, a count parameter (1–10), and a format parameter (full or masked). Returns card number, formatted number, brand, expiry date, and CVV.
  • Added endpoint GET /avatar: generates deterministic avatar images from a seed string. Supports two types (identicon with a 5×5 mirrored grid, pixel with an 8×8 grid), PNG and SVG output, configurable size (50–2000 px), and a custom background color.
  • Added endpoint GET /barcode: generates barcode images from a data string. Supports Code 128 (Set B), EAN-13, EAN-8, UPC-A, and Code 39. EAN check digits are computed automatically if omitted and validated if provided. Renders as SVG (default) or PNG.
  • GET /personal now uses the /credit module to generate card data: numbers are Luhn-valid, CVV length is consistent with the brand (4 digits for Amex), and the formatted number uses the correct spacing pattern.
  • GET /cron scheduler optimized: months, days, and hours that do not match the cron expression are now skipped directly, significantly reducing computation time on restrictive expressions.
  • Added prepare script in package.json: tsc now runs automatically before npm publish.
  • Added .npmignore: src/, tests/, config files, and development assets are excluded from the published npm package.

Documentation

  • Added documentation pages for Credit, Avatar, and Barcode.
  • Added all three endpoints to the Playground registry and sidebar.
  • Updated Personal documentation: cvc field type changed to string, card description updated to reflect Luhn-valid generation.
  • Added "How it works" explanations to Geo (Haversine formula, great-circle distance, bearing) and Statistics (population formulas, mode ties, decimal precision).
  • Removed redundant use case tips from Token, Avatar, and Credit pages.