{"id":19145713,"url":"https://github.com/xremix/swiftdebouncer","last_synced_at":"2026-05-16T22:02:18.656Z","repository":{"id":62456451,"uuid":"124371167","full_name":"xremix/SwiftDebouncer","owner":"xremix","description":"A simple Swift Library for a Debouncer class to delay function calls","archived":false,"fork":false,"pushed_at":"2021-09-11T06:53:17.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-31T07:51:23.950Z","etag":null,"topics":["cocoapods","debounce","debouncing","delay","framework","ios","library","macos","swift"],"latest_commit_sha":null,"homepage":"https://cocoadocs.org/docsets/SwiftDebouncer","language":"Swift","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/xremix.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-08T09:49:25.000Z","updated_at":"2021-09-11T06:51:56.000Z","dependencies_parsed_at":"2022-11-01T22:32:18.249Z","dependency_job_id":null,"html_url":"https://github.com/xremix/SwiftDebouncer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/xremix/SwiftDebouncer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xremix%2FSwiftDebouncer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xremix%2FSwiftDebouncer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xremix%2FSwiftDebouncer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xremix%2FSwiftDebouncer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xremix","download_url":"https://codeload.github.com/xremix/SwiftDebouncer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xremix%2FSwiftDebouncer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270323587,"owners_count":24564686,"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-13T02:00:09.904Z","response_time":66,"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":["cocoapods","debounce","debouncing","delay","framework","ios","library","macos","swift"],"created_at":"2024-11-09T07:41:52.205Z","updated_at":"2026-05-16T22:02:13.624Z","avatar_url":"https://github.com/xremix.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftDebouncer\nA simple Swift Library for a Debouncer class to delay function calls\n\n[![Badge w/ Version](https://cocoapod-badges.herokuapp.com/v/SwiftDebouncer/badge.png)](https://cocoadocs.org/docsets/SwiftDebouncer)\n[![Language](https://img.shields.io/badge/language-swift%204-1b7cb9.svg)](https://img.shields.io/badge/language-swift%204-1b7cb9.svg)\n[![iOS](https://img.shields.io/badge/iOS-8.0%2B-1b7cb9.svg)](https://img.shields.io/badge/iOS-9.0%2B-1b7cb9.svg)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/xremix/SwiftDebouncer/blob/master/LICENSE)\n\n## Description\nA Swift Library for a debounce function, similar to the JavaScript debounce.\nThe Debouncer will delay a function call, and every time it's getting called it will delay the preceding call until the delay time is over.\n\n## Getting started\n\nUsage is as simple as the following code:\n\n```SWIFT\nlet d = Debouncer(delay: 10)\nd.callback = {\n// your code here\n}\n\nd.call()\n```\n\nYou can pass a parameter `delay` (in `ms` of type TimerInterval) and optional an callback function.\n\nMake sure to check out the [Unit Tests](https://github.com/xremix/SwiftDebouncer/tree/master/SwiftDebouncerTests) for further code samples.\n\n###  Properties\n\n- `callback` Callback that is getting called when the timer fires\n- `delay` Delay Time in ms\n- `fireDate` Next Date when the Debouncer will fire\n\n### Functions\n- `call` Call debouncer to start the callback after the delayed time. Multiple calls will ignore the older calls and overwrite the firing time\n\n\n## Installation\n\n### CocoaPods\n\nYou can install [the library](https://cocoapods.org/pods/SwiftDebouncer) to your project by using [CocoaPods](https://cocoapods.org). Add the following code to your `Podfile`:\n```\nplatform :ios, '8.0'\nuse_frameworks!\n\ntarget 'MyApp' do\npod 'SwiftDebouncer'\nend\n```\n\n### Git Submodule\n\nYou can add the project as a git `submodule`. Simply drag the `SwiftDebouncer.xcodeproj` file into your Xcode project.\n**Don't forget to add the framework in your application target**\n\n### Manually\n\nJust copy and paste the [`Debouncer.swift`](https://github.com/xremix/SwiftDebouncer/blob/master/SwiftDebouncer/Debouncer.swift) file into your project.\n\n\n\n![Analytics](https://ga-beacon.appspot.com/UA-40522413-9/SwiftDebouncer/readme?pixel)\n\n## About this\n\n- This was developed to not copy over and over the same classes due different projects\n- Test coverage should be pretty good - was developed using TDD\n- Oriented on [this](https://www.appcoda.com/cocoapods-making-guide/) article on how to deploy this on CocoaPods\n- Contributors are very welcome\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxremix%2Fswiftdebouncer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxremix%2Fswiftdebouncer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxremix%2Fswiftdebouncer/lists"}