{"id":17036026,"url":"https://github.com/phucbm/js-gist","last_synced_at":"2025-10-17T11:45:12.759Z","repository":{"id":133062391,"uuid":"409649165","full_name":"phucbm/js-gist","owner":"phucbm","description":"🩹 JavaScript Snippets","archived":false,"fork":false,"pushed_at":"2022-11-14T08:20:39.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T10:22:36.432Z","etag":null,"topics":["es6","javascript","snippets"],"latest_commit_sha":null,"homepage":"https://phucbm.github.io/js-gist/","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/phucbm.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}},"created_at":"2021-09-23T15:36:04.000Z","updated_at":"2022-01-02T10:22:27.000Z","dependencies_parsed_at":"2024-07-26T04:15:24.709Z","dependency_job_id":null,"html_url":"https://github.com/phucbm/js-gist","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fjs-gist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fjs-gist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fjs-gist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fjs-gist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phucbm","download_url":"https://codeload.github.com/phucbm/js-gist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245031345,"owners_count":20549913,"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":["es6","javascript","snippets"],"created_at":"2024-10-14T08:48:57.610Z","updated_at":"2025-10-17T11:45:12.665Z","avatar_url":"https://github.com/phucbm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🩹 JavaScript Snippets\n\n## Table of Content\n\n- [Copy text to clipboard](/copy-text-to-clipboard.js)\n- [Format datetime](/format-datetime.js)\n- [Check is valid URL](/is-valid-url.js)\n- [Responsive Object](/responsive-object.js)\n- [Sort array of object by value](/sort-array-by-object-value.js)\n- [String to slug](/string-to-slug.js)\n- [Time Since](/time-since.js)\n- [Generate unique ID](/unique-id.js)\n\n## Usage\n\n### Responsive Object v1.0.1 - [demo](/examples/responsive-object.html)\n\nReturn the correct setting object based on the current breakpoint using `matchMedia()`\n\n```js\nconst config = {\n    screen: 'desktop',\n    color: 'white',\n    responsive: [\n        {\n            breakpoint: 1280,\n            settings: {\n                screen: '1280',\n                color: 'blue',\n                isTablet: true\n            }\n        },\n        {\n            breakpoint: 768,\n            settings: {\n                screen: '768',\n            }\n        }\n    ]\n};\n\nnew ResponsiveObject({\n    object: config,\n    onMatched: (data) =\u003e {\n        // do something\n        console.log('onMatched', data);\n    }\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphucbm%2Fjs-gist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphucbm%2Fjs-gist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphucbm%2Fjs-gist/lists"}