icns-lib 
Read and creare Apple Icon Image format files
Parse a buffer into a useful structure with each icon type and its data and convert that structure into a buffer to save it back to a valid .icns.
Install
Ensure you have Node.js 8 or later installed. Then run the following:
$ npm install icns-lib
Usage
const fs = require('sf');
const icns = require('icns-lib');
const buffer = fs.readFileSync('icons.icns')
const icons = icns.parse(buffer);
Object.keys(icons).forEach(type => {
if (!icns.isImageType(type)) {
delete icons;
}
})
fs.writeFileSync('icons.icns', icns.format(icons))
License
MIT © Manuel Rueda