base18813unitedstatesconstitution
Advanced tools
Comparing version 1.0.0 to 1.0.1
14
index.js
@@ -125,3 +125,2 @@ const Base18813UnitedStatesConstitution = {}; | ||
Base18813UnitedStatesConstitution.encodeString = function (inputString, inputOptions) { | ||
console.log('<< ENCODER >>'); | ||
// Options initialization | ||
@@ -136,3 +135,2 @@ var options = { | ||
}; | ||
console.log('inputString.length', inputString.length); | ||
// Convert to Uint8Array | ||
@@ -162,4 +160,2 @@ var uint8arr = (new TextEncoder('utf-8')).encode(inputString); | ||
}).concat(encodeByte(0x00, true)); | ||
console.log('bin9strArr'); | ||
console.log(bin9strArr); | ||
var usedTemplate_ARR = realTemplate.slice(0, uint1arr.length); | ||
@@ -179,3 +175,2 @@ var unusedTemplate_STR = realTemplate.slice(uint1arr.length).join(''); | ||
Base18813UnitedStatesConstitution.decode = function (encodedString, inputOptions) { | ||
console.log('<< DECODER >>'); | ||
// Options initialization | ||
@@ -201,12 +196,5 @@ var options = { | ||
var bin9strArr = uint1arr.join('').replace(/(\d{9})/g, '$1 ').trim().replace(/ 0{9}.+$/, ' 000000000').split(' '); | ||
console.log('bin9strArr'); | ||
console.log(bin9strArr); | ||
bin8strArr = bin9strArr.map(function (bin9str) { return bin9str.slice(1) }); | ||
console.log('bin8strArr'); | ||
console.log(bin8strArr); | ||
myUint8arr = bin8strArr.map(function (bin8str) { return parseInt(bin8str, 2) }); | ||
var decodedString = (new TextDecoder('utf-8')).decode(new Uint8Array(myUint8arr)); | ||
console.log('decodedString'); | ||
console.log(decodedString); | ||
console.log('decodedString.length', decodedString.length); | ||
return decodedString; | ||
@@ -243,1 +231,3 @@ }; | ||
}; | ||
module.exports = Base18813UnitedStatesConstitution; |
{ | ||
"name": "base18813unitedstatesconstitution", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Encode data in United States Constitution", | ||
"main": "index.js", | ||
"main": "index.module.js", | ||
"scripts": { | ||
@@ -7,0 +7,0 @@ "test": "echo \"Error: no test specified\" && exit 1" |
@@ -51,2 +51,6 @@ # Base18813UnitedStatesConstitution | ||
## Package Management Tools | ||
- NPM: https://www.npmjs.com/package/base18813unitedstatesconstitution | ||
## Copyright | ||
@@ -53,0 +57,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71
100247
262