From 305e79e5d3b261728b313a9d93b32b1b16733982 Mon Sep 17 00:00:00 2001 From: tjcrowder Date: Thu, 10 Sep 2009 15:00:34 +0100 Subject: [PATCH] doc: Merged old docs for Hash#keys, updated example. --- src/lang/hash.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lang/hash.js b/src/lang/hash.js index 8f4731f..6088d18 100644 --- a/src/lang/hash.js +++ b/src/lang/hash.js @@ -138,7 +138,15 @@ var Hash = Class.create(Enumerable, (function() { /** * Hash#keys() -> [String...] * - * Provides an Array of keys (that is, property names) for the hash. + * Provides an Array containing the keys for items stored in the hash. + * + * The order of the keys is not guaranteed. + * + * ### Example + * + * var h = $H({one: "uno", two: "due", three: "tre"}); + * h.keys(); + * // -> ["one", "three", "two] (these may be in any order) **/ function keys() { return this.pluck('key');