Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including minitranslate with all npm packages installed. Try it out:

var minitranslate = require("minitranslate")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

minitranslate v1.2.0

A lightweight way to change words into other words.


A lightweight way to change words into other words.

Code Climate NPM version


$ npm install minitranslate


  • WYSIWYG word-replacement translator
  • Tiny: only 2.4 KB compressed
  • Dead-simple library in mt-lib.js:
var mt_lib = [
  { w: "Hello", r: "Goodbye" },
  { w: "World", r: "Mars" }
  • Dynamic translation:
<input id="mt-input"/>
<input id="mt-output"/>
  • Add class .mt-patient to #mt-input to translate only once #mt-button is clicked
<input id="mt-input" class="mt-patient"/>
  • Static translation:
<div id="mt-translate"/>
  • Case insensitive:
    • hElLo => wOrLd
    • bYe => gOodbye
  • Punctuation currently only includes !?,. and appends to word
    • Hello!*(> => World!
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free