finprim simplifies financial applications with a single, zero-dependency library for TypeScript. It provides reliable validations for IBANs, card numbers, VAT, and more, ensuring consistent and efficient implementation. Avoid the hassle of fragmented solutions and streamline your fintech development with this fully typed library.
finprim provides essential financial primitives for modern TypeScript applications, offering a straightforward library that supports various financial operations such as IBAN, card, BIC, VAT, routing number validations, and loan calculations—all without external dependencies.
import { validateIBAN } from 'finprim';
const result = validateIBAN('GB29NWBK60161331926819');
// Output: { valid: true, value: 'GB29NWBK60161331926819', formatted: 'GB29 NWBK 6016 1331 9268 19', countryCode: 'GB' }
import { formatCurrency } from 'finprim';
const formattedCurrency = formatCurrency(1000.5, 'GBP', 'en-GB');
// Output: '£1,000.50'
import { calculateEMI } from 'finprim';
const emi = calculateEMI(100_000, 10, 12); // Monthly payment amount
import { useIBANInput } from 'finprim/react';
function PaymentForm() {
const iban = useIBANInput();
return <input value={iban.value} onChange={iban.onChange} />;
}
finprim can be imported directly or through additional modules for specific use cases. Choose from:
finprim: Core library with essential validators and formatters.finprim/zod: Zod schemas for seamless validation pipelines.finprim/react: React hooks for managing form inputs.finprim/nest: NestJS pipes for input validation.For further details and advanced usage, refer to the API Reference and explore the roadmap for upcoming features.
No comments yet.
Sign in to be the first to comment.