{"_id":"icns-lib","_rev":"2-f0af17d2e7734a22b766e1ab4558d0f4","name":"icns-lib","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"icns-lib","version":"1.0.0","description":"Library to read and create .icns files","license":"MIT","repository":{"type":"git","url":"git+https://github.com/manrueda/icns-lib.git"},"author":{"name":"Manuel Rueda","email":"manuel.rueda.un@gmail.com","url":"https://manrueda.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"keywords":["lib","create","read","parse","format","icon","image","macos","mac","app","icns","apple"],"devDependencies":{"ava":"^0.25.0","xo":"^0.24.0"},"gitHead":"12668bde7d2cda777ad559d8c1579bcbfd3489b1","bugs":{"url":"https://github.com/manrueda/icns-lib/issues"},"homepage":"https://github.com/manrueda/icns-lib#readme","_id":"icns-lib@1.0.0","_nodeVersion":"10.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-WKiTgqepjoY3sgRILz4WOEJXVMDKfo52uMciqb4O7x5i+yH9VyUYlEW6xFbDZOCmcPrXBbYXbHdo8vYb5qzlyQ==","shasum":"de50f2a2cf6382c22e020e6b4e5cb2b9e24f5076","tarball":"https://registry.npmjs.org/icns-lib/-/icns-lib-1.0.0.tgz","fileCount":3,"unpackedSize":3678,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcTUYXCRA9TVsSAnZWagAAka0P/jhXfQcn5eSh/dU/AgOP\npa3edrp7ddvZwLhj1MoosKwwZRVPvpQipS0avF+lGsnbyFyirwI8PagTCvhP\nguO8Ly5HIhTtlhre/rrwTZew30agshcuu0L1vADLUfdyD/xcFSyybAVdbTOH\npzzVIYxXPmy8vFfZo17U7wXE2eqZqwEtjwOo0oL6JQLueT5utImVHOYm6Srw\nv6ghs7vc1GVR1MHojZKxN5IUk3r3s7/kTxcDv3gorbnqQ2eR/VnGjgnQjAGd\nWb3pCJPMrqiR7OqTxxiPasWkLnZYXiCbMSXYWCsqXTJvgmTtNDstzEmHVPyB\n62SYp8GCyH/UhZkl2uyHNEw3exc5P/fHR9E0yzbapIlueEw+GsTPmMLH9F0B\nwmMH+9TxhfK4kHv25Oqt3Mm/5gCQoYbUfzjH0aMyb+bd9n7DbD8udOd8fLT+\nK56kd5H/w+V0qDzvDSL6nA0BMYqfSyCDMdZsOmrnUzFVCDkqTZOBnZ5UW5Z2\ntvZ0qshaosEkLnywxqYjhs/ND9UZEZwmdCDgVtAON/sUqsanZnldytcU7oPQ\nrG2qhJEOeyTxIuT2jrpzf06qybcvq0dKETnRFvuven7iDBv3kKk7J3TOqze/\nw26igtLmIkteNdSq+VN2w96cXQw8C/pkXGPlbgv6kgvioobKhIm3AdI1JOl7\nXfRh\r\n=MkbW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2LCATGL1wShTRMCEvwaNS5xu9lttwhg30lq6nsMYu6AiEA+eGJnpdcmLeJ96YleM/lL5lhXcnBCIHTK7dfZ5/JCns="}]},"maintainers":[{"name":"manrueda","email":"manuel.rueda.un@gmail.com"}],"_npmUser":{"name":"manrueda","email":"manuel.rueda.un@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/icns-lib_1.0.0_1548568086956_0.7341479403741498"},"_hasShrinkwrap":false},"1.0.1":{"name":"icns-lib","version":"1.0.1","description":"Library to read and create .icns files","license":"MIT","repository":{"type":"git","url":"git+https://github.com/manrueda/icns-lib.git"},"author":{"name":"Manuel Rueda","email":"manuel.rueda.un@gmail.com","url":"https://manrueda.com"},"engines":{"node":">=8"},"main":"lib.js","scripts":{"test":"xo && ava"},"keywords":["lib","create","read","parse","format","icon","image","macos","mac","app","icns","apple"],"devDependencies":{"ava":"^0.25.0","xo":"^0.24.0"},"gitHead":"52947b72aa484e0265ebdac51561c22a60c98059","bugs":{"url":"https://github.com/manrueda/icns-lib/issues"},"homepage":"https://github.com/manrueda/icns-lib#readme","_id":"icns-lib@1.0.1","_nodeVersion":"10.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-J7+RDRQApG/vChY5TP043NitBcNC7QMn1kOgGvlAkyrK65hozAaSwTNsTZ2HJh+br9e1NlzpBreAOpk4YuhOJA==","shasum":"ce4488b45f68cbe706d23c0456b511da6cefdca5","tarball":"https://registry.npmjs.org/icns-lib/-/icns-lib-1.0.1.tgz","fileCount":3,"unpackedSize":3697,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcTUmFCRA9TVsSAnZWagAAnwkP/38idLCVq6UNMPVtF6ZO\nTHr7RZR0wlyEmumRY7ILUHORsaBu3C+qhUaxxaeMieyAfA95C50OkG8TYePD\n/6KmtsdiV8Vv/Sj8yKBlX4Dru9bGLPvwCARrllHzzX0gk3Ccok2WUVixUbWA\n9dtBglGYk7wTZFJVtPJWOkeZrw+2GWNUKIYBbnLwMelW/VFrIyjsobWCGzBI\nzkH/gIj9h/oRct4fOA8hTplSj4C59JGAWY+O950qAZxwUWAGqlB4GR0fbIk7\nruD0V3cLrZxEeORFLBCOh+Fxrk/4CKNDTSIW7vhdlNA8XnFyPNYfbTsCNdjC\n0YJZMGrGD7DOsUh6os5D29gQEJndj8fzYclXj+8B9gxDwp9a94hn85PEqNlE\nGNUdO3RgGRjS30q4rmnJOxGg8VfYeKhduPDT7uxkuq9MBCJYdCj0u/NHT4t6\ntFEoVV71txZPcqSQdFlLUOyvkIJmHki9Xpg9VZ1Q/ayh+BE0gXlCuLFpOwAD\naPXWEs1+ASgf3nchjrYDM3x+CpIZ3EZQz8F3UUpSaMvCTflLxaCu9eonafwt\nhTRT8IoYgQsKA+sAwrkerRkoWsUfUu27TlJLnhivRcvrnhEuSTBGzeRCjkFK\nTuAPKl8xxbXHQ0PT0HG1yds9S6DkDvMeqw5dQRj2KDj1phpY9Eng+JCHPkBj\ncamg\r\n=7RiQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICxk+u+Ly4Y4ScJ+1Xrdq7gilkZA6xsZiQwX5aS7TC9UAiEAww16XEibScvpoPsTyQEiRWRPz2C33uECF7o0XkwO9Dc="}]},"maintainers":[{"name":"manrueda","email":"manuel.rueda.un@gmail.com"}],"_npmUser":{"name":"manrueda","email":"manuel.rueda.un@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/icns-lib_1.0.1_1548568965151_0.20124058753638896"},"_hasShrinkwrap":false}},"time":{"created":"2019-01-27T05:48:06.956Z","1.0.0":"2019-01-27T05:48:07.089Z","modified":"2022-05-05T14:51:49.527Z","1.0.1":"2019-01-27T06:02:45.355Z"},"maintainers":[{"name":"manrueda","email":"manuel.rueda.un@gmail.com"}],"description":"Library to read and create .icns files","homepage":"https://github.com/manrueda/icns-lib#readme","keywords":["lib","create","read","parse","format","icon","image","macos","mac","app","icns","apple"],"repository":{"type":"git","url":"git+https://github.com/manrueda/icns-lib.git"},"author":{"name":"Manuel Rueda","email":"manuel.rueda.un@gmail.com","url":"https://manrueda.com"},"bugs":{"url":"https://github.com/manrueda/icns-lib/issues"},"license":"MIT","readme":"# icns-lib [![Build Status](https://travis-ci.org/ManRueda/icns-lib.svg?branch=master)](https://travis-ci.org/ManRueda/icns-lib)\n\n> Read and creare [Apple Icon Image format](https://en.wikipedia.org/wiki/Apple_Icon_Image_format) files\n\nParse 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.\n\n\n## Install\n\nEnsure you have [Node.js](https://nodejs.org) 8 or later installed. Then run the following:\n\n```\n$ npm install icns-lib\n```\n\n\n## Usage\n\n```javascript\nconst fs = require('sf');\nconst icns = require('icns-lib');\n\nconst buffer = fs.readFileSync('icons.icns')\n\n// Parse the buffer into a map where the key is the Icon type (icp4, icp5, etc) and the value is a buffer with the data.\nconst icons = icns.parse(buffer);\n\nObject.keys(icons).forEach(type => {\n\t// Remove all items that are not an image type icon\n\tif (!icns.isImageType(type)) {\n\t\tdelete icons;\n\t}\n})\n\n// Save the icon set without all the non-image icons\nfs.writeFileSync('icons.icns', icns.format(icons))\n\n```\n\n## License\n\nMIT © [Manuel Rueda](https://manrueda.com)\n","readmeFilename":"readme.md"}