ansi-colors
Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).
Found 9484 results for string formatting
Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).
String Formatting for JavaScript
Opinionated HTML formatter focused towards making HTML diffs readable.
A collection of personal utilities to live a happier life
CommonJS version - The smallest and fastest command-line coloring package on the internet
Easy string formatting script
A lightweight and powerful utility library for advanced string manipulation, case conversion, and formatting.
Simple micro templating
Terminal string styling with tagged template literals
The smallest and fastest command-line coloring package on the internet
Escape RegExp special characters
Get the visual width of a string - the number of columns required to display it
Get the native type of a value.
The string_decoder module from Node core
The color gray, in ansi.
Newline character converter
Check if the character represented by a given Unicode code point is fullwidth
Strip UTF-8 byte order mark (BOM) from a string
Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`
Parse JSON with more helpful errors
Get a stream as a string, Buffer, ArrayBuffer or array
Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.
Beautiful color gradients in terminal output
Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet
Returns true if a string has an extglob.
Strip the final newline character from a string or Uint8Array
Matches strings against configurable strings, globs, regular expressions, and/or functions
Efficient implementation of Levenshtein algorithm with locale-specific collator support.
prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.
Indent each line in a string
Compare strings containing a mix of letters and numbers in the way a human being would in sort order.
ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.
`JsSimpleDateFormat` is for formatting and parsing date-time and duration. It formats a `Date` object to be a string as the defined pattern. It can also parse a string to be a `Date` object based on the defined pattern. It supports the pattern which is
The color red, in ansi.
The color cyan, in ansi.
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Parse String to Number based on configuration
ES5 spec-compliant shim for String.prototype.trim
Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow
Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes
A robust HTML entities encoder/decoder with full Unicode support.
Querystringify - Small, simple but powerful query string parser.
Measure the difference between two strings using the Levenshtein distance algorithm
A JavaScript library for escaping CSS strings and identifiers while generating the shortest possible ASCII-only output.
Strip leading whitespace from each line in a string
Small footprint URL parser that works seamlessly across Node.js and browser environments
Normalize a URL
Truncate a string to a specific width in the terminal
Strip redundant indentation and indent the string
Compile regular expressions' unicodeSets (v) flag.
Get the shortest leading whitespace from lines in a string
Robustly get an object's own property keys (strings and symbols), including non-enumerables when possible
Generate a cryptographically strong random string
Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays.
Generate a unique random string
A robust polyfill for the `CSS.escape` utility method as defined in CSSOM.
Strips ANSI Control Characters from string or stream
A robust & optimized `String.prototype.repeat` polyfill, based on the ECMAScript 6 specification.
Returns true if a value exists, false if empty. Works with deeply nested values using object paths.
Detect the indentation of code
Repeat the given string n times. Fastest implementation for repeating a string.
Determine the East Asian Width of a Unicode character
Trim newlines from the start and/or end of a string
Get the visual width of the widest line in a string - the number of columns required to display it
Check if a string has ANSI escape codes
Functions for dealing with a PostgresSQL connection string
mdast utility to get the plain text content of a node
Parse regular expressions' unicodeSets (v) flag.
LZ-based compression algorithm
a few common utility template tags for ES2015
Fastest Levenshtein distance implementation in JS.
A robust & optimized `String.prototype.includes` polyfill, based on the ECMAScript 6 specification.
Tokenize a string into an array of string parts and format identifier objects.
Wildcard matching tools
Parse and stringify URL query strings
Convert object keys to camel case
Compute ripemd160 of bytes or strings.
Generate string from a token array by interpolating values.
Check if a character is hexadecimal
Check if a character is decimal
Get the gzipped size of a string or buffer
Check if a character is alphanumerical
Check if a character is alphabetical
micromark utility to decode markdown strings
Library of miscellaneous formatting and helper functions
Easy way to split a string on a given character unless it's quoted or escaped.
Math and string formula parser.
Convert a string to pascal case (upper camelcase).
Convert object keys from camel case
Convert milliseconds to a human readable string: `1337000000` → `15d 11h 23m 20s`
Strip ANSI color codes from a string. No dependencies.
A module that parses a string as regular expression and returns the parsed value.
Create an array by repeating the given value n times.
Compare strings containing a mix of letters and numbers in the way a human being would in sort order.
Isomorphic, functional type-checking for Javascript
The color green, in ansi.
Hashing made simple. Get the hash of a buffer/string/stream/file.
Split a string on the first occurance of a given separator
The color grey, in ansi.
The color dim, in ansi.
Cross-platform success symbol.
Get the system locale
The color bgblue, in ansi.
The color yellow, in ansi.
The color bold, in ansi.
The color italic, in ansi.
The color bgyellow, in ansi.
Convert a string index to its line and column position
Compare alphanumeric strings the same way a human would, using a natural order algorithm
The color blue, in ansi.
The color bgcyan, in ansi.
The color bgmagenta, in ansi.
Cross-platform error symbol.
The color bgred, in ansi.
The color bgwhite, in ansi.
The color inverse, in ansi.
Cross-platform warning symbol.
Convert a string to a valid safe filename
Formattable string with the same API as an intrinsic string
The most efficient JS implementation calculating the Levenshtein distance, i.e. the difference between two strings.
The color underline, in ansi.
Remove wrapping quotes from a string.
The color bggreen, in ansi.
The color hidden, in ansi.
The color magenta, in ansi.
The color reset, in ansi.
The color black, in ansi.
The color bgblack, in ansi.
The color white, in ansi.
The color strikethrough, in ansi.
Functional errors with formatted output
Cross-platform info symbol.
Mapping between standard locale identifiers and Windows locale identifiers (LCID)
Various helper utilities
Convert a value to a ReadableStream
Multi-colour console output from chalk with added awesome
Useful utilities for working with Uint8Array (and Buffer)
ES2017 spec-compliant String.prototype.padEnd shim.
Repeat a string - fast
Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz
Returns `true` if the value is a primitive.
Functions that surround a string with ansicolor codes so it prints in color.
Convert a string/promise/array/iterable/asynciterable/buffer/typedarray/arraybuffer/object into a stream
Customizable String Formatter
Strip a substring from the start/end of a string
Simple wildcard matching
generic javascript number/string formatting (bytes, milliseconds, ...)
Remove the trailing spaces from a string.
Check if a string is a URL
Capitalize every word in a string: `unicorn cake` → `Unicorn Cake`
Escape strings for use as JavaScript string literals
Remove leading indentation from ES6 template literals.
Stringify Object as tree structure
Iterate any iterable JS value. Works robustly in all environments, all versions.
Pluralize a word
A TypeScript port of the Java StringTemplate 4 library
Get the line and column number of a specific character in a string
hast utility to get the plain-text value of a node
Lightweight and performant natural sorting of arrays and collections by differentiating between unicode characters, numbers, dates, etc.
Serializes any DOM node into a String
Strip a byte order mark (BOM) from a string.
A string formatter and validator based on masks
Stringify is to `eval` as `JSON.stringify` is to `JSON.parse`
A javascript library for formatting and manipulating text (strings).
Terminal string styling done right
A simple string template function based on named or indexed arguments
Returns true if a windows file path has invalid characters.
fast string hashing function
Parse JavaScript one character at a time to look for snippets in Templates. This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.
String manipulation extensions for Underscore.js javascript library.
Native JS murmur hash implementation
hast utility to get the plain-text value of a node according to the `innerText` algorithm
Check if a character is a whitespace character
Check if a string is SVG
Check if a character is a word character
Elegant spinner for interactive CLI apps
Find multiple RegExp matches in a string
Jest snapshot serializer that beautifies HTML.
Regular expression for matching HTML comments
DOMParser.parseFromString for XML with IE8 fallback
Reduce function calls in a string, using a callback
Convert Unicode characters to Latin characters using transliteration
Pure-JS printf
Right pad a string with zeros or a specified string. Fastest implementation.
A robust & optimized `String.fromCodePoint` polyfill, based on the ECMAScript 6 specification.
Slugify a string
Various helper utilities for working with buffers and binary data
Remove any existing casing from a string.
Returns true if a file path does not contain any invalid characters.
sprintf parser and basic formatter
ES2017 spec-compliant String.prototype.padStart shim.
Check if a string is an IP address
Returns true if the value passed is all whitespace.
nlcst utility to transform a tree to a string
Extensible string utility for converting, identifying and flipping string case
Convert a string to space case.
ES2019 spec-compliant String.prototype.trimLeft shim.
Returns `true` if an array has a glob pattern.
remove diacritics from strings
String encoding utilitlies extracted from TweetNaCl.js
ES2019 spec-compliant String.prototype.trimLeft shim.
Convert HTML entities to HTML characters, e.g. `>` converts to `>`.
Math and string formula parser.
Serialises error object to normal object
Lightweight format utility for the browser, based on util.format().
A robust & optimized `String.prototype.codePointAt` polyfill, based on the ECMAScript 6 specification.
A lightweight package for formatting strings with parameter interpolation
Check if a string only contains alphanumeric characters
Convert efficiently index to/from line-column in a string
[](https://www.npmjs.com/package/levenary) [](https://github.com/tanhauhau/levenary/actions)
Write data to a random temporary file
Convert a string to camel case.
strings comparison matchers for chai
Zero-dependency unicode-aware string tools
Check if a string is HTML
Replace search occurrences with a replacement string.
Appends a bullet before string (to mimick lists in ASCII)
Get a pretty output of the original, minified, gzipped size of a string or buffer: 130 B → 91 B → 53 B (gzip)
Similar to String#trim() but removes only newlines
A tiny and fast package for adding colors to your terminal output.
Convert HTML/XML source code or DOM nodes to React elements
Consume a stream of data into a binary Buffer as efficiently as possible
Base64 and base64url to string or arraybuffer, and back. Node, Deno or browser.
parses number and unit, '20px' into [20, 'px']
Returns true if the given number is odd, and is an integer that does not exceed the JavaScript MAXIMUM_SAFE_INTEGER.
Test if a value is a string.
Convert between POSIX and Windows paths.
Insert supplied variable values into a format string.
Test if a value is a regular expression string.
Iterator over lines in a string
Escape a regular expression string or pattern.
Convert a camelized/dasherized/underscored string into a humanized one: `fooBar-Baz_Faz` → `Foo bar baz faz`
Colorful animations in terminal output
Parse parentheses from a string
Get the length of unicode strings
Get a property from an object using dot (object path) notation.
A robust & character encoding–agnostic JavaScript implementation of the `Quoted-Printable` content transfer encoding as defined by RFC 2045.
Allocate a buffer containing a provided string.
Escape a string for use in AppleScript
easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.
Create a regular expression from a regular expression string.
Pad strings to a given length
Split string by any separator excluding brackets, quotes and escaped characters
slugifies even utf-8 chars!
The fast way to check if a string is blank
Contains some util methods for converting numbers into words, ordinal words and ordinal numbers.
Tagged template literal for Sanity.io GROQ-queries
Return a regular expression to parse a regular expression string.
Regular expression for matching URLs
alters a string by replacing multiple range fragments in one fast pass