
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
A collection of utility functions built to save your ass. It includes functions for common operations like string manipulation, array manipulation, object manipulation, and more.
You can install saviourjs using npm:
npm install saviourjs
Or using yarn:
yarn add saviourjs
Or using pnpm:
pnpm add saviourjs
| Function | Description | Parameters |
|---|---|---|
slugify | Converts a string into a URL-friendly slug. | text: string |
getNthLetter | Gets the nth letter from a string. | text: string, n: number |
getFirstLetter | Gets the first letter of a string. | text: string |
getLastLetter | Gets the last letter of a string. | text: string |
capitalize | Capitalizes the first letter of a string. | text: string |
reverseString | Reverses a string. | text: string |
isPalindrome | Checks if a string is a palindrome. | text: string |
truncate | Truncates a string to a specified length. | text: string, length: number |
deepClone | Creates a deep clone of an object. | obj: T |
isEmpty | Checks if a value is empty. | value: any |
isEmail | Validates an email address. | email: string |
camelCase | Converts a string to camelCase. | text: string |
kebabCase | Converts a string to kebab-case. | text: string |
snakeCase | Converts a string to snake_case. | text: string |
randomString | Generates a random string of specified length. | length: number |
flattenArray | Flattens a nested array. | array: any[] |
uniq | Removes duplicate values from an array. | array: any[] |
chunk | Splits an array into chunks of a specified size. | array: T[], size: number |
shuffleArray | Randomly shuffles an array. | array: T[] |
isEqual | Performs a deep comparison between two values. | value: any, other: any |
groupBy | Groups elements of an array based on a key. | `array: T[], key: ((item: T) => string) |
formatDate | Formats a date into a readable string. | date: Date, format: string |
parseQueryStringToObject | Parses a query string into an object. | queryString: string |
parseObjectToQueryString | Converts an object into a query string. | obj: { [key: string]: any } |
selectRandom | Selects a random element from an array. | array: T[] |
capitalizeFirstLetter | Capitalizes the first letter of a given string and converts the rest to lowercase. | text: string |
FAQs
A collection of JavaScript utility functions
We found that saviourjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.