{"_id":"validate-target","_rev":"8-7b68b92c9d6ea6ea70e37fdd40869a99","name":"validate-target","dist-tags":{"latest":"4.0.0"},"versions":{"1.0.0":{"name":"validate-target","version":"1.0.0","author":{"name":"Yoriiis aka Joris DANIEL"},"license":"MIT","_id":"validate-target@1.0.0","maintainers":[{"name":"yoriiis","email":"joris.daniel@gmail.com"}],"homepage":"https://github.com/yoriiis/validate-target","bugs":{"url":"https://github.com/yoriiis/validate-target/issues"},"dist":{"shasum":"b5c458cdf46471f6a860cf77c575a1aca973a48e","tarball":"https://registry.npmjs.org/validate-target/-/validate-target-1.0.0.tgz","fileCount":17,"integrity":"sha512-ISlv6ZY3smN+Icvfbew9sgiERpeHzD56eourCVlPVgCzz3Wum8vvvn6iooSv2pv7tM1Wja1b5XRaYqjdA1AOtw==","signatures":[{"sig":"MEYCIQD6T/yZ8sUeMo2Gmj1lSvnBlOex4xHl+2GHMqf1Yf6NvgIhAPojRDovPiRGg4sxN14/WAOMUU908kocSHIm8k0tHOxM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKjjfCRA9TVsSAnZWagAA148P/1wkq22rPYnjpkRi33ZI\n7Tu2ab1zGdNXRFOAA2ADHBwlLxS1KbfOyOAQDYDhu5hVR5II98XeaChs+nHR\nTcre1eUIZ5nhjoeDA7JW5PbcmFLULDZPaT1850xr2w6j8XQpEG8KuJM/z8cM\ndqC1vJTA2QMmnaNNtT8XB9yQwjg7r1cJk1DunJrUb1xsxXZZCv5V/1LZOMGK\nD01ptCSpSl48k09aH4ZBn2ACtxMNNCRbG+XQ1Dqt423Z2v3MKWveiYVbwMv/\nbLkxDQUAXjbJJ6BkVvxWF7sexKeV0G88DzT5UnqTNH/ZfUz16UI7Pn6165Kr\nSZ3AGFsr41yI753DUSxnxA5Fv3qenhm8DjjpbosN9DtRtjpXRDMNQp22UKLp\nbcbqI2maf2U2hgMexBUY8SqQ08+vkXKrohIo8fgT2G+KOK1e19Pt6a7jlvAq\n8BS03uQ7hPC2DvkZhg3ihMsf21UasOEp4FgWFa0wds+n9jO/7peYZvIZqY+W\naEgh43eDcD+4yukkkDj9Kk8fWigyCB7XM1bwbzZByTM7CFGxnAMGlIH9Stp5\n9yIr7a6nhykC8ipG8RazjWF9h2j8uelWOjbp381cWYqT0TbK7OPgf2Oskn5L\nlkoZbLb3woRAX/C3dCt3km/7BgcXI/M6dvo2hefvlWfRsyiTcMK3Rpo4N7PZ\nIp+l\r\n=vFYE\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=8.11.2"},"gitHead":"057deec00b14f62fae6e31fdd4e9ceb746ee8037","scripts":{"test":"jest","coverage":"npm run test:coverage && cat ./coverage/lcov.info | coveralls","test:watch":"jest --watch --coverage","test:eslint":"eslint -c ./.eslintrc.js .","test:coverage":"jest --coverage","test:markdown":"markdownlint '**/*.md' --ignore node_modules"},"_npmUser":{"name":"yoriiis","email":"joris.daniel@gmail.com"},"repository":{"url":"git+https://github.com/yoriiis/validate-target.git","type":"git"},"_npmVersion":"5.6.0","description":"Easily validate target of an HTML element especially during event delegation","directories":{},"_nodeVersion":"8.11.2","_hasShrinkwrap":false,"devDependencies":{"jest":"24.9.0","eslint":"4.19.1","coveralls":"3.0.9","babel-eslint":"10.0.3","prettier-eslint":"9.0.1","markdownlint-cli":"0.21.0","@babel/preset-env":"7.7.7","eslint-plugin-node":"8.0.1","eslint-plugin-import":"2.19.1","eslint-plugin-promise":"4.2.1","eslint-config-standard":"10.2.1","eslint-plugin-standard":"3.0.1","babel-plugin-dynamic-import-node":"2.3.0"},"_npmOperationalInternal":{"tmp":"tmp/validate-target_1.0.0_1579825374893_0.3595716859203084","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"validate-target","version":"1.0.1","keywords":["validate target","event delegation","validate","utils"],"author":{"name":"Yoriiis aka Joris DANIEL"},"license":"MIT","_id":"validate-target@1.0.1","maintainers":[{"name":"yoriiis","email":"joris.daniel@gmail.com"}],"homepage":"https://github.com/yoriiis/validate-target","bugs":{"url":"https://github.com/yoriiis/validate-target/issues"},"dist":{"shasum":"8895a2823a1d6ce6e1f60991716c4f519b6c6e13","tarball":"https://registry.npmjs.org/validate-target/-/validate-target-1.0.1.tgz","fileCount":6,"integrity":"sha512-qOdJdSJJx7TT4FWmXSKey1DYmaPVJDq+RQL5q1W4eHLqs+oNB4wkVgf208zvgtCgcOBXwAFPHGmahnAJJMxtYg==","signatures":[{"sig":"MEYCIQCnFuUIm5L4TW40O6EXeW7j9+3v8gt+OKNn5YdoC3Ue9wIhAMZC2X4w3UZZ4aIYtsadEww97f73DTsq9DzxZBb7jtvO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKyajCRA9TVsSAnZWagAAkAcP/iaSNEg+JaecOI6LgZvz\nvomXRkDzhgagnVAbMOHi3Y8z2xhLEJ8WjD2J2/NIETGwm8ChGX45lVqlqByD\nhBXQj9ZE2Bv5HNW13V1mwIwYd/EdntSUcxdRPGqhqTed6thuf286U2SFyCCY\nfKZKWXMPCp1fVe8DPgANw1Eb0WOpSIqEPsUIenFN4BsrMg749rGMpkgFn8nO\n8t0UmS4sUv5OoosOvc4VvyZDPS558Y5o2ilJXh2KAalM0AzB4TNeUttiTz2a\n3LsUtDH2TzN2OzEFqwsxkIoCVUmkM5bkufXSLUsofgvrqZEUq42n6WE0tSKn\nPn0TAqMQXlQkOj/vrJq7cx//dU2ZjHF11pxW26o/etpTve5waPWDmuexOfbH\nof6fzbb11SBKv3UvYBnpbP3PONQ3/KQ7cx/ZIC1pzjqCAYmSROoarDBNp07b\nIlxPlPvgYNnme0Dcb0771xT+dSXv4NvxOrgRu+l3MzT1MvkaGEAuyRCDdI78\n1VlPoJDXp5YgqUkUMSJDI9xqEQYx6YizPeCgPDe0Ph6j0o9rBwjNAUwjNK4d\nTjNKQfohC6Z0PiOEMZdPlynMVjsn8jWxcApIvKF0lm2VvQvSEd5e5tPwHj+b\nTiiAcvZHLvwrpjI/NLcWepfw5DITitmqTunEWXTSF19gPCvHmtjViZzMPtCz\nwFLY\r\n=10Ie\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","engines":{"node":">=8.11.2"},"gitHead":"2b5e6abb09d12befe8be9f350830b8395d69bbec","scripts":{"test":"jest","coverage":"npm run test:coverage && cat ./coverage/lcov.info | coveralls","test:watch":"jest --watch --coverage","test:eslint":"eslint -c ./.eslintrc.js .","test:coverage":"jest --coverage","test:markdown":"markdownlint '**/*.md' --ignore node_modules"},"_npmUser":{"name":"yoriiis","email":"joris.daniel@gmail.com"},"repository":{"url":"git+https://github.com/yoriiis/validate-target.git","type":"git"},"_npmVersion":"6.13.4","description":"Easily validate target of an HTML element especially during event delegation","directories":{},"_nodeVersion":"12.14.0","_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","coveralls":"3.0.9","babel-eslint":"10.0.3","prettier-eslint":"9.0.1","markdownlint-cli":"0.21.0","@babel/preset-env":"7.8.3","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.0","eslint-plugin-promise":"4.2.1","eslint-config-standard":"14.1.0","eslint-plugin-standard":"4.0.1","babel-plugin-dynamic-import-node":"2.3.0"},"_npmOperationalInternal":{"tmp":"tmp/validate-target_1.0.1_1579886242837_0.5693000390214338","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"validate-target","version":"2.0.0","keywords":["validate target","event delegation","validate","utils"],"author":{"name":"Yoriiis aka Joris DANIEL"},"license":"MIT","_id":"validate-target@2.0.0","maintainers":[{"name":"yoriiis","email":"joris.daniel@gmail.com"}],"homepage":"https://github.com/yoriiis/validate-target","bugs":{"url":"https://github.com/yoriiis/validate-target/issues"},"dist":{"shasum":"b8fb4f8ccbed9503e8316d9f5d419daec82efab6","tarball":"https://registry.npmjs.org/validate-target/-/validate-target-2.0.0.tgz","fileCount":5,"integrity":"sha512-ELRDv4dNxEPrwavvk8OSNtyvUYZVqKIo9c3deHBxf8YhnNJMN9qtZJkW1sRCqI7gMElHWjy/AaIyJq/DdsKN2Q==","signatures":[{"sig":"MEYCIQCNrJ+8cLhHrggSPSZI9hNqyEwgevozAWybOb9AalXSAwIhAMQBNY8aea10AQxln56OKwTH5zZslSyiP/igI6PFz1Is","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeekl7CRA9TVsSAnZWagAAPnIP/iIGj19BTE2geZlwUqfd\noDb+0Kokbz7LvViCIT5z16LTNcggdc1wHo87bjGpAxVr4YmPMpOimZ++PF4J\nNaV/hSFrmzwxKuy//ekDnIg9B1u/jn7Xf41wSr+T+O4wNmiBL9sFV6N/GRTp\nRbsIF1Uz1YuV4Y9PbYmq+OIPvPvms2ktBuL6Y7Jx5CxaL+LW2BoQqG5QVzcS\nj3v1xHBy5C6Aczlk3t7szcPpVzLnqiP+iyRiL2go/ereU+UmQ6seygXhVhYl\njhRi1UjABpe9mhFFQM6NfExyJrz7CEJ6Q/igryZElUc+lGdi577cmlp2hZ/U\naikdH8Fm22tX19fNZnBtIs19j+d0Sf9rSFGATY6wteP2kV5My0XVpFUo/RP0\ndosHoLdSg4nxiIuA2TEt2r78u+T6um+ENL6UFLmX0ofAft769RCl2+eTxg+O\nilnnnCJXjAKFp8V3niixgST/Jou71citkuc0O+R/TxtmchuEgZ3zNRm3j31u\nRzzHsOs/eS2mSdTfAq3seyM0Afks5J4c+ARxMCv83l6OXXgi3C5WA20IgJ09\na99/tMZhusRGlVLqUGc+3gxb1WImDepPxJAddP+u3vzn2c0LkqJF3mjHOQGD\n6vVP0dBCIysO/i59y/jUoda5VZw5aqf0azcyYf/sc7CUFNsXUqXSxRSBxHlE\nerIr\r\n=I+YU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","engines":{"node":">=8.11.2"},"gitHead":"be7de1e1d7d553c3516a92745b83055106eea1ae","scripts":{"test":"jest","coverage":"npm run test:coverage && cat ./coverage/lcov.info | coveralls","test:watch":"jest --watch --coverage","test:eslint":"eslint -c ./.eslintrc.js .","test:coverage":"jest --coverage","test:markdown":"markdownlint '**/*.md' --ignore node_modules"},"_npmUser":{"name":"yoriiis","email":"joris.daniel@gmail.com"},"repository":{"url":"git+https://github.com/yoriiis/validate-target.git","type":"git"},"_npmVersion":"6.13.4","description":"Easily validate target of an HTML element especially during event delegation","directories":{},"_nodeVersion":"12.14.0","_hasShrinkwrap":false,"devDependencies":{"jest":"25.1.0","eslint":"6.8.0","coveralls":"3.0.11","babel-eslint":"10.1.0","prettier-eslint":"9.0.1","markdownlint-cli":"0.22.0","@babel/preset-env":"7.9.0","eslint-plugin-node":"11.0.0","eslint-plugin-import":"2.20.1","eslint-plugin-promise":"4.2.1","eslint-config-standard":"14.1.1","eslint-plugin-standard":"4.0.1","babel-plugin-dynamic-import-node":"2.3.0"},"_npmOperationalInternal":{"tmp":"tmp/validate-target_2.0.0_1585072506589_0.4453032964092529","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"validate-target","version":"3.0.0","keywords":["validate target","event delegation","validate","utils"],"author":{"name":"Joris DANIEL"},"license":"MIT","_id":"validate-target@3.0.0","maintainers":[{"name":"yoriiis","email":"joris.daniel@gmail.com"}],"homepage":"https://github.com/yoriiis/validate-target","bugs":{"url":"https://github.com/yoriiis/validate-target/issues"},"dist":{"shasum":"67121e13c386654a1123ec98df5f820c30d2ac8f","tarball":"https://registry.npmjs.org/validate-target/-/validate-target-3.0.0.tgz","fileCount":4,"integrity":"sha512-Tnl5lpuMX+BiEt5SoIS2mCxYgE80CBy08pMlsEBNaTdglwm9kfeNMkz0ysslqYf1XpuroxvTLe4Uj7P/9rbPEw==","signatures":[{"sig":"MEUCIQD5Wt2afR8xkLqfVKvGLGlQqUpKPW6VaKdsbWDkscZFaQIgZOI1MpfyrIerGNfE/xJGcjBUAhfUZZjUw/Lugm3cPjw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7008},"main":"src/index.js","type":"module","engines":{"node":">=16.20.0"},"gitHead":"2d0e3f4df5d12614d3bb0c9c64a58abaa2da1f9c","scripts":{"test":"npm run test:markdown && npm run test:eslint && npm run test:unit","build":"echo \"No build specified\" && exit 0","test:unit":"node --experimental-vm-modules node_modules/jest/bin/jest.js --config config/jest.config.js --verbose --coverage","test:watch":"node --experimental-vm-modules node_modules/jest/bin/jest.js --config config/jest.config.js --watchAll --coverage","test:eslint":"eslint . --config ./config/.eslintrc.cjs","test:markdown":"markdownlint-cli2 '**/*.md' '.github/*.md'"},"_npmUser":{"name":"yoriiis","email":"joris.daniel@gmail.com"},"prettier":"./config/prettier.config.cjs","repository":{"url":"git+https://github.com/yoriiis/validate-target.git","type":"git"},"_npmVersion":"8.19.4","description":"Easily validate target of an HTML element especially during event delegation","directories":{},"_nodeVersion":"16.20.0","_hasShrinkwrap":false,"devDependencies":{"jest":"29.5.0","eslint":"^8.39.0","prettier":"^2.8.7","coveralls":"^3.1.1","eslint-plugin-n":"^15.7.0","@babel/preset-env":"^7.22.2","markdownlint-cli2":"^0.7.1","eslint-plugin-node":"^11.1.0","@babel/eslint-parser":"^7.21.8","eslint-plugin-import":"^2.27.5","eslint-plugin-promise":"^6.1.1","eslint-config-prettier":"^8.8.0","eslint-config-standard":"^17.0.0","eslint-plugin-prettier":"^4.2.1","jest-environment-jsdom":"^29.5.0"},"_npmOperationalInternal":{"tmp":"tmp/validate-target_3.0.0_1685228443805_0.8973257864290605","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"validate-target","version":"3.1.0","keywords":["validate target","event delegation","validate","utils"],"author":{"name":"Joris DANIEL"},"license":"MIT","_id":"validate-target@3.1.0","maintainers":[{"name":"yoriiis","email":"joris.daniel@gmail.com"}],"homepage":"https://github.com/yoriiis/validate-target","bugs":{"url":"https://github.com/yoriiis/validate-target/issues"},"dist":{"shasum":"5827f3e35bf5ba65b471accd88d6206a7a7f373b","tarball":"https://registry.npmjs.org/validate-target/-/validate-target-3.1.0.tgz","fileCount":5,"integrity":"sha512-b6S4X2Og25Eb5Ez4Z3AvPv8mYz7t06HznozUBaz984gChWeqM59WDYKXvfjJSo2RStxUI1aR7T3n/5IN0edG+g==","signatures":[{"sig":"MEUCIBAdyZP34JN/wY/yGkBESoRLhg0FgZNuVpKjG+cWPg0VAiEA1sMWsORiKa/rto094c9jt+nGGyJzn0ykSZyT9m4H+KQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7185},"type":"module","types":"./types/index.d.ts","engines":{"node":">=16.20.0"},"exports":"./lib/index.js","gitHead":"a1b25e146a5d2b0d4caee0319f65fbe5df12002d","scripts":{"dev":"tsc --watch","test":"npm run test:unit","build":"rm -rf ./types ./lib && tsc","dev:unit":"jest --config config/jest.config.js --watchAll --coverage","test:unit":"jest --config config/jest.config.js --verbose --coverage"},"_npmUser":{"name":"yoriiis","email":"joris.daniel@gmail.com"},"prettier":"./config/prettier.config.cjs","repository":{"url":"git+https://github.com/yoriiis/validate-target.git","type":"git"},"_npmVersion":"8.19.4","description":"Easily validate target of an HTML element especially during event delegation","directories":{},"_nodeVersion":"16.20.1","_hasShrinkwrap":false,"devDependencies":{"jest":"29.5.0","ts-jest":"^29.1.0","coveralls":"^3.1.1","typescript":"^5.0.4","@babel/core":"^7.22.1","@babel/preset-env":"^7.22.2","jest-environment-jsdom":"^29.5.0"},"_npmOperationalInternal":{"tmp":"tmp/validate-target_3.1.0_1688912661483_0.9861933743539715","host":"s3://npm-registry-packages"}},"3.1.1":{"name":"validate-target","version":"3.1.1","keywords":["validate target","event delegation","validate","utils"],"author":{"name":"Joris DANIEL"},"license":"MIT","_id":"validate-target@3.1.1","maintainers":[{"name":"yoriiis","email":"joris.daniel@gmail.com"}],"homepage":"https://github.com/yoriiis/validate-target","bugs":{"url":"https://github.com/yoriiis/validate-target/issues"},"dist":{"shasum":"4a6dc9a6768aaa801f8e3d94f3fc89adc499a47e","tarball":"https://registry.npmjs.org/validate-target/-/validate-target-3.1.1.tgz","fileCount":5,"integrity":"sha512-MRTgeSwwI8fyNPzRi8SsZiU6LSwlsRE3cLiynyse8G82hjEkfq/setjs0D789FwKrtnDCZn7m0MHlklDPzs74g==","signatures":[{"sig":"MEYCIQDMM0HXIM1AHnyN8N138a1URHyuFFb/tkpL9WJcqBVcUwIhAOYDxndpIrSk9os9jlrnitXhOjkQgUvwvijLAJ1wF+hP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7250},"type":"module","types":"./types/index.d.ts","engines":{"node":">=16.20.0"},"exports":{".":{"types":"./types/index.d.ts","import":"./lib/index.js"}},"gitHead":"dca1b02acff33cc834b64de5b223c4aaa1042dc7","scripts":{"dev":"tsc --watch","test":"npm run test:unit","build":"rm -rf ./types ./lib && tsc","dev:unit":"jest --config config/jest.config.js --watchAll --coverage","test:unit":"jest --config config/jest.config.js --verbose --coverage"},"_npmUser":{"name":"yoriiis","email":"joris.daniel@gmail.com"},"prettier":"./config/prettier.config.cjs","repository":{"url":"git+https://github.com/yoriiis/validate-target.git","type":"git"},"_npmVersion":"8.19.4","description":"Easily validate target of an HTML element especially during event delegation","directories":{},"_nodeVersion":"16.20.1","_hasShrinkwrap":false,"devDependencies":{"jest":"29.5.0","ts-jest":"^29.1.0","coveralls":"^3.1.1","typescript":"^5.0.4","@babel/core":"^7.22.1","@babel/preset-env":"^7.22.2","jest-environment-jsdom":"^29.5.0"},"_npmOperationalInternal":{"tmp":"tmp/validate-target_3.1.1_1688919838847_0.7803485930286453","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"validate-target","version":"4.0.0","description":"Easily validate target of an HTML element especially during event delegation","keywords":["validate target","event delegation","validate","utils"],"homepage":"https://github.com/yoriiis/validate-target","bugs":{"url":"https://github.com/yoriiis/validate-target/issues"},"repository":{"type":"git","url":"git+https://github.com/yoriiis/validate-target.git"},"license":"MIT","author":{"name":"Yoriiis"},"type":"module","exports":{".":{"types":"./types/index.d.ts","import":"./lib/index.js"}},"types":"./types/index.d.ts","scripts":{"biome:check":"biome check","biome:fix":"biome check --write","build":"rm -rf ./types ./lib && tsc","dev":"tsc --watch","dev:unit":"jest --config config/jest.config.js --watchAll --coverage","test":"npm run test:unit","test:unit":"jest --config config/jest.config.js --verbose --coverage"},"prettier":"./config/prettier.config.cjs","devDependencies":{"@babel/core":"^7.28.5","@babel/preset-env":"^7.28.5","@biomejs/biome":"^2.3.4","coveralls":"^3.1.1","jest":"29.5.0","jest-environment-jsdom":"^29.5.0","ts-jest":"^29.4.5","typescript":"^5.9.3"},"engines":{"node":">=22"},"gitHead":"28a8660717fac3a9f3f27a330ac0a68f728a38d3","_id":"validate-target@4.0.0","_nodeVersion":"24.11.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-HTQJMkL6Z2szjEJ0Mn86211uqe3Za5p6KvsLy2CAQObR9h4ZaNbmFuVJklybKIc1ghWnZOCo45MF0Exz2URwMA==","shasum":"0505477b2b81f3545d7a871ded1281ad49438594","tarball":"https://registry.npmjs.org/validate-target/-/validate-target-4.0.0.tgz","fileCount":5,"unpackedSize":7335,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/validate-target@4.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDkEOvK6gSdf4r0gdPRx3+6z1kIOqSFICpiQfPEdq8SlQIgX+3XxTGWU9gOV57mWQJzmqp9CYBRoueBDW+jP3fdl78="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f37711a8-6324-40e6-8399-3b116653fa36"}},"directories":{},"maintainers":[{"name":"yoriiis","email":"npm.9mif8@aleeas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/validate-target_4.0.0_1762974812706_0.41957202221501855"},"_hasShrinkwrap":false}},"time":{"created":"2020-01-24T00:22:54.893Z","modified":"2025-11-12T19:13:33.372Z","1.0.0":"2020-01-24T00:22:55.099Z","1.0.1":"2020-01-24T17:17:22.930Z","2.0.0":"2020-03-24T17:55:06.714Z","3.0.0":"2023-05-27T23:00:43.955Z","3.1.0":"2023-07-09T14:24:21.675Z","3.1.1":"2023-07-09T16:23:59.043Z","4.0.0":"2025-11-12T19:13:32.901Z"},"bugs":{"url":"https://github.com/yoriiis/validate-target/issues"},"author":{"name":"Yoriiis"},"license":"MIT","homepage":"https://github.com/yoriiis/validate-target","keywords":["validate target","event delegation","validate","utils"],"repository":{"type":"git","url":"git+https://github.com/yoriiis/validate-target.git"},"description":"Easily validate target of an HTML element especially during event delegation","maintainers":[{"name":"yoriiis","email":"npm.9mif8@aleeas.com"}],"readme":"# validateTarget\n\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/yoriiis/validate-target/build.yml?branch=main&style=for-the-badge)](https://github.com/yoriiis/validate-target/actions/workflows/build.yml) [![Coverage Status](https://img.shields.io/coveralls/github/yoriiis/validate-target?style=for-the-badge)](https://coveralls.io/github/yoriiis/validate-target?branch=main)\n\n`validate-target` is a minimalist script to easily validate target of an HTML element especially during event delegation. Event delegation is advised for better performance, read [MDN documentation](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_delegation) for more information.\n\nNo needs to check `nodeName` or `className` properties, the function return directly a boolean when the target is correct.\n\nThe target can have multiple node name if element shares common code. The function use [Element.matches](https://developer.mozilla.org/fr/docs/Web/API/Element/matches) to ensure `selectorString` match the target.\n\n## Installation\n\nThe library is available as the `validate-target` package name on [npm](https://www.npmjs.com/package/validate-target) and [Github](https://github.com/yoriiis/validate-target).\n\n```bash\nnpm install validate-target --save-dev\n```\n\n```bash\nyarn add validate-target --dev\n```\n\n> **Warning** validate-target@3 is ESM.\n>\n> **Note** Minimum supported `Node.js` version is `16.20.0`.\n\n### CDN\n\nYou can also download it and include it with a script tag. The library will be registered as the global variable `window.validateTarget`.\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/validate-target@3\" crossorigin></script>\n```\n\n> **Note** You can browse the source of the NPM package at [jsdelivr.com/package/npm/validate-target](https://www.jsdelivr.com/package/npm/validate-target).\n\n## How it works\n\n### Basic usage\n\nThe following example returns `true` because the `nodeName` and `selectorString` properties match.\n\n```html\n<a href=\"\" class=\"itemLink\">Link</a>\n```\n\n```js\nvalidateTarget({\n  target: document.querySelector('.itemLink'),\n  selectorString: '.itemLink',\n  nodeName: 'a'\n});\n```\n\n### Multiple node names\n\nThe following example returns `true` because `button` is a matched value for `nodeName` and `selectorString`.\n\n```html\n<a href=\"\" class=\"itemLink\">Link</a> <button class=\"itemButton\">Button</button>\n```\n\n```js\nvalidateTarget({\n  target: document.querySelector('.itemLink'),\n  selectorString: '.itemLink',\n  nodeName: ['button', 'a']\n});\n```\n\n### Event delegation\n\nThe following example creates a click event listener on the `nav` element and intercepts click events on the `itemLink` element.\n\n```html\n<nav class=\"nav\">\n  <ul>\n    <li>\n      <a href=\"\" class=\"itemLink\">Link</a>\n    </li>\n    <li>\n      <a href=\"\" class=\"itemLink\">Link</a>\n    </li>\n    <li>\n      <a href=\"\" class=\"itemLink\">Link</a>\n    </li>\n  </ul>\n</nav>\n```\n\n```js\ndocument.querySelector('.nav').addEventListener('click', (e) => {\n  const validateTargetLinkClick = validateTarget({\n    target: e.target,\n    selectorString: '.itemLink',\n    nodeName: 'a'\n  });\n\n  if (validateTargetLinkClick) {\n    console.log('Link is clicked.');\n  }\n});\n```\n\n---\n\n## Parameters\n\n### `target`\n\nType:\n\n```ts\ntype target = HTMLElement;\n```\n\nTells to the function the target element.\n\n### `selectorString`\n\nType:\n\n```ts\ntype target = string;\n```\n\nTells the function the selector string of the target element. Can be any valid CSS selector (class, id, attribute, etc.). The function uses the `Element.matches` function.\n\n### `nodeName`\n\nType:\n\n```ts\ntype target = string | string[];\n```\n\nTells the function the node names. The order of the parameters in the array does not matter.\n\n## License\n\n`validate-target` is licensed under the [MIT License](http://opensource.org/licenses/MIT).\n\nCreated with ♥ by [@yoriiis](http://github.com/yoriiis).\n","readmeFilename":"README.md"}