Installations
npm install react-slugify
Developer
martpie
Developer Guide
Module System
ESM
Min. Node Version
Typescript Support
Yes
Node Version
20.11.1
NPM Version
10.2.4
Statistics
24 Stars
76 Commits
3 Forks
3 Watching
1 Branches
3 Contributors
Updated on 13 Jul 2024
Languages
TypeScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
1,027,189
Last day
-6%
1,076
Compared to previous day
Last week
8.1%
6,358
Compared to previous week
Last month
5.6%
25,844
Compared to previous month
Last year
2.2%
279,623
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
react-slugify
Slugify a React node.
Usage
slugify(node[, options])
node
String, Number, Fragment, Array of nodesoptions
Object (optional)delimiter
String (default is'-'
)prefix
String (default is''
)
Examples
1import slugify from 'react-slugify'; 2 3slugify('something I want to test'); 4// -> "something-i-want-to-test" 5 6slugify(<span>Yes it works like that too</span>); 7// -> "yes-it-works-like-that-too" 8 9slugify( 10 <> 11 <span>and</span> 12 <span>with</span> 13 <span>fragments or arrays</span> 14 </> 15); 16// -> "and-with-fragments-or-arrays" 17 18slugify(<h3>Crème brulée receipe</h3>, { delimiter: '_' }); 19// -> creme_brulee_receipe 20 21slugify(<h3>Crème brulée receipe</h3>, { prefix: 'user-content' }); 22// -> user-content-creme-brulee-receipe 23 24slugify(<h3>Crème brulée receipe</h3>, { 25 delimiter: '_', 26 prefix: 'user-content', 27}); 28// -> user-content_creme_brulee_receipe
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
6 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3
- Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx
Reason
Found 2/23 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/tests.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/martpie/react-slugify/tests.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/martpie/react-slugify/tests.yml/master?enable=pin
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
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
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 10 are checked with a SAST tool
Score
2.9
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More