mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Initial commit
This commit is contained in:
commit
b1d73a725d
238 changed files with 105357 additions and 0 deletions
27
src/js/operations/Numberwang.js
Executable file
27
src/js/operations/Numberwang.js
Executable file
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* Numberwang operations.
|
||||
*
|
||||
* @author Unknown Male 282
|
||||
* @namespace
|
||||
*/
|
||||
var Numberwang = {
|
||||
|
||||
/**
|
||||
* Numberwang operation. Remain indoors.
|
||||
*
|
||||
* @param {string} input
|
||||
* @param {Object[]} args
|
||||
* @returns {string}
|
||||
*/
|
||||
run: function(input, args) {
|
||||
if (!input) return "Let's play Wangernumb!";
|
||||
var match = input.match(/\d+/);
|
||||
if (match) {
|
||||
return match[0] + "! That's Numberwang!";
|
||||
} else {
|
||||
// That's a bad miss!
|
||||
return "Sorry, that's not Numberwang. Let's rotate the board!";
|
||||
}
|
||||
},
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue