Skip to content

Main content

ROT13 Converter Source Code

Browse the implementation files for ROT13 Converter.
@tool.io/tools/convert/rot13 source ↗
tool.ts typescript
import { applyRot13 } from '@tool.io/tools/convert/rot13';

export const rot13 = (input: unknown): string =>
	typeof input === 'string' && input !== ''
		? (applyRot13(input) ?? '')
		: '';

export const Tool: TypeTool = {
	name: 'ROT13 Converter',
	slug: 'convert/rot13',
	intro:
		'Apply the reversible ROT13 substitution to English letters while preserving case, punctuation, and other scripts.',
	tool: rot13,
	i: [
		{
			example: 'Tool.io is awesome!',
			label: 'Text',
			placeholder: 'Enter text to transform with ROT13...',
			render: 'textarea',
			type: 'text'
		}
	],
	o: [
		{
			example: 'Gbby.vb vf njrfbzr!',
			label: 'ROT13 Text',
			placeholder: 'ROT13 text will appear here...',
			render: 'textarea',
			type: 'text'
		}
	],
	alternative: [
		{
			title: 'Caesar Cipher',
			url: '/convert/caesar-cipher'
		},
		{ title: 'Encode Base64', url: '/encode/base64' }
	],
	cite: [
		{
			title: 'ROT13 - Wikipedia',
			url: 'https://en.wikipedia.org/wiki/ROT13'
		}
	]
};

export default Tool;

Description

Browse the implementation files for ROT13 Converter.

References

  1. Tool.io on GitHub
  2. Tool.io TypeScript tools library

Similar or alternative tools