r1

rot-13

A simple letter substitution cipher

Showing:

Popularity

Downloads/wk

0

GitHub Stars

0

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

rot-13

rot-13 is a simple letter substitution cipher that replaces a letter with the letter 13 letters after it in the alphabet. https://en.wikipedia.org/wiki/ROT13

Details

Converts alpha characters to there rotated-by-13 equivalent letter. Keeps cases. Ignores other characters.

Input:  ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
Output: NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm

Example

Why did the chicken cross the road?
Gb trg gb gur bgure fvqr!

Transforming the entire text via ROT13 form, the answer to the joke is revealed:

Jul qvq gur puvpxra pebff gur ebnq?
To get to the other side!

Usage

var rot13 = require('./index.js');
console.log(rot13('abc')); // 'nop'

Tests

Just run ava.

ava

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial