UNPKG

april-fools

Version:

A time bomb that will throw a randomly generated `Error` on April 1st.

10 lines (6 loc) 269 B
'use strict' const date = new Date() if (date.getMonth() === 3 && date.getDate() === 1 && Math.floor(Math.random() * 6) + 1 === 1) { const message = require('sentencer').make("Unexpected {{ noun }} with {{ an_adjective }} {{ noun }}") throw new Error(message) }