Dimsum generates lorem ipsum text for your Node.js and web projects
GitHub: https://github.com/ninjascribble/dimsum
npm: https://npmjs.org/package/dimsum
There are a ton of lorem ipsum generators out there, but for the most part you have to navigate to a site, run its tool, and copy+paste the output into your project. If you have lots of text, you're going to be doing this lots of times.
Dimsum aims to keep your projects cleaner, and make your life easier by doing two things well: It provides a simple JavaScript API that returns as much lorem ipsum as you want, and it will also dynamically replace tokens in your HTML with lorem ipsum. Usage notes are in the GitHub repository README, but basically...
// JavaScript: Returns 3 paragraphs of lorem ipsum
dimsum(3);
<!-- HTML: Replaced with 3 <p> of lorem ipsum -->
{{dimsum:p3}}
It can be configured to output either plaintext or HTML, and supports two flavors of lorem ipsum right out of the box ("latin" and "jabberwocky").
Written by Scott Grogan
Related protips
Have a fresh tip? Share with Coderwall community!
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside