{"id":17736639,"url":"https://github.com/parro-it/throttle-override","last_synced_at":"2025-03-31T19:17:09.148Z","repository":{"id":66074161,"uuid":"51779983","full_name":"parro-it/throttle-override","owner":"parro-it","description":"returns a function that will can only be called a certain amount of times per second","archived":false,"fork":false,"pushed_at":"2016-02-15T20:24:32.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-07T07:57:13.998Z","etag":null,"topics":[],"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/parro-it.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":"2016-02-15T19:32:47.000Z","updated_at":"2019-07-15T21:00:10.000Z","dependencies_parsed_at":"2023-03-31T08:29:08.048Z","dependency_job_id":null,"html_url":"https://github.com/parro-it/throttle-override","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fthrottle-override","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fthrottle-override/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fthrottle-override/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fthrottle-override/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parro-it","download_url":"https://codeload.github.com/parro-it/throttle-override/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523847,"owners_count":20791444,"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","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":[],"created_at":"2024-10-26T00:23:52.829Z","updated_at":"2025-03-31T19:17:09.122Z","avatar_url":"https://github.com/parro-it.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# throttle-override\n\n\u003e Takes a function, returns a function that will can only be called a certain amount of times per second.\n\n\u003e Original function is called only when specified period has elapsed. If called more than once in the period, preceding calls are removed from queue, and last one get called on first scheduled time.\n\n\n[![Travis Build Status](https://img.shields.io/travis/parro-it/throttle-override.svg)](http://travis-ci.org/parro-it/throttle-override)\n[![NPM module](https://img.shields.io/npm/v/throttle-override.svg)](https://npmjs.org/package/throttle-override)\n[![NPM downloads](https://img.shields.io/npm/dt/throttle-override.svg)](https://npmjs.org/package/throttle-override)\n\n## Installation\n\n```bash\nnpm install --save throttle-override\n```\n\n## Usage\n\n```javascript\n  const throttle = require('throttle-override');\n\n  const conquer = throttle((what)=\u003e{\n    console.log(what + ' is conquered!');\n  }, 1000 * 60 * 60); // once in a hour\n\n  conquer('The world');   // called at 10:00, it will\n                          // be scheduled to run at 11:00\n\n  // later ...\n\n  conquer('The universe');   // called at 10:15, it will\n                             // be scheduled to run at 11:00\n                             // conquer('The world') call is discarded\n\n  // later ...\n\n  conquer('Mars');           // called at 10:16, it will\n                             // be scheduled to run at 11:00\n                             // conquer('The universe') call is discarded\n\n  // At 11:00 Mars is conquered!\n\n  // later ...\n\n  conquer('Jupiter');        // called at 11:16, it will\n                             // be scheduled to run at 12:00\n\n```\n\n## License\n\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 parro-it\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Fthrottle-override","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparro-it%2Fthrottle-override","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Fthrottle-override/lists"}