From 2033c37e29b9113da23a6d32159db0dbf9c2b4c6 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Thu, 28 Apr 2022 11:06:28 -0500 Subject: [PATCH] Add supportedArchitectures helper --- helpers/bundles.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 helpers/bundles.js diff --git a/helpers/bundles.js b/helpers/bundles.js new file mode 100644 index 0000000..bb08733 --- /dev/null +++ b/helpers/bundles.js @@ -0,0 +1,13 @@ +export function supportedArchitectures ( appScan ) { + // if ( Array.isArray(appScan['Macho Meta']) ) { + // return appScan['Macho Meta'].map( architecture => architecture.processorType) + // } + + // console.log('meta', appScan['Macho Meta']) + + if ( appScan['Macho Meta'].architectures === undefined ) return [] + + return appScan['Macho Meta'].architectures + .map( architecture => architecture.processorType) + .filter(processorType => Number(processorType) !== 0) +}