{"id":24610770,"url":"https://github.com/uniquexiaobai/snippets","last_synced_at":"2026-05-22T05:09:23.978Z","repository":{"id":42827717,"uuid":"264469818","full_name":"uniquexiaobai/snippets","owner":"uniquexiaobai","description":"代码片段","archived":false,"fork":false,"pushed_at":"2023-01-06T06:46:12.000Z","size":567,"stargazers_count":1,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T19:18:16.216Z","etag":null,"topics":["js","snippets"],"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/uniquexiaobai.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":"2020-05-16T15:42:51.000Z","updated_at":"2023-03-09T04:12:50.000Z","dependencies_parsed_at":"2023-02-05T13:46:23.792Z","dependency_job_id":null,"html_url":"https://github.com/uniquexiaobai/snippets","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/uniquexiaobai%2Fsnippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uniquexiaobai%2Fsnippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uniquexiaobai%2Fsnippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uniquexiaobai%2Fsnippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uniquexiaobai","download_url":"https://codeload.github.com/uniquexiaobai/snippets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244244732,"owners_count":20422355,"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":["js","snippets"],"created_at":"2025-01-24T19:18:24.921Z","updated_at":"2026-05-22T05:09:18.928Z","avatar_url":"https://github.com/uniquexiaobai.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snippets\n\n### function\n\n- [x] [bind](./function/bind.js)\n- [x] [call](./function/call.js)\n- [x] [debounce](./function/debounce.js)\n- [x] [memoize](./function/memoize.js)\n- [x] [new](./function/new.js)\n- [x] [once](./function/once.js)\n- [x] [throttle](./function/throttle.js)\n\n### number\n\n- [x] [decimal](./number/decimal.js)\n- [x] [random](./number/random.js)\n- [x] [range](./number/range.js)\n\n### string\n\n- [x] [randomId](./string/random-id.js)\n- [x] [repeat](./string/repeat.js)\n- [x] [separate](./string/separate.js)\n\n### array\n\n- [x] [flatten](./array/flatten.js)\n- [x] [groupBy](./array/group-by.js)\n- [x] [isSorted](./array/is-sorted.js)\n- [x] [shuffle](./array/shuffle.js)\n- [x] [unique](./array/unique.js)\n\n### object\n\n- [x] [deepCopy](./object/deep-copy.js)\n- [x] [instanceof](./object/instanceof.js)\n- [x] [ObjectCreate](./object/object-create.js)\n- [x] [ObjectIs](./object/object-is.js)\n- [x] [pathOr](./object/path-or.js)\n- [x] [propOr](./object/prop-or.js)\n- [x] [shallowEqual](./object/shallow-equal.js)\n\n### date\n\n- [x] [ageOfYear](./date/age-of-year.js)\n- [x] [format](./date/format.js)\n- [x] [getMonthDays](./date/getMonthDays.js)\n- [x] [timeAgo](./date/time-ago.js)\n\n### regexp\n\n- [x] [isEmail](./regexp/is-email.js)\n- [x] [isNumeric]('./regexp/is-number.js)\n- [x] [isUrl]('./regexp/is-url.js)\n\n### browser\n\n- [x] [cookie](./browser/cookie.js)\n- [x] [isBrowser](./browser/is-browser.js)\n- [x] [isNative](./browser/is-native.js)\n- [ ] [iswifi](./browser/is-wifi.js)\n- [x] [jsonp](./browser/jsonp.js)\n- [x] [nextTick](./browser/next-tick.js)\n- [x] [request](./browser/request.js)\n- [x] [requestBatch](./browser/request-batch.js)\n- [x] [requestRetry](./browser/request-retry.js)\n- [x] [requestIdleCallback](./browser/requestIdleCallback.js)\n- [x] [serviceWorker](./browser/servie-worker.js)\n- [x] [worker](./browser/worker.js)\n\n### dom\n\n- [ ] [clipboard](./dom/clipboard.js)\n- [x] [imgToBase64](./dom/img-to-base64.js)\n- [x] [isInViewport](./dom/is-in-viewport.js)\n- [x] [lazyImg](./dom/lazy-img.js)\n- [x] [triggerEvent](./dom/trigger-event.js)\n\n### fp\n\n- [x] [allPass](./fp/all-pass.js)\n- [x] [batch](./fp/batch.js)\n- [x] [compose](./fp/compose.js)\n- [x] [curry](./fp/curry.js)\n- [x] [flip](./fp/flip.js)\n- [x] [head](./fp/head.js)\n- [x] [partial](./fp/partial.js)\n- [x] [pick](./fp/pick.js)\n- [x] [unary](./fp/unary.js)\n- [x] [uncurry](./fp/uncurry.js)\n\n### design platterns\n\n- [x] [decorator](./design-patterns/decorator.js) 装饰者模式\n- [x] [observer](./design-patterns/observer.js) 观察者模式\n- [x] [proxy](./design-patterns/proxy.js) 代理模式\n- [x] [pubsub](./design-patterns/pubsub.js) 订阅模式\n- [x] [singleton](./design-patterns/singleton.js) 单例模式\n- [x] [strategy](./design-patterns/strategy.js) 策略模式\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiquexiaobai%2Fsnippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funiquexiaobai%2Fsnippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funiquexiaobai%2Fsnippets/lists"}