You are currently offline, so some features of this site may not work fully.

Your browser doesn’t support some of the latest CSS features used to build this site.

Read more about my usage of new CSS features.

A friend of mine introduced me to Sindre Sorhus’ Superb Node package a little while ago so I took the concept, turned it on its head and created a small Node package that returns a random, funny curse phrase to your console or app - with the idea that it could be used for when a task goes disastrously wrong.



exclamation informal

Used to express anger or frustration.


Installation couldn’t be easier - as with the majority of Node packages, simply enter:

npm install dammit --save-dev
Remember to pass the --save or --save-dev flag to save it in your package.json and your project.


There are currently two modes you can use dammit in - Safe and NSFW modes. As you can imagine, I’d recommend using Safe mode for your projects as NSFW mode was pretty much just introduced for Mr. Andy Blackledge’s dirty mouth.

To use it within a Node package or Grunt/Gulp task do the following:

var dammit = require('dammit');

console.log(dammit({'NSFW': false})); // Logs a safe one
console.log(dammit({'NSFW': true})); // Logs a naughty one

And that's it!

In the wild

Here’s an example paraphrased from our combine-mq package:

// Read file in
fs.readFile(options.src, 'utf8', function(err, fileContents) {
  if (err) {
    // Write error messages
      NSFW: false
    console.log('(Could not open file: "' + self.src + '")'));
    // Exit out

In this instance, if the file input to combine-mq doesn’t exist, error out and display a dammit phrase to the console.

Via the CLi

Alternatively you can have a play via the command line by installing as above and entering either



dammit NSFW


I wrote a little Node package to return a random curse phrase - for use within other Node/Grunt/Gulp etc. tasks.

NPM badge for dammit showing downloads

Download Dammit! from the NPM registry or enter:

npm install dammit

…and away you go!

Contribute to the curses.json file by forking the GitHub repo.