npm.io
1.3.8 • Published 7 years ago

btxt

Licence
ISC
Version
1.3.8
Deps
0
Size
15 kB
Vulns
0
Weekly
0
Stars
1

Btxt Module Build Status Version

Btxt is a very-tiny module for more features to improve your Style

npm i btxt@latest

Properties

  • btxt Method
    Convert a String into a Customized String
  • Argument
    • txt String
      Returns String
const b = require("btxt");
 b.btxt("Hello World");
//"Ħȩŀḹ๑ Ŵ๏ṝḹժ!"
  • compare Method
    Compare a String with an Array of string to find the most closed value
  • Arguments
    • word String
    • toCompareWith Array
      Returns String || null Incase there was no any similar value
 const b = require("btxt");
b.compare("hulle wurld", ["hello", "boo", "Hello world", "baz", "ello world"])
//"Hello world"
  • toLatin Method
    Calculate a number into Latin
  • Argument
    • number Number
      Returns String
const b = require('btxt');
 b.toLatin(1540);
//"MDXL"
  • keyGenerator Class
    Generate a random key that contains characters and numbers
  • Argument
    • keyLength Number Optional default = 15 You can also set the key length directly via the prop .keyLength
      Returns String
const b = require('btxt');
 var gen = new b.keyGenerator();
gen.generate();
//"634h9jTd92X9d2M"
  • calculateLatin Method
    Calculate a latin number
  • Argument
    • str String, Latin Number
      Returns Number
      Throw an Error if the number was invalid
const b = require('btxt');
 b.calculateLatin("MDXIV")
//1514
  • between Method
    Gets a string between Argument qu1 and qu2
  • Arguments
    • str String.
    • qu1 String. Default = "
    • qu2 String. Default = qu2
      Returns Array | null.
      e.g.
 const b = require('btxt');
b.between("{Hello}{World}{", "{", "}");
// ["Hello", "World"]

Browser Version

<script src='https://raw.githubusercontent.com/LeeeRoux/btxt/master/bin/btxt-browser.js'></script>

Keywords