Stuffed-Na(a)N: stuff your NaN s Joy via Wikimedia Have you ever done this by mistake? console . log ( 0 / 0 ) // Output: NaN Or maybe this? console . log ( Math . asin ( 2 ) ) // Output: NaN Have you been annoyed by NaN propagation? const a = NaN console . log ( ( a * 2 ) - 5 ) // Output: NaN With stuffed-naan , you can finally make use of NaN s. Just stuff NaN Na(a)N s with your data! import { encode , decode } from 'stuffed-naan' ; const encoded = encode ( "Hello world" ) ; console . log ( encoded ) ; // Output: [NaN, NaN, NaN] console . log ( decode ( encoded ) ) ; // Output: Hello world To quote Sun Tzu, "If you can't beat the enemy, use the enemy's advantage to your advantage". Na(a)N s preserve data even when used in mathematical operations: import { encode , decode } from 'stuffed-naan' ; const encoded = encode ( "Hello world" ) ; console . log ( decode ( encoded . map ( x => x * 2 ) ) ) ; // Output: Hello world Why stuffed-naan Compact 💿 stuffed-naan is compact. Community Edition achieves a compression ratio of -25%. That means, for every 1024 bytes of data, you get 1368 bytes of float64 Na(a)N s back! This is an industry-beating level of Na(a)N compression. For even better compression, consider the Enterprise Edition. Blazing fast 🚀 stuffed-naan is blazing fast. Thanks to advanced byte-manipulation capabilities available in ECMAScript® 2026, the overhead of stuffing is minimal. Na(a)N ification of a thousand small objects takes 1–3ms. stuffed-naan is privacy-first. It's a first-of-its-kind privacy-preserving encoding, since an array of Na(a)N s can't be copypasted without losing the information. This makes stuffed-naan indispensable to protect your customers' PII. Contact stuffed-naan DPO to learn more. Installation npm install stuffed-naan Or you can do this in your browser console: const stuffedNaan = await import ( 'https://unpkg.com/stuffed-naan' ) ; stuffedNaan . encode ( "hello world" ) ; Enterprise Edition 🏦 Enterprise Edition includes: ✅ 6% more ef...
First seen: 2025-04-26 15:07
Last seen: 2025-04-27 12:15