-
Notifications
You must be signed in to change notification settings - Fork 0
Map
Malexion edited this page Oct 31, 2016
·
1 revision
-
obj
Item to iterate over. -
[func]
[Optional] Function to evaluate the item. -
[options]
[Optional] Params{ manual: false, pushMultiple: false, build: [] }
var simple = __.map({ 5: 1, 4: 2, 3: 3 });
console.log(simple);
// Build a lookup index for your array
var index = __.map([ 1, 5, 3, 4, 2 ], (x, y) => { return { key: x, value: y }; }, { build: {} });
console.log(index);
console.log(index[5]); // get the index in the array of the item with value 5
- 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