UdeS.FunctionsMixins
This repository provides useful functions to help you create faster your Polymer applications and components.
In Polymer, when we want to use a dom-if, we should provide it a boolean property. However, when we want to provide the result of a function, we must define that function inside our element, even if that function is simple as note > 60 by example.
By using the UdeS.FunctionsMixins, you no longer need to create and maintain theses custom functions. You could simply write your dom-if as below:
<template is="dom-if" if="[[greaterThan(note, 60)]]">
</template>
Mixins
Base mixins
-
UdeS.ArrayFunctionsMixin
arrayReturn an array of arguments.atReturn the element of array at the specified index.
-
EqualityOperatorsMixin
equalPerform a comparison (a == b) on all arguments.strictEqualPerform a strict comparison (a === b) on all arguments.notEqualPerform a comparison (a != b) on all arguments.notStrictEqualPerform a strict comparison (a !== b) on all arguments.
-
UdeS.IsFunctionsMixin
isAllUndefinedCheck if the all variables are undefined.isArrayCheck if the variable is an array.isEmptyArrayCheck to see if an array is empty.isEmptyObjectCheck to see if an object is empty (contains no enumerable properties).isEmptyStringCheck to see if a string is empty.isIntegerCheck to see if a string is an integer.isPositiveIntegerCheck to see if a string is a positive integer.isUndefinedCheck if at least one variable is undefined.isUndefinedVariableCheck if the variable is undefined.
-
UdeS.LogicalOperatorsMixin
andAnd function (&&).iifIf function.notNot function (!).orOr function (||).xorExclusive or function.
Grouping mixins
- UdeS.ComparisonOperatorsMixins
- UdeS.EqualityOperatorsMixin
- UdeS.RelationalOperatorsMixin
- UdeS.FunctionsMixins
- UdeS.ArrayFunctionsMixin
- UdeS.ComparisonOperatorsMixins
- UdeS.EqualityOperatorsMixin
- UdeS.RelationalOperatorsMixin
- UdeS.IsFunctionsMixin