mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -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 UAS_parser */
|
||||
var UAParser = require("uas-parser");
|
||||
|
||||
|
||||
/**
|
||||
* HTTP operations.
|
||||
|
@ -9,7 +10,7 @@
|
|||
*
|
||||
* @namespace
|
||||
*/
|
||||
var HTTP = {
|
||||
var HTTP = module.exports = {
|
||||
|
||||
/**
|
||||
* Strip HTTP headers operation.
|
||||
|
@ -34,7 +35,7 @@ var HTTP = {
|
|||
* @returns {string}
|
||||
*/
|
||||
runParseUserAgent: function(input, args) {
|
||||
var ua = UAS_parser.parse(input); // eslint-disable-line camelcase
|
||||
var ua = UAParser.parse(input);
|
||||
|
||||
return "Type: " + ua.type + "\n" +
|
||||
"Family: " + ua.uaFamily + "\n" +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue