{"id":41755296,"url":"https://github.com/kamicane/maybe-later","last_synced_at":"2026-01-25T01:35:40.036Z","repository":{"id":57292830,"uuid":"79840345","full_name":"kamicane/maybe-later","owner":"kamicane","description":"defer function execution","archived":false,"fork":false,"pushed_at":"2019-12-30T07:18:41.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-24T12:51:32.875Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kamicane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-23T19:38:45.000Z","updated_at":"2019-12-30T07:18:38.000Z","dependencies_parsed_at":"2022-08-27T12:21:04.539Z","dependency_job_id":null,"html_url":"https://github.com/kamicane/maybe-later","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/kamicane/maybe-later","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamicane%2Fmaybe-later","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamicane%2Fmaybe-later/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamicane%2Fmaybe-later/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamicane%2Fmaybe-later/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamicane","download_url":"https://codeload.github.com/kamicane/maybe-later/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamicane%2Fmaybe-later/sbom","scorecard":{"id":548752,"data":{"date":"2025-08-11","repo":{"name":"github.com/kamicane/maybe-later","commit":"d617be7d8c5b6ee66197671e1e2b710ee724486a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T10:13:23.602Z","repository_id":57292830,"created_at":"2025-08-20T10:13:23.602Z","updated_at":"2025-08-20T10:13:23.602Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28740961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T01:25:41.653Z","status":"ssl_error","status_checked_at":"2026-01-25T01:25:34.364Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-25T01:35:39.976Z","updated_at":"2026-01-25T01:35:40.030Z","avatar_url":"https://github.com/kamicane.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maybe Later\n\n`maybe-later` defers the execution of functions at a later time.\nDeferring a function returns a method that cancels the function execution.\n\n`maybe-later` is more resource friendly and faster than simply stacking `requestAnimationFrame` or `setTimeout` calls: every deferred function belonging to the same call stack with the same timeout gets executed inside the same call, at the same time.\n\nWhen using `maybe-later` for animations everything will be synced properly.\n\n## Basic usage\n\n```js\nconst defer = require('maybe-later')\nconst cancel1 = defer(() =\u003e {\n  console.log('hello immediate')\n})\n\nconst cancel2 = defer(() =\u003e {\n  console.log('hello timeout')\n}, 100)\n\n// if you change your mind\ncancel1()\ncancel2()\n```\n\n\u003e `defer()` is an alias for `defer.immediate()` when called with no second argument, and `defer.timeout()` when the second argument is a number (timeout in milliseconds).\n\n## Method: immediate\n\nDefers the execution of a function in the next iteration loop, as soon as possible.\nUses `setImmediate` where available, falls back to `setTimeout(0)`.\n\n```js\nconst defer = require('maybe-later')\ndefer.immediate(() =\u003e {\n  console.log('hello world')\n})\n```\n\n## Method: frame\n\nLike `defer.immediate`, however `defer.frame` defers the execution of a function on the next animation frame.\nIf `requestAnimationFrame` is not available, `defer.frame` falls back to `setTimeout` with a `1000 / 60` delay.\n\n```js\nconst defer = require('maybe-later')\ndefer.frame(() =\u003e {\n  console.log('hello world')\n})\n```\n\n## Method: timeout\n\nDefers the execution of a function after a specified number of milliseconds.\n\n```js\nconst defer = require('maybe-later')\ndefer.timeout(() =\u003e {\n  console.log('hello world')\n}, 1000)\n```\n\n## Method: once\n\nAutomatically cancels the previous call of the same name.\n\n```js\nconst fs = require('fs')\nconst defer = require('defer')\n\nfs.watch(FILE_PATH, () =\u003e {\n  defer.once('file-change', () =\u003e console.log('done something expensive'), 1000)\n})\n```\n\n## Method: wait\n\nReturns a promise that resolves (with the current time as a value) after the specified amount of time (or on setImmediate when no time argument is passed).\n\n```js\nconst defer = require('defer')\n(async () =\u003e {\n  const now = await defer.wait(1000)\n  console.log('waited 1 second', now)\n})()\n```\n\n## Time argument\n\nA time argument is passed to each function of the stack, which is the date at which the stack has begun processing.\nThis ensures each function of the same stack receives the same time argument.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamicane%2Fmaybe-later","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamicane%2Fmaybe-later","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamicane%2Fmaybe-later/lists"}