ansi-styles
ANSI escape codes for styling strings in the terminal
Found 9783 results for string
ANSI escape codes for styling strings in the terminal
Strip ANSI escape codes from a string
Regular expression for matching ANSI escape codes
Get the visual width of a string - the number of columns required to display it
Terminal string styling done right
Wordwrap a string with ANSI escape codes
Escape RegExp special characters
Check if the character represented by a given Unicode code point is fullwidth
The string_decoder module from Node core
Get a stream as a string, Buffer, ArrayBuffer or array
Strip UTF-8 byte order mark (BOM) from a string
Get the native type of a value.
Modify strings, generate sourcemaps
Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`
Parse JSON with more helpful errors
Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.
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
Compare strings containing a mix of letters and numbers in the way a human being would in sort order.
Returns true if a string has an extglob.
ANSI escape codes for manipulating the terminal
Strip the final newline character from a string or Uint8Array
Efficient implementation of Levenshtein algorithm with locale-specific collator support.
Matches strings against configurable strings, globs, regular expressions, and/or functions
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
ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.
Slice a string with ANSI escape codes
Parse String to Number based on configuration
Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow
A JavaScript library for escaping CSS strings and identifiers while generating the shortest possible ASCII-only output.
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Measure the difference between two strings using the Levenshtein distance algorithm
Strip leading whitespace from each line in a string
ES5 spec-compliant shim for String.prototype.trim
Truncate a string to a specific width in the terminal
Strip redundant indentation and indent the string
Robustly get an object's own property keys (strings and symbols), including non-enumerables when possible
Querystringify - Small, simple but powerful query string parser.
Get the visual width of the widest line in a string - the number of columns required to display it
Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes
Determine the East Asian Width of a Unicode character
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).
A robust & optimized `String.prototype.repeat` polyfill, based on the ECMAScript 6 specification.
Get the shortest leading whitespace from lines in a string
A robust HTML entities encoder/decoder with full Unicode support.
Compile regular expressions' unicodeSets (v) flag.
A robust polyfill for the `CSS.escape` utility method as defined in CSSOM.
Small footprint URL parser that works seamlessly across Node.js and browser environments
Normalize a URL
Check if a character is decimal
Generate a unique random string
LZ-based compression algorithm
mdast utility to get the plain text content of a node
Functions for dealing with a PostgresSQL connection string
A robust & optimized `String.prototype.includes` polyfill, based on the ECMAScript 6 specification.
CommonJS version - The smallest and fastest command-line coloring package on the internet
Generate a cryptographically strong random string
Check if a character is hexadecimal
Detect the indentation of code
Check if a character is alphabetical
Parse regular expressions' unicodeSets (v) flag.
Check if a character is alphanumerical
micromark utility to decode markdown strings
Fastest Levenshtein distance implementation in JS.
Convert milliseconds to a human readable string: `1337000000` → `15d 11h 23m 20s`
Returns true if a value exists, false if empty. Works with deeply nested values using object paths.
Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays.
Trim newlines from the start and/or end of a string
Wildcard matching tools
Repeat the given string n times. Fastest implementation for repeating a string.
a few common utility template tags for ES2015
Convert object keys to camel case
Parse and stringify URL query strings
Check if a string has ANSI escape codes
Get the gzipped size of a string or buffer
Useful utilities for working with Uint8Array (and Buffer)
Terminal string styling with tagged template literals
The smallest and fastest command-line coloring package on the internet
Split a string on the first occurance of a given separator
Math and string formula parser.
Compute ripemd160 of bytes or strings.
Various helper utilities
Convert object keys from camel case
Convert a string to pascal case (upper camelcase).
Isomorphic, functional type-checking for Javascript
Create an array by repeating the given value n times.
Various helper utilities for working with buffers and binary data
Easy way to split a string on a given character unless it's quoted or escaped.
Formatting Date objects as strings since 2013
Hashing made simple. Get the hash of a buffer/string/stream/file.
Convert a string index to its line and column position
A module that parses a string as regular expression and returns the parsed value.
Get the system locale
Functional errors with formatted output
Compare strings containing a mix of letters and numbers in the way a human being would in sort order.
Stringify Object as tree structure
Mapping between standard locale identifiers and Windows locale identifiers (LCID)
Simple micro templating
Convert a string to a valid safe filename
The most efficient JS implementation calculating the Levenshtein distance, i.e. the difference between two strings.
Remove wrapping quotes from a string.
Remove the trailing spaces from a string.
Functions that surround a string with ansicolor codes so it prints in color.
Simple wildcard matching
Compare alphanumeric strings the same way a human would, using a natural order algorithm
Repeat a string - fast
hast utility to get the plain-text value of a node according to the `innerText` algorithm
Math and string formula parser.
Strip a byte order mark (BOM) from a string.
ES2017 spec-compliant String.prototype.padEnd shim.
Returns `true` if the value is a primitive.
Convert a value to a ReadableStream
Convert a string/promise/array/iterable/asynciterable/buffer/typedarray/arraybuffer/object into a stream
hast utility to get the plain-text value of a node
Remove leading indentation from ES6 template literals.
Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz
Strip a substring from the start/end of a string
fast string hashing function
Get the line and column number of a specific character in a string
Native JS murmur hash implementation
Lightweight and performant natural sorting of arrays and collections by differentiating between unicode characters, numbers, dates, etc.
A simple string template function based on named or indexed arguments
Stringify is to `eval` as `JSON.stringify` is to `JSON.parse`
Check if a string is a URL
Escape strings for use as JavaScript string literals
Capitalize every word in a string: `unicorn cake` → `Unicorn Cake`
A fast function for calculating where a string should be truncated, given an optional width limit and an ellipsis string.
Serializes any DOM node into a String
String manipulation extensions for Underscore.js javascript library.
Returns true if a windows file path has invalid characters.
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.
Pluralize a word
The color gray, in ansi.
A fast function for calculating the visual width of a string once printed to the terminal.
DOMParser.parseFromString for XML with IE8 fallback
Slugify a string
Convert Unicode characters to Latin characters using transliteration
Beautiful color gradients in terminal output
Elegant spinner for interactive CLI apps
Reduce function calls in a string, using a callback
Find multiple RegExp matches in a string
Iterate any iterable JS value. Works robustly in all environments, all versions.
Opinionated HTML formatter focused towards making HTML diffs readable.
nlcst utility to transform a tree to a string
Check if a string is SVG
remove diacritics from strings
Jest snapshot serializer that beautifies HTML.
Newline character converter
Check if a character is a whitespace character
Pure-JS printf
Check if a string is an IP address
Right pad a string with zeros or a specified string. Fastest implementation.
Check if a character is a word character
Regular expression for matching HTML comments
A robust & optimized `String.prototype.codePointAt` polyfill, based on the ECMAScript 6 specification.
A robust & optimized `String.fromCodePoint` polyfill, based on the ECMAScript 6 specification.
Returns true if a file path does not contain any invalid characters.
Remove any existing casing from a string.
Extensible string utility for converting, identifying and flipping string case
Encode & decode strings, bytes, and integers to Base62
The color cyan, in ansi.
sprintf parser and basic formatter
String encoding utilitlies extracted from TweetNaCl.js
ES2017 spec-compliant String.prototype.padStart shim.
Returns true if the value passed is all whitespace.
parses number and unit, '20px' into [20, 'px']
The color red, in ansi.
Convert a string to space case.
Convert HTML entities to HTML characters, e.g. `>` converts to `>`.
Split string by any separator excluding brackets, quotes and escaped characters
The fast way to check if a string is blank
Parse parentheses from a string
ES2019 spec-compliant String.prototype.trimLeft shim.
ES2019 spec-compliant String.prototype.trimLeft shim.
String formatting inspired by Python's str.format()
Replaces strings in a stream.
Tagged template literal for Sanity.io GROQ-queries
Base64 and base64url to string or arraybuffer, and back. Node, Deno or browser.
Lightweight format utility for the browser, based on util.format().
Returns `true` if an array has a glob pattern.
Convert efficiently index to/from line-column in a string
sprintf formatting targetted for CLI
Zero-dependency unicode-aware string tools
[](https://www.npmjs.com/package/levenary) [](https://github.com/tanhauhau/levenary/actions)
Write data to a random temporary file
parse a css color string
Check if a string only contains alphanumeric characters
escape Markdown control characters
Serialises error object to normal object
slugifies even utf-8 chars!
Convert HTML/XML source code or DOM nodes to React elements
Convert a string to camel case.
Similar to String#trim() but removes only newlines
Convert between POSIX and Windows paths.
Replace search occurrences with a replacement string.
Check if a string is HTML
Get a pretty output of the original, minified, gzipped size of a string or buffer: 130 B → 91 B → 53 B (gzip)
Returns true if the given number is odd, and is an integer that does not exceed the JavaScript MAXIMUM_SAFE_INTEGER.
Tokenize a string into an array of string parts and format identifier objects.
Left pad a string with zeros or a specified string. Fastest implementation.
Test if a value is a string.
Escape a regular expression string or pattern.
Insert supplied variable values into a format string.
Test if a value is a regular expression string.
Generate string from a token array by interpolating values.
Create a regular expression from a regular expression string.
Escape RegExp special characters
Convert a string into a stream (streams2)
Convert a camelized/dasherized/underscored string into a humanized one: `fooBar-Baz_Faz` → `Foo bar baz faz`
Embed data in other data and easily extract it when needed
Pad strings to a given length
Escape a string for use in AppleScript
A robust & character encoding–agnostic JavaScript implementation of the `Quoted-Printable` content transfer encoding as defined by RFC 2045.
Iterator over lines in a string
Regular expression for matching URLs
Return a regular expression to parse a regular expression string.
Allocate a buffer containing a provided string.
small function to append a query string to a URL
The JavaScript implementation of the Multiaddr spec
Strip ANSI color codes from a string. No dependencies.
Convert a string to lowercase.
Detect the indentation of code (commonjs fork)
Get the length of unicode strings
Simple implmentation of Stream.Readable and Stream.Writable holding the data in memory.
Contains some util methods for converting numbers into words, ordinal words and ordinal numbers.
Consume a stream of data into a binary Buffer as efficiently as possible
Left and right string padding
tiny http client for Node and the browser
easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.
alters a string by replacing multiple range fragments in one fast pass
strings comparison matchers for chai
String#replace for React components
Get a property from an object using dot (object path) notation.
Convert a string to snake case.
parse string escapes (\n, \r, etc.)
Converts a Buffer/String into a readable stream
Write nice template literals with newlines, but format as a single-line string
Split a piece text into multiple chunks based on a search query, allowing you to highlight the matches.
A collection of personal utilities to live a happier life
maximally minimal string formatting library
Return true if the given number is even.
Unicode-aware JS string splitting, typescript version
Turn a HTML string into DOM elements, cross-platform
A set of JavaScript helper functions to check for types
A fully Unicode-aware string reverser written in JavaScript.
More than 130 Handlebars helpers in ~20 categories. Helpers can be used with Assemble, Generate, Verb, Ghost, gulp-handlebars, grunt-handlebars, consolidate, or any node.js/Handlebars project.
FNV-1a non-cryptographic hash function
Replace all substring matches in a string
Easily remove Unicode combining marks from strings.
Strip HTML tags from strings. No parser, accepts mixed sources.