All Projects → panzerdp → Voca

panzerdp / Voca

Licence: mit
The ultimate JavaScript string library

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to Voca

stringy
Convert string to camel case, snake case, kebab case / slugify, custom delimiter, pad string, tease string and many other functionalities with help of by Stringy package.
Stars: ✭ 137 (-95.96%)
Mutual labels:  string, slugify
pascalcase
Convert a string to pascal case (upper camel case). Used by more than 8.7 million projects on GitHub! Please follow this library's author: https://github.com/jonschlinkert
Stars: ✭ 35 (-98.97%)
Mutual labels:  string, case
rxjs-ninja
RxJS Operators for handling Observable strings, numbers, booleans and more
Stars: ✭ 68 (-97.99%)
Mutual labels:  string, javascript-library
justified
Wrap, align and justify the words in a string.
Stars: ✭ 30 (-99.11%)
Mutual labels:  string, pad
indexed-string-variation
Experimental JavaScript module to generate all possible variations of strings over an alphabet using an n-ary virtual tree
Stars: ✭ 16 (-99.53%)
Mutual labels:  string, javascript-library
Livebot
An app that allows you to be inside a bot!
Stars: ✭ 271 (-92%)
Mutual labels:  javascript-library
Length.js
📏 JavaScript library for length units conversion.
Stars: ✭ 292 (-91.38%)
Mutual labels:  javascript-library
Formvuelate
Dynamic schema-based form rendering for VueJS
Stars: ✭ 262 (-92.26%)
Mutual labels:  javascript-library
Typelighterjs
Take a stride into the world of dynamic and appealing typewriters. You can be sure that you will never even think of looking back.
Stars: ✭ 262 (-92.26%)
Mutual labels:  javascript-library
Binance
A wrapper for the Binance REST and WebSocket APIs. Also beautifies responses
Stars: ✭ 304 (-91.02%)
Mutual labels:  javascript-library
Cloudinary js
Cloudinary JavaScript library
Stars: ✭ 302 (-91.08%)
Mutual labels:  javascript-library
Dropzone
Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.
Stars: ✭ 16,097 (+375.26%)
Mutual labels:  javascript-library
Oimophysics
A cross-platform 3D physics engine
Stars: ✭ 269 (-92.06%)
Mutual labels:  javascript-library
Attributedstring
基于Swift插值方式优雅的构建富文本, 支持点击长按事件, 支持不同类型过滤, 支持自定义视图等.
Stars: ✭ 294 (-91.32%)
Mutual labels:  string
Kind Of
Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
Stars: ✭ 268 (-92.09%)
Mutual labels:  string
Multilanguages
Android 多语种适配框架,兼容高版本,适配第三方库语种
Stars: ✭ 299 (-91.17%)
Mutual labels:  string
Apify Js
Apify SDK — The scalable web scraping and crawling library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.
Stars: ✭ 3,154 (-6.88%)
Mutual labels:  javascript-library
Menuspy
A JavaScript library to make navigation menus highlight the item based on currently in view section.
Stars: ✭ 283 (-91.64%)
Mutual labels:  javascript-library
Kalmanjs
Javascript based Kalman filter for 1D data
Stars: ✭ 298 (-91.2%)
Mutual labels:  javascript-library
Easycanvas
数据驱动、2D&3D、渐进式Canvas库,支持JSX,配备Chrome调试插件,支持微信小游戏、物理引擎等。
Stars: ✭ 281 (-91.7%)
Mutual labels:  javascript-library

Voca JavaScript library logo

travis build code coverage npm package

Voca is a JavaScript library for manipulating strings. https://vocajs.com

v.camelCase('bird flight');              // => 'birdFlight'
v.sprintf('%s costs $%.2f', 'Tea', 1.5); // => 'Tea costs $1.50'
v.slugify('What a wonderful world');     // => 'what-a-wonderful-world'

The Voca library offers helpful functions to make string manipulations comfortable: change case, trim, pad, slugify, latinise, sprintf'y, truncate, escape and much more. The modular design allows to load the entire library, or individual functions to minimize the application builds. The library is fully tested, well documented and long-term supported.

Features

  • Provides the complete set of functions to manipulate, chop, format, escape and query strings
  • Includes detailed, easy to read and searchable documentation
  • Supports a wide range of environments: Node.js 0.10+, Chrome, Firefox, Safari 7+, Edge 13+, IE 9+
  • 100% code coverage
  • No dependencies

Documentation

See the complete documentation at https://vocajs.com

Usage

Voca can be used in various environments.

Node.js, Rollup, Webpack, Browserify

Voca JavaScript library supports Node.js, Rollup, Webpack, Browserify

Install the library with npm into your local modules directory:

npm install voca

CommonJS modules

Then in your application require the entire library:

const v = require('voca');
v.trim(' Hello World! ');            // => 'Hello World'
v.sprintf('%d red %s', 3, 'apples'); // => '3 red apples'

Or require individual functions:

const words = require('voca/words');
const slugify = require('voca/slugify');
words('welcome to Earth'); // => ['welcome', 'to', 'Earth']
slugify('caffé latté');    // => 'caffe-latte'

ES2015 modules

Voca is compatible with ES2015 modules to import the entire library:

import voca from 'voca';
voca.kebabCase('goodbye blue sky'); // => 'goodbye-blue-sky'

Or import individual functions:

import last from 'voca/last';
last('sun rises', 5); // => 'rises'

Browser

Voca JavaScript library supports Chrome, Firefox, Safari, Edge, Internet Explorer

Load the UMD builds directly into browser's web page:

<script src="voca.js" type="text/javascript"></script>

Then a global variable v is exposed for the entire library:

<script type="text/javascript">
  v.last('wonderful world', 5); // => 'world'
</script>

Functions

Manipulate Query Chop Case Index
v.insert v.endsWith v.charAt v.camelCase v.indexOf
v.latinise v.includes v.codePointAt v.capitalize v.lastIndexOf
v.pad v.isAlpha v.first v.decapitalize v.search
v.padLeft v.isAlphaDigit v.graphemeAt v.kebabCase Escape
v.padRight v.isBlank v.last v.lowerCase v.escapeHtml
v.repeat v.isDigit v.prune v.snakeCase v.escapeRegExp
v.replace v.isEmpty v.slice v.swapCase v.unescapeHtml
v.replaceAll v.isLowerCase v.substr v.titleCase Strip
v.reverse v.isNumeric v.substring v.upperCase v.stripBom
v.reverseGrapheme v.isString v.truncate Split v.stripTags
v.slugify v.isUpperCase Count v.chars
v.splice v.matches v.count v.codePoints
v.tr v.startsWith v.countGraphemes v.graphemes
v.trim Format v.countSubstrings v.split
v.trimLeft v.sprintf v.countWhere v.words
v.trimRight v.vprintf v.countWords
v.wordWrap

Bug reports

For bug reports, documentation typos or feature requests feel free to create an issue.
Please make sure that the same problem wasn't reported already.

For general usage questions please ask on StackOverflow.

Contributing

Contribution is welcome!

  • Create a pull request containing bug fixes or new features. Include unit tests and keep the code coverage report near 100% 😎
  • Propose new functions, improvements, better documentation

See more details in Contributing guide.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Author

Dmitri Pavlutin
Dmitri Pavlutin
Personal blog
Email

License

Licensed under MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].