Btxt Module

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
txtString
ReturnsString
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
wordStringtoCompareWithArray
ReturnsString||nullIncase 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
numberNumber
ReturnsString
const b = require('btxt');
b.toLatin(1540);
//"MDXL"
- keyGenerator Class
Generate a random key that contains characters and numbers
- Argument
keyLengthNumber Optional default =15You can also set the key length directly via the prop.keyLength
ReturnsString
const b = require('btxt');
var gen = new b.keyGenerator();
gen.generate();
//"634h9jTd92X9d2M"
- calculateLatin Method
Calculate a latin number
- Argument
strString, Latin Number
ReturnsNumber
Throw an Error if the number was invalid
const b = require('btxt');
b.calculateLatin("MDXIV")
//1514
- between Method
Gets a string between Argumentqu1andqu2
- Arguments
strString.qu1String. Default ="qu2String. 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>