New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rot-13

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rot-13

rot13

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
4
-60%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

rot13

FAQs

Package last updated on 03 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts