MCPcopy Index your code
hub / github.com/panzerdp/voca

github.com/panzerdp/voca @v1.4.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.4.0 ↗
159 symbols 725 edges 203 files 14 documented · 9%
README

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:

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

Or require individual functions:

var words = require('voca/words');
var 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="https://github.com/panzerdp/voca/raw/v1.4.0/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
@panzerdp

License

Licensed under MIT

Core symbols most depended-on inside this repo

coerceToString
called by 79
src/helper/string/coerce_to_string.js
isNil
called by 28
src/helper/object/is_nil.js
coerceToNumber
called by 17
src/helper/number/coerce_to_number.js
toInteger
called by 14
src/helper/number/to_integer.js
clipNumber
called by 12
src/helper/number/clip_number.js
toString
called by 11
src/helper/string/to_string.js
coerceToBoolean
called by 10
src/helper/boolean/coerce_to_boolean.js
generate
called by 8
jsdoc/template/publish.js

Shape

Function 159

Languages

TypeScript100%

Modules by API surface

jsdoc/template/publish.js27 symbols
jsdoc/template/static/scripts/search.js8 symbols
config/transform.js8 symbols
src/manipulate/tr.js3 symbols
src/helper/string/surrogate_pair.js3 symbols
src/manipulate/word_wrap.js2 symbols
src/manipulate/latinise.js2 symbols
src/helper/string/diacritics_map.js2 symbols
src/helper/format/type_format/float.js2 symbols
src/escape/unescape_html.js2 symbols
src/escape/escape_html.js2 symbols
src/chain/wrapper.js2 symbols

Dependencies from manifests, versioned

babel-cli6.26.0 · 1×
babel-core6.26.0 · 1×
babel-eslint8.1.1 · 1×
babel-plugin-add-module-exports0.2.1 · 1×
babel-plugin-transform-es2015-block-scoping6.26.0 · 1×
babel-plugin-transform-es2015-destructuring6.23.0 · 1×
babel-plugin-transform-es2015-modules-commonjs6.26.0 · 1×
babel-plugin-transform-es2015-parameters6.24.1 · 1×
babel-plugin-transform-es2015-shorthand-properties6.24.1 · 1×
babel-plugin-transform-es2015-spread6.22.0 · 1×
babel-plugin-transform-object-assign6.22.0 · 1×

For agents

$ claude mcp add voca \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact