MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-workbench / getCopyrightValues

Function getCopyrightValues

src/services/models/flatFile.ts:436–446  ·  view source on GitHub ↗
(
  array: unknown[],
  field: "copyright" | "holder" | "author"
)

Source from the content-addressed store, hash-verified

434}
435
436function getCopyrightValues(
437 array: unknown[],
438 field: "copyright" | "holder" | "author"
439) {
440 if (!array || !Array.isArray(array)) {
441 array = [];
442 }
443 const values = array.map((val: Record<string, unknown>) => val[field]);
444 // must wrap this in a list for datatables display; not sure why
445 return [values];
446}
447
448// [{key: val0}, {key: val1}] => [val0, val1]
449function getValues(array: unknown, key: string) {

Callers 1

flattenFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected