{"id":17480894,"url":"https://github.com/sharynjs/sharyn","last_synced_at":"2025-10-24T01:58:17.620Z","repository":{"id":57140433,"uuid":"140269909","full_name":"sharynjs/sharyn","owner":"sharynjs","description":"🌹 Sharyn – A collection of JavaScript / TypeScript packages that make your life easier and reduce your boilerplate code","archived":false,"fork":false,"pushed_at":"2022-05-08T10:04:26.000Z","size":2590,"stargazers_count":31,"open_issues_count":6,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-08T14:48:20.365Z","etag":null,"topics":["helper-functions","javascript","nodejs","react","react-hooks","reactjs","typescript","utility"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/sharynjs.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}},"created_at":"2018-07-09T10:29:33.000Z","updated_at":"2024-05-31T19:04:49.000Z","dependencies_parsed_at":"2022-09-04T22:10:42.562Z","dependency_job_id":null,"html_url":"https://github.com/sharynjs/sharyn","commit_stats":null,"previous_names":["sharynjs/main"],"tags_count":177,"template":false,"template_full_name":null,"purl":"pkg:github/sharynjs/sharyn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharynjs%2Fsharyn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharynjs%2Fsharyn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharynjs%2Fsharyn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharynjs%2Fsharyn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharynjs","download_url":"https://codeload.github.com/sharynjs/sharyn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharynjs%2Fsharyn/sbom","scorecard":{"id":816611,"data":{"date":"2025-08-18","repo":{"name":"github.com/sharynjs/sharyn","commit":"563b7ca4aa28b0ab433822fcc6886aae9b89e44a"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T14:24:17.318Z","repository_id":57140433,"created_at":"2025-08-23T14:24:17.318Z","updated_at":"2025-08-23T14:24:17.318Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280723926,"owners_count":26380108,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["helper-functions","javascript","nodejs","react","react-hooks","reactjs","typescript","utility"],"created_at":"2024-10-18T22:06:25.563Z","updated_at":"2025-10-24T01:58:17.604Z","avatar_url":"https://github.com/sharynjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/40995577/42487947-ea40d256-840b-11e8-8acc-50e62a3226b7.png\" alt=\"Sharyn logo\"\u003e\n\u003c/div\u003e\n\n# 🌹 Sharyn\n\nSharyn is a collection of JavaScript / TypeScript packages that make your life easier and reduce your boilerplate code.\n\n**Note**: I have ported the most useful of those packages over to my new repository [V1V2](https://github.com/v1v2/v1v2).\n\n#### 💯 General\n\n- [**@sharyn/util**](https://github.com/sharynjs/sharyn/blob/master/packages/util/README.md#readme) – Lodash-like utils:\n  - [**between**](https://github.com/sharynjs/sharyn/blob/master/packages/util.between/README.md#readme) – Tests if a value is between two bounds\n  - [**cycle**](https://github.com/sharynjs/sharyn/blob/master/packages/util.cycle/README.md#readme) – Cycles between multiple values\n  - [**either**](https://github.com/sharynjs/sharyn/blob/master/packages/util.either/README.md#readme) – Tests equality with multiple values\n  - [**exists**](https://github.com/sharynjs/sharyn/blob/master/packages/util.exists/README.md#readme) – Returns `true` if not `null` or `undefined`\n  - [**global**](https://github.com/sharynjs/sharyn/blob/master/packages/util.global/README.md#readme) – Functions to create and access global variables\n  - [**ifs**](https://github.com/sharynjs/sharyn/blob/master/packages/util.ifs/README.md#readme) – An `if`, `else if`, `else if`... `else` util\n  - [**inlineThrow**](https://github.com/sharynjs/sharyn/blob/master/packages/util.inlineThrow/README.md#readme) – To `throw` in an expression\n  - [**invoke**](https://github.com/sharynjs/sharyn/blob/master/packages/util.invoke/README.md#readme) – A self invoking function util\n  - [**swit**](https://github.com/sharynjs/sharyn/blob/master/packages/util.swit/README.md#readme) – An inline and less verbose `switch`\n  - [**toggle**](https://github.com/sharynjs/sharyn/blob/master/packages/util.toggle/README.md#readme) – Toggles between two values\n  - [**tryCatch**](https://github.com/sharynjs/sharyn/blob/master/packages/util.trycatch/README.md#readme) – An inline `try` - `catch` - `finally`\n  - [**wait**](https://github.com/sharynjs/sharyn/blob/master/packages/util.wait/README.md#readme) – A `Promise`-based delay\n\n- [**@sharyn/scripts**](https://github.com/sharynjs/sharyn/blob/master/packages/scripts/README.md#readme) – Helpers to write \"NPM scripts\" in a JavaScript file\n\n- [**@sharyn/tags**](https://github.com/sharynjs/sharyn/blob/master/packages/tags/README.md#readme) – No-op ES6 template string tags to enable syntax highlighting in editors:\n  - [**css**](https://github.com/sharynjs/sharyn/blob/master/packages/tags.css/README.md#readme) – For CSS\n  - [**html**](https://github.com/sharynjs/sharyn/blob/master/packages/tags.html/README.md#readme) – For HTML\n\n- [**@sharyn/nanoid**](https://github.com/sharynjs/sharyn/blob/master/packages/nanoid/README.md#readme) – A Nano ID default configuration\n\n- [**@sharyn/actions**](https://github.com/sharynjs/sharyn/blob/master/packages/actions/README.md#readme) – Flux Standard Actions creator functions\n\n- [**@sharyn/chakra-next**](https://github.com/sharynjs/sharyn/blob/master/packages/chakra-next/README.md#readme) – Next Link applied to Chakra UI components\n\n#### ⚛️ React\n\n- [**@sharyn/react-hooks**](https://github.com/sharynjs/sharyn/blob/master/packages/react-hooks/README.md#readme) – React Hooks:\n  - [**useStateObject**](https://github.com/sharynjs/sharyn/blob/master/packages/react-hooks.usestateobject/README.md#readme) – A hook to manage a state that is an object\n\n- [**@sharyn/react-router**](https://github.com/sharynjs/sharyn/blob/master/packages/react-router/README.md#readme) – Components for React Router:\n  - [**PrivateRoute**](https://github.com/sharynjs/sharyn/blob/master/packages/react-router.privateroute/README.md#readme) – A `Route` that redirects unauthenticated users\n  - [**ServerOnlyRoute**](https://github.com/sharynjs/sharyn/blob/master/packages/react-router.serveronlyroute/README.md#readme) – A `Route` that refreshes the page on the client\n\n#### 🌐 Web\n\n- [**@sharyn/browser**](https://github.com/sharynjs/sharyn/blob/master/packages/browser/README.md#readme) – Helpers for code that runs in the browser:\n\n  - [**clearCaches**](https://github.com/sharynjs/sharyn/blob/master/packages/browser.clearcaches/README.md#readme) – Clears all the service worker caches\n  - [**getFormData**](https://github.com/sharynjs/sharyn/blob/master/packages/browser.getformdata/README.md#readme) – Gives you the form data as a plain object\n\n#### 💻 Development\n\n- [**@sharyn/prettier**](https://github.com/sharynjs/sharyn/blob/master/packages/prettier/README.md#readme) – A Prettier configuration\n- [**@sharyn/tsconfig**](https://github.com/sharynjs/sharyn/blob/master/packages/tsconfig/README.md#readme) – TypeScript configurations\n- [**babel-preset-sharyn**](https://github.com/sharynjs/babel-preset-sharyn/blob/master/README.md#readme) – A Babel preset for React and Flow (not included in [**sharyn-dev**](https://github.com/sharynjs/sharyn/blob/master/packages/_sharyn-dev/README.md#readme))\n- [**eslint-config-sharyn**](https://github.com/sharynjs/eslint-config-sharyn) – An ESLint configuration for Babel, React and Flow (not included in [**sharyn-dev**](https://github.com/sharynjs/sharyn/blob/master/packages/_sharyn-dev/README.md#readme))\n\n## Getting Started\n\nDepending on your needs, you can install individual modules, like [**@sharyn/util.swit**](https://github.com/sharynjs/sharyn/blob/master/packages/util.swit/README.md#readme), a group of modules, like [**@sharyn/util**](https://github.com/sharynjs/sharyn/blob/master/packages/util/README.md#readme), or the whole library. If you want to install everything, run:\n\n```sh\nnpm i sharyn \u0026\u0026 npm i --save-dev sharyn-dev\n# or\nyarn add sharyn \u0026\u0026 yarn add --dev sharyn-dev\n```\n\nThis will install [**sharyn**](https://github.com/sharynjs/sharyn/blob/master/packages/_sharyn/README.md#readme) in your `dependencies` and [**sharyn-dev**](https://github.com/sharynjs/sharyn/blob/master/packages/_sharyn-dev/README.md#readme) in your `devDependencies`.\n\nIf you use `sharyn/react-hooks` or `sharyn/react-router` which are included, you will need to install `react` and `react-router` too. They are not listed as `peerDependencies` to avoid noise in projects that want to use `sharyn` without React.\n\n## Imports\n\nAnd depending on what packages you chose to install, you have different ways to `import` or `require` a module:\n\n```js\n// If you installed an individual package (all lowercase)\nimport swit from '@sharyn/util.swit'\n\n// If you installed a group of modules like '@sharyn/util'\nimport swit from '@sharyn/util/swit'\nimport { swit } from '@sharyn/util'\n\n// If you installed the whole 'sharyn' library\nimport swit from 'sharyn/util/swit'\nimport { swit } from 'sharyn/util'\n```\n\n**Note**: TypeScript users, you need your `esModuleInterop` set to `true` if you want to import the default exports without having to use the `*` syntax.\n\n### Credits\n\nBy **Jonathan Verrecchia** (**verekia**) [**Github**](https://github.com/verekia) • [**Twitter**](https://twitter.com/verekia) • [**Website**](https://verekia.com) – MIT License\n\n_Sharyn_ is a reference to one of my favorite metalcore songs, [**Rose of Sharyn**](https://www.youtube.com/watch?v=PgMsACFMIq8) by Killswitch Engage.\n\nRose illustration by tiaesther_4360\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharynjs%2Fsharyn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharynjs%2Fsharyn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharynjs%2Fsharyn/lists"}