Browse Source

Tidied up 'Parse ObjectID Timestamp' operation

n1474335 5 years ago
parent
commit
3a0c8a199a

+ 2 - 2
src/core/config/Categories.json

@@ -242,13 +242,13 @@
             "Convert co-ordinate format",
             "Convert co-ordinate format",
             "Show on map",
             "Show on map",
             "Parse UNIX file permissions",
             "Parse UNIX file permissions",
+            "Parse ObjectID timestamp",
             "Swap endianness",
             "Swap endianness",
             "Parse colour code",
             "Parse colour code",
             "Escape string",
             "Escape string",
             "Unescape string",
             "Unescape string",
             "Pseudo-Random Number Generator",
             "Pseudo-Random Number Generator",
-            "Sleep",
-            "Parse ObjectId timestamp"
+            "Sleep"
         ]
         ]
     },
     },
     {
     {

+ 7 - 7
src/core/operations/ParseObjectIdTimestamp.mjs

@@ -9,19 +9,19 @@ import OperationError from "../errors/OperationError.mjs";
 import BSON from "bson";
 import BSON from "bson";
 
 
 /**
 /**
- * Parse ObjectId timestamp operation
+ * Parse ObjectID timestamp operation
  */
  */
-class ParseObjectIdTimestamp extends Operation {
+class ParseObjectIDTimestamp extends Operation {
 
 
     /**
     /**
-     * ParseObjectIdTimestamp constructor
+     * ParseObjectIDTimestamp constructor
      */
      */
     constructor() {
     constructor() {
         super();
         super();
 
 
-        this.name = "Parse ObjectId timestamp";
-        this.module = "Default";
-        this.description = "Parse timestamp from MongoDB/BSON ObjectId hex string.";
+        this.name = "Parse ObjectID timestamp";
+        this.module = "Serialise";
+        this.description = "Parse timestamp from MongoDB/BSON ObjectID hex string.";
         this.infoURL = "https://docs.mongodb.com/manual/reference/method/ObjectId.getTimestamp/";
         this.infoURL = "https://docs.mongodb.com/manual/reference/method/ObjectId.getTimestamp/";
         this.inputType = "string";
         this.inputType = "string";
         this.outputType = "string";
         this.outputType = "string";
@@ -44,4 +44,4 @@ class ParseObjectIdTimestamp extends Operation {
 
 
 }
 }
 
 
-export default ParseObjectIdTimestamp;
+export default ParseObjectIDTimestamp;

+ 1 - 1
tests/operations/index.mjs

@@ -100,7 +100,7 @@ import "./tests/Lorenz.mjs";
 import "./tests/LuhnChecksum.mjs";
 import "./tests/LuhnChecksum.mjs";
 import "./tests/CipherSaber2.mjs";
 import "./tests/CipherSaber2.mjs";
 import "./tests/Colossus.mjs";
 import "./tests/Colossus.mjs";
-import "./tests/ParseObjectIdTimestamp.mjs";
+import "./tests/ParseObjectIDTimestamp.mjs";
 
 
 
 
 // Cannot test operations that use the File type yet
 // Cannot test operations that use the File type yet

+ 2 - 2
tests/operations/tests/ParseObjectIdTimestamp.mjs

@@ -1,5 +1,5 @@
 /**
 /**
- * Parse ObjectId timestamp tests
+ * Parse ObjectID timestamp tests
  *
  *
  * @author dmfj [dominic@dmfj.io]
  * @author dmfj [dominic@dmfj.io]
  *
  *
@@ -16,7 +16,7 @@ TestRegister.addTests([
         expectedOutput: "1970-01-01T00:00:00.000Z",
         expectedOutput: "1970-01-01T00:00:00.000Z",
         recipeConfig: [
         recipeConfig: [
             {
             {
-                op: "Parse ObjectId timestamp",
+                op: "Parse ObjectID timestamp",
                 args: [],
                 args: [],
             }
             }
         ],
         ],