diff --git a/Chain/CurveType.yaml b/Chain/CurveType.yaml
index 3a40001..af2acef 100644
--- a/Chain/CurveType.yaml
+++ b/Chain/CurveType.yaml
@@ -13,7 +13,7 @@
# limitations under the License.
description: |
- CurveType is the type of cryptographic curve associated with a PublicKey.
+ CurveType is the type of cryptographic curve associated with a PublicKey.
* secp256k1: SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3)
* edwards25519: `y (255-bits) || x-sign-bit (1-bit)` - `32 bytes` (https://ed25519.cr.yp.to/ed25519-20110926.pdf)
diff --git a/README.md b/README.md
index 5bfd01f..2d29d94 100644
--- a/README.md
+++ b/README.md
@@ -15,17 +15,18 @@ Trades & Orders -->
# Protocol Spec
-For ABNF specs, [see the `spec_abnf` dir](https://github.com/freight-trust/protocol/tree/master/spec_abnf/abnf)
+For ABNF specs,
+[see the `spec_abnf` dir](https://github.com/freight-trust/protocol/tree/master/spec_abnf/abnf)
- directories with `spec_*` are the reference specification
-- directories with `lib` or `module`/`component` _should_ be the technical implementation
+- directories with `lib` or `module`/`component` _should_ be the technical
+ implementation
### Interfaces
-
+ style="float: left; margin-right: 10px;" />
### Documents of Trade
@@ -45,27 +46,29 @@ For ABNF specs, [see the `spec_abnf` dir](https://github.com/freight-trust/proto
- Units of Efferent
- Units of Lexigram
-* Controlled Natural Language = Jurisdictional Grammar (see [Burgess](https://github.com/freight-trust/burgess) )
+* Controlled Natural Language = Jurisdictional Grammar (see
+ [Burgess](https://github.com/freight-trust/burgess) )
* Afferent = Towards
* Efferent = Away
## Blocks as `units of agreement`
-A couple of specific block linkages are stated as facts. Two general principles of block chaining based on such linkages are stated as "conclusion if condition" rules. (The diagrams' color coding is extended to the symbolic form by using green for facts and their rule-condition counterparts while using red for rule conclusions and their -- recursive -- rule-condition counterpart.)
+A couple of specific block linkages are stated as facts. Two general principles
+of block chaining based on such linkages are stated as "conclusion if condition"
+rules. (The diagrams' color coding is extended to the symbolic form by using
+green for facts and their rule-condition counterparts while using red for rule
+conclusions and their -- recursive -- rule-condition counterpart.)
-Facts
-"Block1 links to Block2."
-"Block2 links to Block3."
-Rules
-"x chains to y if x links to y."
-"x chains to z if x links to y and y chains to z."
+Facts "Block1 links to Block2." "Block2 links to Block3." Rules "x chains to y
+if x links to y." "x chains to z if x links to y and y chains to z."
-Facts are _primitives_ (i.e. not containing variables) that apply
-a predicate to arguments
+Facts are _primitives_ (i.e. not containing variables) that apply a predicate to
+arguments
-to Block1 followed by Block2 and
-to Block2 followed by Block3
+to Block1 followed by Block2 and to Block2 followed by Block3
-Rules are of the form `conclusion :- condition` (i.e. containing variables), with the Prolog-like (symbol) infix `":-"` corresponding to the above "if".
+Rules are of the form `conclusion :- condition` (i.e. containing variables),
+with the Prolog-like (symbol) infix `":-"` corresponding to the above "if".
-This consittutes the extent of which RuleML is applied to the `TradeDocs` system, a basic primitive set for `rule-conditions`
+This consittutes the extent of which RuleML is applied to the `TradeDocs`
+system, a basic primitive set for `rule-conditions`
diff --git a/ROOT/LoadContactInfo.json b/ROOT/LoadContactInfo.json
index eb088c1..121c935 100644
--- a/ROOT/LoadContactInfo.json
+++ b/ROOT/LoadContactInfo.json
@@ -1,10 +1,8 @@
{
"Loop_G61_204": "LoadContactInfo",
-
"class": {
"L11": "List",
"Item": "G61",
-
"G61": {
"Name": "G61.Name_02",
"CommunicationNumberQualifier": "G61.CommunicationNumberQualifier_03",
diff --git a/ROOT/SpecialServicesCode.json b/ROOT/SpecialServicesCode.json
index 5940779..3e6f187 100644
--- a/ROOT/SpecialServicesCode.json
+++ b/ROOT/SpecialServicesCode.json
@@ -1,6 +1,5 @@
{
"type": "object",
-
"properties": {
"SpecialServicesCode": {
"D1": "One - Day Service",
@@ -15,7 +14,6 @@
"ZZ": "Mutually Defined"
},
"required": ["SpecialServicesCode"],
-
"dependencies": {
"": [""]
}
diff --git a/bin/pem.js b/bin/pem.js
index a89b9f1..05732e8 100644
--- a/bin/pem.js
+++ b/bin/pem.js
@@ -16,11 +16,12 @@ async function run() {
let publicpem = fs.readFileSync("./device.crt", "utf8");
let publickey = await keystore.add(publicpem, "pem");
- // we need the public key chain in x5c header. x5c header chain will be used during
- // decode, a full cert can be provided to ensure validation all the way to root
+ // we need the public key chain in x5c header. x5c header chain will be used
+ // during decode, a full cert can be provided to ensure validation all the
+ // way to root
// https://tools.ietf.org/html/draft-ietf-jose-json-web-key-41#page-9
- // unfortunately we can't just use plain jwk, since jwk is only the *key* and not the
- // full *certificate*, so ... x5c it is
+ // unfortunately we can't just use plain jwk, since jwk is only the *key*
+ // and not the full *certificate*, so ... x5c it is
let x5cChain = cert_to_x5c(publicpem);
// the message body
@@ -35,7 +36,8 @@ async function run() {
// and signing options
let signoptions = { fields: { x5c: x5cChain } };
- // sign 'message' with the 'privatekey', include the 'x5c' chain in the headers
+ // sign 'message' with the 'privatekey', include the 'x5c' chain in the
+ // headers
let signed = await jose.JWS.createSign(signoptions, privatekey)
.update(message, "utf8")
.final();
@@ -45,7 +47,8 @@ async function run() {
console.log("//////////////////////////////");
- // a quick sanity check - the cisco/node-jose lib provides x5c verification fortunately
+ // a quick sanity check - the cisco/node-jose lib provides x5c verification
+ // fortunately
let result = await jose.JWS.createVerify().verify(signed);
console.log(JSON.parse(result.payload));
@@ -61,10 +64,10 @@ async function run() {
console.log("message expiry valid");
}
- // and .. it doesn't do the full x509 cert verification, it just checks that the
- // key from the first cert in the x5c header can verify the payload so now, we
- // need to shell out to openssl to verify that the provided key was signed by the CA
- // why oh why is there nothing native for this
+ // and .. it doesn't do the full x509 cert verification, it just checks that
+ // the key from the first cert in the x5c header can verify the payload so
+ // now, we need to shell out to openssl to verify that the provided key was
+ // signed by the CA why oh why is there nothing native for this
let cert = await x5c_to_cert(result.header.x5c);
// load the CA
@@ -100,7 +103,8 @@ function cert_to_x5c(cert, maxdepth) {
}
/*
* Convert a PEM-encoded certificate to the version used in the x5c element
- * of a [JSON Web Key](http://tools.ietf.org/html/draft-ietf-jose-json-web-key).
+ * of a [JSON Web
+ * Key](http://tools.ietf.org/html/draft-ietf-jose-json-web-key).
*
* `cert` PEM-encoded certificate chain
* `maxdepth` The maximum number of certificates to use from the chain.
diff --git a/docs/staking/index.html b/docs/staking/index.html
index abbc6b8..6d02c49 100644
--- a/docs/staking/index.html
+++ b/docs/staking/index.html
@@ -1873,7 +1873,7 @@
TradeDocs Form Generator
+ TradeDocs Form Generator
`
+search for...
+``
let HashingOutput = Base64URL( Multihash(DATA, 'sha2-256') );
### terms
-`credentials`: [source](https://www.w3.org/TR/vc-data-model/#dfn-verifiable-credentials)
+`credentials`:
+[source](https://www.w3.org/TR/vc-data-model/#dfn-verifiable-credentials)
-`derived predicate`
-A verifiable, boolean assertion about the value of another attribute in a verifiable credential.
+`derived predicate` A verifiable, boolean assertion about the value of another
+attribute in a verifiable credential.
## Minimal DID
diff --git a/etc/lei/README.md b/etc/lei/README.md
index 68f8b6d..a824f00 100644
--- a/etc/lei/README.md
+++ b/etc/lei/README.md
@@ -1,6 +1,8 @@
# LEI Informative
-curl --request GET 'https://leilookup.gleif.org/api/v2/leirecords?lei=254900C9UJMDGJ0ILK56' --header 'Content-Type: application/json' --data-raw '[]'
+curl --request GET
+'https://leilookup.gleif.org/api/v2/leirecords?lei=254900C9UJMDGJ0ILK56'
+--header 'Content-Type: application/json' --data-raw '[]'
```json
[
@@ -132,16 +134,18 @@ freighttrust.com. IN CAA 0 issue "sectigo.com"
parse lei.bloomberg.com
-search for... ``
+search for...
+``
let HashingOutput = Base64URL( Multihash(DATA, 'sha2-256') );
### terms
-`credentials`: [source](https://www.w3.org/TR/vc-data-model/#dfn-verifiable-credentials)
+`credentials`:
+[source](https://www.w3.org/TR/vc-data-model/#dfn-verifiable-credentials)
-`derived predicate`
-A verifiable, boolean assertion about the value of another attribute in a verifiable credential.
+`derived predicate` A verifiable, boolean assertion about the value of another
+attribute in a verifiable credential.
## Minimal DID
diff --git a/protocol/index.js b/protocol/index.js
index e5b6b6d..8f5f266 100644
--- a/protocol/index.js
+++ b/protocol/index.js
@@ -17,7 +17,7 @@ window.onload = function (e) {
// TODO: Feat: Build a visual representation of the EDI document
// buildDocumentTree(flatDoc.Loops.getItem(0), $("#DocumentUL").get(0));
- //Hook up expand/collapse of loaded EDI document functionality
+ // Hook up expand/collapse of loaded EDI document functionality
hookUpDocumentTree();
});
};
diff --git a/protocol/server.js b/protocol/server.js
index d85b18e..fca2e1d 100644
--- a/protocol/server.js
+++ b/protocol/server.js
@@ -1,6 +1,7 @@
-import MoleServer from "mole-rpc/MoleServer";
import TransportServerWSS from "mole-rpc-transport-ws/TransportServerWSS";
+import MoleServer from "mole-rpc/MoleServer";
import { Server } from "ws";
+
const WSS_PORT = 12345;
function sum(a, b) {
diff --git a/protocol/validate-document.js b/protocol/validate-document.js
index 687fdc2..315333c 100644
--- a/protocol/validate-document.js
+++ b/protocol/validate-document.js
@@ -4,20 +4,20 @@ const enumMap = require("./enummap");
let map = new enumMap();
-//Create a new validator
+// Create a new validator
let validator = new edi.EDIValidator();
-//While validating also load the data in memory
+// While validating also load the data in memory
validator.LoadValidatedData = true;
-//Load a 5010 validation rules
+// Load a 5010 validation rules
let validationRules = fs
.readFileSync("../../Validation Rules/5010/Rules_5010")
.toString();
validator.EDIRulesFileData = validationRules;
-//Set the EDI data to validate and load. This can also be read in from a file
+// Set the EDI data to validate and load. This can also be read in from a file
validator.EDIDataString =
"ISA*00*..........*01*SECRET....*ZZ*SUBMITTERS.ID..*ZZ*RECEIVERS.ID...*030101*1253*^*00501*000000905*1*T*:~" +
"GS*Hk*SENDER CODE*RECEIVERCODE*19991231*0802*1*X*005010X279A1~" +
@@ -41,7 +41,7 @@ console.log("Validating 5010 EDI Files");
validator.validate();
console.log("Errors Found");
-//Get all errors from the EDI data
+// Get all errors from the EDI data
for (let i = 0; i < validator.Errors.Count; i++) {
let error = validator.Errors.getItem(i);
@@ -49,8 +49,8 @@ for (let i = 0; i < validator.Errors.Count; i++) {
Type: "Error",
Line: error.LineNumber,
Transaction: "",
- SnipLevel: map.SnipLevelTypes[error.SnipLevel], //SnipTestLevel Enum
- Message: map.MessageTypes[error.Message], //EDIValidationMessage Enum
+ SnipLevel: map.SnipLevelTypes[error.SnipLevel], // SnipTestLevel Enum
+ Message: map.MessageTypes[error.Message], // EDIValidationMessage Enum
Loop: error.Loop,
Segment: error.Segment,
Element: error.ElementOrdinal,
diff --git a/smart_contracts/era.md b/smart_contracts/era.md
index 14f94a2..d8d556b 100644
--- a/smart_contracts/era.md
+++ b/smart_contracts/era.md
@@ -4,10 +4,14 @@
**Parameters:**
-- \_domainHash `uint256`: _Keccak256 message digest of the domain to add or update._
-- \_domainAuthority `address`: _Contract to resolve sub-domains. This contract must implement this interface._
-- \_domainInfo `address`: _Contract which holds domain information for the domain name identified by_
-- \_domainOwner `address`: _Account entitled to update the \_domainAuthority or the \_domainInfo address for this domain_
+- \_domainHash `uint256`: _Keccak256 message digest of the domain to add or
+ update._
+- \_domainAuthority `address`: _Contract to resolve sub-domains. This contract
+ must implement this interface._
+- \_domainInfo `address`: _Contract which holds domain information for the
+ domain name identified by_
+- \_domainOwner `address`: _Account entitled to update the \_domainAuthority or
+ the \_domainInfo address for this domain_
## removeDomain
diff --git a/spec_configs/lei.json b/spec_configs/lei.json
index a2c5575..188a6b3 100644
--- a/spec_configs/lei.json
+++ b/spec_configs/lei.json
@@ -1,8 +1,12 @@
[
{
- "LEI": { "$": "254900C9UJMDGJ0ILK56" },
+ "LEI": {
+ "$": "254900C9UJMDGJ0ILK56"
+ },
"Entity": {
- "LegalName": { "$": "FreightTrust and Clearing, Inc." },
+ "LegalName": {
+ "$": "FreightTrust and Clearing, Inc."
+ },
"OtherEntityNames": {
"OtherEntityName": [
{
@@ -12,42 +16,98 @@
]
},
"LegalAddress": {
- "FirstAddressLine": { "$": "c/o ROCKET LAWYER CORPORATE SERVICES LLC" },
+ "FirstAddressLine": {
+ "$": "c/o ROCKET LAWYER CORPORATE SERVICES LLC"
+ },
"AdditionalAddressLine": [
- { "$": "2035 SUNSET LAKE RD" },
- { "$": "SUITE B-2" }
+ {
+ "$": "2035 SUNSET LAKE RD"
+ },
+ {
+ "$": "SUITE B-2"
+ }
],
- "City": { "$": "NEWARK" },
- "Region": { "$": "US-DE" },
- "Country": { "$": "US" },
- "PostalCode": { "$": "19702" }
+ "City": {
+ "$": "NEWARK"
+ },
+ "Region": {
+ "$": "US-DE"
+ },
+ "Country": {
+ "$": "US"
+ },
+ "PostalCode": {
+ "$": "19702"
+ }
},
"HeadquartersAddress": {
- "FirstAddressLine": { "$": "1424 4th St Ste 214" },
- "AdditionalAddressLine": [{ "$": "PMB 1513" }],
- "City": { "$": "Santa Monica" },
- "Region": { "$": "US-CA" },
- "Country": { "$": "US" },
- "PostalCode": { "$": "90401" }
+ "FirstAddressLine": {
+ "$": "1424 4th St Ste 214"
+ },
+ "AdditionalAddressLine": [
+ {
+ "$": "PMB 1513"
+ }
+ ],
+ "City": {
+ "$": "Santa Monica"
+ },
+ "Region": {
+ "$": "US-CA"
+ },
+ "Country": {
+ "$": "US"
+ },
+ "PostalCode": {
+ "$": "90401"
+ }
},
"RegistrationAuthority": {
- "RegistrationAuthorityID": { "$": "RA000602" },
- "RegistrationAuthorityEntityID": { "$": "7650005" }
+ "RegistrationAuthorityID": {
+ "$": "RA000602"
+ },
+ "RegistrationAuthorityEntityID": {
+ "$": "7650005"
+ }
},
- "LegalJurisdiction": { "$": "US-DE" },
- "LegalForm": { "EntityLegalFormCode": { "$": "XTIQ" } },
- "EntityStatus": { "$": "ACTIVE" }
+ "LegalJurisdiction": {
+ "$": "US-DE"
+ },
+ "LegalForm": {
+ "EntityLegalFormCode": {
+ "$": "XTIQ"
+ }
+ },
+ "EntityStatus": {
+ "$": "ACTIVE"
+ }
},
"Registration": {
- "InitialRegistrationDate": { "$": "2020-05-11T11:47:13.761Z" },
- "LastUpdateDate": { "$": "2020-05-11T11:47:13.761Z" },
- "RegistrationStatus": { "$": "ISSUED" },
- "NextRenewalDate": { "$": "2021-05-11T11:47:13.761Z" },
- "ManagingLOU": { "$": "5493001KJTIIGC8Y1R12" },
- "ValidationSources": { "$": "FULLY_CORROBORATED" },
+ "InitialRegistrationDate": {
+ "$": "2020-05-11T11:47:13.761Z"
+ },
+ "LastUpdateDate": {
+ "$": "2020-05-11T11:47:13.761Z"
+ },
+ "RegistrationStatus": {
+ "$": "ISSUED"
+ },
+ "NextRenewalDate": {
+ "$": "2021-05-11T11:47:13.761Z"
+ },
+ "ManagingLOU": {
+ "$": "5493001KJTIIGC8Y1R12"
+ },
+ "ValidationSources": {
+ "$": "FULLY_CORROBORATED"
+ },
"ValidationAuthority": {
- "ValidationAuthorityID": { "$": "RA000602" },
- "ValidationAuthorityEntityID": { "$": "7650005" }
+ "ValidationAuthorityID": {
+ "$": "RA000602"
+ },
+ "ValidationAuthorityEntityID": {
+ "$": "7650005"
+ }
}
}
}
diff --git a/spec_trade/event_orderProcessed.json b/spec_trade/event_orderProcessed.json
index 111e443..71ed4d6 100644
--- a/spec_trade/event_orderProcessed.json
+++ b/spec_trade/event_orderProcessed.json
@@ -1,5 +1,7 @@
{
"action": "update",
"type": "order_processed",
- "data": { "id": "ft7717d4-04e9-4430-a21b-08d32b2c340x" }
+ "data": {
+ "id": "ft7717d4-04e9-4430-a21b-08d32b2c340x"
+ }
}
diff --git a/spec_user_entity/entityType.json b/spec_user_entity/entityType.json
index d8fe93e..4bddd40 100644
--- a/spec_user_entity/entityType.json
+++ b/spec_user_entity/entityType.json
@@ -1,4 +1,4 @@
-[
+[
{
"typeID": 1,
"entityType": "CargoInterest",
@@ -94,7 +94,11 @@
"entityType": "RegularBroker",
"entityTypeDescription": "BookingagentwhoislicensedbythegovernmentintheirjurisdictiontobookcargoasdefinedbyFMCSA"
},
- { "typeID": 20, "entityType": "Agent", "entityTypeDescription": "Agent" },
+ {
+ "typeID": 20,
+ "entityType": "Agent",
+ "entityTypeDescription": "Agent"
+ },
{
"typeID": 21,
"entityType": "3rdParty",
diff --git a/src/class/splitter.string.ts b/src/class/splitter.string.ts
index f72fda1..4997679 100644
--- a/src/class/splitter.string.ts
+++ b/src/class/splitter.string.ts
@@ -9,35 +9,35 @@ interface StringSplitter {
*/
buffer: string[] | null;
/**
- * Returns a string array that contains the substrings in this instance that are delimited by
- elements of a specified string or Unicode character array. This method is unsafe and can throw
+ * Returns a string array that contains the substrings in this instance that are delimited by
+ elements of a specified string or Unicode character array. This method is unsafe and can throw
IndexOutOfRange exception if we overflow the buffer
*
* @instance
* @public
* @this StringSplitter
* @memberof StringSplitter
- * @param {string} value
+ * @param {string} value
* @param {number} separator
* @return {number} The number of results found
*/
split(value: string | null, separator: number): number;
/**
- * Returns a string array that contains the substrings in this instance that are delimited by
+ * Returns a string array that contains the substrings in this instance that are delimited by
a specified string or Unicode character array.
*
* @instance
* @public
* @this StringSplitter
* @memberof StringSplitter
- * @param {string} value
+ * @param {string} value
* @param {string} separator
* @return {number} The number of results found
*/
split$4(value: string | null, separator: string | null): number;
/**
- * Returns a string array that contains the substrings in this instance that are delimited by
- elements of a specified string or Unicode character array. This method is unsafe and can throw
+ * Returns a string array that contains the substrings in this instance that are delimited by
+ elements of a specified string or Unicode character array. This method is unsafe and can throw
IndexOutOfRange exception if we overflow the buffer
*
* @instance
@@ -45,14 +45,14 @@ interface StringSplitter {
* @this StringSplitter
* @memberof StringSplitter
* @throws IndexOutOfRange
- * @param {string} value
+ * @param {string} value
* @param {Array.} separators
* @return {number} The number of results found
*/
split$2(value: string | null, separators: number[] | null): number;
/**
- * Returns a string array that contains the substrings in this instance that are delimited by
- elements of a specified string or Unicode character array. This method is unsafe and can throw
+ * Returns a string array that contains the substrings in this instance that are delimited by
+ elements of a specified string or Unicode character array. This method is unsafe and can throw
IndexOutOfRange exception if we overflow the buffer
*
* @instance
@@ -60,8 +60,8 @@ interface StringSplitter {
* @this StringSplitter
* @memberof StringSplitter
* @throws IndexOutOfRange
- * @param {string} value
- * @param {number} separator
+ * @param {string} value
+ * @param {number} separator
* @param {System.StringSplitOptions} options
* @return {number} The number of results found
*/
@@ -71,15 +71,15 @@ interface StringSplitter {
options: System.StringSplitOptions
): number;
/**
- * Returns a string array that contains the substrings in this instance that are delimited by
+ * Returns a string array that contains the substrings in this instance that are delimited by
a specified string or Unicode character array.
*
* @instance
* @public
* @this StringSplitter
* @memberof StringSplitter
- * @param {string} value
- * @param {string} separator
+ * @param {string} value
+ * @param {string} separator
* @param {System.StringSplitOptions} options
* @return {number} The number of results found
*/
@@ -89,8 +89,8 @@ interface StringSplitter {
options: System.StringSplitOptions
): number;
/**
- * Returns a string array that contains the substrings in this instance that are delimited by
- elements of a specified string or Unicode character array. This method is unsafe and can throw
+ * Returns a string array that contains the substrings in this instance that are delimited by
+ elements of a specified string or Unicode character array. This method is unsafe and can throw
IndexOutOfRange exception if we overflow the buffer
*
* @instance
@@ -98,8 +98,8 @@ interface StringSplitter {
* @this StringSplitter
* @memberof StringSplitter
* @throws IndexOutOfRange
- * @param {string} value
- * @param {Array.} separators
+ * @param {string} value
+ * @param {Array.} separators
* @param {System.StringSplitOptions} options
* @return {number} The number of results found
*/
@@ -109,7 +109,7 @@ interface StringSplitter {
options: System.StringSplitOptions
): number;
/**
- * Returns a string array that contains the substrings in this instance that are delimited by
+ * Returns a string array that contains the substrings in this instance that are delimited by
elements of a specified string or Unicode character array.
This method is safe and will
automatically adjust the buffer if needed
@@ -118,7 +118,7 @@ interface StringSplitter {
* @public
* @this StringSplitter
* @memberof StringSplitter
- * @param {string} value
+ * @param {string} value
* @param {number} separator
* @return {number} The number of results found
*/
@@ -136,21 +136,21 @@ interface StringSplitter {
*/
safeSplit$4(value: string | null, separator: string | null): number;
/**
- * Returns a string array that contains the substrings in this instance that are delimited by
- elements of a specified string or Unicode character array. This method is unsafe and can throw
+ * Returns a string array that contains the substrings in this instance that are delimited by
+ elements of a specified string or Unicode character array. This method is unsafe and can throw
IndexOutOfRange exception if we overflow the buffer
*
* @instance
* @public
* @this StringSplitter
* @memberof StringSplitter
- * @param {string} value
+ * @param {string} value
* @param {Array.} separators
* @return {number} The number of results found
*/
safeSplit$2(value: string | null, separators: number[] | null): number;
/**
- * Returns a string array that contains the substrings in this instance that are delimited by
+ * Returns a string array that contains the substrings in this instance that are delimited by
elements of a specified string or Unicode character array.
This method is safe and will
automatically adjust the buffer if needed
@@ -159,8 +159,8 @@ interface StringSplitter {
* @public
* @this StringSplitter
* @memberof StringSplitter
- * @param {string} value
- * @param {number} separator
+ * @param {string} value
+ * @param {number} separator
* @param {System.StringSplitOptions} options
* @return {number} The number of results found
*/
@@ -187,8 +187,8 @@ interface StringSplitter {
options: System.StringSplitOptions
): number;
/**
- * Returns a string array that contains the substrings in this instance that are delimited by
- elements of a specified string or Unicode character array. This method is unsafe and can throw
+ * Returns a string array that contains the substrings in this instance that are delimited by
+ elements of a specified string or Unicode character array. This method is unsafe and can throw
IndexOutOfRange exception if we overflow the buffer
*
* @instance
@@ -196,8 +196,8 @@ interface StringSplitter {
* @this StringSplitter
* @memberof StringSplitter
* @throws IndexOutOfRange
- * @param {string} value
- * @param {Array.} separators
+ * @param {string} value
+ * @param {Array.} separators
* @param {System.StringSplitOptions} options
* @return {number} The number of results found
*/
diff --git a/test_harness/generateacknowledgement/enummap.js b/test_harness/generateacknowledgement/enummap.js
index 9c5cf2c..c3d1dc3 100644
--- a/test_harness/generateacknowledgement/enummap.js
+++ b/test_harness/generateacknowledgement/enummap.js
@@ -1,4 +1,5 @@
-//Other validation rules files are located in the RDPCrystalInstallation\Validation Rules directory
+// Other validation rules files are located in the
+// RDPCrystalInstallation\Validation Rules directory
function EnumMap() {
this.SnipLevelTypes = {
0: "DoesNotApply",
diff --git a/test_harness/generateacknowledgement/index.js b/test_harness/generateacknowledgement/index.js
index 00ab71c..7755700 100644
--- a/test_harness/generateacknowledgement/index.js
+++ b/test_harness/generateacknowledgement/index.js
@@ -5,20 +5,20 @@ const enumMap = require("./enummap");
let map = new enumMap();
-//Create a new validator
+// Create a new validator
let validator = new edi.EDIValidator();
-//While validating also load the data in memory
+// While validating also load the data in memory
validator.LoadValidatedData = true;
-//Load a 5010 270 validation rules
+// Load a 5010 270 validation rules
let validationRules = fs
.readFileSync("../../validationrules/5010/Rules_5010_270_005010X279A1.Rules")
.toString();
validator.EDIRulesFileData = validationRules;
-//Set the EDI data to validate and load. This can also be read in from a file
+// Set the EDI data to validate and load. This can also be read in from a file
validator.EDIDataString =
"ISA*00*..........*01*SECRET....*ZZ*SUBMITTERS.ID..*ZZ*RECEIVERS.ID...*030101*1253*^*00501*000000905*1*T*:~" +
"GS*Hk*SENDER CODE*RECEIVERCODE*19991231*0802*1*X*005010X279A1~" +
@@ -43,7 +43,7 @@ validator.validate();
console.log("Errors Found->");
-//Get all errors from the EDI data
+// Get all errors from the EDI data
for (let i = 0; i < validator.Errors.Count; i++) {
let error = validator.Errors.getItem(i);
@@ -63,7 +63,7 @@ for (let i = 0; i < validator.Errors.Count; i++) {
}
console.log("Generated 5010 999 Acknowledgment File");
-//Generate 5010 999 Acknowledgment File
+// Generate 5010 999 Acknowledgment File
let ack999Generator = new edi.Ack999Generator();
let ackDocument = ack999Generator.generate(validator);
diff --git a/test_harness/validatedocument/enummap.js b/test_harness/validatedocument/enummap.js
index 9c5cf2c..c3d1dc3 100644
--- a/test_harness/validatedocument/enummap.js
+++ b/test_harness/validatedocument/enummap.js
@@ -1,4 +1,5 @@
-//Other validation rules files are located in the RDPCrystalInstallation\Validation Rules directory
+// Other validation rules files are located in the
+// RDPCrystalInstallation\Validation Rules directory
function EnumMap() {
this.SnipLevelTypes = {
0: "DoesNotApply",
diff --git a/test_harness/validatedocument/index.js b/test_harness/validatedocument/index.js
index b5de1b2..2ec10b0 100644
--- a/test_harness/validatedocument/index.js
+++ b/test_harness/validatedocument/index.js
@@ -5,20 +5,20 @@ const enumMap = require("./enummap");
let map = new enumMap();
-//Create a new validator
+// Create a new validator
let validator = new edi.EDIValidator();
-//While validating also load the data in memory
+// While validating also load the data in memory
validator.LoadValidatedData = true;
-//Load a 5010 270 validation rules
+// Load a 5010 270 validation rules
let validationRules = fs
.readFileSync("../../validationrules/5010/Rules_5010_270_005010X279A1.Rules")
.toString();
validator.EDIRulesFileData = validationRules;
-//Set the EDI data to validate and load. This can also be read in from a file
+// Set the EDI data to validate and load. This can also be read in from a file
validator.EDIDataString =
"ISA*00*..........*01*SECRET....*ZZ*SUBMITTERS.ID..*ZZ*RECEIVERS.ID...*030101*1253*^*00501*000000905*1*T*:~" +
"GS*Hk*SENDER CODE*RECEIVERCODE*19991231*0802*1*X*005010X279A1~" +
@@ -42,7 +42,7 @@ console.log("Validating 5010 271 EDI Files");
validator.validate();
console.log("Errors Found");
-//Get all errors from the EDI data
+// Get all errors from the EDI data
for (let i = 0; i < validator.Errors.Count; i++) {
let error = validator.Errors.getItem(i);
@@ -50,8 +50,8 @@ for (let i = 0; i < validator.Errors.Count; i++) {
Type: "Error",
Line: error.LineNumber,
Transaction: "",
- SnipLevel: map.SnipLevelTypes[error.SnipLevel], //SnipTestLevel Enum
- Message: map.MessageTypes[error.Message], //EDIValidationMessage Enum
+ SnipLevel: map.SnipLevelTypes[error.SnipLevel], // SnipTestLevel Enum
+ Message: map.MessageTypes[error.Message], // EDIValidationMessage Enum
Loop: error.Loop,
Segment: error.Segment,
Element: error.ElementOrdinal,
diff --git a/test_harness/x12_test_harness/group.js b/test_harness/x12_test_harness/group.js
index 74e0ed0..3833533 100644
--- a/test_harness/x12_test_harness/group.js
+++ b/test_harness/x12_test_harness/group.js
@@ -116,7 +116,8 @@ describe("Group", function () {
name: "1000B",
},
],
- }, // -- At this point group 1000A would be pushed down the data stream before starting loop 2000
+ }, // -- At this point group 1000A would be pushed down the data stream
+ // before starting loop 2000
{
start: "CLP",
end: null,
@@ -169,7 +170,7 @@ describe("Group", function () {
};
const myGroup = new Group(groupedByISAschema, finished[0], callDone);
finished.forEach((item, index) => {
- //Skip first index / ISA
+ // Skip first index / ISA
if (index === 0) return;
myGroup.add(item);
diff --git a/test_harness/x12_test_harness/segment.js b/test_harness/x12_test_harness/segment.js
index ad308f6..274e5fd 100644
--- a/test_harness/x12_test_harness/segment.js
+++ b/test_harness/x12_test_harness/segment.js
@@ -17,20 +17,21 @@ describe("Segment", function () {
});
describe("#processElement()", function () {
it("Should return an array of strings, split by the component delimiter", function () {
- //TODO: Remove initial segment when type checking is added
+ // TODO: Remove initial segment when type checking is added
const mySegment = new Segment("AMT*AU*34.25", delimiters);
assert.deepEqual(mySegment.processElement("AU"), ["AU"]);
});
it("If ISA component is left in tact, since it is an actual element", function () {
- //TODO: Remove initial segment when type checking is added
+ // TODO: Remove initial segment when type checking is added
const isa =
"ISA*00* *00* *ZZ*EMEDNYBAT *ZZ*ETIN *100101*1000*^*00501*006000600*0*T*:";
const mySegment = new Segment(isa, delimiters);
assert.deepEqual(mySegment.processElement(":"), [":"]);
});
});
- // Class immediatly calls parse, so constructor test was moved below the other method tests
- // To be changed in future update when type testing is added to segment class
+ // Class immediatly calls parse, so constructor test was moved below the other
+ // method tests To be changed in future update when type testing is added to
+ // segment class
describe("#constructor()", function () {
const mySegment = new Segment("AMT*AU*34.25", delimiters);
it("Should return a Segment", function () {
diff --git a/test_harness/x12_test_harness/x12grouper.js b/test_harness/x12_test_harness/x12grouper.js
index 724207a..bc78192 100644
--- a/test_harness/x12_test_harness/x12grouper.js
+++ b/test_harness/x12_test_harness/x12grouper.js
@@ -18,7 +18,7 @@ const schema = {
const testSchema = new Schema("005010X221A1", schema, true);
const testSchema2 = new Schema("005010X221", schema, false);
-//TODO: Still need to add unit tests for some specific methods
+// TODO: Still need to add unit tests for some specific methods
describe("X12grouper", function () {
describe("#constructor()", function () {
const myGrouper = new X12grouper(testSchema);
diff --git a/test_harness/x12_test_harness/x12parser.js b/test_harness/x12_test_harness/x12parser.js
index ffe8c2f..e7df376 100644
--- a/test_harness/x12_test_harness/x12parser.js
+++ b/test_harness/x12_test_harness/x12parser.js
@@ -94,7 +94,8 @@ describe("X12parser", function () {
const { finished } = require("./testFiles/835/profee-done");
testFile.pipe(myParser).on("data", (data) => {
if (!finished[counter])
- // Super ugly, but resets counter if undefined since it's same ISA just duplicated in file
+ // Super ugly, but resets counter if undefined since it's same ISA
+ // just duplicated in file
counter = 0;
assert.deepStrictEqual(data, finished[counter]);