DEV Community

‌

Posted on

I built the most over-engineered utility library ever

TL;DR: I created LoLite, a JavaScript utility library that uses 67+ dependencies just to add two numbers, has over 380 passing tests, and over 90% code coverage. It's a parody of over-engineering, but it actually works!

What is LoLite?

LoLite is a "10x enterprise-grade" utility library that takes simple operations and makes them use as many npm package as possible. Want to add 2 + 2? Sure, but first we need to import 15 packages!

GitHub Repository

Features

  • ✅ Full TypeScript Definitions
  • ✅ 30+ utility functions (arrays, math, logic gates, validation)
  • ✅ Comprehensive documentation (Code of Conduct, Contributing Guide, Security Policy)
  • ✅ High test coverage (Over 90%)
  • ✅ Extreme linting - ESLint with 3 plugins and almost all rules enabled

Some Examples

Adding Two Numbers

const lolite = require("lolite")
console.log(lolite.add(5, 2)) // 7, but with 10+ dependencies!
Enter fullscreen mode Exit fullscreen mode

The Dependency Tree

When you run npm list --all, the output is over 10,000 lines! It includes:

  • Every number from 1-100 as individual packages (@positive-numbers/forty-two)
  • Every letter of the alphabet (@lowercase-letters/z)
  • Hundreds of emoji packages (emoji-poop, emoji-sunglasses)
  • Over 100 different is-wds packages from Web Dev Simplified viewers
  • Packages like nan-is-a-function@67.67.67

Please check it out!

Please star the LoLite repository, and check out some of the source code!. You can also check out some other packages I've made like this one on the enterprise-npm-ai org.

Top comments (0)