aftc-modules
A collection of useful utilities / functions.
Last updated 9 days ago by darceylloyd .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install aftc-modules 
SYNC missed versions from official npm registry.

AFTC-MODULES v1.2.7

Donate

A collection of usefull everyday utilities / functions.

Find AFTC-MODULES useful? Please Donate...

Any and all donations to help keep active development and the lights on are more than welcome.

paypal



CDN

Installation

npm i aftc-modules



Usage examples

See tests folder, but most of the functions are self explanitory.




Documentation

Coming soon, but most of it should be pretty obvious from the class/functions list below.




Available functions:

  • AnimationFrameStack()
  • ArgsToObject(fArgs, obj, strict)
  • ArrayClear(arr)
  • ArrayContains(needle, haystack)
  • arrayEmpty(arr)
  • ArrayGetMax(arr)
  • ArrayGetMin(arr)
  • ArrayMax(arr)
  • ArrayMin(arr)
  • ArrayRemoveIndex(arr,index)
  • ArrayRemoveItem(arr, value)
  • ArrayShuffle(arr)
  • ArrayShuffle2(a)
  • IsInArray(needle, haystack)
  • IsStringInArray(needle, haystack)
  • GetBrowser()
  • GetBrowserX()
  • GetBrowserY()
  • IsInViewport(el)
  • BoolToString(bool)
  • BoolToYesNo(b)
  • DegToRad(input)
  • HexToRgb(hex)
  • NumToHex(num)
  • RadToDeg(input)
  • RGBToHex(r, g, b)
  • RGBToHex2(r, g, b)
  • StringToBool(str)
  • GetCookie(name)
  • SetCookie(name, value)
  • GetDaysBetween(startDateTime, endDateTime)
  • GetMySQLDateTimeString()
  • GetUKDate(dte)
  • GetUkDateFromDbDateTime(input)
  • GetUkDateTimeFromDbDateTime (input)
  • GetUSDate(dte)
  • appendTo(elementOrId,msg,endOfLine="<br>")
  • AttachDebug(no,ele)
  • DebugTo(index, str)
  • log(arg)
  • logTo(elementOrId,msg,append=false,endOfLine="")
  • GetIEVersion()
  • GetOS(testAgent)
  • IsAndroid()
  • IsChrome()
  • IsEdge()
  • IsFireFox()
  • IsIE()
  • IsIOS()
  • IsMobile()
  • IsOpera()
  • IsSafari()
  • GetElementPosition(el)
  • IsDOM(obj)
  • IsElement(o)
  • IsElement2(element)
  • GetElementOffsetTop(elementId)
  • HasClass(elementOrId, c)
  • SetHTML(elementOrId, str)
  • EventManager
  • onReady(fn)
  • WordLimiter(str, maxWords)
  • XHR
  • GetRandomBoolean()
  • GetRandomFloat(min, max)
  • GetRandomInt(min, max)
  • GetRandomThatsNot(min,max,not)
  • GetWeightedRandom(odds, iterations)
  • InertiaTo(current,target,amount)
  • IsEven(n)
  • IsOdd(n)
  • NormaliseRange(min, max, v)
  • ParseArrayToFloat(arr)
  • ParseArrayToInt(arr)
  • RoundTo(v, dec)
  • FPSMonitor
  • GetGUID()
  • GetUID(len)
  • IsAlphaNumeric(v)
  • IsArray(input)
  • IsBool(input)
  • IsBoolean(input)
  • IsNumber(n)
  • IsNumeric(n)
  • CutStringTo(s, len)
  • EscapeHTML(str)
  • GetAnchor(url)
  • GetCleanJSONString(s)
  • GetFileExtension(input)
  • GetFileExtension2(str)
  • GetLastPartOfUrl(url)
  • GetRandomString(len)
  • GetStringBetween(str, start, end)
  • getStringsBetween2(str, start, end)
  • GetWordCount(str)
  • InString(find,source)
  • IsInString(find,source)
  • LTrimBy(str, by)
  • RemoveFileFromPath(path)
  • RTrimBy(str, trimBy)
  • TrimStringBy(str, trimBy)
  • UcFirst(s)
  • IsEmail(email)

Current Tags

  • 1.2.7                                ...           latest (9 days ago)

22 Versions

  • 1.2.7                                ...           9 days ago
  • 1.2.6                                ...           2 months ago
  • 1.2.5                                ...           3 months ago
  • 1.2.2                                ...           3 months ago
  • 1.2.1                                ...           3 months ago
  • 1.2.0                                ...           3 months ago
  • 1.1.8                                ...           3 months ago
  • 1.1.7                                ...           4 months ago
  • 1.1.5                                ...           4 months ago
  • 1.1.4                                ...           4 months ago
  • 1.1.3                                ...           4 months ago
  • 1.1.2                                ...           4 months ago
  • 1.1.1                                ...           4 months ago
  • 1.1.0                                ...           4 months ago
  • 1.0.38                                ...           4 months ago
  • 1.0.37                                ...           5 months ago
  • 1.0.36                                ...           6 months ago
  • 1.0.35                                ...           6 months ago
  • 1.0.33                                ...           6 months ago
  • 1.0.32                                ...           6 months ago
  • 1.0.31                                ...           6 months ago
  • 1.0.30                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 9
Last Month 10
Dependencies (2)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |