serendip-utility
v1.1.4
Published
tool box for Javascript (+Typescript) programming - no dependency
Downloads
43
Readme
Serendip Utility
Utility package used in serendip repositories.
Installing
Assuming that you have already installed Nodejs, you can start installing Serendip Utility package with NPM. Open your Terminal/Command Prompt(CMD) and write:
npm install serendip-utility --save
Example
var su = require('serendip-utility');
console.log(su.text.replacePersianDigitsWithEnglish("۱۲۳۴۵۶۷۸۹۰"))
// should return 1234567890
Methods
- arrays.toposort(edges)
- functions.args(func)
- querystring.fromObject(inputObject)
- querystring.toObject(querystring)
- text.reverse(input)
- text.replaceArabicCharWithPersian(value)
- text.replacePersianDigitsWithEnglish(string)
- text.replaceEnglishDigitsWithPersian(input)
- text.switchPersianKeyToEnglish(value)
- text.switchEnglishKeyToPersian(value)
- text.fixPersianHalfSpace(value)
- text.replaceArabicDigitsWithPersian(value)
- text.replaceArabicDigitsWithEnglish(value)
- text.capitalizeFirstLetter(string)
- text.randomString(length,chars)
- text.randomAsciiString(length)
- text.randomNumberString(length)
- text.randomAccessToken()
- validate.isLength(input,min,max)
- validate.isEmail(input)
- validate.isAlphanumeric(input)
- validate.isNumeric(input)
- objects.memorySizeOf(obj)
Code Documentation
This documents are auto generated from typescript source using typedocpac