MCPcopy Create free account
hub / github.com/github/gh-aw / parseBoolTemplatable

Function parseBoolTemplatable

actions/setup/js/templatable.cjs:35–38  ·  view source on GitHub ↗

* Parses a templatable boolean config value. * * Handles all representations that can arrive in a handler config: * - `undefined` / `null` → `defaultValue` * - boolean `true` → `true` * - boolean `false` → `false` * - string `"true"` → `true` * - string `"false"`

(value, defaultValue = true)

Source from the content-addressed store, hash-verified

33 * @returns {boolean}
34 */
35function parseBoolTemplatable(value, defaultValue = true) {
36 if (value === undefined || value === null) return defaultValue;
37 return String(value).trim().toLowerCase() !== "false";
38}
39
40/**
41 * Parses a templatable integer config value.

Callers 15

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
assign_to_user.cjsFile · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
buildMissingIssueHandlerFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected