Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@cerebrusinc/fstring
Advanced tools
This package brings some Python string formatting to Javascript! Currently you can:
npm install @techtronics/fstring
or
yarn add @techtronics/fstring
It goes hand in hand with our quality of life package qol
// ES6 Module
import * as fstring from "@techtronics/fstring";
// ES6 Destructuring
import { abbreviate, toTitleCase, toSentenceCase } from "@techtronics/fstring";
// ES5 Module
const fstring = require("@techtronics/fstring");
// ES5 Destructuring
const {
abbreviate,
toTitleCase,
toSentenceCase,
} = require("@techtronics/fstring");
const sentence = "heLLo wOrLD, mY NAME is lEwis; i am a Developer.";
const name = "lEwiS mOsho junior";
console.log(toSentenceCase(sentence));
// Hello world, my name is lewis; I am a developer.
console.log(toTitleCase(name));
// Lewis Mosho Junior
console.log(abbreviate(name));
// LMJ
Make an abbreviation of a string; Usually used for names. It returns a capital case abbreviation of the string.
Parameter | Default Setting | Required? | Definition |
---|---|---|---|
txt | null | Yes | The string you wish to abbreviate |
delimiter | " " | No | The character or string that seperates words in the string |
reverse | false | No | An option to enable you to request a reversed return string |
Make any string title cased. it returns a string in which every first letter of a word is upper cased with the rest being lower cased.
Parameter | Default Setting | Required? | Definition |
---|---|---|---|
txt | null | Yes | The string you wish to change to title case |
delimiter | " " | No | The character or string that seperates words in the string |
Make any string sentence cased; The current sentence delimiters are:
.
;
:
!
?
It returns a string in which every first letter of the first word of a sentence is capitalised, with the reaminder of the senter being lower cased.
Parameter | Default Setting | Required? | Definition |
---|---|---|---|
txt | null | Yes | The string you wish to change to sentence case |
delimiter | " " | No | The character or string that seperates words in the string |
toSentenceCase
FAQs
This brings Python string manipulation to js!
We found that @cerebrusinc/fstring 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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.