{"id":32225132,"url":"https://github.com/kuzalekon/gamble","last_synced_at":"2026-05-27T21:31:14.939Z","repository":{"id":58225181,"uuid":"125426863","full_name":"kuzalekon/gamble","owner":"kuzalekon","description":"Gamble is a small and simply javascript library for dynamically add a resource-hints in your web pages","archived":false,"fork":false,"pushed_at":"2018-03-19T08:38:22.000Z","size":55,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-25T23:38:34.480Z","etag":null,"topics":["assets","browser","hints","javascript","js","resource","resource-hints","resources","util","utility"],"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/kuzalekon.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}},"created_at":"2018-03-15T21:14:28.000Z","updated_at":"2019-01-25T14:57:38.000Z","dependencies_parsed_at":"2022-08-31T05:41:28.410Z","dependency_job_id":null,"html_url":"https://github.com/kuzalekon/gamble","commit_stats":null,"previous_names":["kalexey89/gamble","kalexey89/preparejs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kuzalekon/gamble","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzalekon%2Fgamble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzalekon%2Fgamble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzalekon%2Fgamble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzalekon%2Fgamble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kuzalekon","download_url":"https://codeload.github.com/kuzalekon/gamble/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzalekon%2Fgamble/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33585203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"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":["assets","browser","hints","javascript","js","resource","resource-hints","resources","util","utility"],"created_at":"2025-10-22T09:16:09.004Z","updated_at":"2026-05-27T21:31:14.917Z","avatar_url":"https://github.com/kuzalekon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"gamble.png\" alt=\"gamble\" /\u003e\u003c/p\u003e\r\n\u003cp align=\"center\"\u003eA small and simply javascript library for dynamically add a resource-hints in your web pages\u003c/p\u003e\r\n\u003chr\u003e\r\n\u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg\" alt=\"MIT\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/chrome-%3E%3D%204-blue.svg\" alt=\"Chrome\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/firefox-%3E%3D%203.5-blue.svg\" alt=\"FireFox\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/opera-%3E%3D%2015-blue.svg\" alt=\"Opera\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/safari-%3E%3D%205-blue.svg\" alt=\"Safari\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/ie-%3E%3D%209-blue.svg\" alt=\"IE\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/badge/edge-%3E%3D%2012-blue.svg\" alt=\"Edge\"\u003e\r\n\u003c/p\u003e\r\n\r\n### Installation\r\nYou can install `gamble` using npm, yarn or bower:\r\n```\r\n$ npm install gamble\r\n$ yarn add gamble\r\n$ bower install gamble\r\n```\r\n### Usage\r\n\r\nNote: the library is exports as **UMD module**.\r\n\r\n```js\r\nconst gamble = require('gamble');\r\n\r\n// dns-prefetch\r\ngamble({\r\n    rel: 'dns-prefetch',\r\n    href: 'https://domain.com'\r\n});\r\n// prefetch a script with CORS\r\ngamble({\r\n    rel: 'prefetch',\r\n    href: 'https://domain.com/script.js',\r\n    as: 'script',\r\n    crossorigin: 'use-credentials'\r\n});\r\n// preload a HTML page\r\ngamble({\r\n    rel: 'preload',\r\n    href: 'https://domain.com/index.html',\r\n    as: 'html'\r\n});\r\n// prerender a page\r\ngamble({\r\n    rel: 'prerender',\r\n    href: 'https://domain.com/index.html'\r\n});\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuzalekon%2Fgamble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuzalekon%2Fgamble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuzalekon%2Fgamble/lists"}