mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 16:26:16 -04:00
Converted the majority of the core and operations to use CommonJS module syntax.
This commit is contained in:
parent
a4197684e5
commit
a21e0e546b
50 changed files with 308 additions and 123 deletions
|
@ -1,4 +1,5 @@
|
|||
/* globals punycode */
|
||||
var punycode = require("punycode");
|
||||
|
||||
|
||||
/**
|
||||
* Punycode operations.
|
||||
|
@ -9,7 +10,7 @@
|
|||
*
|
||||
* @namespace
|
||||
*/
|
||||
var Punycode = {
|
||||
var Punycode = module.exports = {
|
||||
|
||||
/**
|
||||
* @constant
|
||||
|
@ -28,7 +29,7 @@ var Punycode = {
|
|||
var idn = args[0];
|
||||
|
||||
if (idn) {
|
||||
return punycode.ToASCII(input);
|
||||
return punycode.toASCII(input);
|
||||
} else {
|
||||
return punycode.encode(input);
|
||||
}
|
||||
|
@ -46,7 +47,7 @@ var Punycode = {
|
|||
var idn = args[0];
|
||||
|
||||
if (idn) {
|
||||
return punycode.ToUnicode(input);
|
||||
return punycode.toUnicode(input);
|
||||
} else {
|
||||
return punycode.decode(input);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue