{"_id":"@1ohooks/use-script","_rev":"2-fff2afe24a6215a6b30f94d936906bd1","name":"@1ohooks/use-script","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@1ohooks/use-script","version":"0.1.0","main":"dist/packages/useScript/src/index.js","types":"dist/packages/useScript/src/index.d.ts","scripts":{"build":"tsc && copyfiles -u 1 src/**/*.{scss,png,jpg} dist/"},"keywords":[],"author":"","license":"ISC","_id":"@1ohooks/use-script@0.1.0","_nodeVersion":"18.14.2","_npmVersion":"9.5.1","dist":{"integrity":"sha512-rB7aL2DdpeByLeYRmgXS6oVJSGpRC/1DaViB5nLoex/IldtB+bNqkbDMQtr1UXaG3rG/cgixAIeV28DtxGAmjA==","shasum":"b32f7c8ec8acae4fe713914a2021ecf3db8207fe","tarball":"https://registry.npmjs.org/@1ohooks/use-script/-/use-script-0.1.0.tgz","fileCount":7,"unpackedSize":2389,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkzQbi+IHTWlEZGrrojY52o4Km0qmrq8y/uDFVF+OQcAIgOwxGHrc4bP9GNjMFqzlm692AYZMQTzdvCFvOVUz5KNo="}]},"_npmUser":{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"},"directories":{},"maintainers":[{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-script_0.1.0_1695583183118_0.9860726519816074"},"_hasShrinkwrap":false},"0.1.1":{"name":"@1ohooks/use-script","version":"0.1.1","main":"dist/packages/useScript/src/index.js","types":"dist/packages/useScript/src/index.d.ts","scripts":{"build":"tsc && copyfiles -u 1 src/**/*.{scss,png,jpg} dist/"},"keywords":[],"author":"","license":"ISC","description":"[![Version](https://img.shields.io/npm/v/@1ohooks/use-script.svg)](https://www.npmjs.org/package/@1ohooks/use-script) [![Coverage Status](https://coveralls.io/repos/github/1ohooks/use-script/badge.svg?branch=master)](https://coveralls.io/github/1ohooks/us","_id":"@1ohooks/use-script@0.1.1","_nodeVersion":"18.14.2","_npmVersion":"9.5.1","dist":{"integrity":"sha512-4vYmNraBmMg1PdIMQd5/NuJ51cpAbWlsEZ9ja4231Beg8uWZq8vMWsJ1nypxAmabnzU54aoDF/hZTG0iDklrIg==","shasum":"a020ebf4a04f0161977f2aa5b0c51098708795de","tarball":"https://registry.npmjs.org/@1ohooks/use-script/-/use-script-0.1.1.tgz","fileCount":8,"unpackedSize":4471,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPViYDrf3f+OiIk/sdLsLevFSBdB58IynN7c0Qww4xAgIgSwBmf28Wf7KoUvfL/7hnCVsPzrXZ/B/JPzAND/0OKk0="}]},"_npmUser":{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"},"directories":{},"maintainers":[{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-script_0.1.1_1695593243434_0.28019903924942224"},"_hasShrinkwrap":false},"0.1.2":{"name":"@1ohooks/use-script","version":"0.1.2","main":"dist/packages/useScript/src/index.js","types":"dist/packages/useScript/src/index.d.ts","scripts":{"build":"tsc && copyfiles -u 1 src/**/*.{scss,png,jpg} dist/"},"keywords":[],"author":"","license":"ISC","_id":"@1ohooks/use-script@0.1.2","description":"[![Version](https://img.shields.io/npm/v/@1ohooks/use-script.svg)](https://www.npmjs.org/package/@1ohooks/use-script) [![Coverage Status](https://coveralls.io/repos/github/1ohooks/use-script/badge.svg?branch=master)](https://coveralls.io/github/1ohooks/us","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-UsYMZwkcHcuJ+wq/+/c+/tbVRsOMy5UlwPu0K+xer3LlNUn2bQE8P34GAPC/1+FxO0qjLHod3eDhB6XT8NPiVw==","shasum":"ddc4b7d9e7153ad6520c04682b0f0b1b6f864859","tarball":"https://registry.npmjs.org/@1ohooks/use-script/-/use-script-0.1.2.tgz","fileCount":8,"unpackedSize":4471,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBQ62aMLFBH/HF/SFywFHqVTenzI+7iWW/Itzo5494qdAiAnhDe7Z58eftCr2DTR8X2EhDaxkwtjsodQgVKSb4tTCg=="}]},"_npmUser":{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"},"directories":{},"maintainers":[{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-script_0.1.2_1698234000332_0.5867645965548416"},"_hasShrinkwrap":false}},"time":{"created":"2023-09-24T19:19:42.983Z","0.1.0":"2023-09-24T19:19:43.352Z","modified":"2023-10-25T11:40:00.723Z","0.1.1":"2023-09-24T22:07:23.600Z","0.1.2":"2023-10-25T11:40:00.552Z"},"maintainers":[{"name":"1ojames","email":"jameshuntdevelopment@gmail.com"}],"keywords":[],"license":"ISC","readme":"# @1ohooks/use-script\n\n[![Version](https://img.shields.io/npm/v/@1ohooks/use-script.svg)](https://www.npmjs.org/package/@1ohooks/use-script)\n[![Coverage Status](https://coveralls.io/repos/github/1ohooks/use-script/badge.svg?branch=master)](https://coveralls.io/github/1ohooks/use-script?branch=master)\n[![Downloads](https://img.shields.io/npm/dm/@1ohooks/use-script.svg)](https://www.npmjs.com/package/@1ohooks/use-script)\n[![Try on RunKit](https://badge.runkitcdn.com/@1ohooks/use-script.svg)](https://runkit.com/npm/@1ohooks/use-script)\n\nThe `@1ohooks/use-script` package provides a custom React hook for dynamically loading JavaScript scripts in your applications.\n\n## Installation\n\nYou can install `@1ohooks/use-script` using npm or yarn:\n\n```sh\nnpm install @1ohooks/use-script\n# or\nyarn add @1ohooks/use-script\n```\n\n## Documentation\n\n### useScript\n\nThe `useScript` hook allows you to dynamically load JavaScript scripts and manage their loading state.\n\n```javascript\nimport { useScript } from '@1ohooks/use-script';\n\n// Usage example\nfunction MyComponent() {\n  const { loaded, error } = useScript('https://example.com/myscript.js');\n\n  if (loaded) {\n    // The script has been successfully loaded\n  }\n\n  if (error) {\n    // An error occurred while loading the script\n  }\n\n  return (\n    // Your component JSX\n  );\n}\n```\n\n#### Parameters\n\n- `url` (string): The URL of the JavaScript script to load.\n\n#### Return Values\n\n- `loaded` (boolean): Indicates whether the script has been successfully loaded.\n- `error` (Error | null): An error object, if an error occurred during script loading; otherwise, `null`.\n\n## Requirements\n\n- React 16 or higher.\n\n## Usage\n\nYou can use the `useScript` hook to load external JavaScript scripts dynamically in your React components. This can be helpful for integrating third-party libraries or resources into your application.\n\nFor more advanced usage and handling script dependencies, refer to the hook documentation.\n\nThank you for using `@1ohooks/use-script` to simplify script loading in your React applications. We hope you find it valuable!","readmeFilename":"readme.md","description":"[![Version](https://img.shields.io/npm/v/@1ohooks/use-script.svg)](https://www.npmjs.org/package/@1ohooks/use-script) [![Coverage Status](https://coveralls.io/repos/github/1ohooks/use-script/badge.svg?branch=master)](https://coveralls.io/github/1ohooks/us"}