Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji cipher with ES2015 #7

Open
6 tasks
tannerwelsh opened this issue Jun 17, 2016 · 1 comment
Open
6 tasks

Emoji cipher with ES2015 #7

tannerwelsh opened this issue Jun 17, 2016 · 1 comment

Comments

@tannerwelsh
Copy link
Contributor

tannerwelsh commented Jun 17, 2016

Description

Let's build a cipher using emoji. High five! 馃檶馃徑

To complete this goal, you'll create a Node.js module that exports two functions: one to encode a string of alphanumeric characters into emoji, and another to decode an emoji message to the original string.

Here's an example usage:

import {encode, decode} from "emoji-cipher"

encode("secret message")
// => "馃樃馃弮馃惔馃懣馃弮馃 馃惀馃弮馃樃馃樃馃尩馃寧馃弮"

decode("馃樃馃弮馃惔馃懣馃弮馃 馃惀馃弮馃樃馃樃馃尩馃寧馃弮")
// => "secret message"

If you're not familiar with Node.js and/or ECMAScript 2015, you'll need to do some research to become familiar with these technologies. For compiling, consider using Babel.

Context

A cipher is "a secret or disguised way of writing; a code" (source: Google). Technically, a cipher is a mapping between two sets of symbols.

One of the earliest and simplest ciphers in history is something you may have played with as a child: a Caesar cipher.

Translating between different representations of data is a such a common task in programming, and a cipher is a good (and fun) way to become familiar with this process.

As you work on this goal, consider the following questions:

  • What does it mean to encode or decode something? Where else are these processes used?
  • Which characters will the cipher support? How will the mapping between characters and emoji be represented?
  • How should the functions respond to invalid input? What are the possible errors and how should they be handled?

Specifications

  • Code is packaged as a module that exports (at least) the two functions encode and decode.
  • Exported functions can encode and decode alphanumeric characters to/from emoji.
  • Tests for both encode and decode functions are included and passing.
  • All source code is written using ECMAScript 2015 syntax.
  • Source code contains a README.md file with instructions and example usage.

Required

Do not remove these specs - they are required for all goals.

  • The artifact produced is properly licensed, preferably with the MIT license.

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

@shakalee14
Copy link

I just did an emojicipher. I felt like I spent a lot of time learning about unicode, and idk if that learning deepened my understanding of javascript.

@shereefb shereefb modified the milestones: Level 0, Level 1, Level 2 Oct 5, 2016
@tannerwelsh tannerwelsh modified the milestones: Level 1.3, Level 1 Feb 8, 2017
@tannerwelsh tannerwelsh modified the milestone: Level 1 Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants