
Security News
Risky Biz Podcast: AI Agents Are Raising the Stakes for Software Supply Chain Security
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.
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', { numbers: true })
// Output: camel123Case
console.log(result)
result = camelCase('cameL 123 casE', { lower: true })
// Output: camelCase
console.log(result)
result = camelCase('cameL 123 casE', { numbers: true, lower: true })
// Output: camel123Case
console.log(result)
import { capitalize } from 'string-filters'
let result = ''
result = capitalize('capitalize')
// Output: Capitalize
console.log(result)
result = capitalize('cApitalizE', true)
// 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', { numbers: true })
// Output: Pascal123Case
console.log(result)
result = pascalCase('pascaL 123 casE', { lower: true })
// Output: PascalCase
console.log(result)
result = pascalCase('pascaL 123 casE', { numbers: true, lower: 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', { numbers: true })
// Output: Title 123 Case
console.log(result)
result = titleCase('titlE 123 casE', { lower: true })
// Output: Title Case
console.log(result)
result = titleCase('titlE 123 casE', { numbers: true, lower: 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', { numbers: true })
// Output: Train-123-Case
console.log(result)
result = trainCase('traiN 123 casE', { lower: true })
// Output: Train-Case
console.log(result)
result = trainCase('traiN 123 casE', { numbers: true, lower: 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 11 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
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.