
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@directus9/format-title
Advanced tools
Custom string formatter that converts any string into [Title Case](http://www.grammar-monster.com/lessons/capital_letters_title_case.htm)
Custom string formatter that converts any string into Title Case for the rules
This package converts any string into title case. This means only using capital letters for the principal words. Articles, conjunctions, and prepositions do not get capital letters unless they start or end the title
input | output |
---|---|
snowWhiteAndTheSevenDwarfs | Snow White and the Seven Dwarfs |
NewcastleUponTyne | Newcastle Upon Tyne |
brighton_on_sea | Brighton on Sea |
apple_releases_new_ipad | Apple Releases New iPad |
7-food-trends | 7 Food Trends |
The package contains a list of words that use some sort of special casing, for example: McDonalds, iPhone, and YouTube.
$ npm install @directus9/format-title
The package by default converts camelCase, PascalCase, underscore, and "regular" sentences to Title Case
formatTitle(string, [separator]);
formatTitle('snowWhiteAndTheSevenDwarfs');
// => Snow White and the Seven Dwarfs
You can provide an optional separator
regex as a second parameter to support splitting the string on different
characters. By default, this regex is set to /\s|-|_/g
.
If your favorite specially cased word isn't being capitalized properly, please open an issue or submit a pull request!
The following pnpm
scripts are available:
pnpm lint
– Lint the code using Eslint / Prettierpnpm test
– Run the unit testsMake sure that both commands pass locally before creating a Pull Request.
This applies to maintainers only
pnpm version <version>
. Tip: use pnpm version patch|minor|major
to
auto-bump the version numbergit push && git push --tags
)The CI will automatically build and release to npm, and generate the release notes.
FAQs
Custom string formatter that converts any string into [Title Case](http://www.grammar-monster.com/lessons/capital_letters_title_case.htm)
The npm package @directus9/format-title receives a total of 0 weekly downloads. As such, @directus9/format-title popularity was classified as not popular.
We found that @directus9/format-title demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.