MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / pickId

Function pickId

wxapp/junpinhui.js:146–151  ·  view source on GitHub ↗
(item = {})

Source from the content-addressed store, hash-verified

144}
145
146function pickId(item = {}) {
147 for (const key of ["id", "sorghum_id", "sorghumId", "member_sorghum_id", "memberSorghumId", "land_id", "landId"]) {
148 if (item[key] !== undefined && item[key] !== null && item[key] !== "") return item[key];
149 }
150 return "";
151}
152
153function landNo(item = {}) {
154 return item.serial_number ?? item.serialNumber ?? pickId(item) ?? "?";

Callers 5

landNoFunction · 0.85
isPlantableFunction · 0.85
isGrowingFunction · 0.85
isHarvestableFunction · 0.85
landPayloadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected