-
Notifications
You must be signed in to change notification settings - Fork 0
Percentage
Malexion edited this page Nov 3, 2016
·
1 revision
-
values
Array of the given values to process to return an array with given percentages of the total. -
[func]
[Optional] Function to process the array with should return the values to process.
var result = __.math.percentages([ 1, 5, 22, 2, 3 ]);
console.log(result);
result = __.math.percentages([
{ value: 1 },
{ value: 5 },
{ value: 22 },
{ value: 2 },
{ value: 3 }
], x => x.value);
console.log(result);
- Home
- String Prototype Functions
- Replace All
- Replace While
- Format
- Contains
- Whiteout
- Capitalize
- First Word
- Truncate
- Base Functions
- All
- Class
- Contains
- Count
- Debounce
- Deep All
- Distinct
- Enum
- First
- Filter
- Fuse
- Get Type
- Group
- Index
- Intersect
- Last
- Map
- Match
- Move
- Options
- Get Property
- Rank
- Remove
- Remove At
- Scope
- Search
- Sort
- Switch
- Throttle
- Formats
- Pad Left
- Pad Right
- Type Detection
- Defined
- Set
- Same Type
- Function
- Object
- Array
- Arguments
- Boolean
- String
- Number
- Date
- Null
- Undefined
- NaN
- Math
- Random 16-bit
- Round To
- Round Down To
- Round Up To
- Median
- Sum
- Average
- Max
- Min
- Between
- Percentage
- Generators
- Guid
- Password
- Classes
- Overwrite
- Updatable