dimabory / ecoji-js

JavaScript port of Ecoji
https://www.npmjs.com/package/ecoji-js
Apache License 2.0
5 stars 3 forks source link

add encodeType function #9

Closed biocrypto730 closed 5 years ago

biocrypto730 commented 5 years ago

.encode still works

I added a .encodeType function where you can specify the input as binary or whatever

And a quick test? Do you think this solves the problem since it's not binary data?

var ecoji = require("ecoji-js");
var input = "abcdef012345543210bdefa";
console.log(input)
var thing = ecoji.encodeType(input,"hex");
console.log(thing);
var newthing = ecoji.decode(thing);
console.log(newthing);
biocrypto730 commented 5 years ago

Wait, sorry. I thought decoding was working automatically but it isn't

codecov-io commented 5 years ago

Codecov Report

Merging #9 into master will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
+ Coverage   98.27%   98.29%   +0.01%     
==========================================
  Files           5        5              
  Lines         116      117       +1     
  Branches       12       12              
==========================================
+ Hits          114      115       +1     
  Misses          1        1              
  Partials        1        1
Impacted Files Coverage Δ
lib/src/Ecoji.ts 97.18% <100%> (+0.04%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b814930...a571370. Read the comment docs.