{"id":18582973,"url":"https://github.com/astahmer/pastable","last_synced_at":"2025-10-17T13:38:41.690Z","repository":{"id":44624369,"uuid":"356370770","full_name":"astahmer/pastable","owner":"astahmer","description":"📦  A collection of pastable code gathered from past projects","archived":false,"fork":false,"pushed_at":"2024-09-09T08:19:25.000Z","size":2600,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-24T17:42:18.527Z","etag":null,"topics":["gists","pastable","react","reusable","snippets","tiny","utils"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/astahmer.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-09T18:55:09.000Z","updated_at":"2024-09-09T09:31:17.000Z","dependencies_parsed_at":"2024-06-19T01:32:21.800Z","dependency_job_id":"eb2ae9a9-c802-43c7-9ebc-a00b4bb9a655","html_url":"https://github.com/astahmer/pastable","commit_stats":{"total_commits":344,"total_committers":3,"mean_commits":"114.66666666666667","dds":0.008720930232558155,"last_synced_commit":"fcc55617bf687ea059aa4f574eaa08769bd5fafb"},"previous_names":[],"tags_count":122,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astahmer%2Fpastable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astahmer%2Fpastable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astahmer%2Fpastable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astahmer%2Fpastable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astahmer","download_url":"https://codeload.github.com/astahmer/pastable/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230537062,"owners_count":18241515,"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":["gists","pastable","react","reusable","snippets","tiny","utils"],"created_at":"2024-11-07T00:17:58.988Z","updated_at":"2025-10-17T13:38:36.645Z","avatar_url":"https://github.com/astahmer.png","language":"TypeScript","readme":"\u003ch1 align=\"center\"\u003e\n  📦 A collection of pastable code gathered from past projects\n\u003c/h1\u003e\n\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://codecov.io/gh/astahmer/entity-routes\"\u003e\n    \u003cimg\n      alt=\"Code coverage\"\n      src=\"https://codecov.io/gh/astahmer/entity-routes/branch/main/graph/badge.svg?token=N0YDUEVIWJ\"\n    /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/astahmer_dev\"\u003e\n    \u003cimg\n      alt=\"astahmer_dev Twitter\"\n      src=\"https://img.shields.io/twitter/follow/astahmer_dev?label=%40astahmer_dev\u0026style=social\"\n    /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\n\n## TL;DR\n\nthis package is meant mostly for myself.\n\n[API]https://paka.dev/npm/pastable@2.0.13/api\n\n```sh\npnpm i pastable\n```\n\nWith 1 main \u0026 5 specific entrypoints:\n\n-   `\"pastable\"`: re-exports everything from utils+typings\n-   `\"pastable/utils\"`\n-   `\"pastable/react\"`\n-   `\"pastable/typings\"`\n-   `\"pastable/machines\"`\n-   `\"pastable/server\"` everything that's commonly used server-side (= no browser APIs + no vendors like react/xstate)\n\n```ts\nimport { useSelection } from \"pastable\";\n\n//  or\n\nimport { useSelection } from \"pastable/react\";\n```\n\n## ⚡ Motivations\n\nIn every project I've been a part of, I've always ended up copy/pasting some part of a previous project that I had made generic, and moving from one project to another I just kept pasting it over and over.\n\nSo here we are, I made yet another multi-purpose-utils package !\n\n## 🎨 Code style\n\nIt aims to be as generic as possible so that either the source can litteraly be pasted if you just need a couple of functions or you can install any specific package at some point.\n\n100% written in Typescript, near 100% code coverage as a constant goal.\n\nFeel free to contribute if you think there is space for one of your previous projects gems.\n\n## ❤️ Built with\n\nPackages are built with https://preconstruct.tools/ \u0026 tested with https://vitest.dev/, special thanks to their authors for those priceless gems !\n\n# Package History\n\n-   [v1 using yarn2 workspaces + custom build scripts](https://github.com/astahmer/pastable/commit/f0f5c0a069f15f4669b976d1f51c7ebe512426d2), had a shitload of single-file packages deployed to npm, each built with https://github.com/developit/microbundle \u0026 tested with https://github.com/lukeed/uvu, generated with [plop](https://www.npmjs.com/package/plop)\n-   [v2 using pnpm + turborepo](https://github.com/astahmer/pastable/commit/edf6904e041060084920159de04e5889eb4b5425): less packages, still too many folders / complexity, spent way too much time making it work in any env (browser, server, both like when using earlier version of NextJS..)\n-   [v3 (current) using pnpm + preconstruct](https://github.com/astahmer/pastable/commit/5542e1cd095dd26bf09aa8ef6d4f829f366db51d): flattened lots of folders, let preconstruct do the hard work, removed shitty react unit tests, deadcode, outdateds demo/docs sites, removed `@` alias to simplify the publish process, replaced uvu by vitest\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastahmer%2Fpastable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastahmer%2Fpastable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastahmer%2Fpastable/lists"}