v0.14.0: Full Deno and Bun Runtime Support
π Full Deno and Bun Runtime Support
nano-string-utils now works seamlessly across all modern JavaScript runtimes: Node.js, Deno, and Bun!
β¨ Highlights
- π¦ Deno Support: All 41 utility functions and CLI tool work natively in Deno
- π Bun Support: Full compatibility with Bun runtime including performance optimizations
- π§ Universal CLI: The
nano-stringCLI tool now runs in any runtime - β Zero Breaking Changes: Existing Node.js users are unaffected
- π¦ Zero Dependencies: Maintains our commitment to zero runtime dependencies
π― What's New
Runtime Abstraction Layer
- Unified interface for cross-runtime compatibility
- Automatic runtime detection (Node.js, Deno, or Bun)
- Seamless stdin handling and path resolution across runtimes
Enhanced CLI Tool
- Works with
deno run,bun run, and Node.js execution - Full pipe support in all runtimes
- Consistent behavior across all environments
Comprehensive Testing
- Dedicated runtime compatibility tests for Deno and Bun
- All 41 functions verified across runtimes
- CI/CD pipeline extended with runtime compatibility checks
π Usage Examples
Deno:
```typescript
// Import from JSR
import { slugify } from "jsr:@zheruel/nano-string-utils";
// Or use the CLI
deno run --allow-read https://unpkg.com/nano-string-utils/bin/nano-string.js slugify "Hello Deno"
```
Bun:
```bash
Install and use
bun add nano-string-utils
Use the CLI
bunx nano-string-utils camelCase "hello-bun-world"
```
Node.js:
```bash
Works as always
npx nano-string-utils kebabCase "HelloWorld"
```
π Runtime Compatibility Matrix
| Runtime | Library | CLI | Installation |
|---|---|---|---|
| Node.js β₯18 | β | β | `npm install nano-string-utils` |
| Deno | β | β | `deno add @zheruel/nano-string-utils` |
| Bun | β | β | `bun add nano-string-utils` |
π¦ Installation
NPM: `npm install [email protected]`
JSR: `deno add @zheruel/[email protected]`
Bun: `bun add [email protected]`
π Documentation
Full documentation and interactive playground: https://zheruel.github.io/nano-string-utils/
Full Changelog: https://github.com/Zheruel/nano-string-utils/blob/main/CHANGELOG.md#0140---2025-09-21