{"version":"2.1.271","anchor":"sessionusage-now-accepts-options","canonical_anchor":"sessionusage-now-accepts-options","heading":"$.session.usage() plugin call now accepts and validates options","tier":"use","area":"Plugin API","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271\/e\/sessionusage-now-accepts-options","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271","markdown":"### $.session.usage() plugin call now accepts and validates options\n\nThe plugin $.session.usage() call now takes breakdown and columns options, validated before running\n\n**Unclear.** The finding doesn't say what values `breakdown` and `columns` accept or how they change the returned usage data.\n\n**What** The `$.session.usage()` call available to plugins previously took no arguments. It now accepts an optional options object with:\n\n- `breakdown`, which must be `'summary'` or `'full'`\n\n- `columns`, which must be a positive integer\n\nA new validation step checks these values (and rejects unknown keys) before the call runs, instead of running unchecked.\n\n**Why** Plugin authors get immediate, clear errors if they pass invalid options to `session.usage()`, instead of the call silently misbehaving or failing later.\n\n- Area: Plugin API\n- Tier: Use it now\n- Useful: 2\/5\n- Signal: 1\/5"}