{"_id":"whats-that-gerber","_rev":"30-3af297205779e5b4515674069d04a1f0","name":"whats-that-gerber","description":"Identify Gerber and drill files by filenamee","dist-tags":{"latest":"4.2.7","next":"5.0.0-next.0"},"versions":{"1.0.0":{"name":"whats-that-gerber","version":"1.0.0","description":"Guesses the PCB layer type given a filename of a Gerber or drill file","main":"index.js","scripts":{"lint":"eslint index.js test/*js","test":"mocha","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/tracespace/whats-that-gerber.git"},"keywords":["pcb","gerber","svg","gerber-to-svg","hardware"],"author":{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},"license":"ISC","bugs":{"url":"https://github.com/tracespace/whats-that-gerber/issues"},"homepage":"https://github.com/tracespace/whats-that-gerber#readme","devDependencies":{"chai":"^3.5.0","eslint":"^2.9.0","mocha":"^2.4.5"},"gitHead":"eee66904201993e317141830ae1c134e6910b474","_id":"whats-that-gerber@1.0.0","_shasum":"69ccc8fc15f7c2ee3ebbc9058c32b849d35274e0","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"shasum":"69ccc8fc15f7c2ee3ebbc9058c32b849d35274e0","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-1.0.0.tgz","integrity":"sha512-W3BHBOw185Cf0Z7vaULVGvDB7Fq2JuVQlcCkfDkcHiKPL0mdDalP4mfNMISSwS7lKEqAb7FC8f3gO9TF0UZWIA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlD0wsHaI1wfC4PoLzE4pOB71k7Z4dBxf2a4bsWNPLCgIgRgXy203uFLN+25j7YfrtW282pmgSuX8gUv5C55+CbTw="}]},"maintainers":[{"name":"mcous","email":"mike@cousins.io"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/whats-that-gerber-1.0.0.tgz_1462126737661_0.7116801063530147"},"directories":{}},"1.0.1":{"name":"whats-that-gerber","version":"1.0.1","description":"Guesses the PCB layer type given a filename of a Gerber or drill file","main":"index.js","scripts":{"lint":"eslint index.js test/*js","test":"mocha","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/tracespace/whats-that-gerber.git"},"keywords":["pcb","gerber","svg","gerber-to-svg","hardware"],"author":{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},"license":"ISC","bugs":{"url":"https://github.com/tracespace/whats-that-gerber/issues"},"homepage":"https://github.com/tracespace/whats-that-gerber#readme","devDependencies":{"chai":"^3.5.0","eslint":"^2.9.0","mocha":"^2.4.5"},"gitHead":"33cee14b602bed351008da7b3769fc750f0acfbf","_id":"whats-that-gerber@1.0.1","_shasum":"50ae8be4b55e163bd35e225c9290dbfa50c90b84","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"shasum":"50ae8be4b55e163bd35e225c9290dbfa50c90b84","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-1.0.1.tgz","integrity":"sha512-l6gIe/2uJ1fj5zkObkFAnILls2BiDzrUk3wc9LUQ4nOX8RhEaen+PXFBMzMf7yxjNrMmZFsRRPCrh5KiI6dkHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIADQe8+CyQbr0eASDxXvP8hOwFPJ32Qj1UMykTDMFawdAiEA3vzxbdiH1wL0IjPLSqTdbGIfPdi32ZEZMKwZQ08HTas="}]},"maintainers":[{"name":"mcous","email":"mike@cousins.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/whats-that-gerber-1.0.1.tgz_1462342446731_0.4679237441159785"},"directories":{}},"2.0.0":{"name":"whats-that-gerber","version":"2.0.0","description":"Guesses the PCB layer type given a filename of a Gerber or drill file","main":"index.js","scripts":{"lint":"eslint index.js test/*js","test":"istanbul cover _mocha","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/tracespace/whats-that-gerber.git"},"keywords":["pcb","gerber","svg","gerber-to-svg","hardware","circuit"],"author":{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},"license":"ISC","bugs":{"url":"https://github.com/tracespace/whats-that-gerber/issues"},"homepage":"https://github.com/tracespace/whats-that-gerber#readme","devDependencies":{"chai":"^3.5.0","eslint":"^2.9.0","istanbul":"^0.4.3","mocha":"^2.4.5"},"dependencies":{"lodash.find":"^4.3.0"},"gitHead":"75f7f7d165f52c12bebd80a9dd30bb8bdcfa7d8a","_id":"whats-that-gerber@2.0.0","_shasum":"4423a518b7874ba65c619444100c758a6df8c1fd","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"shasum":"4423a518b7874ba65c619444100c758a6df8c1fd","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-2.0.0.tgz","integrity":"sha512-EUFQ4jz2rPTHs1wQrsMnG2dl1//TbdEYDD+3Th7409HzCS8q4BHfSaSBVKvL5G4CY+6Doy8rO5V8Jbzn9OCC8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEBpTTopCKJmCyKIHgPbGGS9mynsigIoKCMOnVctUuB5AiAS9kzT2OvE8A49UfldRSA9pG9PokHtKu7yDrajTpUmHg=="}]},"maintainers":[{"name":"mcous","email":"mike@cousins.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/whats-that-gerber-2.0.0.tgz_1465655666069_0.16570687480270863"},"directories":{}},"2.0.1":{"name":"whats-that-gerber","version":"2.0.1","description":"Guesses the PCB layer type given a filename of a Gerber or drill file","main":"index.js","scripts":{"lint":"eslint index.js test/*js","test":"istanbul cover _mocha","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/tracespace/whats-that-gerber.git"},"keywords":["pcb","gerber","svg","gerber-to-svg","hardware","circuit"],"author":{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},"license":"ISC","bugs":{"url":"https://github.com/tracespace/whats-that-gerber/issues"},"homepage":"https://github.com/tracespace/whats-that-gerber#readme","devDependencies":{"chai":"^3.5.0","eslint":"^2.9.0","istanbul":"^0.4.3","mocha":"^2.4.5"},"dependencies":{},"gitHead":"b5655c6e35bbf58705fe5d36e99f5afc71745789","_id":"whats-that-gerber@2.0.1","_shasum":"88a8958710c13e38eda6481a477f6ca4611c57b1","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"shasum":"88a8958710c13e38eda6481a477f6ca4611c57b1","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-2.0.1.tgz","integrity":"sha512-jZKirrXUvMF2k0OwMhpBy2mPzu0swcopLgNz6AWWP+MioA/KGyQOUEBMplWj6rBds8LtezPpBaloerUTQOBLEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGSX/Wh8W6vOmqU+3FjQgaYhLOP+teuDHmWusjeAU8SjAiA9Ynag5mIU+GdMoqH2Apa7tuhTYARKUxmQuMHww9gWcQ=="}]},"maintainers":[{"name":"mcous","email":"mike@cousins.io"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/whats-that-gerber-2.0.1.tgz_1465669083750_0.7452222721185535"},"directories":{}},"2.0.2":{"name":"whats-that-gerber","version":"2.0.2","description":"Guesses the PCB layer type given a filename of a Gerber or drill file","main":"index.js","scripts":{"lint":"eslint index.js test/*js","test":"istanbul cover _mocha","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/tracespace/whats-that-gerber.git"},"keywords":["pcb","gerber","svg","gerber-to-svg","hardware","circuit"],"author":{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},"license":"ISC","bugs":{"url":"https://github.com/tracespace/whats-that-gerber/issues"},"homepage":"https://github.com/tracespace/whats-that-gerber#readme","devDependencies":{"chai":"^3.5.0","eslint":"^2.9.0","istanbul":"^0.4.3","mocha":"^2.4.5"},"dependencies":{},"gitHead":"a4460cb156e76576c81165ef328fd15b435fbda1","_id":"whats-that-gerber@2.0.2","_shasum":"f7bc24a8185d65699bc8968e320e81828b876d0f","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"shasum":"f7bc24a8185d65699bc8968e320e81828b876d0f","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-2.0.2.tgz","integrity":"sha512-MeSUiupYVxmJURB0aSdVmOfwnJ9YPQYgMYdrDJjNiwddMESz7FdS1zAouceiq1Pm46dCuez34FTrQVuWcW4SRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNmR8S9cE7k8RFN3Kl0IJKijPjLbwV9+CMh7RGdGB0EAiEAmLwfall4mm2yVH9dJ6zN6bFHd561iQfskeiHiuKJjRM="}]},"maintainers":[{"name":"mcous","email":"mike@cousins.io"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/whats-that-gerber-2.0.2.tgz_1467386240184_0.44381160172633827"},"directories":{}},"2.0.3":{"name":"whats-that-gerber","version":"2.0.3","description":"Guesses the PCB layer type given a filename of a Gerber or drill file","main":"index.js","scripts":{"lint":"eslint index.js test/*js","test":"istanbul cover _mocha","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/tracespace/whats-that-gerber.git"},"keywords":["pcb","gerber","svg","gerber-to-svg","hardware","circuit"],"author":{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},"license":"ISC","bugs":{"url":"https://github.com/tracespace/whats-that-gerber/issues"},"homepage":"https://github.com/tracespace/whats-that-gerber#readme","devDependencies":{"chai":"^3.5.0","eslint":"^2.9.0","istanbul":"^0.4.3","mocha":"^2.4.5"},"dependencies":{},"gitHead":"3066e8de521903a1a65535fc3d94c57bc13dd764","_id":"whats-that-gerber@2.0.3","_shasum":"9f7de54125a411334a58ecd0332c3b14390a4b63","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"shasum":"9f7de54125a411334a58ecd0332c3b14390a4b63","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-2.0.3.tgz","integrity":"sha512-hWCG41fHchB4LhyUGnBwtL+Nha0XDxzxbQHNIewUEOQ79l0HJSE2DTvFGAL/zDJ/jKH21jCyN7hWJzxBpeAFIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFqcns1cf+fbGRY09PodNwGCX71Ktg0qSjjN9RHRX/6QIgCrXMg3BOAjWqT2SZJTfzTvCB9d6jarG6oGGv0a8aqOk="}]},"maintainers":[{"name":"mcous","email":"mike@cousins.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/whats-that-gerber-2.0.3.tgz_1467734338144_0.6705170783679932"},"directories":{}},"2.1.0":{"name":"whats-that-gerber","version":"2.1.0","description":"Guesses the PCB layer type given a filename of a Gerber or drill file","main":"index.js","scripts":{"lint":"eslint index.js 'test/*js'","test":"nyc mocha","test:watch":"mocha --watch --reporter=dot","coverage":"nyc report","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/tracespace/whats-that-gerber.git"},"keywords":["pcb","gerber","svg","gerber-to-svg","hardware","circuit"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"}],"license":"ISC","bugs":{"url":"https://github.com/tracespace/whats-that-gerber/issues"},"homepage":"https://github.com/tracespace/whats-that-gerber#readme","devDependencies":{"chai":"^3.5.0","eslint":"^2.9.0","mocha":"^3.0.2","nyc":"^8.1.0"},"dependencies":{},"gitHead":"c462754adb5778c4c8fefaa22fb43ead47f3a455","_id":"whats-that-gerber@2.1.0","_shasum":"d06939c74c5fee28252a5f2e060b7b4b755abcb2","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"shasum":"d06939c74c5fee28252a5f2e060b7b4b755abcb2","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-2.1.0.tgz","integrity":"sha512-+FoxZ11EjlEhJUTA0XNL1PRdEwANmowEqYEMRPHHqdZSC9InQXdEr9dYTWRTDkkiSLxIlUDua7Fwj71xDpQT/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDHzRQ1vaOUrvmvAP15VJRKYwqJaVf+xK+mYAfKAI0EPAiEAsRLZBtAnFBy2SX95xVNIWXwzjOY2jM1iMRdN3gSzeaE="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/whats-that-gerber-2.1.0.tgz_1471474383561_0.6545758785214275"},"directories":{}},"2.1.1":{"name":"whats-that-gerber","version":"2.1.1","description":"Guesses the PCB layer type given a filename of a Gerber or drill file","main":"index.js","scripts":{"lint":"eslint index.js 'test/*js'","test":"nyc mocha","test:watch":"mocha --watch --reporter=dot","coverage":"nyc report","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/tracespace/whats-that-gerber.git"},"keywords":["pcb","gerber","svg","gerber-to-svg","hardware","circuit"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"}],"license":"ISC","bugs":{"url":"https://github.com/tracespace/whats-that-gerber/issues"},"homepage":"https://github.com/tracespace/whats-that-gerber#readme","devDependencies":{"chai":"^3.5.0","eslint":"^2.9.0","mocha":"^3.0.2","nyc":"^8.1.0"},"dependencies":{},"gitHead":"141aa06f8dbe6b2876d0b81f355884f3dc4ac11e","_id":"whats-that-gerber@2.1.1","_shasum":"7e662f42757f988712880c1e4faf83fe38a585cc","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"shasum":"7e662f42757f988712880c1e4faf83fe38a585cc","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-2.1.1.tgz","integrity":"sha512-KFS/bJjHsn35QXXri1Zh5ronU9UXjmxiGwmapogbw1ukGaG7095trS9vBe0pPDBBm5+6TVUtrRy8NeV4l8Xh9A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHL6J+5g0nKDiNabzHEzjRbWx2EYdNJevSvs33bMTdQiAiB/YWx+6n4ifyTgvnDzGLxKqEniHGuiaVLSRBQmI5Ao3Q=="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber-2.1.1.tgz_1496061068113_0.25713708670809865"},"directories":{}},"3.0.0":{"name":"whats-that-gerber","version":"3.0.0","description":"Guesses the PCB layer type given a filename of a Gerber or drill file","main":"index.js","scripts":{"lint":"eslint index.js 'test/*js'","test":"nyc mocha","test:watch":"mocha --watch --reporter=dot","coverage":"nyc report","posttest":"npm run lint"},"repository":{"type":"git","url":"git+https://github.com/tracespace/whats-that-gerber.git"},"keywords":["pcb","gerber","svg","gerber-to-svg","hardware","circuit"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"}],"license":"ISC","bugs":{"url":"https://github.com/tracespace/whats-that-gerber/issues"},"homepage":"https://github.com/tracespace/whats-that-gerber#readme","devDependencies":{"chai":"^3.5.0","eslint":"^2.9.0","mocha":"^3.0.2","nyc":"^8.1.0"},"dependencies":{},"gitHead":"6839b6f5e3580031443c5822f0aca90e8b67d62a","_id":"whats-that-gerber@3.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.11.1","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"integrity":"sha512-FGnacqnx7rSlH2DuBdzzzieVE3uo2fiZHJ6IUdVVo4i12QksCZPsXZT59STkBuw24ja01I3JlEZi9Vm0UVRMMg==","shasum":"1b58b569fbbba8ceb8aebb1ee6f594e899da7a00","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-3.0.0.tgz","fileCount":8,"unpackedSize":18955,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD01LI+1I+pPsV5UDcesinuVDfdq0MsN7Jmsv7hexirIQIgddN2Ep3DK8sh5BTZ+Q/1FQwkZpcayhERLV02qU24gew="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_3.0.0_1523193233465_0.5508967753524703"},"_hasShrinkwrap":false},"4.0.0-next.3":{"name":"whats-that-gerber","version":"4.0.0-next.3","description":"Identify Gerber and drill files by filenamee","main":"index.js","repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","readme":"# what's that gerber?\n\n[![version][npm-badge]][npm]\n\n> Identify Gerber and drill files by filename\n\nHave you got a bunch of Gerber files lying around without any idea what they're for? We've all been there. `whats-that-gerber` is here to help.\n\n## install\n\n```shell\nnpm install --save whats-that-gerber\n# or\nyarn add whats-that-gerber\n```\n\n## usage\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\n\nconst filename = 'my-board-F_Cu.gbr'\nconst layerType = whatsThatGerber(filename) // 'tcu'\nconst layerName = whatsThatGerber.getFullName(layerType) // 'top copper'\n```\n\n### layer types and names\n\nThere are 12 available layer types. You can get an array of all types with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst allLayerTypes = whatsThatGerber.getAllTypes() // ['drw', 'tcu', ...]\n```\n\n| type | full name (en)     |\n| ---- | ------------------ |\n| drw  | gerber drawing     |\n| tcu  | top copper         |\n| tsm  | top soldermask     |\n| tss  | top silkscreen     |\n| tsp  | top solderpaste    |\n| bcu  | bottom copper      |\n| bsm  | bottom soldermask  |\n| bss  | bottom silkscreen  |\n| bsp  | bottom solderpaste |\n| icu  | inner copper       |\n| out  | board outline      |\n| drl  | drill hits         |\n\n#### checking if a layer type is valid\n\nYou can check if any given string is a valid layer type with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst isValidType = whatsThatGerber.isValidType\n\nconst type1 = 'tsm'\nconst type2 = 'hello'\n\nconsole.log(isValidType(type1)) // true\nconsole.log(isValidType(type2)) // false\n```\n\n### full name locales\n\nThe full name method takes a locale string as its second parameter, which defaults to 'en':\n\n```js\nconst fullName = whatsThatGerber.getFullName('tcu', 'en')\n```\n\nCurrently, no other locales are supported (because I don't know any!); contributions are greatly appreciated. If the type or locale is unrecognized, the result will be an empty string. Locale additions will be considered patch-level upgrades.\n\n### supported cad programs\n\nWe should be able to identify files output by the following programs:\n\n* KiCad\n* Eagle\n* Altium\n* Orcad\n* gEDA PCB\n\n## contributing\n\nPlease read the [Contributing Section](../README.md#contributing) of the main README for development setup instructions!\n\nIf you're adding or modifying a filetype matcher, please remember to add or modify an example filename in [`@tracespace/fixtures/gerber-filenames.json`](../fixtures/gerber-filenames.json) to ensure your change is tested.\n\n[npm]: https://www.npmjs.com/package/whats-that-gerber\n[npm-badge]: https://img.shields.io/npm/v/whats-that-gerber.svg?style=flat-square&maxAge=86400\n","readmeFilename":"README.md","_id":"whats-that-gerber@4.0.0-next.3","_npmVersion":"5.6.0","_nodeVersion":"9.11.1","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"integrity":"sha512-XqVZWHOKyZ0EmxTpwI/rbWLPZ0aW5HAFM40OCdvhQSJdAxtktJ8m3y2A/2TZyZH6MVf8DaL6UIERjK5IL3Ce6g==","shasum":"fd2b73cda98847aa8d9738ce85ee8ee85aa57682","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.0.0-next.3.tgz","fileCount":5,"unpackedSize":9399,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1s3uCRA9TVsSAnZWagAAROoP/2+Hb4s1/y/YR//3kqJ7\nLDdD+/qWCf0rx0H822JnSWskrZ5ZkpH8ocF9a/6/l4xrRuLJGYYcZWQ93MvH\nombyb6Xa1pxfSfwS0K35wKMNKps9DNPvphx76ocfeAAUMcoEoO328islksnX\n2f4FzeCTvKjS7SZJ8cnyEZ0j183dXJ5kiBMgkjLt2cYC3aUO8n7+uPEVKKs3\n7l0EQo2CaZTEK3fHsPMxq8joR57iQ+/jqJvN0pKKg1fuCNyqGIMGVHJQMGBh\nkqGFvnuWGGEuJ1HkNLxOUhEtOYEe6dd0dV4z9WXN9xRK8PfUfH+mX1F5aP50\nt1fnZYIccckS6AeA6ew7UJJ/JLjX0ls5sqwHGTOQIpOvp1cQLoQuOpnX+peW\n4572F46TcDKDJVzBSVO172G3yhT33EqVkNQ6N1tjpvstStJ2Stm9FIltx738\n9S6zsgDZdcZYt2vXaQGehOxChkCvVIeEXJS/+lXXzz7oS6SbufDcMxhB8dR7\nca5m6BL+QXmshATCYKkFC5rXPe4iaIcuKHo2U66WSRghW6wXLF6iaBbQVqJe\naqhndG3o+WaZV5qN8oafTLKQYNmWqj+PK4tszRrQ4QAA4nlxucyk+GYjRTtK\nxjmK/22grLZ8WL7xtB8dcUW4NSE2DsOMnjQ48gfd8uTEZxw3WWiQBLP/eOFU\nz6ws\r\n=HaUn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGGhh94B4XbS/P4TBwmfjCbyLaIFyl3rGG2BQqwErYZaAiAgKmMROrxfGnKBUZ92+nayEwNV9QQnNQzAAP1/AssPiA=="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.0.0-next.3_1524026861909_0.6725336940085549"},"_hasShrinkwrap":false},"4.0.0-next.4":{"name":"whats-that-gerber","version":"4.0.0-next.4","description":"Identify Gerber and drill files by filenamee","main":"index.js","repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","readme":"# what's that gerber?\n\n[![version][npm-badge]][npm]\n\n> Identify Gerber and drill files by filename\n\nHave you got a bunch of Gerber files lying around without any idea what they're for? We've all been there. `whats-that-gerber` is here to help.\n\n## install\n\n```shell\nnpm install --save whats-that-gerber\n# or\nyarn add whats-that-gerber\n```\n\n## usage\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\n\nconst filename = 'my-board-F_Cu.gbr'\nconst layerType = whatsThatGerber(filename) // 'tcu'\nconst layerName = whatsThatGerber.getFullName(layerType) // 'top copper'\n```\n\n### layer types and names\n\nThere are 12 available layer types. You can get an array of all types with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst allLayerTypes = whatsThatGerber.getAllTypes() // ['drw', 'tcu', ...]\n```\n\n| type | full name (en)     |\n| ---- | ------------------ |\n| drw  | gerber drawing     |\n| tcu  | top copper         |\n| tsm  | top soldermask     |\n| tss  | top silkscreen     |\n| tsp  | top solderpaste    |\n| bcu  | bottom copper      |\n| bsm  | bottom soldermask  |\n| bss  | bottom silkscreen  |\n| bsp  | bottom solderpaste |\n| icu  | inner copper       |\n| out  | board outline      |\n| drl  | drill hits         |\n\n#### checking if a layer type is valid\n\nYou can check if any given string is a valid layer type with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst isValidType = whatsThatGerber.isValidType\n\nconst type1 = 'tsm'\nconst type2 = 'hello'\n\nconsole.log(isValidType(type1)) // true\nconsole.log(isValidType(type2)) // false\n```\n\n### full name locales\n\nThe full name method takes a locale string as its second parameter, which defaults to 'en':\n\n```js\nconst fullName = whatsThatGerber.getFullName('tcu', 'en')\n```\n\nCurrently, no other locales are supported (because I don't know any!); contributions are greatly appreciated. If the type or locale is unrecognized, the result will be an empty string. Locale additions will be considered patch-level upgrades.\n\n### supported cad programs\n\nWe should be able to identify files output by the following programs:\n\n* KiCad\n* Eagle\n* Altium\n* Orcad\n* gEDA PCB\n\n## contributing\n\nPlease read the [Contributing Section](../README.md#contributing) of the main README for development setup instructions!\n\nIf you're adding or modifying a filetype matcher, please remember to add or modify an example filename in [`@tracespace/fixtures/gerber-filenames.json`](../fixtures/gerber-filenames.json) to ensure your change is tested.\n\n[npm]: https://www.npmjs.com/package/whats-that-gerber\n[npm-badge]: https://img.shields.io/npm/v/whats-that-gerber.svg?style=flat-square&maxAge=86400\n","readmeFilename":"README.md","_id":"whats-that-gerber@4.0.0-next.4","_npmVersion":"5.6.0","_nodeVersion":"10.0.0","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"integrity":"sha512-w6gBWjUA8FwzDP4kUbBAwaXrqxhTYJDokqcv44N2nvNhShI2PxdSC4W6AdDklZTuQNBy1p/a37fd7FgxfShhZw==","shasum":"5ebdf6cd4104b704de377b33976484d907a23cfd","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.0.0-next.4.tgz","fileCount":5,"unpackedSize":9610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4qe1CRA9TVsSAnZWagAAOLsP/0qMK3mZytqiQHZZrUgJ\nIoeKSBEcipzBIeqzjH1SqAyGjxlKJaGcY1mp3jJwu+AYkkxOVRTZdgtgnz/6\nYeU7ssubkm+CHd45u+VxgNEni5lLedwMnpAFNd3GiBnkwvi45gXngALA9G2v\n8gW3yzWhkVoFd7wXU14U2nuIfSMaCNaABdwGVCmfE6pwod95wXxHklmZShtZ\n8MdxtYbMUpC8/+FhYrcNIO+tIKRpZxHfmu+pdmOkIChI+ddy2pSVDAzV5KeU\nSr3DkAYS7Z2kpdjxuFX+8BZCz/AMPIp2SDIuPgFhp2GZy01KhzGnTXt+MeqY\nh++SZPtl9MWtpLlSvqldz95xxGIskmB5sQHASxykMQPa06vWWhYUakf6BWEN\n1G9V1/aaJQjU3c5vRv28O6+QOA1rmT0Ur7hACwvpMFJoqXRsqPu7Q5jea/CI\nf2pKi1Daceu23qtExh1Rel4WVwPVCbq0a+jQhLXdniZM+cJUphOCGeC5L21w\nfWAUWp5NSouCO0WJZqzpc/n+jho4J/jF7dn6byokqPIQzHy74lKZOqSLnuoW\n8cg2F3iNESQckV6niDOTZsij0X2SECh2dI1t4A98t0fNohfnO6KInxiluW5v\n56DsKhl9GEQZPPnICmLiwLRNB7qpSBRCl6Tj9vN2pGpuBjqHnb4RIuBEi+rM\nsq1S\r\n=ADo8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjdLdAfGKmYjBR8cnZUXsEDUGv0cLZHbdtIYoGT3uX0gIgUFIp5gzrZ8oVH2J64pob51YWvu0vbNHdbsTWBo3nZ5M="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.0.0-next.4_1524803508119_0.007749634170715947"},"_hasShrinkwrap":false},"4.0.0-next.9":{"name":"whats-that-gerber","version":"4.0.0-next.9","description":"Identify Gerber and drill files by filenamee","main":"index.js","repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","readme":"# what's that gerber?\n\n[![version][npm-badge]][npm]\n\n> Identify Gerber and drill files by filename\n\nHave you got a bunch of Gerber files lying around without any idea what they're for? We've all been there. `whats-that-gerber` is here to help.\n\nPart of the [tracespace][] collection of PCB visualization tools.\n\n[tracespace]: https://github.com/tracespace/tracespace\n[npm]: https://www.npmjs.com/package/whats-that-gerber\n[npm-badge]: https://img.shields.io/npm/v/whats-that-gerber.svg?style=flat-square&maxAge=3600\n\n## install\n\n```shell\nnpm install --save whats-that-gerber\n# or\nyarn add whats-that-gerber\n```\n\n## usage\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\n\nconst filename = 'my-board-F_Cu.gbr'\nconst layerType = whatsThatGerber(filename) // 'tcu'\nconst layerName = whatsThatGerber.getFullName(layerType) // 'top copper'\n```\n\n### layer types and names\n\nThere are 12 available layer types. You can get an array of all types with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst allLayerTypes = whatsThatGerber.getAllTypes() // ['drw', 'tcu', ...]\n```\n\n| type | full name (en)                |\n| ---- | ----------------------------- |\n| drw  | gerber drawing (unknown type) |\n| tcu  | top copper                    |\n| tsm  | top soldermask                |\n| tss  | top silkscreen                |\n| tsp  | top solderpaste               |\n| bcu  | bottom copper                 |\n| bsm  | bottom soldermask             |\n| bss  | bottom silkscreen             |\n| bsp  | bottom solderpaste            |\n| icu  | inner copper                  |\n| out  | board outline                 |\n| drl  | drill hits                    |\n\n#### checking if a layer type is valid\n\nYou can check if any given string is a valid layer type with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst isValidType = whatsThatGerber.isValidType\n\nconst type1 = 'tsm'\nconst type2 = 'hello'\n\nconsole.log(isValidType(type1)) // true\nconsole.log(isValidType(type2)) // false\n```\n\n### full name locales\n\nThe full name method takes a locale string as its second parameter, which defaults to 'en':\n\n```js\nconst fullName = whatsThatGerber.getFullName('tcu', 'en')\n```\n\nCurrently, no other locales are supported (because I don't know any!); contributions are greatly appreciated. If the type or locale is unrecognized, the result will be an empty string. Locale additions will be considered patch-level upgrades.\n\n### supported cad programs\n\nWe should be able to identify files output by the following programs:\n\n* KiCad\n* Eagle\n* Altium\n* Orcad\n* gEDA PCB\n\n## contributing\n\nPlease read the [Contributing Section](../README.md#contributing) of the main README for development setup instructions.\n\nIf you're adding or modifying a filetype matcher, please remember to add or modify an example filename in [`@tracespace/fixtures/gerber-filenames.json`](../fixtures/gerber-filenames.json) to ensure your change is tested.\n","readmeFilename":"README.md","_id":"whats-that-gerber@4.0.0-next.9","_npmVersion":"6.1.0","_nodeVersion":"10.4.1","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"integrity":"sha512-fowpfFfdMCMb/f/nXRPll9xMrMV2+6qJT9IZFdZOURTQ3DebW9TkrimK5kRyvJSLbsQTgZc05dL5qhLeC20jiw==","shasum":"f9c7bb46b217c99816de494cec69130bb3a279b9","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.0.0-next.9.tgz","fileCount":5,"unpackedSize":10087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKYCvCRA9TVsSAnZWagAAL8wP/ja8K1mOXFweWP+0C3Di\n1BLtiM/TxOqucSWF6/qmviWTquTYNsNRaxbDxUHBBMzNMn4gFU+nNmxSdGsS\n/c6S1xTLjETihBSZetZr6O5LUyH0x0Kqtby6hX9Jy031vJKQdAxNSnZHq0i1\nZpeJacUl0HaomaYN1R/VcAcVikq8E/pDZJPaOOttsiDeCA9NRfd/VDXG04pv\nj8TgulxXuCZPkCh6Zr79UdZFM4jU3zqEqd49tf1eQqN+fvvAa0n9392TNclW\nj53cqrC8LuoxgVAV1F+I6OwEVH52DZkR/ESaLYipnqeRRW+CNqzehtL2BDQ6\naxaRP6OWLCifquaImLVNwjiBvX43QcweAzcC8WwMWi4sa6McUMQmPA1NwjaB\nosVrJequUd/JR+e12lovV+mDPH5eBlRgcXnoRcXpLL6ZNLhehFTbleziND9o\nceT8Lz8tsqNr4lbJTdEiB4FceET9YJM7xthwRsW+fgQ3xj+l85bCvLDdrDLG\nlB77Jq3wqNw9BXeqvzC9cacEZxE5jthg0V1Zw91Xuq3KyAoJRjusPhefMfxG\nxFagkIW+iHNQXSwxtnp+XuIe6RDfZVPwKw0hPVCsW/RNpv0Z2ZnOVYtCChTU\ncO0laxNTsBnFsr5ASJazebEE5koSXPWhCc0y8sjGY+yvMbUOPq30obAZ+w86\nYzMn\r\n=n52F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDzSQ1WD9C0rsXglQEafufW/SChHYdwf73xHeiWw9Kd9AiEA2R5/KBNZXqgYYXDvsaw3YXa32KflMFzekSxitOb1om8="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.0.0-next.9_1529446574610_0.30806281734650787"},"_hasShrinkwrap":false},"4.0.0-next.10":{"name":"whats-that-gerber","version":"4.0.0-next.10","description":"Identify Gerber and drill files by filenamee","main":"index.js","repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","readme":"# what's that gerber?\n\n[![version][npm-badge]][npm]\n\n> Identify Gerber and drill files by filename\n\nHave you got a bunch of Gerber files lying around without any idea what they're for? We've all been there. `whats-that-gerber` is here to help.\n\nPart of the [tracespace][] collection of PCB visualization tools.\n\n[tracespace]: https://github.com/tracespace/tracespace\n[npm]: https://www.npmjs.com/package/whats-that-gerber\n[npm-badge]: https://img.shields.io/npm/v/whats-that-gerber.svg?style=flat-square&maxAge=3600\n\n## install\n\n```shell\nnpm install --save whats-that-gerber\n# or\nyarn add whats-that-gerber\n```\n\n## usage\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\n\nconst filename = 'my-board-F_Cu.gbr'\nconst layerType = whatsThatGerber(filename) // 'tcu'\nconst layerName = whatsThatGerber.getFullName(layerType) // 'top copper'\n```\n\n### layer types and names\n\nThere are 12 available layer types. You can get an array of all types with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst allLayerTypes = whatsThatGerber.getAllTypes() // ['drw', 'tcu', ...]\n```\n\n| type | full name (en)                |\n| ---- | ----------------------------- |\n| drw  | gerber drawing (unknown type) |\n| tcu  | top copper                    |\n| tsm  | top soldermask                |\n| tss  | top silkscreen                |\n| tsp  | top solderpaste               |\n| bcu  | bottom copper                 |\n| bsm  | bottom soldermask             |\n| bss  | bottom silkscreen             |\n| bsp  | bottom solderpaste            |\n| icu  | inner copper                  |\n| out  | board outline                 |\n| drl  | drill hits                    |\n\n#### checking if a layer type is valid\n\nYou can check if any given string is a valid layer type with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst isValidType = whatsThatGerber.isValidType\n\nconst type1 = 'tsm'\nconst type2 = 'hello'\n\nconsole.log(isValidType(type1)) // true\nconsole.log(isValidType(type2)) // false\n```\n\n### full name locales\n\nThe full name method takes a locale string as its second parameter, which defaults to 'en':\n\n```js\nconst fullName = whatsThatGerber.getFullName('tcu', 'en')\n```\n\nCurrently, no other locales are supported (because I don't know any!); contributions are greatly appreciated. If the type or locale is unrecognized, the result will be an empty string. Locale additions will be considered patch-level upgrades.\n\n### supported cad programs\n\nWe should be able to identify files output by the following programs:\n\n* KiCad\n* Eagle\n* Altium\n* Orcad\n* gEDA PCB\n\n## contributing\n\nPlease read the [Contributing Section](../README.md#contributing) of the main README for development setup instructions.\n\nIf you're adding or modifying a filetype matcher, please remember to add or modify an example filename in [`@tracespace/fixtures/gerber-filenames.json`](../fixtures/gerber-filenames.json) to ensure your change is tested.\n","readmeFilename":"README.md","_id":"whats-that-gerber@4.0.0-next.10","_npmVersion":"6.1.0","_nodeVersion":"10.5.0","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"integrity":"sha512-v1kWgRXPkTasg72Yn1htFjH5V1TnYk9GJUkDuqyhaVG9mEVpPGwmsue3cT6/M1EBhz1RwoB2lgOIQj0eA34tcw==","shasum":"1695fb18544cdcff0a90386ec18b7be37ea42170","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.0.0-next.10.tgz","fileCount":5,"unpackedSize":10514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbM4t3CRA9TVsSAnZWagAAI4QP/0IrMTFQX9t+/tUUG+Q8\nezI0+leLa8/0HN9wx5MYWfcMjWF59eu5j6lRf8rS3pZXKqGs4WPF4vXBqpr3\nEciaw47wJM/3YKGyqu2/822RTnTbIsg8lPJToNn2uw6YIO03RFOzdO82RBzm\nkX5rbJF8/BusjJas1Ruc0enUatsDOkSXvsP5psTbF19oIVORiM0amga8dQd9\n3c+WsAIHb0MVxg7n/npQlzO5iY8+QwVfBzqiehQVydXU03C69Uyep+0gb6Gk\nJPJ2r4gIYR2AvAp6tqSlt4JsK2GvmLaZd244vTAZIvlQ3rDayyEwhzsXzcMt\ni5ITC3Mdo1jX6y6B4H+4VY44FRC1jSTIsz60nyPxzLumzHbIjrhK+6ftaqb1\nOOowcKJE6gJtq+IIScDEXiC9GxAgoBNx7PkU1U8PQX2lVXru8a1/tNbHrjTN\n6FQ7/bfmKK1KRN5NCfbW9l62zBHa4ZId1J9jg/eE08lLQuOBXAWm7d9TXh9V\nIzXvDnFbABUItjKRCI8f2MXKns15zzNKNEU0k361uxk7YrSweOvR5Kg0E93H\nBjf9F/BpcdYyH7fFI75Ix2BTvCdN0+F114hh52rMImSSALYX5S+XwNntG2YK\nlfDZ6VywtWSY93kV6dwihKDmAVTsM2X4v/bVr0HHEhKPVnteDBAIQAzEwGig\nAxwZ\r\n=UTqE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID3uAMTkGUviMDwd13CCY9u0aTScrWfbAdoNSL+NjwQjAiEA3DPdB4qRasvpeLklkLj6og8HyVeimEq3bb1KJ8dfsyQ="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.0.0-next.10_1530104695272_0.21092155034032545"},"_hasShrinkwrap":false},"4.0.0-next.12":{"name":"whats-that-gerber","version":"4.0.0-next.12","description":"Identify Gerber and drill files by filenamee","main":"index.js","repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","readme":"# what's that gerber?\n\n[![version][npm-badge]][npm]\n\n> Identify Gerber and drill files by filename\n\nHave you got a bunch of Gerber files lying around without any idea what they're for? We've all been there. `whats-that-gerber` is here to help.\n\nPart of the [tracespace][] collection of PCB visualization tools.\n\n[tracespace]: https://github.com/tracespace/tracespace\n[npm]: https://www.npmjs.com/package/whats-that-gerber\n[npm-badge]: https://img.shields.io/npm/v/whats-that-gerber.svg?style=flat-square&maxAge=3600\n\n## install\n\n```shell\nnpm install --save whats-that-gerber\n# or\nyarn add whats-that-gerber\n```\n\n## usage\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\n\nconst filename = 'my-board-F_Cu.gbr'\nconst layerType = whatsThatGerber(filename) // 'tcu'\nconst layerName = whatsThatGerber.getFullName(layerType) // 'top copper'\n```\n\n### layer types and names\n\nThere are 12 available layer types. You can get an array of all types with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst allLayerTypes = whatsThatGerber.getAllTypes() // ['drw', 'tcu', ...]\n```\n\n| type | full name (en)                |\n| ---- | ----------------------------- |\n| drw  | gerber drawing (unknown type) |\n| tcu  | top copper                    |\n| tsm  | top soldermask                |\n| tss  | top silkscreen                |\n| tsp  | top solderpaste               |\n| bcu  | bottom copper                 |\n| bsm  | bottom soldermask             |\n| bss  | bottom silkscreen             |\n| bsp  | bottom solderpaste            |\n| icu  | inner copper                  |\n| out  | board outline                 |\n| drl  | drill hits                    |\n\n#### checking if a layer type is valid\n\nYou can check if any given string is a valid layer type with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst isValidType = whatsThatGerber.isValidType\n\nconst type1 = 'tsm'\nconst type2 = 'hello'\n\nconsole.log(isValidType(type1)) // true\nconsole.log(isValidType(type2)) // false\n```\n\n### full name locales\n\nThe full name method takes a locale string as its second parameter, which defaults to 'en':\n\n```js\nconst fullName = whatsThatGerber.getFullName('tcu', 'en')\n```\n\nCurrently, no other locales are supported (because I don't know any!); contributions are greatly appreciated. If the type or locale is unrecognized, the result will be an empty string. Locale additions will be considered patch-level upgrades.\n\n### supported cad programs\n\nWe should be able to identify files output by the following programs:\n\n* KiCad\n* Eagle\n* Altium\n* Orcad\n* gEDA PCB\n\n## contributing\n\nPlease read the [Contributing Section](../README.md#contributing) of the main README for development setup instructions.\n\nIf you're adding or modifying a filetype matcher, please remember to add or modify an example filename in [`@tracespace/fixtures/gerber-filenames.json`](../fixtures/gerber-filenames.json) to ensure your change is tested.\n","readmeFilename":"README.md","_id":"whats-that-gerber@4.0.0-next.12","_npmVersion":"6.1.0","_nodeVersion":"10.6.0","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"integrity":"sha512-RCLkX3D4gIc2x1APCbzURzJhJItOXShiOZCag12Ju3IgQuXz+e6DxC0ex9llGC73LJYH37v/SLW/v7iugb11gQ==","shasum":"1cada3f518236fdab95b0739d1f3038ab25eed6a","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.0.0-next.12.tgz","fileCount":5,"unpackedSize":11450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbTniHCRA9TVsSAnZWagAAVRAP/1pCRWhGk6YIbA29B6NV\n/c2NHtgWQTwwWQf0nAPDMwjNSnipF4oLyxJKNdDVpzUf3O+CqmmXM+mrjoS/\nvXbhtl2H+IJ4l2cBj4dWOJeqjvieia3tZVE9hrmEALGKorVbQHUWoIzltC5q\nImsFlkCC4pq52m7StgY6pqzYm0A6QqLJUKrgBTi6+t66ElSUCWTGY30hbmcR\nAYs31poq4Qhw1Ll3+U8NWdIKWyKVll/3vIOPKwULvnn4GJoDGCBzZtI7twDQ\nWjRFAcrSQJPKZCHUtEkXoAsjHexke2NEAqOHqXxkD8LWBZmuAlXNlOOqlUJq\nVM8zWrJ7p/d1vFAckWJ3Ef5ndhusFpmuVKo9lEL4FFLTPoTV0U+l1udam/DP\nTdH3g+x+YndE4XiZvbb/IFi92fXcsy584lwrd1o1U1pa0jUyDWJyAiuXL15e\ne0h5EYHuIZDxErmQWDvwFqeYsHF7Nb3cQ7qQAuqwQgJYXwEwTD5S87OJuKZ2\nss0LiN1s/7VtKKeOgNw5Mc9yxOprO5wu4wGZWdU/A7DW2ql/TmClGtQPg4gA\nQm3958nK1843K6eedi2PsMJeWbVDCn+QqPNcf+yqOGK5MtmN2OuTdJV7m763\nuvB9sHfYWd4QkvCzzbu6lySsdObUm/NO5x9ZPKpIAasapHB4czWS1iBT0RDI\nWe9s\r\n=k0X1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDKuzGhLVybC2Zh6zFxiGzCTkKv1eDe1IZ1ujumRxhEDAiAF2ipfIYg3de7ABwoJD5sOBSA0KsgtnQjexwsKpL+4oA=="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.0.0-next.12_1531869319775_0.9181489894182875"},"_hasShrinkwrap":false},"4.0.0-next.13":{"name":"whats-that-gerber","version":"4.0.0-next.13","description":"Identify Gerber and drill files by filenamee","main":"index.js","repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","readme":"# what's that gerber?\n\n[![version][npm-badge]][npm]\n\n> Identify Gerber and drill files by filename\n\nHave you got a bunch of Gerber files lying around without any idea what they're for? We've all been there. `whats-that-gerber` is here to help.\n\nPart of the [tracespace][] collection of PCB visualization tools.\n\n[tracespace]: https://github.com/tracespace/tracespace\n[npm]: https://www.npmjs.com/package/whats-that-gerber\n[npm-badge]: https://img.shields.io/npm/v/whats-that-gerber.svg?style=flat-square&maxAge=3600\n\n## install\n\n```shell\nnpm install --save whats-that-gerber\n# or\nyarn add whats-that-gerber\n```\n\n## usage\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\n\nconst filename = 'my-board-F_Cu.gbr'\nconst layerType = whatsThatGerber(filename) // 'tcu'\nconst layerName = whatsThatGerber.getFullName(layerType) // 'top copper'\n```\n\n### layer types and names\n\nThere are 12 available layer types. You can get an array of all types with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst allLayerTypes = whatsThatGerber.getAllTypes() // ['drw', 'tcu', ...]\n```\n\n| type | full name (en)                |\n| ---- | ----------------------------- |\n| drw  | gerber drawing (unknown type) |\n| tcu  | top copper                    |\n| tsm  | top soldermask                |\n| tss  | top silkscreen                |\n| tsp  | top solderpaste               |\n| bcu  | bottom copper                 |\n| bsm  | bottom soldermask             |\n| bss  | bottom silkscreen             |\n| bsp  | bottom solderpaste            |\n| icu  | inner copper                  |\n| out  | board outline                 |\n| drl  | drill hits                    |\n\n#### checking if a layer type is valid\n\nYou can check if any given string is a valid layer type with:\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\nconst isValidType = whatsThatGerber.isValidType\n\nconst type1 = 'tsm'\nconst type2 = 'hello'\n\nconsole.log(isValidType(type1)) // true\nconsole.log(isValidType(type2)) // false\n```\n\n### full name locales\n\nThe full name method takes a locale string as its second parameter, which defaults to 'en':\n\n```js\nconst fullName = whatsThatGerber.getFullName('tcu', 'en')\n```\n\nCurrently, no other locales are supported (because I don't know any!); contributions are greatly appreciated. If the type or locale is unrecognized, the result will be an empty string. Locale additions will be considered patch-level upgrades.\n\n### supported cad programs\n\nWe should be able to identify files output by the following programs:\n\n* KiCad\n* Eagle\n* Altium\n* Orcad\n* gEDA PCB\n* DipTrace\n\n## contributing\n\nPlease read the [Contributing Section](../README.md#contributing) of the main README for development setup instructions.\n\nIf you're adding or modifying a filetype matcher, please remember to add or modify an example filename in [`@tracespace/fixtures/gerber-filenames.json`](../fixtures/gerber-filenames.json) to ensure your change is tested.\n","readmeFilename":"README.md","_id":"whats-that-gerber@4.0.0-next.13","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"integrity":"sha512-KZ9KR/VdBdM1YGJRfLPFnGZ4QG+0kjdKNuM/qFTPZZzwL+lq3TRco9Q3UrMHfCZ7pJBAB1W2FEPh1gR1LEWOPQ==","shasum":"1bd76056b2450d13c2000de94950c300b2b3e4eb","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.0.0-next.13.tgz","fileCount":6,"unpackedSize":12881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmRvxCRA9TVsSAnZWagAAmKsP/jxJH1yTXHvWxo1WvTOZ\njfERem4Yf988ojY0TICMkJPxFWQlVibIup4zJKfVu4g0jnvZRLLKUiB6MQDr\nbKnmPOpNLwzxOlO5ZVPSWxtCp92L0GjOX9hCw4Cz3ONKPNCvW+wwNGEyaWHx\n/1JI44C6VMGKBHNsGIvmSSq2Phtu0OsOV0tJP7WWxFtR78RftmoeJRZOPqqV\nFy4dLvNT/KUrx++yS3NCl4CphST/3TjGzApWopJt2wgoFHM/LWYJ3D0e2D+e\ntUIOpRiQ/ci6v0XWcZI5w6kRjwsUZSEH2Gh/j8e4SogfWxCbOut7C/Wehbu3\nftuV9E8nGH18bcf3k6gYWWnJoehTKpYwFW1IaTMbcEujS0BEQSo306ez396f\ndN6Oa5xd81cVy4/4BB3QZS2yICzisyIdgIUSR8ZECn3UkZrCaAuhQMlt9KAW\niW7JTJCRjvWyYiWMcomA9GO/X3H/u7iGXASaTq9iB/Qtsr9CRZAQ0tRIaHlT\nXHNTdw69Nwe480TPze4zGl+fNHHLVJLuiDESx+MFG+kRq9q9GAnjBaIKybEd\nLVeT54bAIYWvIBP9CgQyAPU9QWYbWfNmkYyF88S0iHS9WZNrOZQO9wLm7hei\nrSXjtCFcCjH1ujjoQQp/CBNRvRp3MDUmVau6U7ZNOnKMtcsDAdAPKyIwpiZj\nGA5H\r\n=RLI+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICdfBzGSmEwQfq8W15B49Qsr3QFYgSpSxqd5WcjVPXO+AiBrQcZeb7QcsgRlQt1UPi0xG2ULSP/En1+mq4NtCLiHKg=="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.0.0-next.13_1536760816807_0.5704610936667709"},"_hasShrinkwrap":false},"4.0.0-next.15":{"name":"whats-that-gerber","version":"4.0.0-next.15","description":"Identify Gerber and drill files by filenamee","main":"index.js","repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","dependencies":{"xtend":"^4.0.1"},"gitHead":"03aaf1f3d3c8432e77dac581dcbde15068da5e55","_resolved":"","_integrity":"","_from":"file:whats-that-gerber-4.0.0-next.15.tgz","readme":"# what's that gerber?\n\n[![latest][whats-that-gerber-latest-badge]][npm]\n[![next][whats-that-gerber-next-badge]][npm-next]\n[![david][whats-that-gerber-david-badge]][david]\n\n> Identify Gerber and drill files by filename\n\nHave you got a bunch of Gerber files lying around without any idea what they're for? We've all been there. `whats-that-gerber` is here to help.\n\nPart of the [tracespace][] collection of PCB visualization tools.\n\n[tracespace]: https://github.com/tracespace/tracespace\n[npm]: https://www.npmjs.com/package/whats-that-gerber\n[npm-next]: https://www.npmjs.com/package/whats-that-gerber/v/next\n[david]: https://david-dm.org/tracespace/tracespace?path=packages/whats-that-gerber\n[whats-that-gerber-latest-badge]: https://flat.badgen.net/npm/v/whats-that-gerber\n[whats-that-gerber-next-badge]: https://flat.badgen.net/npm/v/whats-that-gerber/next\n[whats-that-gerber-david-badge]: https://flat.badgen.net/david/dep/tracespace/tracespace/packages/whats-that-gerber\n\n## install\n\n```shell\nnpm install --save whats-that-gerber\n# or\nyarn add whats-that-gerber\n```\n\n## usage\n\nPass `whatsThatGerber` an array of filenames from a PCB, and it will give you back an object keyed by filename with the best guess it can make for the type and side of each file. If both `side` and `type` are `null`, the filename cannot be identified as a Gerber / drill file.\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\n\nconst filenames = ['my-board-F_Cu.gbr', 'my-board-B_Cu.gbr', 'foo.bar']\nconst typeByFilename = whatsThatGerber(filenames)\n// {\n//   'my-board-F_Cu.gbr': {type: 'copper', side: 'top'},\n//   'my-board-B_Cu.gbr': {type: 'copper', side: 'bottom'},\n//   'my-board-notes.gbr': {type: 'drawing', side: null},\n//   'foo.bar': {type: null, side: null},\n// }\n```\n\n### layer types and names\n\nThere are 12 available layer types, were a type is an object of the format:\n\n```js\n{\n  side: 'top' | 'bottom' | 'inner' | 'all' | null,\n  type: 'copper' | 'soldermask' | 'silkscreen' | 'solderpaste' | 'drill' | 'outline' | 'drawing' | null,\n}\n```\n\nYou can get an array of all types with:\n\n```js\nconst {getAllLayers} = require('whats-that-gerber')\nconst allLayers = getAllLayers()\n```\n\n| side       | type            |\n| ---------- | --------------- |\n| `'top'`    | `'copper'`      |\n| `'top'`    | `'soldermask'`  |\n| `'top'`    | `'silkscreen'`  |\n| `'top'`    | `'solderpaste'` |\n| `'bottom'` | `'copper'`      |\n| `'bottom'` | `'soldermask'`  |\n| `'bottom'` | `'silkscreen'`  |\n| `'bottom'` | `'solderpaste'` |\n| `'inner'`  | `'copper'`      |\n| `'all'`    | `'outline'`     |\n| `'all'`    | `'drill'`       |\n| `null`     | `'drawing'`     |\n\n#### constants\n\nSide and type constants are exported for your usage:\n\n```js\nconst {\n  // layer types\n  TYPE_COPPER, // 'copper'\n  TYPE_SOLDERMASK, // 'soldermask'\n  TYPE_SILKSCREEN, // 'silkscreen'\n  TYPE_SOLDERPASTE, // 'solderpaste'\n  TYPE_DRILL, // 'drill'\n  TYPE_OUTLINE, // 'outline'\n  TYPE_DRAWING, // 'drawing'\n\n  // board sides\n  SIDE_TOP, // 'top'\n  SIDE_BOTTOM, // 'bottom'\n  SIDE_INNER, // 'inner'\n  SIDE_ALL, // 'all'\n} = require('whats-that-gerber')\n```\n\n#### checking if a layer type is valid\n\nYou can check if any given string is a valid layer type with:\n\n```js\nconst {validate} = require('whats-that-gerber')\n\nconst type1 = {side: 'top', type: 'copper'}\nconst type2 = {side: 'foo', type: 'silkscreen'}\nconst type3 = {side: 'bottom', type: 'bar'}\n\nconsole.log(validate(type1)) // {valid: true, side: 'top', type: 'copper'}\nconsole.log(validate(type2)) // {valid: false, side: null, type: 'silkscreen'}\nconsole.log(validate(type3)) // {valid: false, side: 'bottom', type: null}\n```\n\n### supported cad programs\n\nWe should be able to identify files output by the following programs:\n\n- KiCad\n- Eagle\n- Altium\n- Orcad\n- gEDA PCB\n- DipTrace\n\n## contributing\n\nPlease read the [Contributing Section](../README.md#contributing) of the main README for development setup instructions.\n\nIf you're adding or modifying a filetype matcher, please remember to add or modify an example filename in [`@tracespace/fixtures/gerber-filenames.json`](../fixtures/gerber-filenames.json) to ensure your change is tested.\n","readmeFilename":"README.md","_id":"whats-that-gerber@4.0.0-next.15","_npmVersion":"6.4.1","_nodeVersion":"11.1.0","_npmUser":{"name":"mcous","email":"mike@cousins.io"},"dist":{"integrity":"sha512-1QbyZaQNNokFwOkFx7M4kSXgOeGv0tPnI9HsKasQE72hCG4P3YEG07dxn5ckhqUEta+cyuCzNwD5YNXuseAgPw==","shasum":"7276d82596ed7aa05f87642d3bdfcc9b7176ab18","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.0.0-next.15.tgz","fileCount":12,"unpackedSize":21542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6izFCRA9TVsSAnZWagAAWVEP/RsQsnIgwjc2avX/0+q1\nSNgiEzcO7ELH1rs4n/KQpMuENTZujlleLKdSCk8F90EHDNO1e4sxKZUIKvGs\nSFK1GHKsWrKeHglM/f+xDLmhMato4NBqMiJZix3vEFEYEOqnYifsByoOV7/8\ngbHDCQo8pQ0cQNEejIYBLqjNDMKzbeNi0Mtgv2RjQ/50V2b9spuaZGNKOSyh\nk+nOAo5LftBtPuycPvlT+pg2UPjqaR6nMCWViEqllX5om2zfhN56diWhkHHb\nRcFh5JXk+voxncSv95PKgKL1SbEbG0524xE6lR9FLWKyxONTV6mG+FSzO7Id\nAPz9rkgAD14SzrgKRsnI3b7JeblmvCUgHcPi4sIPQVBbhxBMvMWJWZ++CMps\nZUtrFeaXVQQ7P9iPRoibRL5j6Yq2fOS3CJWjESPtT0GzdvHNwX6aXIGYe4CG\nmDXNDva4q0rpMyCIRAx6NEhaa/vmo/tMv7sg7D7+24946uuACPQB1PZkL4AI\nxqpdqoNfS87r6f6VZEQAGpeZnXqZAA0J9pp6thpl8nOlm3XHpKnEA49k+zCj\nDhVQ2Jn28C0P/O7+vrtCa/JUU6iBuoqVImTgvn5d0mLrl+EZWe0cMxzDcRv8\ns0/zl7QvsSwEZuXEbfOSH6QZglUPNmUKnI47QBTX8QI9eZeJVSzZt0UsXz3F\ny0bz\r\n=CGyk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFT6Uuyzpdo8VeNzWu12SL/SwDjTd8iej5Jgzrq/mb83AiBPO993qmqG6J0WZcNiUaMXYovVBcuO8cNrLrTnUApV/g=="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.0.0-next.15_1542073540857_0.9221207765149717"},"_hasShrinkwrap":false},"4.0.0-next.19":{"name":"whats-that-gerber","version":"4.0.0-next.19","description":"Identify Gerber and drill files by filenamee","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","dependencies":{"xtend":"^4.0.1"},"gitHead":"b8b15ae67426dea26e71acba9d4e93e95ef45392","readme":"# what's that gerber?\n\n[![latest][whats-that-gerber-latest-badge]][npm]\n[![next][whats-that-gerber-next-badge]][npm-next]\n[![david][whats-that-gerber-david-badge]][david]\n\n> Identify Gerber and drill files by filename\n\nHave you got a bunch of Gerber files lying around without any idea what they're for? We've all been there. `whats-that-gerber` is here to help.\n\nPart of the [tracespace][] collection of PCB visualization tools.\n\n[tracespace]: https://github.com/tracespace/tracespace\n[npm]: https://www.npmjs.com/package/whats-that-gerber\n[npm-next]: https://www.npmjs.com/package/whats-that-gerber/v/next\n[david]: https://david-dm.org/tracespace/tracespace?path=packages/whats-that-gerber\n[whats-that-gerber-latest-badge]: https://flat.badgen.net/npm/v/whats-that-gerber\n[whats-that-gerber-next-badge]: https://flat.badgen.net/npm/v/whats-that-gerber/next\n[whats-that-gerber-david-badge]: https://flat.badgen.net/david/dep/tracespace/tracespace/packages/whats-that-gerber\n\n## install\n\n```shell\nnpm install --save whats-that-gerber\n# or\nyarn add whats-that-gerber\n```\n\n## usage\n\nPass `whatsThatGerber` an array of filenames from a PCB, and it will give you back an object keyed by filename with the best guess it can make for the type and side of each file. If both `side` and `type` are `null`, the filename cannot be identified as a Gerber / drill file.\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\n\nconst filenames = ['my-board-F_Cu.gbr', 'my-board-B_Cu.gbr', 'foo.bar']\nconst typeByFilename = whatsThatGerber(filenames)\n// {\n//   'my-board-F_Cu.gbr': {type: 'copper', side: 'top'},\n//   'my-board-B_Cu.gbr': {type: 'copper', side: 'bottom'},\n//   'my-board-notes.gbr': {type: 'drawing', side: null},\n//   'foo.bar': {type: null, side: null},\n// }\n```\n\n### layer types and names\n\nThere are 12 available layer types, were a type is an object of the format:\n\n```js\n{\n  side: 'top' | 'bottom' | 'inner' | 'all' | null,\n  type: 'copper' | 'soldermask' | 'silkscreen' | 'solderpaste' | 'drill' | 'outline' | 'drawing' | null,\n}\n```\n\nYou can get an array of all types with:\n\n```js\nconst {getAllLayers} = require('whats-that-gerber')\nconst allLayers = getAllLayers()\n```\n\n| side       | type            |\n| ---------- | --------------- |\n| `'top'`    | `'copper'`      |\n| `'top'`    | `'soldermask'`  |\n| `'top'`    | `'silkscreen'`  |\n| `'top'`    | `'solderpaste'` |\n| `'bottom'` | `'copper'`      |\n| `'bottom'` | `'soldermask'`  |\n| `'bottom'` | `'silkscreen'`  |\n| `'bottom'` | `'solderpaste'` |\n| `'inner'`  | `'copper'`      |\n| `'all'`    | `'outline'`     |\n| `'all'`    | `'drill'`       |\n| `null`     | `'drawing'`     |\n\n#### constants\n\nSide and type constants are exported for your usage:\n\n```js\nconst {\n  // layer types\n  TYPE_COPPER, // 'copper'\n  TYPE_SOLDERMASK, // 'soldermask'\n  TYPE_SILKSCREEN, // 'silkscreen'\n  TYPE_SOLDERPASTE, // 'solderpaste'\n  TYPE_DRILL, // 'drill'\n  TYPE_OUTLINE, // 'outline'\n  TYPE_DRAWING, // 'drawing'\n\n  // board sides\n  SIDE_TOP, // 'top'\n  SIDE_BOTTOM, // 'bottom'\n  SIDE_INNER, // 'inner'\n  SIDE_ALL, // 'all'\n} = require('whats-that-gerber')\n```\n\n#### checking if a layer type is valid\n\nYou can check if any given string is a valid layer type with:\n\n```js\nconst {validate} = require('whats-that-gerber')\n\nconst type1 = {side: 'top', type: 'copper'}\nconst type2 = {side: 'foo', type: 'silkscreen'}\nconst type3 = {side: 'bottom', type: 'bar'}\n\nconsole.log(validate(type1)) // {valid: true, side: 'top', type: 'copper'}\nconsole.log(validate(type2)) // {valid: false, side: null, type: 'silkscreen'}\nconsole.log(validate(type3)) // {valid: false, side: 'bottom', type: null}\n```\n\n### supported cad programs\n\nWe should be able to identify files output by the following programs:\n\n- KiCad\n- Eagle\n- Altium\n- Orcad\n- gEDA PCB\n- DipTrace\n\n## contributing\n\nPlease read the [Contributing Section](../README.md#contributing) of the main README for development setup instructions.\n\nIf you're adding or modifying a filetype matcher, please remember to add or modify an example filename in [`@tracespace/fixtures/gerber-filenames.json`](../fixtures/gerber-filenames.json) to ensure your change is tested.\n","readmeFilename":"README.md","_id":"whats-that-gerber@4.0.0-next.19","_nodeVersion":"8.15.1","_npmVersion":"lerna/3.13.0/node@v8.15.1+x64 (linux)","dist":{"integrity":"sha512-NCde9BC9Yy5KgkvYYl1v8LoGpVmZUgIRetQFg+JEJJhm+kTO2e6VR1n0AnnTAS2Mn2FOTPe9Xzr0xveLXDldzw==","shasum":"271330c4a9a5703dd868bd3f28375461cdd3852e","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.0.0-next.19.tgz","fileCount":13,"unpackedSize":23203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchBCtCRA9TVsSAnZWagAASPIP/AsYte69Wy3Z2lrEVeWr\nvlbj9li8l+pTJR+7CAqdL05H49bxccpWYEXQcQZSHYNaod5sG5M3a27SNkAJ\nFW5mNOL6Dxad3KdW7ghHDNVIBnbqTIMhJlUwn3PdCCkOs0KNqftRM1CnUG9s\nBwV5bPiNaqkGeZIRYhjD7U88yrV29iIresYzVVC2KbsU1anKJLOnd3lpCYfm\nZev3uVghN9RjzO+jQDoPyXC8pqWXLJ9ja1TRu0x/d2dBombwEEQuFbSpuwu7\nQZXXgQG7Tiv+eHUZ09/JCoY1GbiuGh6Bwiuy4zVcfu3p72D4RDNYxuFkDvG7\nIvFAZvKP/ENk0rHMZR3w9nZ+/EPIAx1+nieZ4r2E9+bcD7Z9Qb+Tt5Q1ye1F\nmreIW/zbMk0FCKrXnnnq0lhK58TRXEUr9wS0IbLV64Pms68bPxZt3zZe/LhU\n6P6bwcXCZvWHXJuFDyWYg12SZvgL2WUGVODHnUnXNqzx+2s0l5EsL8vGlYh/\n5dPyLxrDc8sIAHZW1FNGvOT0n8Dmea2vs4LunPlf46xT6APOvE0evlgvhLqy\nfGvax0k8GOOdNlKKeJEXiBrV3Jre/Dzj+SRQwNIxT9VIRVpoDQpJMgwWbnEW\n+xa0iydqr6fH5tdAeuwHPUe71hutxb6RtGfVUel4CLs7v3+WXBIsVeuBGKZd\nKvAe\r\n=JK2Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDbe+ZZVnGIftA485vvDH9i1stt90AxkK6Hi3dcKksV0AiAA+kpAxiCXCjelkq5nzsBBaHB988SoxcKS5DpktgsNBw=="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"_npmUser":{"name":"mcous","email":"mike@cousins.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.0.0-next.19_1552158892549_0.2354876091454523"},"_hasShrinkwrap":false},"4.0.0":{"name":"whats-that-gerber","version":"4.0.0","description":"Identify Gerber and drill files by filenamee","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","dependencies":{"xtend":"^4.0.1"},"gitHead":"83cb1faa86ba7cd13e06c1ac04bd88f6c8ec3cc6","_id":"whats-that-gerber@4.0.0","_nodeVersion":"8.15.1","_npmVersion":"lerna/3.13.0/node@v8.15.1+x64 (linux)","dist":{"integrity":"sha512-cPKHqICOfyJ22aNyt3gK8pOKNjNC4W1gPODf+Fgs81edsJivgXeSyQ/Esg1hb4sApyx+lADRkHZoCVOjVm396g==","shasum":"c2ce4d1c852c439dbf82e8abf64851112c433b68","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.0.0.tgz","fileCount":13,"unpackedSize":23356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchBmsCRA9TVsSAnZWagAAsxwP/0UElAZSJHjBIxhCCOs7\n/qXfOARRKgnNZ1/VHqwXtYXMRDaDCOM692TX3aVlGpf2SOj0HGoAxld7IpjQ\nEmjG7ZkjT+BsdtI1vClvdMghwdSLVDdIMzh85ujx8Qc0k+iEiOCd9EpFfb/U\n6PaDFYyo6XJA8sZtNXYmUWc9H40kzzrgW3yGWzIC9N1a17Fqj0SlPnSmiPJH\nOSwpl8/fx5H77ZEp15YuwUCzQRMjKxa5qodLpz4FbzJ45sZC3pdElY8Nsqga\nkRy7qt42GXRCleWNHa1SUivxtFtb4N4aPwoJwfVxZTj3MDOA8ffoUFffCOGU\nYWgdLr1PVoD6WDJZkUH6PNECvM3XUkSdopXMIlsctviUhmeuKFUiAC8flkFV\n42YrdxcQdJp9qbRxkBVj5IVrWCEG4EU58mOAsZvcKmL7ArkiX9ff1s/vJZwf\nAl96V240EEUday+zXg3Z4ONebgXuc6bkiKi83WYP+gFmLer8hp5SFtlTBzBO\nTB3GeEgwdZH6A11xLgD74cjWgUpgktB9K314X1ybBj/q29VHE87OleFN7gSr\nDSs7n8XncWyrGrVk/3ULPZd6r0YESTa3aVEEGYOocQ9eMqnBaAfkVHDj16z8\nWJGIycso91RfFBe6lhYWQ6ynEBhgySiNotTnklkmBkohMEPU90FdQwkH/5bT\nXfBp\r\n=nE8P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkYou1Xn9/g8+mFinFBaNGUdcdY4S/t7X0buk3a2alDAiEA8wVdYHd0HOeRoQecxFwR17ylDviqkZaSIIZscoUAGuY="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"_npmUser":{"name":"mcous","email":"mike@cousins.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.0.0_1552161195999_0.7059842498462805"},"_hasShrinkwrap":false},"4.0.1":{"name":"whats-that-gerber","version":"4.0.1","description":"Identify Gerber and drill files by filenamee","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","dependencies":{"xtend":"^4.0.1"},"gitHead":"9c01c34ce312de6877d5c502ccb10795202ce4d6","_id":"whats-that-gerber@4.0.1","_nodeVersion":"8.15.1","_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (linux)","dist":{"integrity":"sha512-H8woXoLgFP09P5n/GIANtiDpOPv5bno2ZL2xG+ijIQvrN/6QyCd7Tb6/Hf4hc7ETtcGJNW6EQircG4BVKntr5A==","shasum":"aece63a6871591e7093e606a78b06994e3272e9d","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.0.1.tgz","fileCount":13,"unpackedSize":23778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcldzPCRA9TVsSAnZWagAAePYP/0NfI3lOsvtLIgoEeglV\nPFzPGKSPcgonGKNL+ktP66uuxDTFnIDQ04btFovK+sM1CkC3DeAGLS+QJK5X\nYIim6764x/J+TtiG7JkXyMd2wjPFYibttXsrdFtCwVjRUPHwfbYsHClF3MVH\n/l63BF39DHZgcQewvBs+N7bb7yLx/fNql0YGBQ9IqwAj4SpM4q6u4Ao0zTz0\ntgXQBccgEDg/pB/34k6T1DfovYdr86DLQgSMptj2jTk5y+a+1pQUuHP+Mgln\nP315cg5RMZxmOIlkRdLp3A+wkZG5xx5w48x2iDdOA1Tr7+22WHHQCUGU+5eo\nVHjYzRY6XAdsf1A5NBSt0UQYfTqW4tcYgxRgL0lefKttd23IRE0j/Zv5CXxm\nsOxyinAJgrjSZQwmlXldp2gd/Cv8EtpcXfvfqQXhdhObwyrw9G0BvBvDlcG5\nsMXAMzMCeqLsIV4X4++JXhUMyPgql/iskMwnLo6GeGnvGex826D8hie0xoms\nxXn/eCcoI7CDs2MrSVxBnPLN5+GNpT7Bvu9eT6DyYtPCxSvfzZxaMJN/Dr0/\nk0FNyPH65zakpgmwkqkYevxpneqvZkWx57r2x4atnDgjjEcO01maCUiuPY+X\nw02RMtsUKyM5dUXmXuef9tt1w57qf01EXQPyNQahAwDCdeWSjT4hjKgquomi\nhDDF\r\n=t26e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMX5KpGhs4eJ71kMzMyjZLzrQJstnKgqzHC+r0LJkaewIgBr2d1PHjM37jYtqOeeyBk46c38/lIceNKqrxSAr5jHU="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"_npmUser":{"name":"mcous","email":"mike@cousins.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.0.1_1553325262644_0.4892907978328749"},"_hasShrinkwrap":false},"4.0.2":{"name":"whats-that-gerber","version":"4.0.2","description":"Identify Gerber and drill files by filenamee","main":"index.js","types":"index.d.ts","scripts":{"build":"cross-env NODE_ENV=production webpack","serve":"node ../../scripts/serve"},"repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git","directory":"packages/whats-that-gerber"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","dependencies":{"xtend":"^4.0.1"},"gitHead":"e9fab58e3547c0df2662798a7e8f76d38762f154","_id":"whats-that-gerber@4.0.2","_nodeVersion":"8.15.1","_npmVersion":"lerna/3.13.1/node@v8.15.1+x64 (linux)","dist":{"integrity":"sha512-1TS6UANlf5gDdZxMfVDgViaQ/bKb3e31y0bkslSY7FaBULP61CBT3OYcPPKWI+9A7UDkfIy/tke4lSXbfoJRNw==","shasum":"710cedb9685d91669dd775b0540f6b14e36beb2f","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.0.2.tgz","fileCount":17,"unpackedSize":57144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclxUcCRA9TVsSAnZWagAAjiEP/R5cHqpzL1LJEN3++WWz\nWUJTuqEybMTltE09xKwfsS5p/zXQISsozdEMZbq6TeePMPyzZal/Tf6n1Acu\nDB46dOOd1zDpQSpJBcxXpr7ZIYBjKU0ktDW378a8CNHj4XQ6F0htSfmWKFWj\nZR4/RYIcBQysAglAvqNi9H4xVtQ7G/bP+NJxL4gHY65/jRszibr4p/JbcBMt\nsCd777HRU0gw95cUFsBoEVcXuxGXgYVOlO0y7cT0Jb6m9fddIhrz9Y23vqKG\nlTcW89U0vlBnxb2n+/gnslqqd6747OKAqO6Tm0C0HyUQjl6wtSsUtDPHEV6U\nlRPweKGysElLbkZqL1vn5aza1I7/fiO62fMrYRe0TTkh6AiCuP6Mg9vZXv+V\nwdIqvPj37ij+48ev1Msl1sCvkaJmNuJ3SUyI1iT2u+b/vVgtj5ctK0QFoDyn\n6pcjSeHofjj9iOuxi5yah3Mh6kLH9Rmv623C8jhUtP0Y6V7Ro6vnr/ViekO4\niO6+BHEMccG3/+nSpQIhVSlGUYpuRcgub9ycwCnks0N+EylrA1KBMm/9ITtl\noqEZMoI8L1PqAoewIZyCC8s1atq2NIeOl+rG5ASl67fos/pUcUF4Qu3yHPJb\nYja/25OH95a0muINsbkEnxUD+lrYWPDK19bLbag9OmQkqJeTGiY2GXJ/MfCo\nXs3K\r\n=YoZe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHo3w1rQ0TvwXqs1RseQ9fvaqIjliBmECCHzXF6jXmvRAiEAukDYfEQnV204SYjqLfhTYuLwWw8mdLZfkEEv9jmMeXE="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"_npmUser":{"name":"mcous","email":"mike@cousins.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.0.2_1553405211467_0.9456522891442716"},"_hasShrinkwrap":false},"4.1.1":{"name":"whats-that-gerber","version":"4.1.1","description":"Identify Gerber and drill files by filenamee","main":"index.js","types":"index.d.ts","scripts":{"build":"cross-env NODE_ENV=production webpack","serve":"node ../../scripts/serve"},"repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git","directory":"packages/whats-that-gerber"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","dependencies":{"xtend":"^4.0.1"},"gitHead":"885b1500a3db61cb493290b82175698d72066ddf","_id":"whats-that-gerber@4.1.1","_nodeVersion":"8.16.0","_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (linux)","dist":{"integrity":"sha512-U277OsUzQM75k4tB7avliONSbDZ/9LBTUk5UYD9nH5nH8SgUpUeJkGxK3Wcap7bFuxAx4dn0jJXdAMrf3F/OVw==","shasum":"c4886b4caab029e69e3d7efec3495262989bc40b","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.1.1.tgz","fileCount":17,"unpackedSize":61954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9xVdCRA9TVsSAnZWagAAc4cP/RcPLWfTOc5ubkeqZf+I\nSEk6CrQcglV7drk4FyQ32Yv/z1sqm19ZkNgm27R/V41pt4tXpNTz4yLCRsDP\nSoWq/+AV0TAZ6cFyGtqMMnTD8PgafEo6A9/p7ZZtCA76ktljLUUI0SV17xkE\nSbsCxs7b1M4xx/srLYtySK4CZ2Daxn54xIL3jEYo0sT7gwqTHSV2+ZoScPiS\nZ5N/HSsHU9K9NCMDBlE7KjQI34e5A8lBjXcQErTPgUNfnPiuAGJxUL/18zjp\n4S+IZiIHjtmgm7v1B4BPTCcMk9MqCD+1RMNsYY6ZgPBBJY/yzDcUVevN0D39\n7VAkH9dLdZ0z/t6kTJdNt9oiZ7HHmvPKL6ZHAEsJvYt08XdS+a+mk5z5r3oe\n/9C6NzWDXekWFB6oMKsevHLIeSQE1AE4BD63RlV2d8vPBnAT6EjOv6V5Za1A\nry6sdCVPUksHDY1gy5c/QAaaORrir+zsOJVzmw71ma2Sf8HLZIDiutvDxrG/\nAdtqEGuma1xMYbKdTjvodSuSZsZqUewyL/68VsMO9wARL9IrfGmzl9v0k80B\nrbMRq6yvKR8nD3ZnrvAN4g485C3mzutAOjWprylan5RPAgZuAr60VQvZeXBF\nIOkLnv6LvPK5mxYWL2JULv6QeOY+xHhys4otgJS+3xdYZIlhI7LvHs9FDQW9\nimPy\r\n=wu44\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtldYSAEAbvKNW/Hse8AS1AsK+27hOEAPvgsdmrHsnaAIgX0Vk5PwU2haGTEA/JhAziBW6uHEZRK4KQ8s03lZzTQc="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"_npmUser":{"name":"mcous","email":"mike@cousins.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.1.1_1559696732305_0.5857151509512097"},"_hasShrinkwrap":false},"4.2.0":{"name":"whats-that-gerber","version":"4.2.0","description":"Identify Gerber and drill files by filenamee","main":"index.js","types":"index.d.ts","scripts":{"build":"cross-env NODE_ENV=production webpack","serve":"node ../../scripts/serve"},"repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git","directory":"packages/whats-that-gerber"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","dependencies":{"xtend":"^4.0.2"},"gitHead":"4304c118ad28283ef15184b9b5dc0e28a0a5630d","_id":"whats-that-gerber@4.2.0","_nodeVersion":"8.16.2","_npmVersion":"lerna/3.16.4/node@v8.16.2+x64 (linux)","dist":{"integrity":"sha512-uPzjOvMd73hwGjigzGau6D4Qz+eJyHnkcdbAKuPMGmZabR+WjJDYHbHfM8jDvz9soJI86V8/nGeqIjGXSGNSBQ==","shasum":"77cbe3c1ea40cb5abd4bb3c760f01e7558e32dca","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.2.0.tgz","fileCount":17,"unpackedSize":62618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnqchCRA9TVsSAnZWagAAezsP/imP5pVYXoSeS7Clz37u\nQeGZ123wYQspwP0bBsgNOwmHNVTKapEiRJ4TB0Pi0f74KOt6ylueON89rgty\nfUoWIpzcEdAk4b1kysqnbTqIWeuIga+DmK7xE0IbSB3Z5m9ocbIsu2sVHCxY\neaLa+Ew3W/g199M3PmG5ziQc9FEgzxfcIHvj9g+aAaUt20qDGGcPhpl5NKzU\n37Ge2PMOxiW6IDhTisQEQeKHlBJYpp5A2GbCdnisEX900OJ2DNUSSOSHCk9P\nYFIJa89usof1E+ZoPJ0T7DoPA/+JODZhVm5UMuU7mJshc9vGyn2hSryV1XdF\ndI3ooRzMOZD0pk4ouiGEWXAUUfDYIhwSUYfYhK3qAGeSm9phtppzrH6U4M17\nscJ9kTJZdkFo+mwKUOe3h1qXyHgQtuP/toziq+TW4JhISy+9G4Iid00xsuEG\nWJ0h3ln3cL+ze9jpMnnzEy+dSxF4dPmIHRMYTvjbfCGC+G0jMsxmmp2dYUu+\nmpB6CnuspFus2oL0b9Y3XoRUCo3VFBfi6D3io1DkI/KJUfzgAMkOC0IvdoEl\neiSTN45rW3WWpL+bcbYl9MUnEFaptZ5/YY+NZpayaJhsavFn4ZyVLXCVC/gj\n+Bcoke2nB4awgjK/EDvj/eG6Bl0GzYCcimDzVZdLvI1rSp/r/n+mjpJ0yO4N\nizEE\r\n=v8i0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHyVjSxrflXYkua73E4h3aHiIpxgwhGyq6cuwNif11r5AiEA+WtC54rksk4SVSD658zmr7MqO60+hECo25xzOMxYynk="}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"_npmUser":{"name":"mcous","email":"mike@cousins.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.2.0_1570678560337_0.05121498634214361"},"_hasShrinkwrap":false},"5.0.0-next.0":{"name":"whats-that-gerber","version":"5.0.0-next.0","description":"Identify Gerber and drill files by filename","source":"src/index.ts","main":"cjs/index.js","module":"esm/index.mjs","types":"lib/index.d.ts","unpkg":"umd/whats-that-gerber.min.js","sideEffects":false,"scripts":{"clean":"rimraf cjs esm lib umd"},"repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git","directory":"packages/whats-that-gerber"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","gitHead":"0d84af26a74ff870728ef7c4ef89548cbfe23045","readme":"# what's that gerber?\n\n[![latest][whats-that-gerber-latest-badge]][npm]\n[![next][whats-that-gerber-next-badge]][npm-next]\n[![david][whats-that-gerber-david-badge]][david]\n\n> Identify Gerber and drill files by filename\n\nHave you got a bunch of Gerber files lying around without any idea what they're for? We've all been there. `whats-that-gerber` is here to help.\n\nPart of the [tracespace][] collection of PCB visualization tools.\n\n[tracespace]: https://github.com/tracespace/tracespace\n[npm]: https://www.npmjs.com/package/whats-that-gerber\n[npm-next]: https://www.npmjs.com/package/whats-that-gerber/v/next\n[david]: https://david-dm.org/tracespace/tracespace?path=packages/whats-that-gerber\n[whats-that-gerber-latest-badge]: https://flat.badgen.net/npm/v/whats-that-gerber\n[whats-that-gerber-next-badge]: https://flat.badgen.net/npm/v/whats-that-gerber/next\n[whats-that-gerber-david-badge]: https://flat.badgen.net/david/dep/tracespace/tracespace/packages/whats-that-gerber\n\n## install\n\n```shell\nnpm install --save whats-that-gerber\n# or\nyarn add whats-that-gerber\n```\n\nOr, use a script tag:\n\n```html\n<script src=\"https://unpkg.com/whats-that-gerber@^4.0.0/umd/whats-that-gerber.min.js\"></script>\n<script>\n  // global variable WhatsThatGerber now available\n  var identifyLayers = WhatsThatGerber.identifyLayers\n</script>\n```\n\n## usage\n\nPass `identifyLayers` an array of filenames from a PCB, and it will give you back an object keyed by filename with the best guess it can make for the type and side of each file. If both `side` and `type` are `null`, the filename cannot be identified as a Gerber / drill file.\n\n```js\nconst {identifyLayers} = require('whats-that-gerber')\n// ES Modules work, too\n// import {identifyLayers} from 'whats-that-gerber'\n\nconst filenames = ['my-board-F_Cu.gbr', 'my-board-B_Cu.gbr', 'foo.bar']\nconst typeByFilename = identifyLayers(filenames)\n// {\n//   'my-board-F_Cu.gbr': {type: 'copper', side: 'top'},\n//   'my-board-B_Cu.gbr': {type: 'copper', side: 'bottom'},\n//   'my-board-notes.gbr': {type: 'drawing', side: null},\n//   'foo.bar': {type: null, side: null},\n// }\n```\n\n### layer types and names\n\nThere are 12 available layer types, were a type is an object of the format:\n\n```js\n{\n  side: 'top' | 'bottom' | 'inner' | 'all' | null,\n  type: 'copper' | 'soldermask' | 'silkscreen' | 'solderpaste' | 'drill' | 'outline' | 'drawing' | null,\n}\n```\n\nYou can get an array of all types with:\n\n```js\nconst {getAllLayers} = require('whats-that-gerber')\n// ES Modules work, too\n// import {getAllLayers} from 'whats-that-gerber'\n\nconst allLayers = getAllLayers()\n```\n\n| side       | type            |\n| ---------- | --------------- |\n| `'top'`    | `'copper'`      |\n| `'top'`    | `'soldermask'`  |\n| `'top'`    | `'silkscreen'`  |\n| `'top'`    | `'solderpaste'` |\n| `'bottom'` | `'copper'`      |\n| `'bottom'` | `'soldermask'`  |\n| `'bottom'` | `'silkscreen'`  |\n| `'bottom'` | `'solderpaste'` |\n| `'inner'`  | `'copper'`      |\n| `'all'`    | `'outline'`     |\n| `'all'`    | `'drill'`       |\n| `null`     | `'drawing'`     |\n\n#### constants\n\nSide and type constants are exported for your usage:\n\n```js\nconst {\n  // layer types\n  TYPE_COPPER, // 'copper'\n  TYPE_SOLDERMASK, // 'soldermask'\n  TYPE_SILKSCREEN, // 'silkscreen'\n  TYPE_SOLDERPASTE, // 'solderpaste'\n  TYPE_DRILL, // 'drill'\n  TYPE_OUTLINE, // 'outline'\n  TYPE_DRAWING, // 'drawing'\n\n  // board sides\n  SIDE_TOP, // 'top'\n  SIDE_BOTTOM, // 'bottom'\n  SIDE_INNER, // 'inner'\n  SIDE_ALL, // 'all'\n} = require('whats-that-gerber')\n\n// ES Modules work, too\n// import {TYPE_COPPER} from 'whats-that-gerber'\n```\n\n#### checking if a layer type is valid\n\nYou can check if any given string is a valid layer type with:\n\n```js\nconst {validate} = require('whats-that-gerber')\n// ES Modules work, too\n// import {validate} from 'whats-that-gerber'\n\nconst type1 = {side: 'top', type: 'copper'}\nconst type2 = {side: 'foo', type: 'silkscreen'}\nconst type3 = {side: 'bottom', type: 'bar'}\n\nconsole.log(validate(type1)) // {valid: true, side: 'top', type: 'copper'}\nconsole.log(validate(type2)) // {valid: false, side: null, type: 'silkscreen'}\nconsole.log(validate(type3)) // {valid: false, side: 'bottom', type: null}\n```\n\n### supported cad programs\n\nWe should be able to identify files output by the following programs:\n\n- KiCad\n- Eagle\n- Altium\n- Orcad\n- gEDA PCB\n- DipTrace\n\n## contributing\n\nPlease read the [Contributing Section](../README.md#contributing) of the main README for development setup instructions.\n\nIf you're adding or modifying a filetype matcher, please remember to add or modify an example filename in [`@tracespace/fixtures/gerber-filenames.json`](../fixtures/gerber-filenames.json) to ensure your change is tested.\n","readmeFilename":"README.md","_id":"whats-that-gerber@5.0.0-next.0","_nodeVersion":"12.18.1","_npmVersion":"lerna/3.22.1/node@v12.18.1+x64 (linux)","dist":{"integrity":"sha512-4tO9/Bb00zTSKZsdUoJO2M4gCAEm0c73I6gBzxBpZqGMLffy6UjuRVLqqayW4byWIYKRzKhAJthZWFGCDwHTXw==","shasum":"98f1607d316ce2ff6d31c4bdf714b3b8e1368ee4","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-5.0.0-next.0.tgz","fileCount":29,"unpackedSize":174508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+OepCRA9TVsSAnZWagAA8XUP/2NeI/QRwxPMors6tCZJ\nT+1yHJCRJoF0c38eftS5zXK+qw0qtEzP7pX+NVSRRjGl1iwomLHGXk9d43BG\noOW3n4uTWPpapn44dEYDs+ZglamNxIOyXv/DJ76mvCY7PFzwv7t6wvMnu11x\nS+HPoUYMaoxEXn0W1wsyiasWy15COVspaF3k/rnBiEUXYRbrRE0eD8O4VYSI\nJsh4/slWGnmlMizWmTFd7MrATI7IViYTa+IEZc56f/AxzWmwgta6CVbMiTIT\nXUrj4AYMo6jmDfi7OkifSshHym3KexsVGsWN3DR9DtM1W92iE5YyZaBkdz/C\nR6JwaYlEmaOHD0st368EQLnGn48YQj4uZO9IUlZh/vgcwUos7axRKwHK9Q3s\nRIOs580pEzbK68aYC7OaGy3jQAebI8NzTfee/PXKNnjAKiwzC89xZLa/wHSo\nEs1lkP7wWSChrNtrK8fC2BI1MjZM9aXu8SaiSv1uZJiJEuDxGrb5D5QIbWhp\njcr3ekJ+KAboAmSSBXIOmV61gHgYGc3RFpW0ehfn0csLyf4IXnNyf3WHkvLm\nXIO1Y4rvNjkysdJVFBZu6vbPildF4MontEyLThnGckJvoJZpKMWw+iCfDVlr\nxN7U3uX6Y3ikfmKsUMxh/6kkULCjcJpPXJTGxSFaVCXH7je4tBQskABkOrnJ\nHWEJ\r\n=S2AN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0C2Lp9sT9FbJrwPmbkOZiLs1JlXah7yuGDZusY+eqggIhANqIBPJsz8YdNVGU4AkC44nG0+wYiWGMe8zHIz8kNoRL"}]},"maintainers":[{"name":"kasbah","email":"kaspar.emanuel@gmail.com"},{"name":"mcous","email":"mike@cousins.io"}],"_npmUser":{"name":"mcous","email":"mike@cousins.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_5.0.0-next.0_1593370536738_0.4585249796339994"},"_hasShrinkwrap":false},"4.2.2":{"name":"whats-that-gerber","version":"4.2.2","description":"Identify Gerber and drill files by filenamee","main":"index.js","types":"index.d.ts","scripts":{"build":"cross-env NODE_ENV=production webpack","serve":"node ../../scripts/serve"},"repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git","directory":"packages/whats-that-gerber"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","dependencies":{"xtend":"^4.0.2"},"gitHead":"c3690c37fc17cdc3d15ce034e30e09bc084fffe1","_id":"whats-that-gerber@4.2.2","_nodeVersion":"12.19.0","_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (linux)","dist":{"integrity":"sha512-2agpMEj0a0SYYdvxlRJHMEiTbu25qgri5Le6Q1acKjU1s567J6hK6henR0a7I1XWNFxsALk5hl45xR1ZJFukFQ==","shasum":"7b039664887a6d971852095682d1ed1d28825a41","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.2.2.tgz","fileCount":17,"unpackedSize":62817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhS8CCRA9TVsSAnZWagAAfpcQAIVq7QBaTi2lK7qNo/0L\nleM7Oxtcolfrj3LxXeojDgKwu1mfblX1ltcezXJoVw0zT2V5MQDQEcKv5y6a\npIsz1vi3nWhEHWNlgkwK+h8c/FtJYib0s11hQT6OSwzo8ogKea/z0TdmdcNg\nadA11WxywhVwuW66aJLBBu5FeJczoooLrnBd1HrYWgtgA80YdcZRT/UGIJ4k\nkA9+ZhYO1fW75uxkR4maILR1S6xSe1GZiCd356s9V/HIenAasQIMQj1C7Umr\nq5HDI5uuqeRsZ8tukRjyhhQfsG+o/cLGuzhkqmI426t1/GSkkjNMm1HCsztG\nrdaMVZzK9Yq9R5D3bmVETtQuDPVgTOzTsZSstqOgJwkgzChwf/NAKmLdE6bZ\nzqp3VB5NizczrUW203jZ6+LihFhGk1XE1nv0v2XRA2PrdgYY40MKdJzJdE1Z\nC0kt+rVEVPMVCp3deiBWRI48gDqySno/962A7lJBjNVw7nn6j11mQZNX2BRr\ntvQZvkMZfMszIGl+QQkR0pq53E7IcpUBF+AWfMj86jNWKs/sIDqhA3CblkZQ\nHi+Z0sN40iGqTntLzOI99u3yhGYU9PwW7ZKlf7h79yugfNEO6xjZgis4BTHU\nUZRgWs8CQw/SIufbXS6HefqdqX1pDr6DHhL8zHNlUGFFa/NLhXCWehpweCUG\nX18J\r\n=cvVd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEnyBAAxV5M4h1h81Uo74bF1oI9nGcV0y1oqy4msddX2AiBWaUh9Q2NyDgDrEERVp+WY6F7L9CTQ7BiOXoSPUbSX0A=="}]},"maintainers":[{"name":"mcous","email":"mike@cousins.io"},{"name":"kasbah","email":"kaspar.emanuel@gmail.com"}],"_npmUser":{"name":"mcous","email":"mike@cousins.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.2.2_1602563841623_0.08726932208493987"},"_hasShrinkwrap":false},"4.2.7":{"name":"whats-that-gerber","version":"4.2.7","description":"Identify Gerber and drill files by filenamee","main":"index.js","types":"index.d.ts","scripts":{"build":"cross-env NODE_ENV=production webpack","serve":"node ../../scripts/serve"},"repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git","directory":"packages/whats-that-gerber"},"keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"homepage":"https://github.com/tracespace/tracespace#readme","dependencies":{"xtend":"^4.0.2"},"gitHead":"8ecba37cf1788a7d80b856b892e683af125e0cc3","_id":"whats-that-gerber@4.2.7","_nodeVersion":"12.22.10","_npmVersion":"lerna/3.22.1/node@v12.22.10+x64 (linux)","dist":{"integrity":"sha512-MJ9QWVmIVRQX1YQIP1kk032ZVk7jJO0sX3XnXIqP7PfIJ36+h0/CL296/x++K5eOGvriTO+8s7Vz6+8PML4/dg==","shasum":"7b30f8c0936bb87e4f247df7f0ced037eef72cf5","tarball":"https://registry.npmjs.org/whats-that-gerber/-/whats-that-gerber-4.2.7.tgz","fileCount":17,"unpackedSize":62970,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiLRH+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvCA/9EBUGTdOYP/peheFW9heTjs3/YPCTiQnXku3kEDOT3o6y8gdj\r\nEUMnmXe5eP1CXcq3qplyOt0kASvyUhBZx4ZbLKd6Nn7nOh/Cmh4gaYHn0ajq\r\nwAOrj/+FVPzLYC5mONL868YMXJZhaZN32B5a8tZrSm/vhnOnA4j07kAcWq8y\r\nQq1SI3q8w2fKenyTYA/orr56Cdawt9PmJsP0jN6evco2rcgMh5Vd9tLkgiE5\r\nf3dm4Egz0bmm2tuAEJk+ouY21B26bbQiPCpa6rmOI1p0FaYTzD1oTZGxMo7R\r\nHKsQdwBhrdbr9YkJZv1/vaDxevR5krIu/0T5C9b2T+IGoxNsqGguB1PD2/zg\r\nNKZCx/HS124hwP8RkKeCNrAM0qJQL/8OiMRYuqUNtaSpWrPBrzzQ9yC/g5CL\r\ngAhwhEXCVf/iuwyRRhFqwtjE4/mtza/0LgQyUqMxfhxDTVhv9URC+B5nYNIW\r\ntDJPlQPbMRbJnx2xd9CCeyEj3tKcDUMpfeGV7tMhSFvIbOKMp40PZ4nUXyiD\r\nJu42heNR2yFqkc8pDZrZJffjA9pNl+cuIMIDC8jBFh8q9wlXmz29BUdsfkGs\r\nAXu4n13KQou9hIdGYF3pXQhve1yrl/y30L+OR/JbDUylNLz3O63twmaXuXGE\r\nhZqyUU+pEWJuTPqE/emM2ErKfSjXsqXc4DI=\r\n=avPe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFOxUy+ViXi9ikWVr7Odv0+mdK+1RiIdd8rTaHJVobILAiBZ5UNKLhX+zoiL6grj7DQaBy7XI/Q6qoV98wGBSa/uUQ=="}]},"_npmUser":{"name":"mcous","email":"mike@cousins.io"},"directories":{},"maintainers":[{"name":"mcous","email":"mike@cousins.io"},{"name":"kasbah","email":"kaspar.emanuel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whats-that-gerber_4.2.7_1647120894813_0.219093775332577"},"_hasShrinkwrap":false}},"readme":"# what's that gerber?\n\n[![latest][whats-that-gerber-latest-badge]][npm]\n[![next][whats-that-gerber-next-badge]][npm-next]\n[![david][whats-that-gerber-david-badge]][david]\n\n> Identify Gerber and drill files by filename\n\nHave you got a bunch of Gerber files lying around without any idea what they're for? We've all been there. `whats-that-gerber` is here to help.\n\nPart of the [tracespace][] collection of PCB visualization tools.\n\n[tracespace]: https://github.com/tracespace/tracespace\n[npm]: https://www.npmjs.com/package/whats-that-gerber\n[npm-next]: https://www.npmjs.com/package/whats-that-gerber/v/next\n[david]: https://david-dm.org/tracespace/tracespace?path=packages/whats-that-gerber\n[whats-that-gerber-latest-badge]: https://flat.badgen.net/npm/v/whats-that-gerber\n[whats-that-gerber-next-badge]: https://flat.badgen.net/npm/v/whats-that-gerber/next\n[whats-that-gerber-david-badge]: https://flat.badgen.net/david/dep/tracespace/tracespace/packages/whats-that-gerber\n\n## install\n\n```shell\nnpm install --save whats-that-gerber\n# or\nyarn add whats-that-gerber\n```\n\nOr, use a script tag:\n\n```html\n<script src=\"https://unpkg.com/whats-that-gerber@^4.0.0/dist/whats-that-gerber.min.js\"></script>\n<script>\n  // global variable whatsThatGerber now available\n  var parser = whatsThatGerber()\n</script>\n```\n\n## usage\n\nPass `whatsThatGerber` an array of filenames from a PCB, and it will give you back an object keyed by filename with the best guess it can make for the type and side of each file. If both `side` and `type` are `null`, the filename cannot be identified as a Gerber / drill file.\n\n```js\nconst whatsThatGerber = require('whats-that-gerber')\n\nconst filenames = ['my-board-F_Cu.gbr', 'my-board-B_Cu.gbr', 'foo.bar']\nconst typeByFilename = whatsThatGerber(filenames)\n// {\n//   'my-board-F_Cu.gbr': {type: 'copper', side: 'top'},\n//   'my-board-B_Cu.gbr': {type: 'copper', side: 'bottom'},\n//   'my-board-notes.gbr': {type: 'drawing', side: null},\n//   'foo.bar': {type: null, side: null},\n// }\n```\n\n### layer types and names\n\nThere are 12 available layer types, were a type is an object of the format:\n\n```js\n{\n  side: 'top' | 'bottom' | 'inner' | 'all' | null,\n  type: 'copper' | 'soldermask' | 'silkscreen' | 'solderpaste' | 'drill' | 'outline' | 'drawing' | null,\n}\n```\n\nYou can get an array of all types with:\n\n```js\nconst {getAllLayers} = require('whats-that-gerber')\nconst allLayers = getAllLayers()\n```\n\n| side       | type            |\n| ---------- | --------------- |\n| `'top'`    | `'copper'`      |\n| `'top'`    | `'soldermask'`  |\n| `'top'`    | `'silkscreen'`  |\n| `'top'`    | `'solderpaste'` |\n| `'bottom'` | `'copper'`      |\n| `'bottom'` | `'soldermask'`  |\n| `'bottom'` | `'silkscreen'`  |\n| `'bottom'` | `'solderpaste'` |\n| `'inner'`  | `'copper'`      |\n| `'all'`    | `'outline'`     |\n| `'all'`    | `'drill'`       |\n| `null`     | `'drawing'`     |\n\n#### constants\n\nSide and type constants are exported for your usage:\n\n```js\nconst {\n  // layer types\n  TYPE_COPPER, // 'copper'\n  TYPE_SOLDERMASK, // 'soldermask'\n  TYPE_SILKSCREEN, // 'silkscreen'\n  TYPE_SOLDERPASTE, // 'solderpaste'\n  TYPE_DRILL, // 'drill'\n  TYPE_OUTLINE, // 'outline'\n  TYPE_DRAWING, // 'drawing'\n\n  // board sides\n  SIDE_TOP, // 'top'\n  SIDE_BOTTOM, // 'bottom'\n  SIDE_INNER, // 'inner'\n  SIDE_ALL, // 'all'\n} = require('whats-that-gerber')\n```\n\n#### checking if a layer type is valid\n\nYou can check if any given string is a valid layer type with:\n\n```js\nconst {validate} = require('whats-that-gerber')\n\nconst type1 = {side: 'top', type: 'copper'}\nconst type2 = {side: 'foo', type: 'silkscreen'}\nconst type3 = {side: 'bottom', type: 'bar'}\n\nconsole.log(validate(type1)) // {valid: true, side: 'top', type: 'copper'}\nconsole.log(validate(type2)) // {valid: false, side: null, type: 'silkscreen'}\nconsole.log(validate(type3)) // {valid: false, side: 'bottom', type: null}\n```\n\n### supported cad programs\n\nWe should be able to identify files output by the following programs:\n\n- KiCad\n- Eagle\n- Altium\n- Orcad\n- gEDA PCB\n- DipTrace\n\n## contributing\n\nPlease read the [Contributing Section](../README.md#contributing) of the main README for development setup instructions.\n\nIf you're adding or modifying a filetype matcher, please remember to add or modify an example filename in [`@tracespace/fixtures/gerber-filenames.json`](../fixtures/gerber-filenames.json) to ensure your change is tested.\n","maintainers":[{"name":"mcous","email":"mike@cousins.io"},{"name":"kasbah","email":"kaspar.emanuel@gmail.com"}],"time":{"modified":"2022-06-29T01:22:38.516Z","created":"2016-05-01T18:18:58.659Z","1.0.0":"2016-05-01T18:18:58.659Z","1.0.1":"2016-05-04T06:14:08.867Z","2.0.0":"2016-06-11T14:34:28.632Z","2.0.1":"2016-06-11T18:18:06.500Z","2.0.2":"2016-07-01T15:17:22.207Z","2.0.3":"2016-07-05T15:59:00.240Z","2.1.0":"2016-08-17T22:53:04.345Z","2.1.1":"2017-05-29T12:31:09.001Z","3.0.0":"2018-04-08T13:13:53.528Z","4.0.0-next.3":"2018-04-18T04:47:41.983Z","4.0.0-next.4":"2018-04-27T04:31:48.249Z","4.0.0-next.9":"2018-06-19T22:16:14.692Z","4.0.0-next.10":"2018-06-27T13:04:55.332Z","4.0.0-next.12":"2018-07-17T23:15:19.852Z","4.0.0-next.13":"2018-09-12T14:00:16.877Z","4.0.0-next.15":"2018-11-13T01:45:41.018Z","4.0.0-next.19":"2019-03-09T19:14:52.761Z","4.0.0":"2019-03-09T19:53:16.143Z","4.0.1":"2019-03-23T07:14:22.798Z","4.0.2":"2019-03-24T05:26:51.683Z","4.1.1":"2019-06-05T01:05:32.555Z","4.2.0":"2019-10-10T03:36:00.519Z","5.0.0-next.0":"2020-06-28T18:55:36.843Z","4.2.2":"2020-10-13T04:37:21.918Z","4.2.7":"2022-03-12T21:34:54.990Z"},"homepage":"https://github.com/tracespace/tracespace#readme","keywords":["pcb","gerber","excellon","circuit","hardware","electronics"],"repository":{"type":"git","url":"git+https://github.com/tracespace/tracespace.git","directory":"packages/whats-that-gerber"},"bugs":{"url":"https://github.com/tracespace/tracespace/issues"},"license":"MIT","readmeFilename":"README.md","contributors":[{"name":"Mike Cousins","email":"mike@cousins.io","url":"http://cousins.io"},{"name":"Kaspar Emanuel","email":"kaspar@monostable.co.uk","url":"http://monostable.co.uk"},{"name":"David Freitag","email":"dvdfreitag@gmail.com"}]}