1.2.0 • Published 3 years ago

unenglish v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Unenglish

npm

npm bundle size

An npm package to transmogrify standard English strings.

Installation

npm -i unenglish

Update

npm -i unenglish@latest

Usage

node.js

const uneng = require('unenglish');

// default is 'Japanglish'
console.log(uneng('This is a test sentence.'));
// => 匕井l乙 l乙 大 匕巳乙匕 乙巳冂匕巳冂匸巳.

// 0 is 'Japanglish'
console.log(uneng('This is a test sentence.', 0));
// => 匕井l乙 l乙 大 匕巳乙匕 乙巳冂匕巳冂匸巳.

// 1 is 'Diacritic'
console.log(uneng('This is a test sentence.', 1));
// => Ŧħíŝ íŝ å ŧèŝŧ ŝèñŧèñçè.

// 2 is 'Rot-13' or Caesar's Cypher
console.log(uneng('This is a test sentence.', 2));
// => Guvf vf n grfg fragrapr.

// and since Rot-13 is reversable:
console.log(uneng('Guvf vf n grfg fragrapr.', 2));
// => This is a test sentence.

Vue.js

<template>
  <div class="footer">
    <h1>{{ title }}</h1>
    <p>{{ paragraph() }}</p>
  </div>
</template>

<script>
import unenglish from 'unenglish';

export default {
  name: 'Footer',
  props: {
    msg: String
  },
  computed: {
    title(){
      return unenglish('This is the footer...', 0);
    }
  },
  methods: {
    paragraph() {
      return unenglish('This is why we cannot have good things.', 1);
    }
  }
}
</script>
1.2.0

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago