{"_id":"@aleloiac/simple-dropdown-toggle","name":"@aleloiac/simple-dropdown-toggle","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aleloiac/simple-dropdown-toggle","version":"1.0.0","description":"Simple function to toggle the visibility of a dropdown entry","main":"toggle-dropdown.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AleLoiac/dropdown-menu.git"},"author":{"name":"Alessandro Loiac"},"license":"ISC","bugs":{"url":"https://github.com/AleLoiac/dropdown-menu/issues"},"homepage":"https://github.com/AleLoiac/dropdown-menu","publishConfig":{"access":"public"},"_id":"@aleloiac/simple-dropdown-toggle@1.0.0","gitHead":"8591974fab59948152c119629fab2871383659cd","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-+hwqZJYLjmQtPG+5Hflaf5/qI1ph0QrRyZ8Gl0s5WtL39mqA0iifQbZOfhHbR7S4LCFly7eYhujCFaQJu0PvVw==","shasum":"98459c939b675ba42be4f35087305f765c8dd694","tarball":"https://registry.npmjs.org/@aleloiac/simple-dropdown-toggle/-/simple-dropdown-toggle-1.0.0.tgz","fileCount":3,"unpackedSize":1684,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFmVd/FYA2iwcXQX07Lc3nUQdPknFUshPYo/Wj4DZimzAiBJWPRWjmtt8UuI8z86jAklJryDNTthM0hIWqvQs5W9XQ=="}]},"_npmUser":{"name":"aleloiac","email":"alessandroloiac@gmail.com"},"directories":{},"maintainers":[{"name":"aleloiac","email":"alessandroloiac@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/simple-dropdown-toggle_1.0.0_1748418214917_0.8209303874206455"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-28T07:43:34.834Z","1.0.0":"2025-05-28T07:43:35.089Z","modified":"2025-05-28T07:43:35.322Z"},"maintainers":[{"name":"aleloiac","email":"alessandroloiac@gmail.com"}],"description":"Simple function to toggle the visibility of a dropdown entry","homepage":"https://github.com/AleLoiac/dropdown-menu","repository":{"type":"git","url":"git+https://github.com/AleLoiac/dropdown-menu.git"},"author":{"name":"Alessandro Loiac"},"bugs":{"url":"https://github.com/AleLoiac/dropdown-menu/issues"},"license":"ISC","readme":"# simple-dropdown-toggle\n\nA tiny utility function to toggle the visibility of a dropdown element using plain JavaScript.\n\n## Installation\n\n```bash\nnpm install @aleloiac/simple-dropdown-toggle\n```\n\n## Usage\n\nThis package provides a single named export: `toggleDropdown`. It toggles a DOM element’s visibility by switching between `display: \"none\"` and `display: \"block\"`.\n\n### Example\n\n```js\nimport { toggleDropdown } from \"@aleloiac/simple-dropdown-toggle\";\n\nconst dropdown = document.getElementById(\"my-dropdown\");\nconst toggleButton = document.getElementById(\"my-button\");\n\ntoggleButton.addEventListener(\"click\", () => {\n  toggleDropdown(dropdown);\n});\n```\n\n# Notes\n\n- Designed for use in vanilla JavaScript projects.\n\n- Intended for browser environments (bundled via Webpack, Vite, etc.).\n\n- Assumes the dropdown element’s display style is initially set via CSS or inline.\n","readmeFilename":"README.md","_rev":"1-18cc5e33294257c85679d4f2db5cf038"}