Installation
Persian Tools is available via a npm package and supports multiple JavaScript or TypeScript environments, including Node.js, Bun, and modern browsers.Package Manager Installation
CDN Usage
For browser, environments, you can use Persian Tools directly from a CDN:Requirements
Compatibility
- Node.js: 14+ (ESM and CommonJS support) - Bun: Latest versions - Browsers: Modern browsers with ES2018+ support - TypeScript: 4.0+ (optional, but recommended)
Bundle Sizes
Persian Tools is designed to be lightweight and tree-shakable:📦 Full Bundle
📦 Full Bundle
- Minified: ~127KB gzipped
- Uncompressed: ~830KB
- Contains all 27+ utilities
🌳 Tree-Shaken
🌳 Tree-Shaken
- Single utility: ~1-3KB gzipped
- Typical usage: ~8-15KB gzipped
- Modern bundlers automatically optimize
Environment Support
Node.js & Bun
Full support for server-side applications with both CommonJS and ESM imports
Browsers
Works in all modern browsers with native ES modules or bundled applications
TypeScript
First-class TypeScript support with comprehensive type definitions
Bundlers
Compatible with Webpack, Vite, Rollup, and other modern bundlers
Verification
After installation, verify everything works correctly:If you encounter any installation issues, please check our troubleshooting
guide or create a new issue on GitHub.
