Skip to content

Instantly share code, notes, and snippets.

@zekesonxx
Created January 10, 2014 22:21
Show Gist options
  • Save zekesonxx/8363851 to your computer and use it in GitHub Desktop.
Save zekesonxx/8363851 to your computer and use it in GitHub Desktop.
USD Currency Checker
/**
* USD Currency Checker
* Checks a article of currency if it has been used in a fradulent transaction.
* @author Zeke Sonxx (https://github.com/zekesonxx)
* @license MIT
*/
/**
* Checks a USD bill for fradulant activity
* @param {int} face Face value ($1, $5, $10, etc)
* @param {string} id The ID on the bill
* @return {boolean} If the bill has been used in fradulent activity
*/
exports.check = function(face, id) {
switch face {
case 1:
case 2:
case 5:
case 10:
case 20:
case 50:
case 100:
case 500:
case 1000:
return true;
break;
default:
console.err("Invalid face value");
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment