Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
skaleb-string-utils
Advanced tools
This package provides easy to use string utility functions that provide more functionality above and beyond normal string functions. These functions can be imported individually, without instantiation.
To install this package you can simply use the install command below.
$ npm i --save skaleb-string-utils
reverse(string)
reverses and returns the given string.
import { reverse } from './index'
// gnirts emos
return reverse('some string')
capitalCase(string)
capitalizes each individual word in a given string and returns the new string.
import { capitalCase } from './index'
// Some Or Other String
return capitalCase('some or other string')
camelCase(string)
converts the given string to camelCaseFormat and returns it.
import { camelCase } from './index'
// thisIsNowCamelCase
return camelCase('This is now camel case')
toBinary(string, ?deliminate)
converts the given string or sentence into binary code. This by default is returned as
a single string however the response can be set to be deliminated. This delimination is spaces.
import { toBinary } from './index'
// 1110011110111111011011100101100000110001011010011101110110000111100101111001
return toBinary('some binary')
// 1110011 1101111 1101101 1100101 100000 1100010 1101001 1101110 1100001 1110010 1111001
return toBinary('some binary', true)
toHexadecimal(string, ?deliminate)
converts the given string or sentence into hexadecimal. This be default is returned
as a single string however the response can be set to be deliminated. This delimination is spaces.
import { toHexadecimal } from './index'
// 68657861646563696d616c
return toHexadecimal('hexadecimal')
// 73 6f 6d 65 20 68 65 78 61 64 65 63 69 6d 61 6c
return toHexadecimal('some hexadecimal', true)
This project is completely covered by unit tests. Various cases have been accounted for both in the codebase and in the tests covering it. If a bug is picked up regarding the test suite or code, feel free to make a contribution to help correct the bug.
To run the tests, you can simply run the following test
command/s.
$ npm run lint
$ npm run test
$ npm run coverage
Feedback and contributions are more than welcome. Should you feel there is something you wish to contribute to this paginator, feel free to make a merge request. Ensure that whatever proposed change, has tests covering various cases for the change.
FAQs
Simple string utilities provided in an easy to consume interface
The npm package skaleb-string-utils receives a total of 1 weekly downloads. As such, skaleb-string-utils popularity was classified as not popular.
We found that skaleb-string-utils 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.