Deck.prototype.getSortedItems >= 0.1.2

Purpose

Get the sorted internal items

Syntax

Deck#getSortedItems ( Booleanslice= true );

Parameters

slice
Slice the array before returning

Return values

Array

Examples

var d = new Deck()

d.push('a', 100);>>> 0

d.push('b', 900);>>> 1

d.push('_', 10);>>> 2

d.getSortedItems();>>> [{id: 1, key: "_pushed_1", value: "b", weight: 900}, {id: 0, key: "_pushed_0", value: "a", weight: 100}, {id: 2, key: "_pushed_2", value: "_", weight: 10}]