{"id":26663216,"url":"https://github.com/startpolymer/s-utils","last_synced_at":"2026-02-02T10:07:44.706Z","repository":{"id":74217654,"uuid":"98235841","full_name":"StartPolymer/s-utils","owner":"StartPolymer","description":"Polymer utility functions, mixins, modules and styles.","archived":false,"fork":false,"pushed_at":"2017-09-25T12:15:12.000Z","size":30,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T00:06:00.340Z","etag":null,"topics":["polymer","throttle","utilities","utils"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/StartPolymer.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-07-24T21:18:48.000Z","updated_at":"2018-04-18T10:59:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"84214d37-54bd-4ed6-98c6-75516419ea7b","html_url":"https://github.com/StartPolymer/s-utils","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/StartPolymer/s-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartPolymer%2Fs-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartPolymer%2Fs-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartPolymer%2Fs-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartPolymer%2Fs-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StartPolymer","download_url":"https://codeload.github.com/StartPolymer/s-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartPolymer%2Fs-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29009714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T08:40:12.472Z","status":"ssl_error","status_checked_at":"2026-02-02T08:40:10.926Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["polymer","throttle","utilities","utils"],"created_at":"2025-03-25T14:27:18.805Z","updated_at":"2026-02-02T10:07:44.668Z","avatar_url":"https://github.com/StartPolymer.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StartPolymer Utilities\n\n[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://help.github.com/articles/about-pull-requests/)\n\nPolymer utility functions, mixins, modules and styles.\n\n## Install\n\n`bower i StartPolymer/s-utils -S`\n\n## Import\n\n### Polymer 1.0\n\n```html\n\u003clink rel=\"import\" href=\"../bower_components/s-utils/utils-es5/throttle.html\"\u003e\n```\n\n### Polymer 2.0\n\n```html\n\u003clink rel=\"import\" href=\"../bower_components/s-utils/utils/throttle.html\"\u003e\n```\n\n## Functions\n\n### throttle() from throttle.html\n\nCreates a throttled function that only invokes `callback` at most once per every `wait` milliseconds.\n\n\u003e See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\nfor details over the differences between throttle and debounce techniques.\n\n```js\n// Limiting the api call thrice a second.\nvar resultFunction = S.Utils.throttle(_apiCall, 1000, 3);\n\n// Calling the closure function in every 100 milliseconds.\nsetInterval(function () {\n  resultFunction();\n}, 100);\n```\n\n\u003e Inspired by https://stackoverflow.com/a/42975776/1614237\n\n### throttlePerFrame() from throttle.html\n\nCreates a throttled function that only invokes `callback` at most once per frame using `requestAnimationFrame`.\nIdeal using for mouse, resize, scroll events.\n\n```js\nwindow.addEventListener('resize', S.Utils.throttlePerFrame(this._onOptimizedResize));\n```\n\n\u003e Inspired by [raf-throttle](https://github.com/wuct/raf-throttle)\n\n### timestamp() from date.html\n\nReturns a timestamp measured in milliseconds, accurate to five thousandths of a millisecond (5 microseconds).\n\n```js\nS.Utils.timestamp()\n```\n\n## Modules\n\n### Browser from browser.html\n\nModule that provides a number of properties for detection of browser types and features.\n\n```js\nS.Utils.Browser.hasTouchScreen\nS.Utils.Browser.isIE\nS.Utils.Browser.onAndroid\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartpolymer%2Fs-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstartpolymer%2Fs-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartpolymer%2Fs-utils/lists"}