GithubHelp home page GithubHelp logo

dimabory / ecoji-js Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 3.0 829 KB

JavaScript port of Ecoji

Home Page: https://www.npmjs.com/package/ecoji-js

License: Apache License 2.0

JavaScript 3.38% TypeScript 96.62%
ecoji ecoji-js javascript typescript encoding emoji

ecoji-js's People

Contributors

dependabot[bot] avatar dimabory avatar keith-turner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ecoji-js's Issues

Invalid rune provided: ๐Ÿ€„

I keep getting the error "Invalid rune provided", but only for ๐Ÿ€„... Any idea how to fix this?

Also, separate issue quick fix, I am using binary data now after reading the issue about it, but it should be an option to set the encoding type for that part. There's no reason it should by default only decode binary data.... There should be a pass-inargument for that for both decode and encode. I tried to make a fork which implemented it but weirdly couldnt load the library any longer. So I ended up just converting all my data to binary data (difficult to find functions for it since Javascript didn't support binary data at all until only a few years ago).

Write Up Readme

  • badges
  • table of contents
  • introduction
  • installation
  • usage
  • license

Random binary data is encoding differently

While working on #3 I was running some test. I tried running the following commands (using commit b51529a) and there were lots of differences.

~/git/ecoji-js$ head -c 100 /dev/urandom > test.dat
~/git/ecoji-js$ cat test.dat | ecoji -w 0  | xxd > ecoji-go-xxd.txt
~/git/ecoji-js$ cat test.dat | node ./bin/cli.js  | xxd > ecoji-js-xxd.txt
~/git/ecoji-js$ diff ecoji-go-xxd.txt ecoji-js-xxd.txt 

If I convert the random binary data to base64, then there are no diffs except for a new line diff.

~/git/ecoji-js$ cat test.dat | base64 -w 0 | node ./bin/cli.js  | xxd > ecoji-js-xxd.txt
~/git/ecoji-js$ cat test.dat | base64 -w 0 | ecoji -w 0  | xxd > ecoji-go-xxd.txt
~/git/ecoji-js$ diff ecoji-js-xxd.txt ecoji-go-xxd.txt 
28c28
< 000001b0: f09f 8f81 e298 95e2 9895 e298 950a       ..............
---
> 000001b0: f09f 8f81 e298 95e2 9895 e298 95         .............

So I suspect there is something going on with binary data. This may be because string is used in the source instead of byte array. I don't know javascript well enough to say. If this is a limitation of javascript, a disclaimer in the readme might help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.