{"_id":"@confuzzle/ecoji-buffers","_rev":"1-cbeea428a78129ac6b60395d56102553","name":"@confuzzle/ecoji-buffers","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@confuzzle/ecoji-buffers","version":"1.0.0","description":"Encode and decode arbitrary data as emoji","license":"MIT","repository":{"type":"git","url":"git+https://github.com/rjkat/confuzzle.git"},"main":"index.js","keywords":["emoji","encoding","base1024"],"bugs":{"url":"https://github.com/rjkat/confuzzle/issues"},"homepage":"https://github.com/rjkat/confuzzle#readme","_id":"@confuzzle/ecoji-buffers@1.0.0","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-33F3Mg32X8ivh6RcAFZUhbQlnauoUap38Gmmmp0y9kPnYmtczgyTnPkAqcr0Ky7cSmiXzlQWMY2ms1wQr69GMQ==","shasum":"33f90bb59f930c6e934db4dee1f7983c9e496bbf","tarball":"https://registry.npmjs.org/@confuzzle/ecoji-buffers/-/ecoji-buffers-1.0.0.tgz","fileCount":5,"unpackedSize":19132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf96IrCRA9TVsSAnZWagAAnfUP/1wO0GQE3NNrwc/7cvEA\nmxiRXok8PajyaisrQTjVH2Mp0KwgvVQciWd5bn28en8LSTTXVtloGherVdYj\ndCJFvg36LoI7fWPK2sXu70LKIBANBsl8YdJ9b4S0FsSEvD9dEGhBE/P13jZF\nxLT9JArFFc9u1BLfMtm7Nn/SFktkfgIU6YtoGlVgeI9uSZ2c7qwKslr9R3M8\nG2fHtDhXh/u4cuW4T5yZBBMy59mshdLoTQ/NYfi0lPncL7RM3ekszZ4ovmEr\n/N3KgDLkT4Rn8pyKzhgdf3hi8aA3iI36aPD4Zph3tSVDHXoT72h8AJZH9vrC\n5/VEkgmgF/YNV5mH1+I1mgcC6Kt8dLoyprrFPdjdmBtjgBWSqYKHw7FZvYVC\n61n800BUz9thWbIJry17CzkGc/8PUUjNwx+ogD7zuiSraFV8M4hfccEVytqo\nghvqPDUrMHiV0y9BMi/OVJV7ZvRUMjtKKVVZHA7gQx8LRZJtQLt5E04qwYGp\nNtDXZwSpQnCCpmZdE7PqAflGU/2ZFLTQpMoDzg9UYrV5tExuVtgJBNfY9OSe\n1fO0c8OV4W/UPk3bB2cx7uNBHIw7Q3Gv8ahyxvv2XRm3Qcgv1bRlue5/SSDF\n92R8B13ye9xzlOa7m/RLPeuWKTbRT8YvEKgOxBL4cngJoYcRe0BYbniqMV2Z\n7iT3\r\n=g8k6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE1Egpd3HwsNVqi1jxRXqdldwYtyrDgCgMxs8DdE8CypAiEAvwF6p41s2DTiyNMRCjbgKTnYb0ClnVHLaLsFJ5yPArw="}]},"_npmUser":{"name":"rjkat","email":"rjkat@ieee.org"},"directories":{},"maintainers":[{"name":"rjkat","email":"rjkat@ieee.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ecoji-buffers_1.0.0_1610064426578_0.5964909734324109"},"_hasShrinkwrap":false}},"time":{"created":"2021-01-08T00:07:06.265Z","1.0.0":"2021-01-08T00:07:06.675Z","modified":"2022-04-05T00:54:29.056Z"},"maintainers":[{"name":"rjkat","email":"rjkat@ieee.org"}],"description":"Encode and decode arbitrary data as emoji","homepage":"https://github.com/rjkat/confuzzle#readme","keywords":["emoji","encoding","base1024"],"repository":{"type":"git","url":"git+https://github.com/rjkat/confuzzle.git"},"bugs":{"url":"https://github.com/rjkat/confuzzle/issues"},"license":"MIT","readme":"# @confuzzle/ecoji-buffers\n\nEncode and decode arbitrary data as emoji. Since it uses [ecoji-js](https://www.npmjs.com/package/ecoji-js) under the hood it may be compatible with the [ecoji standard](https://github.com/keith-turner/ecoji), but has not been tested for this.\n\nHuge thanks are owed to the following authors whose work is used in this package under license:\n* Keith Turner - [ecoji standard](https://github.com/keith-turner/ecoji)\n* Dmytro Borysovskyi - [ecoji-js](https://www.npmjs.com/package/ecoji-js)\n* Ryan Shea - [emojicoding](https://www.npmjs.com/package/emojicoding)\n\nThis package differs from the packages above in that it operates with buffers.\n[ecoji-js](https://www.npmjs.com/package/ecoji-js) only accepts and produces strings, so is less convenient for arbitrary binary data. [emojicoding](https://www.npmjs.com/package/emojicoding) accepts only arrays of emoji to decode, meaning strings need to be split into emoji (non-trivial). See [grapheme-splitter](https://www.npmjs.com/package/grapheme-splitter) for a possible way to do this. \n\n`ecoji-buffers` also differs from these packages in that it is a standalone package with no dependencies.\n\n## Functions\n\n* `encode(x)` - encodes a `Uint8Array` or `Buffer` as an emoji string\n* `decode(x)` - decodes an emoji string to a `Buffer`\n\n## Example Usage\n\n```js\nconst ecoji = require('@confuzzle/ecoji-buffers');\nconst x = Buffer.from('Hello world');\nconst y = ecoji.encode(x);\nconsole.log(y); // 🏯🔩🚗🌷🍉🤣🦒🕊👡\nconst z = ecoji.decode(y).toString();\nconsole.log(z); // Hello world\n```\n\n## Limitations\n\nThis package has not been optimised for performance in any way, and has not been extensively tested. Use at your own risk.\n","readmeFilename":"README.md"}