How to get System Icons on Mac through Node

I've been looking for a way to get the system set icons for paths.

For e.g

/Applications/TextEdit.app
/test.docx
/test/folder

On windows i achieved this by using a C# CLI program to generate Base64 pngs of icons for paths, and then call it synchronously in Node...

Given the path to the file (filePath), just call this:-

NSImage *image = [[NSWorkspace sharedWorkspace] iconForFile:filePath];