A Node.js package for invoking divine blessings for one's Javascript code.
Dua
is the Hindi word for blessings/good wishes. More than the meaning, I like the sound of it; it's cute. It's a loanword from Arabic,
where the word has a rather different meaning.
For your code to run successfully, of course! Do note that this doesn't mean dua WILL run your code, no matter how buggy it is; it just means a lot of good wishes and blessings are being directed towards your code. Ultimately, karma does count.
Well...yes. But honestly, it's not a lot. Believe me, it's better than React's dependency list! And again, why not add an extra dependency that puts in a harmless, useful blessing here and there? Not gonna hurt!
First, install it:
npm install --save dua.js
Next, you need to include dua in every single module. Every single module. Blessings don't work when you solicit them half-heartedly.
var dua = require('dua.js')
That's it! When you need a blessing before running a piece of code that's particularly troublesome:
var newDua = new dua()
console.log(newDua.message)
// 'Blessing ID #c3877741-28e3-447b-b701-418475801fab: Our blessings are with you.'
console.log(newDua.id)
// 'c3877741-28e3-447b-b701-418475801fab'
console.log(newDua.isCodeBlessed())
// true
Every blessing comes with a unique ID, and you can even go ahead and log all your blessings. Remember, accumulated blessings are a blessing!
Yeah, but blessings are universal. Ports for Python, Ruby, Go, Rust, Swift and F# are on their way :)
Inspired by a conversation with @kshitishpurohit. Built with additional blessings from @rudimk. Additional contributions by @shawndellysse , @Phanatic and @akashdeep-singh.