@ff0000-ad-tech/ad-utils
v3.0.1
Published
[![npm (tag)](https://img.shields.io/npm/v/@ff0000-ad-tech%2Fad-utils.svg?style=flat-square)](https://www.npmjs.com/package/@ff0000-ad-tech%2Fad-utils) [![GitHub issues](https://img.shields.io/github/issues/ff0000-ad-tech/ad-utils.svg?style=flat-square)](
Downloads
33
Readme
RED Interactive Agency - Ad Technology
ad-utils
A package of stand alone utilies for Array, Math, Text, Object, etc
API
ArrayUtils
- .combine(arr1, arr2)
- .copy(array)
- .insertAt(array, index, arguments)
- .removeAt(array, index)
- .remove(array, item)
- .shuffle(array)
- .contains(array, item)
ColorUtils
- .toRgba(color, alpha)
- .toRgbaString(color, alpha)
- .hue(obj)
- .saturation(obj)
- .contrast(obj)
- .tint(obj)
- .transform(obj) ⇒ string | object
- .invert(obj)
DcsUtils
- .addVideoMetrics(player, message)
- .addYouTubeVideoMetrics(player)
ImageUtils
- .fitImageAtCoordinate(target, originX, originY, source)
- .fitCanvasImageAtCoordinate(target, params, fitParams, imgSourceWidth, imgSourceHeight)
LocationUtils
- .getGPSData(callbackSuccess, callbackFail)
MathUtils
- .toRadians(degree)
- .toDegrees(radian)
- .random(a, b, increment)
- .randomBoolean(weight)
- .rel(a0, a1, b0, b1, bX)
- .inRange(val, a, b) ⇒ boolean
- .isNumber(num)
- .toNumber(str)
- .restrict()
- .getAnglePoint() ⇒ array
- .getAngle()
- .getDistance() ⇒ number
MonetUtils
MotionUtils
- .setSpeedLimits(negX, posX, negY, posY)
- .setSpeedMultiplier(multi)
- .activate(callback)
- .deactivate()
- .callibrate()
ObjectUtils
- .objectifier
- .get(str, ctxObj)
- .set(str, val, ctxObj)
- .clone(obj) ⇒ object
- .defaults(obj, defaultObj, recursive)
TextUtils
- .addSpaces()(numberOfSpaces) ⇒ string
- .getSpecialCharacter()(requestedCharacter, isCapital) ⇒ string
- .trimStartAndEnd()(target) ⇒ string
- .removeSpaces()(str) ⇒ string
- .pad()(_target, _count) ⇒ string
- .injectBreakTags(str, indexes)