voca - The ultimate JavaScript string library

  •        5

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. Voca can be used in various environments.

https://vocajs.com
https://github.com/panzerdp/voca

Tags
Implementation
License
Platform

   




Related Projects

string.js - Extra JavaScript string methods.

  •    Javascript

string.js, or simply S is a lightweight (< 5 kb minified and gzipped) JavaScript library for the browser or for Node.js that provides extra String methods. Originally, it modified the String prototype. But I quickly learned that in JavaScript, this is considered poor practice.Personally, I prefer the cleanliness of the way code looks when it appears to be native methods. i.e. when you modify native JavaScript prototypes. However, if any app dependency required string.js, then the app's string prototype would be modified in every module. This could be troublesome. So I settled on creating a wrapper a la jQuery style. For those of you prototype hatin' fools, there is the method extendPrototype().

camel-snake-kebab - A Clojure[Script] library for word case conversions

  •    Clojure

A Clojure[Script] library for word case conversions. The :separator argument can either be a regex, string or character.

left-pad - :arrow_left: String left pad

  •    Javascript

NOTE: The third argument should be a single char. However the module doesn't throw an error if you supply more than one chars. See #28. NOTE: Characters having code points outside of BMP plan are considered a two distinct characters. See #58.

strip-json-comments - Strip comments from JSON. Lets you use comments in your JSON files!

  •    Javascript

It will replace single-line comments // and multi-line comments /**/ with whitespace. This allows JSON error positions to remain as close as possible to the original source.Also available as a gulp/grunt/broccoli plugin.


Chalk - Terminal string styling done right

  •    Javascript

Chalk comes with an easy to use composable API where you just chain and nest the styles you want. Chain styles and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that chalk.red.yellow.green is equivalent to chalk.green.

python-versioneer - version-string management for VCS-controlled trees

  •    Python

This is a tool for managing a recorded version number in distutils-based python projects. The goal is to remove the tedious and error-prone "update the embedded version string" step from your release process. Making a new release should be as easy as recording a new tag in your version-control system, and maybe making new tarballs. For released software, the version identifier is closely related to a VCS tag. Some projects use tag names that include more than just the version string (e.g. "myproject-1.2" instead of just "1.2"), in which case the tool needs to strip the tag prefix to extract the version identifier. For unreleased software (between tags), the version identifier should provide enough information to help developers recreate the same tree, while also giving them an idea of roughly how old the tree is (after version 1.2, before version 1.3). Many VCS systems can report a description that captures this, for example git describe --tags --dirty --always reports things like "0.7-1-g574ab98-dirty" to indicate that the checkout is one revision past the 0.7 tag, has a unique revision id of "574ab98", and is "dirty" (it has uncommitted changes.

slugify - Converts a string to a slug

  •    PHP

Converts a string into a slug. Developed by Florian Eckerstorfer in Vienna, Europe with the help of many great contributors.

slug-generator - Slug Generator Library for PHP, based on Unicode’s CLDR data

  •    PHP

This library provides methods to generate slugs for URLs, filenames or any other target that has a limited character set. It’s based on PHPs Transliterator class which uses the data of the CLDR to transform characters between different scripts (e.g. Cyrillic to Latin) or types (e.g. upper- to lower-case or from special characters to ASCII). To install the library use Composer or download the source files from GitHub.

HTML-Truncator - Wants to truncate an HTML string properly? This Ruby gem is for you.

  •    Ruby

Wants to truncate an HTML string properly? This Ruby gem is for you.

sprintf.js - sprintf.js is a complete open source JavaScript sprintf implementation

  •    Javascript

sprintf-js is a complete open source JavaScript sprintf implementation for the browser and Node.js. Note: as of v1.1.1 you might need some polyfills for older environments. See Support section below.

iOSPlot - Chart library for iOS

  •    Objective-C

Use gesture/tap to show the value label (or mild statistics) for a data point. Further break out colors for customization of background, x/y labels, and shadows. Allow legend labels to appear on either the right or left side of the chart (or not at all). Use the rendered string width of the legend labels to determine right/left side margin. If a legend string is significantly long (200% percentage of default margin width?), truncate or abbreviate it to X characters.

speakingurl - Generate a slug – transliteration with a lot of options

  •    Javascript

Generate a slug with a lot of options; create a so-called Semantic URL or 'Clean URL' or 'Pretty URL' or 'nice-looking URL' or 'Speaking URL' or 'user-friendly URL' or 'SEO-friendly URL' from a string. This module aims to transliterate the input string.

change-case - Convert strings between camelCase, PascalCase, Title Case, snake_case and more

  •    Javascript

Convert strings between camelCase, PascalCase, Title Case, snake_case, lowercase, UPPERCASE, CONSTANT_CASE and more. All methods support Unicode (non-ASCII characters) and non-string entities, such as objects with a toString property, numbers and booleans. Empty values (null and undefined) will result in an empty string.

jsesc - Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data

  •    Javascript

For any input, jsesc generates the shortest possible valid printable-ASCII-only output. Here’s an online demo.jsesc’s output can be used instead of JSON.stringify’s to avoid mojibake and other encoding issues, or even to avoid errors when passing JSON-formatted data (which may contain U+2028 LINE SEPARATOR, U+2029 PARAGRAPH SEPARATOR, or lone surrogates) to a JavaScript parser or an UTF-8 encoder.

tinyformat - Minimal, type safe printf replacement library for C++

  •    C++

All user facing functions are defined in the namespace tinyformat. A namespace alias tfm is provided to encourage brevity, but can easily be disabled if desired. Three main interface functions are available: an iostreams-based format(), a string-based format() and a printf() replacement. These functions can be thought of as C++ replacements for C's fprintf(), sprintf() and printf() functions respectively. All the interface functions can take an unlimited number of input arguments if compiled with C++11 variadic templates support. In C++98 mode, the number of arguments must be limited to some fixed upper bound which is currently 16 as of version 1.3. Supporting more arguments is quite easy using the in-source code generator based on cog.py - see the source for details.

yq - Command-line YAML and XML processor - jq wrapper for YAML/XML documents

  •    Python

Before using yq, you also have to install its dependency, jq. See the jq installation instructions for details and directions specific to your platform. Use the --width/-w argument to pass the line wrap width for string literals. All other command line arguments are forwarded to jq. yq forwards the exit code jq produced, unless there was an error in YAML parsing, in which case the exit code is 1. See the jq manual for more details on jq features and options.

FlexiColorPicker - A pure JavaScript color picker - no images, external libraries, CSS or 1px divs.

  •    Javascript

FlexiColorPicker is based on HSV color model. The only two parts of the color picker are therefore the slider for selecting hue value and the picker for selecting saturation and value. Both the slider and picker are HTML elements (usually <div>'s) that serve as wrappers for SVG/VML gradient rectangles. The slider gradient rectangle represents the hue value (gradient with 9 stop-colors). The two overlapping black and white gradient rectangles of the picker represent the saturation and value values. The top level elements (<svg> in case of SVG enabled browser and <div> in case of VML enabled browser) that wrap each of the slider and picker gradient rectangles have set width and height to 100% which means that the color picker components (slider and picker) adjust themselfs automatically to the dimensions of the slider and picker HTML elements. This is the no-hassle form of creating the color picker. This is the recommended call.