Deck.prototype.set >= 0.1.2

Purpose

Set a key-value pair with an optional weight

Syntax

Deck#set ( Stringkey value Numberweight= 100 );

Parameters

key
value
weight
The weight of this value

Return values

Number

The numeric id of the inserted value

Examples

var a = new Deck();

a.set('key', 'value', 10);>>> 0

a.set('key', 'overwrite', 10);>>> 0

a.set('other-key', 'value2', 10);>>> 1