Example 1 — List Methods on a Plain Object
Non-function properties are skipped; names are sorted.
var obj = {
zed: function () {},
age: 10,
alpha: function () {}
};
_.functions(obj);
// → ["alpha", "zed"] How It Works
- Scan. Each property is checked with
typeof === "function". - Skip.
ageis a number — not included. - Collect.
zedandalphaare method names. - Sort. Result is alphabetical:
alphabeforezed.

