Convert a string of words to a JavaScript identifier
Installations
npm install toidentifier
Releases
Unable to fetch releases
Developer
component
Developer Guide
Module System
Unable to determine the module system for this package.
Min. Node Version
>=0.6
Typescript Support
No
Node Version
16.7.0
NPM Version
7.20.3
Statistics
5 Stars
81 Commits
8 Forks
7 Watching
1 Branches
27 Contributors
Updated on 16 May 2024
Bundle Size
301.00 B
Minified
218.00 B
Minified + Gzipped
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
6,319,960,767
Last day
-3.3%
6,903,608
Compared to previous day
Last week
3%
37,401,231
Compared to previous week
Last month
10.4%
154,543,556
Compared to previous month
Last year
4.3%
1,652,065,335
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
toidentifier
Convert a string of words to a JavaScript identifier
Install
This is a Node.js module available through the
npm registry. Installation is done using the
npm install
command:
1$ npm install toidentifier
Example
1var toIdentifier = require('toidentifier') 2 3console.log(toIdentifier('Bad Request')) 4// => "BadRequest"
API
This CommonJS module exports a single default function: toIdentifier
.
toIdentifier(string)
Given a string as the argument, it will be transformed according to the following rules and the new string will be returned:
- Split into words separated by space characters (
0x20
). - Upper case the first character of each word.
- Join the words together with no separator.
- Remove all non-word (
[0-9a-z_]
) characters.
License
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities 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
Found 0/30 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
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.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/ci.yml:126: update your workflow using https://app.stepsecurity.io/secureworkflow/component/toidentifier/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:199: update your workflow using https://app.stepsecurity.io/secureworkflow/component/toidentifier/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:211: update your workflow using https://app.stepsecurity.io/secureworkflow/component/toidentifier/ci.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:159
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:175
- Info: 0 out of 1 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 third-party GitHubAction dependencies pinned
- Info: 0 out of 2 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
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
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3.4
/10
Last Scanned on 2024-11-25
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