{"_id":"ads.txt","_rev":"9-cb43ec3b6d8ca933539890564e76d964","name":"ads.txt","description":"Ads.txt parser","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"ads.txt","version":"0.1.0","description":"Ads.txt parser","main":"source/index.js","dependencies":{"domain-regex":"^0.0.1","deepfreeze":"^2.0.0","object-values":"^1.0.0"},"devDependencies":{"chai":"^4.1.2","mocha":"^4.0.1","np":"^2.16.1"},"scripts":{"pub":"np","test":"mocha -r test/index.js 'test/unit/**/*.spec.js'"},"repository":{"type":"git","url":"git+https://github.com/perry-mitchell/ads.txt.git"},"keywords":["ads.txt","ads","parse"],"author":{"name":"Perry Mitchell","email":"perry@perrymitchell.net"},"license":"MIT","bugs":{"url":"https://github.com/perry-mitchell/ads.txt/issues"},"homepage":"https://github.com/perry-mitchell/ads.txt#readme","gitHead":"f8545c5865a3e30fb1f6a8f7814b4640268e9176","_id":"ads.txt@0.1.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"kiosked-perry","email":"perry@kiosked.com"},"dist":{"integrity":"sha512-cJVBR4nHRf0LD7I3W2lJu9DhTeYOeWklSmn3d4wYx718Vo95fAYBb+m8kSIOpbHzOCnJmK9ksBLd4jJ/RuBWsg==","shasum":"fc3658011c0dacd03913ba94f3a85a2f4c553e4c","tarball":"https://packageproxy.dev/npmfiles/ads.txt/-/ads.txt-0.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHFmDqaA+zq4G8PpAo2aR/PjlxLVHxeNsyCvbtOM0+0/AiEAwWTvfJP9OYISpzkbLyqIQ5fY+Q/g58/jhyI4O6oGkKU="}]},"maintainers":[{"name":"kiosked-perry","email":"perry@kiosked.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ads.txt-0.1.0.tgz_1510570477560_0.6328897103667259"},"directories":{}},"0.1.1":{"name":"ads.txt","version":"0.1.1","description":"Ads.txt parser","main":"source/index.js","dependencies":{"domain-regex":"^0.0.1","deepfreeze":"^2.0.0","object-values":"^1.0.0"},"devDependencies":{"chai":"^4.1.2","mocha":"^4.0.1","np":"^2.16.1"},"scripts":{"pub":"np","test":"mocha -r test/index.js 'test/unit/**/*.spec.js'"},"repository":{"type":"git","url":"git+https://github.com/perry-mitchell/ads.txt.git"},"keywords":["ads.txt","ads","parse"],"author":{"name":"Perry Mitchell","email":"perry@perrymitchell.net"},"license":"MIT","bugs":{"url":"https://github.com/perry-mitchell/ads.txt/issues"},"homepage":"https://github.com/perry-mitchell/ads.txt#readme","gitHead":"a26939e00b75c916d0d177d2305861ca1417a069","_id":"ads.txt@0.1.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"perrymitchell","email":"perry@perrymitchell.net"},"dist":{"integrity":"sha512-JADcLbuLYiOMRwIs524A1RK8IxKEAviO6Rqi/hG7jUFvS6HLVMhTkwO75LrB6dI5Jsz1cQvJcQLJfYaDbXFRWg==","shasum":"38b72aac2ea738e517fc6f4f0faf1a59d6724c3f","tarball":"https://packageproxy.dev/npmfiles/ads.txt/-/ads.txt-0.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChuKONIq7Un9dPPnPXSWMYlZmDCiDmqII63ZahwkwucAIgGGrmWw7jmBN2ZzXMoCFmaPOORd8llYYvS1NTO3I69es="}]},"maintainers":[{"email":"perry@perrymitchell.net","name":"perrymitchell"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ads.txt-0.1.1.tgz_1510571436291_0.10061182384379208"},"directories":{}},"0.1.2":{"name":"ads.txt","version":"0.1.2","description":"Ads.txt parser","main":"source/index.js","dependencies":{"domain-regex":"^0.0.1","deepfreeze":"^2.0.0","object-values":"^1.0.0"},"devDependencies":{"chai":"^4.1.2","mocha":"^4.0.1","np":"^2.16.1"},"scripts":{"pub":"np","test":"mocha -r test/index.js 'test/unit/**/*.spec.js'"},"repository":{"type":"git","url":"git+https://github.com/perry-mitchell/ads.txt.git"},"keywords":["ads.txt","ads","parse"],"author":{"name":"Perry Mitchell","email":"perry@perrymitchell.net"},"license":"MIT","bugs":{"url":"https://github.com/perry-mitchell/ads.txt/issues"},"homepage":"https://github.com/perry-mitchell/ads.txt#readme","gitHead":"53228b9b1f43ded6847a6437ce8accbc0a36a627","_id":"ads.txt@0.1.2","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"perrymitchell","email":"perry@perrymitchell.net"},"dist":{"integrity":"sha512-nqGOl97cfaJoVxPlH+ySw71Bs7vG75bP6ounLEITodSbsWwxkP3QKAcV6H0taIOtrJTRU1xZ2QoT3SZKqRTLIQ==","shasum":"fffaa315ad921c35be25731af0dc2152e2449484","tarball":"https://packageproxy.dev/npmfiles/ads.txt/-/ads.txt-0.1.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIg8XglKDJ0C9PEqy9418vhb9TECtKDOGX3U0ImfWOGQIhAIbwdH7OhmwngWFlyAKKuixeVtNbUjwIdFIjIJ0x59zQ"}]},"maintainers":[{"email":"perry@perrymitchell.net","name":"perrymitchell"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ads.txt-0.1.2.tgz_1510582584461_0.2640026321168989"},"directories":{}},"0.2.0":{"name":"ads.txt","version":"0.2.0","description":"Ads.txt parser","main":"source/index.js","dependencies":{"domain-regex":"^0.0.1","deepfreeze":"^2.0.0","object-values":"^1.0.0"},"devDependencies":{"chai":"^4.1.2","mocha":"^4.0.1","np":"^2.16.1"},"scripts":{"pub":"np","test":"mocha -r test/index.js 'test/unit/**/*.spec.js'"},"repository":{"type":"git","url":"git+https://github.com/perry-mitchell/ads.txt.git"},"keywords":["ads.txt","ads","parse"],"author":{"name":"Perry Mitchell","email":"perry@perrymitchell.net"},"license":"MIT","bugs":{"url":"https://github.com/perry-mitchell/ads.txt/issues"},"homepage":"https://github.com/perry-mitchell/ads.txt#readme","gitHead":"f3410afdb13ed7abbf9e5d443b50d0177388ccd4","_id":"ads.txt@0.2.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"perrymitchell","email":"perry@perrymitchell.net"},"dist":{"integrity":"sha512-CXWrfWtMwHStwVIMDT92AeLQOwiH5UQ4ZDhjB1OnmPFQMfTjRdFhxQhaCs4fM2NRuJr6keM7QTAJgLn1QEtqww==","shasum":"2c7f30cb8d652d74a2e8cce5b40bac8d3625558a","tarball":"https://packageproxy.dev/npmfiles/ads.txt/-/ads.txt-0.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGCmR2TYogdANBE2bSZ5jQHYjwUCvWj9CQ3Uz8c3MA4jAiEA6tvyuTmVzylrty89x7X0VOnUimZEmeiXl9p97FnQXvQ="}]},"maintainers":[{"email":"perry@perrymitchell.net","name":"perrymitchell"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ads.txt-0.2.0.tgz_1510830426487_0.027901601046323776"},"directories":{}},"0.2.1":{"name":"ads.txt","version":"0.2.1","description":"Ads.txt parser","main":"source/index.js","dependencies":{"deepfreeze":"^2.0.0","is-domain-name":"^1.0.1","object-values":"^1.0.0"},"devDependencies":{"chai":"^4.1.2","mocha":"^4.1.0","np":"^2.20.1"},"scripts":{"pub":"np","test":"mocha -r test/index.js 'test/unit/**/*.spec.js'"},"repository":{"type":"git","url":"git+https://github.com/perry-mitchell/ads.txt.git"},"keywords":["ads.txt","ads","parse"],"author":{"name":"Perry Mitchell","email":"perry@perrymitchell.net"},"license":"MIT","bugs":{"url":"https://github.com/perry-mitchell/ads.txt/issues"},"homepage":"https://github.com/perry-mitchell/ads.txt#readme","gitHead":"5f477899e7eb8746bda36f3b785db7616ed1ebd1","_id":"ads.txt@0.2.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"perrymitchell","email":"perry@perrymitchell.net"},"dist":{"integrity":"sha512-fA1yMIAfFABJCrvDcWr1QW8tn+y+0bZF2NDp+8LabZd1FIBT2JyXHY6cKOYyM+zPEVf0WtOcp/9wjHK+6DmZ0Q==","shasum":"fcb53f645f60fd5e923234edc4e083604ea0ff4f","tarball":"https://packageproxy.dev/npmfiles/ads.txt/-/ads.txt-0.2.1.tgz","fileCount":9,"unpackedSize":19489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa71mkCRA9TVsSAnZWagAAge4P/jPrW3Q/BJQfxuEsdXHu\nu0wU03G60lcRrXFdS7Qod37KXwPnWexWQWV9sjD8fuq5qpXXzy4un/QEZVzX\n2aMEfs+28r3fGpvSvFXbJl/SSh4irgSUcjF6ssI2T3VwoMy31bCU+8buXYGq\nsJPmAf0XllMX3oC+QqdlzuVfNf0yGiA4ALwDzy8jqUEDWMqDAl0lArKrLhjT\nZD5GWmlg8sEPQLfwh7fX/5Khi77qX/ZQpdAqypJ4tHIX3JcIq2NdldFRrzQ2\n2H1WwxJ/FHPTN7LhVuh9oMDhK2+0Nzs0t0yV29xoSWRwtoSC7OAXrijh4Xxr\nouuUkWWYwy4APUqprEi7wNlPLsCpeOVEWo/0b4WP2IOOXVXrOP55P0BzS5vG\nxNvNnF03guxQD2SczrdEPjTIYS3zL2Qv4NDrkdZ64Ndrw25LP4Sl7SCRnpg5\nTQ6FGuiWykcEpzTnyRqly0ETdjfQwKDy5+RjKY/qxqVRuaOOvyNURBbuQJ+I\nEdEmo+fIXCLxq1F/QxtYjApizlSo1IoEVi17uw1fHCJcCnG0bQJkmHVxtI1E\nW1OF4q0ybKJN2ei3EKcXBhHpSTpiDZhFdsve7AfC2XIwYV0+UpTeNZOtUX2u\nNmh2ST5YAHFUvck3xNLFYdYmllc9Z5aUkDhOvpNKeD3whnNeLFiSAoEJ+gVA\nO5ZB\r\n=a1o4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDVjshnJ3OERi1hEFGQSzsbInauBGr/dEgJtn4A0IpO0AiA0APr3A25vhKaMJigaZdQsV8HwCL2/dcIp7ifKYEvolg=="}]},"maintainers":[{"email":"perry@perrymitchell.net","name":"perrymitchell"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ads.txt_0.2.1_1525635490774_0.7766131221783379"},"_hasShrinkwrap":false},"0.3.0":{"name":"ads.txt","version":"0.3.0","description":"Ads.txt parser","main":"source/index.js","dependencies":{"deepfreeze":"^2.0.0","is-domain-name":"^1.0.1","object-values":"^2.0.0"},"devDependencies":{"chai":"^4.2.0","mocha":"^5.2.0"},"scripts":{"pub":"np","test":"mocha -r test/index.js 'test/unit/**/*.spec.js'"},"repository":{"type":"git","url":"git+https://github.com/perry-mitchell/ads.txt.git"},"keywords":["ads.txt","ads","parse"],"author":{"name":"Perry Mitchell","email":"perry@perrymitchell.net"},"license":"MIT","bugs":{"url":"https://github.com/perry-mitchell/ads.txt/issues"},"homepage":"https://github.com/perry-mitchell/ads.txt#readme","gitHead":"ae9e02e3f39b7a8306cbe3f2dac209067275c448","_id":"ads.txt@0.3.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"perrymitchell","email":"perry@perrymitchell.net"},"dist":{"integrity":"sha512-rLFFX2tQ3ExTf10JVyPQLKSzfilSiIwVLw2paktuWb2wgOyrm51wqX4RjN1Mbd096H0D1sb4su2P5OMSEsZ2Mw==","shasum":"1086bb74c238da5095c2e82b2d7c0b5e7eea119f","tarball":"https://packageproxy.dev/npmfiles/ads.txt/-/ads.txt-0.3.0.tgz","fileCount":10,"unpackedSize":20128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5JK6CRA9TVsSAnZWagAAmT8P/jQhqh/shF4d5F6Rhj4R\nPAfRGkk0R+WnyBJnrG5HWWgFGPPcVr/7SKqE2Q7NuwyIDB5X0XmMJQMgJKTy\nQfnTZ6+hSjdrz/aIRTZG39uLXYT5pfR3UQD7bjVVquor2A1HUPJj0JOe2hXv\n9GTyrEKT+i/HUrs8f2cDkHaOIuPNrf3ayvsnjdhQ4GOkZUVpC8W1VKqlaqh7\n/SC89mLOIhQVVhA/cpDQIH6PScp+RpKNREjobTsCJUiY3fZZ7+hw5q9r3lc4\nL7N1u93JQXsu1ub2I/N9FUBvtJnmT9ObuagnCrSRQB2+Sr96EfxfXQmSTEuj\nQ//T5USogU+xWUeTvu7p3SNmNPYLZPLTmVadMkUTc2B/SDGwFhTbsqDO6+7v\ndGva2AUuBL1vxOXKtMGAZ1zVvy4C/8dtV0W8rTd9kD39PvOPMVVjBtBJ8bDd\njkXWxHTH9g6EU2iSVekmgX6NbvsTzT3qwfIniUSwLPhrjMfOX52PJJUKuli8\n2pCfYyiGtoI8WwsE+Lh6AUFgEaaxhcQar6JelLlU+S624Fw7y3Jy58HehbK+\n7dbblTFwgC4rhfueEFOIBiddUjh5/UTYBWA/dy1eQ95IMsFYaULLPVIN3gIc\nLAbZdJFqtoKytY5Mez/0ZqRTHdfZP9VayDZhpl+ugrOFw8vshPKZ69iMMrP8\niXRD\r\n=83YQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCR9gPS6FIpsSZWQXstSUWkZ8sfCSovE7MbyBh2kf6VmQIgMs/I2oRIvuzrGmiQjNOFOr1UjEyIkhh535Trz9QiHUw="}]},"maintainers":[{"email":"perry@perrymitchell.net","name":"perrymitchell"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ads.txt_0.3.0_1541706424497_0.7899824662850596"},"_hasShrinkwrap":false},"0.4.0":{"name":"ads.txt","version":"0.4.0","description":"Ads.txt parser","main":"source/index.js","dependencies":{"deepfreeze":"^2.0.0","is-domain-name":"^1.0.1","object-values":"^2.0.0"},"devDependencies":{"chai":"^4.2.0","mocha":"^5.2.0"},"scripts":{"pub":"np","test":"mocha -r test/index.js 'test/unit/**/*.spec.js'"},"repository":{"type":"git","url":"git+https://github.com/perry-mitchell/ads.txt.git"},"keywords":["ads.txt","ads","parse"],"author":{"name":"Perry Mitchell","email":"perry@perrymitchell.net"},"license":"MIT","bugs":{"url":"https://github.com/perry-mitchell/ads.txt/issues"},"homepage":"https://github.com/perry-mitchell/ads.txt#readme","gitHead":"44fd22ec8503cb198a16c7fb31e50fddd44b8a42","_id":"ads.txt@0.4.0","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"perrymitchell","email":"perry@perrymitchell.net"},"dist":{"integrity":"sha512-p1k0uLL2BnoufgGoCDzMqcXYbomeJL3MKFBtoNv2ZBg12EIJcWMUNxnjJMRQFh5rQUiB8V/sCbCqe9SGztjnxw==","shasum":"39aa43f92af2071c08a71d5c59fb223fbcf1acc3","tarball":"https://packageproxy.dev/npmfiles/ads.txt/-/ads.txt-0.4.0.tgz","fileCount":10,"unpackedSize":20737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGmETCRA9TVsSAnZWagAABHcP/3ryJ7628I3zgY2jF+23\nvUldGTJ6TAJHFn79qYm+WIBlLdc2waqlZZWzAmpfdNNtM2Wur8VLff0mmI3Y\nrAiCcmn3N2lt7Fk04gePVR9psgGiwB3dRHMeqwwBgHS068s23bs71Z5UYaEV\n0wR8zxqfM6pfodzAagMcg10OhhTihpX5kyiMzDdlio+F2ULtGn05bVH+Stti\nYpIO2p7ZYS7mqJxCtcPjzYYv3GzqGhXgiNiq0iFmqNffaFizX5VF5oEbP+xV\n+MsytirCr+qhQTTQViEEbTNYbkCJmwIVx7rDzeAPLIU2cxfNVctJ8vbop1jw\nzLoU+zd9JhqbNjVaV4Jn4RiILWyzudKI+T2WGNQBxv2WHcbDNSH1d9z3h7dw\nzucWv9wLZ6D7CD2MmzbB3xEfEuNGsK0Gokl44PlL/7sN8e3bhFkakB9Y4ox7\nt8+5ahOyiRaddEvGnybwunwtyOUu54Vql5822cs0ZOayTX6/yPIz7qki9PsD\nGQm481aCyXMEVqFWubfTMsn8CBxCfpIW1XnbVdRDTUWxC5jJVitOCAZ9m1XT\nPfJiv0c/v++wWezQUAf+DcQV0fxAmdOuZb9dlTLan5J/AH2pWZk6zZm2yODr\nVha7lravHv0T/AcQigT9kDLH3fObMKo4LB0kcPseEjWhecm8dh3D1m1HAjKF\nUdRv\r\n=3WXd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICy+RT3Q937MsBOU95Tpos84NQCKyTSRXLltA6ui9l/NAiEAoCyxOgXUr0h236KGj90kwZyU6fF0nfUuhOBRIDBODg4="}]},"maintainers":[{"email":"perry@perrymitchell.net","name":"perrymitchell"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ads.txt_0.4.0_1562009874249_0.08197814955322791"},"_hasShrinkwrap":false}},"readme":"# ads.txt\n> Ads.txt parser and generator\n\n[![Build Status](https://travis-ci.org/perry-mitchell/ads.txt.svg?branch=master)](https://travis-ci.org/perry-mitchell/ads.txt) [![npm version](https://badge.fury.io/js/ads.txt.svg)](https://www.npmjs.com/package/ads.txt)\n\nParse ads.txt file contents, according to the [IAB OpenRTB Ads.txt Public Spec](https://iabtechlab.com/wp-content/uploads/2017/09/IABOpenRTB_Ads.txt_Public_Spec_V1-0-1.pdf). Generate ads.txt files from a sensible manifest structure.\n\n_**Note**: There may be some minor descrepencies between this implementation and the spec, but the `ads.txt` package does aim to be 100% in-line with the spec. Please file an issue if you notice any problems!_\n\n## About\nAds.txt files are used by publishers to list their advertising partners that run ads on their sites. For instance, this is the top section of the `ads.txt` file on `cnn.com`:\n\n```\n # CNN.com/ads.txt\n # \n # DOMESTIC\ngoogle.com, pub-7439281311086140, DIRECT, f08c47fec0942fa0 # banner, video, native\nrubiconproject.com, 11078, DIRECT, 0bfd66d529a55807 # banner, video\nc.amazon-adsystem.com, 3159, DIRECT # banner, video\nopenx.com, 537153334, DIRECT # banner\nappnexus.com, 7745, DIRECT # banner, video\nkargo.com, 105, DIRECT # banner\n```\n\n## Installation\nSimply `npm` install the package:\n\n```shell\nnpm install ads.txt --save\n```\n\n## Usage\n\n### Parsing\nImport the parsing method and pass the contents of an `ads.txt` file to it:\n\n```javascript\nconst { parseAdsTxt } = require(\"ads.txt\");\n\nconst { variables, fields } = parseAdsTxt(someAdsTxtContent);\n```\n\n`parseAdsTxt` outputs an object with `variables` (Object) and `fields` (Array).\n\n`variables` may resemble the following:\n\n```json\n{\n    \"subdomain\": [\"divisionone.example.com\", \"divisiontwo.example.com\"],\n    \"contact\": \"Jane Doe\"\n}\n```\n\nEach field item in the `fields` array corresponds with a parsed `ads.txt` line:\n\n```json\n{\n    \"domain\": \"openx.com\",\n    \"publisherAccountID\": \"343560932\",\n    \"accountType\": \"DIRECT\",\n    \"certificateAuthorityID\": \"38f6ae102b\"\n}\n```\n\nFields can also handle comments, if they are present in a parsed `ads.txt` file. For instance, the line `kargo.com, 105, DIRECT # banner` would generate the following field:\n\n```json\n{\n    \"domain\": \"kargo.com\",\n    \"publisherAccountID\": \"105\",\n    \"accountType\": \"DIRECT\",\n    \"comment\": \"banner\"\n}\n```\n\nThe `parseAdsText` function takes an options object (`parseAdsTxt(contents, options)`) that takes the following properties:\n\n| Property            | Range              | Default      | Description                                                             |\n|---------------------|--------------------|--------------|-------------------------------------------------------------------------|\n| invalidLineAction   | \"filter\" / \"throw\" | \"filter\"     | Action to take when an invalid line is found. \"throw\" throws an exception, \"filter\" removes the line and continues on. |\n\n_The parsing process will recognise both **CR** (Linux/Mac) and **CRLF** (Windows) when reading ads.txt content._\n\n### Generating\nAds.txt files can also be generated by using the `generateAdsTxt` method:\n\n```javascript\nconst { generateAdsTxt } = require(\"ads.txt\");\n\nconst adsTxtContent = generateAdsTxt({\n    fields: [\n        {\n            \"domain\": \"openx.com\",\n            \"publisherAccountID\": \"343560932\",\n            \"accountType\": \"DIRECT\",\n            \"certificateAuthorityID\": \"38f6ae102b\"\n        },\n        {\n            \"domain\": \"appnexus.com\",\n            \"publisherAccountID\": \"455492434\",\n            \"accountType\": \"DIRECT\",\n            \"certificateAuthorityID\": \"90a23bf11ac\",\n            \"comment\": \"banner\"\n        }\n    ],\n    variables: {\n        CONTACT: \"John Doe\",\n        SUBDOMAIN: [\"sub1.domain.com\", \"sub2.domain.com\"]\n    }\n});\n```\n\nThe generation method uses the following syntax: `generateAdsTxt(manifest[, header[, footer]])`. A `header` and/or `footer` can be added to the generated document:\n\n```javascript\nconst adsTxtContent = generateAdsTxt(manifest, \"My Website\\nwebsite.com\");\n```\n\nThis example might generate the following:\n\n```\n# My Website\n# website.com\nopenx.com, 537153334, DIRECT\n```\n\nBoth `header` and `footer` are optional.\n","maintainers":[{"email":"perry@perrymitchell.net","name":"perrymitchell"}],"time":{"modified":"2022-04-11T12:47:26.225Z","created":"2017-11-13T10:54:38.421Z","0.1.0":"2017-11-13T10:54:38.421Z","0.1.1":"2017-11-13T11:10:37.233Z","0.1.2":"2017-11-13T14:16:25.313Z","0.2.0":"2017-11-16T11:07:09.003Z","0.2.1":"2018-05-06T19:38:10.878Z","0.3.0":"2018-11-08T19:47:04.635Z","0.4.0":"2019-07-01T19:37:54.591Z"},"homepage":"https://github.com/perry-mitchell/ads.txt#readme","keywords":["ads.txt","ads","parse"],"repository":{"type":"git","url":"git+https://github.com/perry-mitchell/ads.txt.git"},"author":{"name":"Perry Mitchell","email":"perry@perrymitchell.net"},"bugs":{"url":"https://github.com/perry-mitchell/ads.txt/issues"},"license":"MIT","readmeFilename":"README.md"}