Pot.Hash.prototype.has

{Boolean} Pot.Hash.prototype.has ({String} key)

Pot.js で利用可能。 PotLite.js では利用できません。

Hash に指定のキーが存在するか調べます。

引数 key が存在するか調べ、存在するかどうかを真偽値で取得します。

キーが存在する場合 true が返り、存在しなかった場合は false が返ります。

var hash = new Pot.Hash();
hash.set('foo', 1);
Pot.debug(hash.has('foo')); // true
Pot.debug(hash.has('bar')); // false