
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
string-filters
Advanced tools
Fast native javascript string filters library.
| Browser | Version |
|---|---|
| Chrome | >= 107 |
| Edge | >= 107 |
| Firefox | >= 104 |
| Safari | >= 16 |
npm install string-filters
Download package and unpack it or use following commands:
wget https://github.com/tarkhov/js-string-filters/releases/download/v0.1.0/js-string-filters.zip
unzip js-string-filters.zip
import { camelCase } from 'string-filters'
let result = ''
result = camelCase('camel 123 casE')
// Output: camelCase
console.log(result)
result = camelCase('camel 123 casE', true)
// Output: camel123Case
console.log(result)
import { capitalize } from 'string-filters'
let result = capitalize('capitalizE')
// Output: Capitalize
console.log(result)
import { flatCase } from 'string-filters'
let result = ''
result = flatCase('Flat 123 Case')
// Output: flatcase
console.log(result)
result = flatCase('Flat 123 Case', true)
// Output: flat123case
console.log(result)
import { kebabCase } from 'string-filters'
let result = ''
result = kebabCase('Kebab 123 Case')
// Output: kebab-case
console.log(result)
result = kebabCase('Kebab 123 Case', true)
// Output: kebab-123-case
console.log(result)
import { pad } from 'string-filters'
let result = ''
result = pad('pad', 10, '_')
// Output: ___pad____
console.log(result)
import { pascalCase } from 'string-filters'
let result = ''
result = pascalCase('pascal 123 casE')
// Output: PascalCase
console.log(result)
result = pascalCase('pascal 123 casE', true)
// Output: Pascal123Case
console.log(result)
import { snakeCase } from 'string-filters'
let result = ''
result = snakeCase('Snake 123 Case')
// Output: snake_case
console.log(result)
result = snakeCase('Snake 123 Case', true)
// Output: snake_123_case
console.log(result)
import { titleCase } from 'string-filters'
let result = ''
result = titleCase('title 123 casE')
// Output: Title Case
console.log(result)
result = titleCase('title 123 casE', true)
// Output: Title 123 Case
console.log(result)
import { trainCase } from 'string-filters'
let result = ''
result = trainCase('train 123 casE')
// Output: Train-Case
console.log(result)
result = trainCase('train 123 casE', true)
// Output: Train-123-Case
console.log(result)
import { truncate } from 'string-filters'
let result = truncate('etcetera', 3, '...')
// Output: etc...
console.log(result)
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Fast native javascript string filters library.
The npm package string-filters receives a total of 23 weekly downloads. As such, string-filters popularity was classified as not popular.
We found that string-filters demonstrated a healthy version release cadence and project activity because the last version was released less than 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
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.