{"_id":"@axeptio/links-classifier","_rev":"26-9b6be9992dc557f6c9c1621c4a51dc99","name":"@axeptio/links-classifier","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"@axeptio/links-classifier","version":"0.0.1","keywords":[],"author":"","license":"ISC","_id":"@axeptio/links-classifier@0.0.1","maintainers":[{"name":"mcriel-axeptio","email":"monty.criel@axeptio.eu"},{"name":"vincentbianciotto","email":"vincent@axeptio.eu"},{"name":"shouze","email":"sebastien.houze@gmail.com"},{"name":"achalhii","email":"ilyesachalhi@gmail.com"},{"name":"christophebraud","email":"christophe@agilitation.fr"},{"name":"rombat","email":"roro.devweb@gmail.com"},{"name":"romaingabilan","email":"romain.gabilan@axeptio.eu"},{"name":"fluorz","email":"leo.lecherbonnier@axeptio.eu"},{"name":"romainbessuges","email":"romainbessuges@gmail.com"}],"dist":{"shasum":"027c3a4f113769cb9f2470a35ec9049a136f5dd7","tarball":"https://registry.npmjs.org/@axeptio/links-classifier/-/links-classifier-0.0.1.tgz","fileCount":18,"integrity":"sha512-xDJ3pPFhHGvHCrBE4MEbxMSinr91qaIp4P3hbl+rRFEYv/3XGh3qwx6C3Y3hwMi4VvT43JGNgmlBpJyRpYRniw==","signatures":[{"sig":"MEYCIQCt/SaOQHSnF6ocP1ztQs1EOGJs7WFgEJZ5GzquIyQXIAIhAIi8M/VwzLNsQN8a34DTmgPbC6RT7veEOQRzJnLvSpn+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":539048},"main":"dist/links-classifier.node.js","type":"module","gitHead":"c94acd4996a136913e55b6df277832b8ad7bdd57","scripts":{"test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"webpack","prettier":"prettier --write 'src/**/*.{js,jsx}' 'data/**/*.{js,json}' 'tests/**/*.{js,jsx}'"},"_npmUser":{"name":"romainbessuges","email":"romainbessuges@gmail.com"},"_npmVersion":"9.6.4","description":"This library is used to filter and classify links inside a web page, works with any language.","directories":{},"_nodeVersion":"20.0.0","dependencies":{"locale-codes":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","webpack":"^5.89.0","prettier":"^3.0.3","@babel/core":"^7.23.2","webpack-cli":"^5.1.4","babel-loader":"^9.1.3","@babel/preset-env":"^7.23.2","@babel/plugin-proposal-export-default-from":"^7.22.17"},"_npmOperationalInternal":{"tmp":"tmp/links-classifier_0.0.1_1697494323093_0.7609079654901605","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@axeptio/links-classifier","version":"0.0.2","keywords":[],"author":"","license":"ISC","_id":"@axeptio/links-classifier@0.0.2","maintainers":[{"name":"mcriel-axeptio","email":"monty.criel@axeptio.eu"},{"name":"vincentbianciotto","email":"vincent@axeptio.eu"},{"name":"shouze","email":"sebastien.houze@gmail.com"},{"name":"achalhii","email":"ilyesachalhi@gmail.com"},{"name":"christophebraud","email":"christophe@agilitation.fr"},{"name":"rombat","email":"roro.devweb@gmail.com"},{"name":"romaingabilan","email":"romain.gabilan@axeptio.eu"},{"name":"fluorz","email":"leo.lecherbonnier@axeptio.eu"},{"name":"romainbessuges","email":"romainbessuges@gmail.com"}],"dist":{"shasum":"3e2f6756cfad2c5617171ad369a6a3aba8ee77dd","tarball":"https://registry.npmjs.org/@axeptio/links-classifier/-/links-classifier-0.0.2.tgz","fileCount":18,"integrity":"sha512-m+kUYPjhhQrf0ehFaQGOawN7vDoOE+JQmB2NIloAjQY6hDrGdld3GBEdUR6a7jQD6LoItklzWW+LvYX1IUM8hw==","signatures":[{"sig":"MEUCIECQQVCFhjmVOEQXvIcK3oeIex+ey0mBilIgYjAzW7VUAiEAsxKOeasiaWXEqNuEbkJScKZcljYzBiHIUKG/Ii70Fx4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":544551},"main":"dist/links-classifier.node.js","type":"module","gitHead":"afc0a6b91f6c0c8a9a1a4b80f4690a9a2acc47a6","scripts":{"test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"webpack","prettier":"prettier --write 'src/**/*.{js,jsx}' 'data/**/*.{js,json}' 'tests/**/*.{js,jsx}'"},"_npmUser":{"name":"romainbessuges","email":"romainbessuges@gmail.com"},"_npmVersion":"9.6.4","description":"This library is used to filter and classify links inside a web page, works with any language.","directories":{},"_nodeVersion":"20.0.0","dependencies":{"locale-codes":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","webpack":"^5.89.0","prettier":"^3.0.3","@babel/core":"^7.23.2","webpack-cli":"^5.1.4","babel-loader":"^9.1.3","@babel/preset-env":"^7.23.2","@babel/plugin-proposal-export-default-from":"^7.22.17"},"_npmOperationalInternal":{"tmp":"tmp/links-classifier_0.0.2_1697526063386_0.4880452946399221","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@axeptio/links-classifier","version":"0.0.3","keywords":[],"author":"","license":"ISC","_id":"@axeptio/links-classifier@0.0.3","maintainers":[{"name":"mcriel-axeptio","email":"monty.criel@axeptio.eu"},{"name":"vincentbianciotto","email":"vincent@axeptio.eu"},{"name":"shouze","email":"sebastien.houze@gmail.com"},{"name":"achalhii","email":"ilyesachalhi@gmail.com"},{"name":"christophebraud","email":"christophe@agilitation.fr"},{"name":"rombat","email":"roro.devweb@gmail.com"},{"name":"romaingabilan","email":"romain.gabilan@axeptio.eu"},{"name":"fluorz","email":"leo.lecherbonnier@axeptio.eu"},{"name":"romainbessuges","email":"romainbessuges@gmail.com"}],"dist":{"shasum":"36ee161bcf7a5aeeeb899116716a144c857270e0","tarball":"https://registry.npmjs.org/@axeptio/links-classifier/-/links-classifier-0.0.3.tgz","fileCount":18,"integrity":"sha512-Osd3zI5Elx6xezL8oIMqftixgNptneLEeXNYoSQ5+qtxUKClA+MnV5jb2A3z82qWq54nkwb3WEd2RluaIHc+QQ==","signatures":[{"sig":"MEUCIQDQKyFgerEcPpqW9SAeiBzxkByp2d5liJ5VsDvOj1RebQIgKHiPx9lANPKB2FmfrUNMCeDhul+VI0NZYczJpaIsg9o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":544669},"main":"dist/links-classifier.node.js","type":"module","husky":{"hooks":{"pre-commit":"npm run prettier && npm run build"}},"gitHead":"2baaa0a4f0e56a0755761aac482257e71ff5c3ad","scripts":{"test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"webpack","prettier":"prettier --write 'src/**/*.{js,jsx}' 'data/**/*.{js,json}' 'tests/**/*.{js,jsx}'"},"_npmUser":{"name":"romainbessuges","email":"romainbessuges@gmail.com"},"_npmVersion":"9.6.4","description":"This library is used to filter and classify links inside a web page, works with any language.","directories":{},"_nodeVersion":"20.0.0","dependencies":{"locale-codes":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^8.0.3","webpack":"^5.89.0","prettier":"^3.0.3","@babel/core":"^7.23.2","webpack-cli":"^5.1.4","babel-loader":"^9.1.3","@babel/preset-env":"^7.23.2","@babel/plugin-proposal-export-default-from":"^7.22.17"},"_npmOperationalInternal":{"tmp":"tmp/links-classifier_0.0.3_1697533134774_0.04953935342755744","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@axeptio/links-classifier","version":"0.0.4","keywords":[],"author":"","license":"ISC","_id":"@axeptio/links-classifier@0.0.4","maintainers":[{"name":"mcriel-axeptio","email":"monty.criel@axeptio.eu"},{"name":"vincentbianciotto","email":"vincent@axeptio.eu"},{"name":"shouze","email":"sebastien.houze@gmail.com"},{"name":"achalhii","email":"ilyesachalhi@gmail.com"},{"name":"christophebraud","email":"christophe@agilitation.fr"},{"name":"rombat","email":"roro.devweb@gmail.com"},{"name":"romaingabilan","email":"romain.gabilan@axeptio.eu"},{"name":"fluorz","email":"leo.lecherbonnier@axeptio.eu"},{"name":"romainbessuges","email":"romainbessuges@gmail.com"}],"homepage":"https://github.com/axeptio/links-classifier#readme","bugs":{"url":"https://github.com/axeptio/links-classifier/issues"},"dist":{"shasum":"3e001bf06e806f7d43cdaf7a2f36316ddd88bf21","tarball":"https://registry.npmjs.org/@axeptio/links-classifier/-/links-classifier-0.0.4.tgz","fileCount":19,"integrity":"sha512-s5lgcn0zueaWmeIWMYsJ26Z+8q6TIQx1J+L9hA6aFhBfYul4zrTM0UhkLzzyj1hZzCrP4wHbAgZ/mtq0s230GA==","signatures":[{"sig":"MEUCIQCP/e03CwemvOdiFPfxrlMhDrqqhE4Z3uh/65XRh9mgNwIgH9WRoIfHy9L84esgNF6ZZbX+EEu4UDE6lImeIjHEor4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":529652},"main":"dist/links-classifier.node.js","type":"module","husky":{"hooks":{"pre-commit":"npm run prettier && npm run build"}},"gitHead":"4b30e55ba8f93601c1e80c3f1df78312963b690e","scripts":{"test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"webpack","prettier":"prettier --write 'src/**/*.{js,jsx}' 'data/**/*.{js,json}' 'tests/**/*.{js,jsx}'"},"_npmUser":{"name":"achalhii","email":"ilyesachalhi@gmail.com"},"repository":{"url":"git+https://github.com/axeptio/links-classifier.git","type":"git"},"_npmVersion":"9.8.0","description":"This library is used to filter and classify links inside a web page, works with any language.","directories":{"test":"tests"},"_nodeVersion":"16.14.2","dependencies":{"locale-codes":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^8.0.3","webpack":"^5.89.0","prettier":"^3.0.3","@babel/core":"^7.23.2","webpack-cli":"^5.1.4","babel-loader":"^9.1.3","@babel/preset-env":"^7.23.2","@babel/plugin-proposal-export-default-from":"^7.22.17"},"_npmOperationalInternal":{"tmp":"tmp/links-classifier_0.0.4_1698392399780_0.974610966967715","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@axeptio/links-classifier","version":"0.0.5","keywords":[],"author":"","license":"ISC","_id":"@axeptio/links-classifier@0.0.5","maintainers":[{"name":"mcriel-axeptio","email":"monty.criel@axeptio.eu"},{"name":"vincentbianciotto","email":"vincent@axeptio.eu"},{"name":"shouze","email":"sebastien.houze@gmail.com"},{"name":"achalhii","email":"ilyesachalhi@gmail.com"},{"name":"christophebraud","email":"christophe@agilitation.fr"},{"name":"rombat","email":"roro.devweb@gmail.com"},{"name":"romaingabilan","email":"romain.gabilan@axeptio.eu"},{"name":"fluorz","email":"leo.lecherbonnier@axeptio.eu"},{"name":"romainbessuges","email":"romainbessuges@gmail.com"}],"homepage":"https://github.com/axeptio/links-classifier#readme","bugs":{"url":"https://github.com/axeptio/links-classifier/issues"},"dist":{"shasum":"e73a78464c3f4739a5f01df47474791b0a22f099","tarball":"https://registry.npmjs.org/@axeptio/links-classifier/-/links-classifier-0.0.5.tgz","fileCount":19,"integrity":"sha512-U6X20cQ2Z7uw4VrQJnuD/pL2U02wLlo83sS6juquRLdUQ7aVYGkqSQ9VkBH1nxi/gasEXDEblVsmQvVdzQlXfg==","signatures":[{"sig":"MEUCIQD1/x1y2YFji0rToz4XH/C2xl31r0xeCPf8erD8j8ce9gIgba+VXF6YhM4hEqOR7vAFD7rG+9kOD8r3iN8nPUEyl3I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":529754},"main":"dist/links-classifier.node.js","type":"module","husky":{"hooks":{"pre-commit":"npm run prettier && npm run build"}},"gitHead":"e7d943a4d5a694de7b324212def8c8032b532ac1","scripts":{"test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"webpack","prettier":"prettier --write 'src/**/*.{js,jsx}' 'data/**/*.{js,json}' 'tests/**/*.{js,jsx}'"},"_npmUser":{"name":"achalhii","email":"ilyesachalhi@gmail.com"},"repository":{"url":"git+https://github.com/axeptio/links-classifier.git","type":"git"},"_npmVersion":"9.8.0","description":"This library is used to filter and classify links inside a web page, works with any language.","directories":{"test":"tests"},"_nodeVersion":"16.14.2","dependencies":{"locale-codes":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^8.0.3","webpack":"^5.89.0","prettier":"^3.0.3","@babel/core":"^7.23.2","webpack-cli":"^5.1.4","babel-loader":"^9.1.3","@babel/preset-env":"^7.23.2","@babel/plugin-proposal-export-default-from":"^7.22.17"},"_npmOperationalInternal":{"tmp":"tmp/links-classifier_0.0.5_1698395580663_0.1675477142697639","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"@axeptio/links-classifier","version":"0.0.6","keywords":[],"author":"","license":"ISC","_id":"@axeptio/links-classifier@0.0.6","maintainers":[{"name":"mcriel-axeptio","email":"monty.criel@axeptio.eu"},{"name":"vincentbianciotto","email":"vincent@axeptio.eu"},{"name":"shouze","email":"sebastien.houze@gmail.com"},{"name":"achalhii","email":"ilyesachalhi@gmail.com"},{"name":"christophebraud","email":"christophe@agilitation.fr"},{"name":"rombat","email":"roro.devweb@gmail.com"},{"name":"romaingabilan","email":"romain.gabilan@axeptio.eu"},{"name":"fluorz","email":"leo.lecherbonnier@axeptio.eu"},{"name":"romainbessuges","email":"romainbessuges@gmail.com"}],"homepage":"https://github.com/axeptio/links-classifier#readme","bugs":{"url":"https://github.com/axeptio/links-classifier/issues"},"dist":{"shasum":"96b2473bedaaf8dc4bc897262235364fa445511b","tarball":"https://registry.npmjs.org/@axeptio/links-classifier/-/links-classifier-0.0.6.tgz","fileCount":19,"integrity":"sha512-4jONHxAyqJhJknzoDdDxue0sJ+ggKWZDi0w3Mr2Pdb6o+5ScN3+mCovqsRKouopSNCMmyR50bof2gDXK6e3MiQ==","signatures":[{"sig":"MEUCIDzeoNiDu+L35lbFFsSSOS7AyMa9LSV12bTl4sFwqcTvAiEAhVUp53pqkAAs0iSpmyxhtiIQCddhY9kOwnEEJXoP+7c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":530103},"main":"dist/links-classifier.node.js","type":"module","husky":{"hooks":{"pre-commit":"npm run prettier && npm run build"}},"gitHead":"bea2b5f07a64d5919d067cdb7002e69e6fdbf648","scripts":{"test":"node --experimental-vm-modules node_modules/jest/bin/jest.js","build":"webpack","prettier":"prettier --write 'src/**/*.{js,jsx}' 'data/**/*.{js,json}' 'tests/**/*.{js,jsx}'"},"_npmUser":{"name":"achalhii","email":"ilyesachalhi@gmail.com"},"repository":{"url":"git+https://github.com/axeptio/links-classifier.git","type":"git"},"_npmVersion":"9.8.0","description":"This library is used to filter and classify links inside a web page, works with any language.","directories":{"test":"tests"},"_nodeVersion":"16.14.2","dependencies":{"locale-codes":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^8.0.3","webpack":"^5.89.0","prettier":"^3.0.3","@babel/core":"^7.23.2","webpack-cli":"^5.1.4","babel-loader":"^9.1.3","@babel/preset-env":"^7.23.2","@babel/plugin-proposal-export-default-from":"^7.22.17"},"_npmOperationalInternal":{"tmp":"tmp/links-classifier_0.0.6_1698399694291_0.9113946223730083","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-10-16T22:12:03.092Z","modified":"2026-09-14T10:07:22.015Z","0.0.1":"2023-10-16T22:12:03.582Z","0.0.2":"2023-10-17T07:01:03.695Z","0.0.3":"2023-10-17T08:58:54.959Z","0.0.4":"2023-10-27T07:40:00.011Z","0.0.5":"2023-10-27T08:33:00.837Z","0.0.6":"2023-10-27T09:41:34.447Z"},"bugs":{"url":"https://github.com/axeptio/links-classifier/issues"},"license":"ISC","homepage":"https://github.com/axeptio/links-classifier#readme","keywords":[],"repository":{"url":"git+https://github.com/axeptio/links-classifier.git","type":"git"},"description":"This library is used to filter and classify links inside a web page, works with any language.","maintainers":[{"email":"romainbessuges@gmail.com","name":"romainbessuges"},{"email":"tech@axeptio.eu","name":"axeptiotech"},{"email":"aurelien.grimaud@axeptio.eu","name":"a_ng_d_axeptio"},{"email":"philippe.leberre@axeptio.eu","name":"pleberre"},{"email":"luis.flores.externe@axeptio.eu","name":"luisfl-axeptio"},{"email":"javier.costa@axeptio.eu","name":"javier.costa-axeptio"},{"email":"matheus.cavinato@axeptio.eu","name":"matheuscavinax"}],"readme":"Links Classifier\n================\n\n## Use Case\n\nWe want to filter links from a given webpage and classify them into different document types, like Privacy Policy, Terms of Service, etc.\n\n## Approach\n\nWe expose two functions, one for filtering the links, removing external, invalid and duplicate links, and another one for classifying the links into different document types.\n\n## Usage\n\n```javascript\n\nconst { filterLinks, classifyLinks, keywords } = require('links-classifier');\n\nconst links = document.querySelectorAll('a');\n\nconst filteredLinks = filterLinks(\n  links, // the links to filter\n  window.location, // the context\n  ['en', 'fr', 'it'], // valid locales (other languages will be ignored)\n  false, // follow subdomains\n  console.log // logger function\n);\n\nconst classifiedLinks = classifyLinks(filteredLinks, keywords, 'fr');\n\nconsole.log(classifiedLinks);\n\n/*\n{\n 'privacy_policy': Array(2),\n 'terms_of_service': Array(1),\n}\n */\n```\n\n# Data\n\nThis module imports its own dataset, located in `data/keywords.js`, which contains variations for each document type. It is exposed as a symbol from the index, but you are free to use your own dataset.\n","readmeFilename":"README.md"}