{"id":25824255,"url":"https://github.com/scrachstack/fetchnui","last_synced_at":"2026-05-10T05:13:29.414Z","repository":{"id":279735724,"uuid":"939787041","full_name":"ScrachStack/fetchnui","owner":"ScrachStack","description":"NPM Model to send a post request to the backend for NUI Callbacks.","archived":false,"fork":false,"pushed_at":"2025-04-15T03:08:50.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-27T07:53:23.381Z","etag":null,"topics":["cfx","fetchnui","fivem","module","nodejs","npm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ScrachStack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-27T05:28:24.000Z","updated_at":"2025-04-15T03:08:54.000Z","dependencies_parsed_at":"2025-02-27T06:01:20.304Z","dependency_job_id":"0b51812a-4efb-4a08-bd01-a915627eee18","html_url":"https://github.com/ScrachStack/fetchnui","commit_stats":null,"previous_names":["scrachstack/fetchnui"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ScrachStack/fetchnui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScrachStack%2Ffetchnui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScrachStack%2Ffetchnui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScrachStack%2Ffetchnui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScrachStack%2Ffetchnui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScrachStack","download_url":"https://codeload.github.com/ScrachStack/fetchnui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScrachStack%2Ffetchnui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268199532,"owners_count":24211823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cfx","fetchnui","fivem","module","nodejs","npm"],"created_at":"2025-02-28T12:39:17.389Z","updated_at":"2026-05-10T05:13:29.383Z","avatar_url":"https://github.com/ScrachStack.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fetch NUI Module\n\n[![Discord](https://img.shields.io/badge/Discord-Support-5865F2?style=flat\u0026logo=discord\u0026logoColor=white)](https://discord.gg/tgrU8wgeHx) \n\n\n## Overview\nThis module allows you to easily interact with the NUI (Native User Interface) in your frontend applications. With the `Post` function, you can send messages to the NUI with minimal setup.\n\n## Installation\n\nTo get started, simply install the module via NPM:\n\n```bash\nnpm install fetchnui\nOR\nyarn add fetchnui\n```\nImport the module\nOnce installed, you can import the Post function into your frontend JavaScript file:\n```js\nimport Post from 'fetchnui';\n```\nUsage\n\nSending Events\nUse the Post function to send an event to your NUI interface. The Post function accepts two parameters:\n\neventName: The name of the event you want to trigger (e.g., 'playerEntered').\ndata: The data you want to send along with the event (this can be any object).\nExample Usage\n```js\nPost('test', {});\n```\nIn this example, we send an event called 'test' to the NUI with an empty object as the associated data.\n\nCustom Data Example\nYou can also send custom data with your event:\n```js\nPost('test', { playerId: 123, playerName: 'JohnDoe' });\n```\nIn this case, we're sending an object with player data to the NUI.\n\n# Example Project Setup\n\nInstall the module using NPM/Yarn.\nImport the Post function into your project.\nUse Post to trigger events and pass data between your frontend and NUI.\n```js\nimport Post from 'fetchnui';\nfunction playerJoined() {\n    const playerData = { playerId: 123, playerName: 'JohnDoe' };\n    Post('playerEntered', playerData);\n}\n```\nDownload:\nhttps://www.npmjs.com/package/fetchnui?activeTab=readme\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrachstack%2Ffetchnui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrachstack%2Ffetchnui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrachstack%2Ffetchnui/lists"}