JSPM

Found 9783 results for string

ansi-styles

ANSI escape codes for styling strings in the terminal

  • v6.2.3
  • 71.28
  • Published

strip-ansi

Strip ANSI escape codes from a string

  • v7.2.0
  • 70.81
  • Published

ansi-regex

Regular expression for matching ANSI escape codes

  • v6.2.2
  • 70.26
  • Published

string-width

Get the visual width of a string - the number of columns required to display it

  • v8.2.0
  • 70.07
  • Published

chalk

Terminal string styling done right

  • v5.6.2
  • 69.83
  • Published

wrap-ansi

Wordwrap a string with ANSI escape codes

  • v10.0.0
  • 68.58
  • Published

is-fullwidth-code-point

Check if the character represented by a given Unicode code point is fullwidth

  • v5.1.0
  • 67.03
  • Published

string_decoder

The string_decoder module from Node core

  • v1.3.0
  • 66.80
  • Published

get-stream

Get a stream as a string, Buffer, ArrayBuffer or array

  • v9.0.1
  • 66.29
  • Published

strip-bom

Strip UTF-8 byte order mark (BOM) from a string

  • v5.0.0
  • 66.16
  • Published

kind-of

Get the native type of a value.

  • v6.0.3
  • 66.07
  • Published

magic-string

Modify strings, generate sourcemaps

  • v0.30.21
  • 65.91
  • Published

camelcase

Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`

  • v9.0.0
  • 65.78
  • Published

parse-json

Parse JSON with more helpful errors

  • v8.3.0
  • 65.77
  • Published

jsesc

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

  • v3.1.0
  • 65.53
  • Published

is-glob

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

  • v4.0.3
  • 65.44
  • Published

natural-compare

Compare strings containing a mix of letters and numbers in the way a human being would in sort order.

  • v1.4.0
  • 65.12
  • Published

is-extglob

Returns true if a string has an extglob.

  • v2.1.1
  • 64.90
  • Published

ansi-escapes

ANSI escape codes for manipulating the terminal

  • v7.3.0
  • 64.86
  • Published

strip-final-newline

Strip the final newline character from a string or Uint8Array

  • v4.0.0
  • 64.73
  • Published

fast-levenshtein

Efficient implementation of Levenshtein algorithm with locale-specific collator support.

  • v3.0.0
  • 64.62
  • Published

anymatch

Matches strings against configurable strings, globs, regular expressions, and/or functions

  • v3.1.3
  • 64.43
  • Published

prelude-ls

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.

  • v1.2.1
  • 64.28
  • Published

indent-string

Indent each line in a string

  • v5.0.0
  • 64.15
  • Published

es-to-primitive

ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.

  • v1.3.0
  • 64.02
  • Published

slice-ansi

Slice a string with ANSI escape codes

  • v9.0.0
  • 64.01
  • Published

strnum

Parse String to Number based on configuration

  • v2.2.3
  • 63.36
  • Published

decamelize

Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow

  • v6.0.1
  • 63.22
  • Published

cssesc

A JavaScript library for escaping CSS strings and identifiers while generating the shortest possible ASCII-only output.

  • v3.0.0
  • 63.15
  • Published

is-string

Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

  • v1.1.1
  • 63.09
  • Published

leven

Measure the difference between two strings using the Levenshtein distance algorithm

  • v4.1.0
  • 63.04
  • Published

strip-indent

Strip leading whitespace from each line in a string

  • v4.1.1
  • 62.91
  • Published

cli-truncate

Truncate a string to a specific width in the terminal

  • v6.0.0
  • 62.44
  • Published

redent

Strip redundant indentation and indent the string

  • v4.0.0
  • 62.42
  • Published

own-keys

Robustly get an object's own property keys (strings and symbols), including non-enumerables when possible

  • v1.0.1
  • 62.10
  • Published

querystringify

Querystringify - Small, simple but powerful query string parser.

  • v2.2.0
  • 62.00
  • Published

widest-line

Get the visual width of the widest line in a string - the number of columns required to display it

  • v6.0.0
  • 61.90
  • Published

string-length

Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes

  • v7.0.1
  • 61.88
  • Published

get-east-asian-width

Determine the East Asian Width of a Unicode character

  • v1.5.0
  • 61.86
  • Published

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).

  • v4.1.3
  • 61.86
  • Published

string.prototype.repeat

A robust & optimized `String.prototype.repeat` polyfill, based on the ECMAScript 6 specification.

  • v1.0.0
  • 61.80
  • Published

min-indent

Get the shortest leading whitespace from lines in a string

  • v1.0.1
  • 61.67
  • Published

he

A robust HTML entities encoder/decoder with full Unicode support.

  • v1.2.0
  • 61.66
  • Published

css.escape

A robust polyfill for the `CSS.escape` utility method as defined in CSSOM.

  • v1.5.1
  • 61.52
  • Published

url-parse

Small footprint URL parser that works seamlessly across Node.js and browser environments

  • v1.5.10
  • 61.37
  • Published

is-decimal

Check if a character is decimal

  • v2.0.1
  • 61.08
  • Published

unique-string

Generate a unique random string

  • v3.0.0
  • 60.88
  • Published

lz-string

LZ-based compression algorithm

  • v1.5.0
  • 60.86
  • Published

mdast-util-to-string

mdast utility to get the plain text content of a node

  • v4.0.0
  • 60.84
  • Published

pg-connection-string

Functions for dealing with a PostgresSQL connection string

  • v2.12.0
  • 60.73
  • Published

string.prototype.includes

A robust & optimized `String.prototype.includes` polyfill, based on the ECMAScript 6 specification.

  • v2.0.1
  • 60.67
  • Published

yoctocolors-cjs

CommonJS version - The smallest and fastest command-line coloring package on the internet

  • v2.1.3
  • 60.66
  • Published

is-hexadecimal

Check if a character is hexadecimal

  • v2.0.1
  • 60.46
  • Published

detect-indent

Detect the indentation of code

  • v7.0.2
  • 60.36
  • Published

is-alphabetical

Check if a character is alphabetical

  • v2.0.1
  • 60.24
  • Published

fastest-levenshtein

Fastest Levenshtein distance implementation in JS.

  • v1.0.16
  • 60.00
  • Published

pretty-ms

Convert milliseconds to a human readable string: `1337000000` → `15d 11h 23m 20s`

  • v9.3.0
  • 59.96
  • Published

has-value

Returns true if a value exists, false if empty. Works with deeply nested values using object paths.

  • v2.0.2
  • 59.88
  • Published

has-values

Returns true if any values exist, false if empty. Works for booleans, functions, numbers, strings, nulls, objects and arrays.

  • v2.0.1
  • 59.79
  • Published

trim-newlines

Trim newlines from the start and/or end of a string

  • v5.0.0
  • 59.78
  • Published

wildcard

Wildcard matching tools

  • v2.0.1
  • 59.49
  • Published

repeat-string

Repeat the given string n times. Fastest implementation for repeating a string.

  • v1.6.1
  • 59.46
  • Published

common-tags

a few common utility template tags for ES2015

  • v1.8.2
  • 59.32
  • Published

camelcase-keys

Convert object keys to camel case

  • v10.0.2
  • 58.92
  • Published

query-string

Parse and stringify URL query strings

  • v9.3.1
  • 58.91
  • Published

has-ansi

Check if a string has ANSI escape codes

  • v6.0.2
  • 58.89
  • Published

gzip-size

Get the gzipped size of a string or buffer

  • v7.0.0
  • 58.61
  • Published

uint8array-extras

Useful utilities for working with Uint8Array (and Buffer)

  • v1.5.0
  • 58.58
  • Published

chalk-template

Terminal string styling with tagged template literals

  • v1.1.2
  • 58.52
  • Published

yoctocolors

The smallest and fastest command-line coloring package on the internet

  • v2.1.2
  • 58.37
  • Published

split-on-first

Split a string on the first occurance of a given separator

  • v4.0.0
  • 58.18
  • Published

ripemd160

Compute ripemd160 of bytes or strings.

  • v2.0.3
  • 58.15
  • Published

decamelize-keys

Convert object keys from camel case

  • v2.0.1
  • 58.00
  • Published

pascalcase

Convert a string to pascal case (upper camelcase).

  • v2.0.0
  • 57.65
  • Published

typical

Isomorphic, functional type-checking for Javascript

  • v7.3.0
  • 57.64
  • Published

repeat-element

Create an array by repeating the given value n times.

  • v1.1.4
  • 57.62
  • Published

@jsonjoy.com/buffers

Various helper utilities for working with buffers and binary data

  • v18.12.0
  • 57.60
  • Published

split-string

Easy way to split a string on a given character unless it's quoted or escaped.

  • v6.1.0
  • 57.54
  • Published

date-format

Formatting Date objects as strings since 2013

  • v4.0.14
  • 57.24
  • Published

hasha

Hashing made simple. Get the hash of a buffer/string/stream/file.

  • v7.0.0
  • 57.01
  • Published

index-to-position

Convert a string index to its line and column position

  • v1.2.0
  • 56.83
  • Published

regex-parser

A module that parses a string as regular expression and returns the parsed value.

  • v2.3.1
  • 56.74
  • Published

os-locale

Get the system locale

  • v8.0.0
  • 56.73
  • Published

fault

Functional errors with formatted output

  • v2.0.1
  • 56.52
  • Published

natural-compare-lite

Compare strings containing a mix of letters and numbers in the way a human being would in sort order.

  • v1.4.0
  • 56.48
  • Published

object-treeify

Stringify Object as tree structure

  • v5.0.1
  • 56.41
  • Published

lcid

Mapping between standard locale identifiers and Windows locale identifiers (LCID)

  • v5.0.0
  • 56.25
  • Published

pupa

Simple micro templating

  • v3.3.0
  • 56.23
  • Published

filenamify

Convert a string to a valid safe filename

  • v7.0.1
  • 56.18
  • Published

js-levenshtein

The most efficient JS implementation calculating the Levenshtein distance, i.e. the difference between two strings.

  • v1.1.6
  • 56.10
  • Published

unquote

Remove wrapping quotes from a string.

  • v1.1.1
  • 55.69
  • Published

ansicolors

Functions that surround a string with ansicolor codes so it prints in color.

  • v0.3.2
  • 55.33
  • Published

matcher

Simple wildcard matching

  • v6.0.0
  • 55.20
  • Published

string-natural-compare

Compare alphanumeric strings the same way a human would, using a natural order algorithm

  • v3.0.1
  • 55.13
  • Published

repeating

Repeat a string - fast

  • v4.0.0
  • 55.09
  • Published

hast-util-to-text

hast utility to get the plain-text value of a node according to the `innerText` algorithm

  • v4.0.2
  • 55.04
  • Published

@hapi/formula

Math and string formula parser.

  • v3.0.2
  • 55.01
  • Published

strip-bom-string

Strip a byte order mark (BOM) from a string.

  • v1.0.0
  • 54.87
  • Published

is-primitive

Returns `true` if the value is a primitive.

  • v3.0.1
  • 54.60
  • Published

into-stream

Convert a string/promise/array/iterable/asynciterable/buffer/typedarray/arraybuffer/object into a stream

  • v9.1.0
  • 54.42
  • Published

hast-util-to-string

hast utility to get the plain-text value of a node

  • v3.0.1
  • 54.39
  • Published

outdent

Remove leading indentation from ES6 template literals.

  • v0.8.0
  • 54.28
  • Published

trim-repeated

Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz

  • v2.0.0
  • 54.25
  • Published

strip-outer

Strip a substring from the start/end of a string

  • v2.0.0
  • 54.24
  • Published

string-hash

fast string hashing function

  • v1.1.3
  • 54.07
  • Published

locate-character

Get the line and column number of a specific character in a string

  • v3.0.0
  • 54.06
  • Published

murmurhash-js

Native JS murmur hash implementation

  • v1.0.0
  • 53.94
  • Published

natural-orderby

Lightweight and performant natural sorting of arrays and collections by differentiating between unicode characters, numbers, dates, etc.

  • v5.0.0
  • 53.77
  • Published

string-template

A simple string template function based on named or indexed arguments

  • v1.0.0
  • 53.54
  • Published

javascript-stringify

Stringify is to `eval` as `JSON.stringify` is to `JSON.parse`

  • v2.1.0
  • 53.43
  • Published

is-url-superb

Check if a string is a URL

  • v6.1.0
  • 53.37
  • Published

js-string-escape

Escape strings for use as JavaScript string literals

  • v1.0.1
  • 53.15
  • Published

titleize

Capitalize every word in a string: `unicorn cake` → `Unicorn Cake`

  • v4.0.0
  • 53.12
  • Published

fast-string-truncated-width

A fast function for calculating where a string should be truncated, given an optional width limit and an ellipsis string.

  • v3.0.3
  • 52.98
  • Published

dom-serialize

Serializes any DOM node into a String

  • v2.2.1
  • 52.92
  • Published

underscore.string

String manipulation extensions for Underscore.js javascript library.

  • v3.3.6
  • 52.86
  • Published

is-invalid-path

Returns true if a windows file path has invalid characters.

  • v1.0.2
  • 52.85
  • Published

character-parser

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.

  • v4.0.0
  • 52.81
  • Published

plur

Pluralize a word

  • v6.0.0
  • 52.71
  • Published

ansi-gray

The color gray, in ansi.

  • v0.1.1
  • 52.70
  • Published

fast-string-width

A fast function for calculating the visual width of a string once printed to the terminal.

  • v3.0.2
  • 52.70
  • Published

gradient-string

Beautiful color gradients in terminal output

  • v3.0.0
  • 52.08
  • Published

elegant-spinner

Elegant spinner for interactive CLI apps

  • v3.0.0
  • 52.07
  • Published

execall

Find multiple RegExp matches in a string

  • v3.0.0
  • 51.85
  • Published

iterate-value

Iterate any iterable JS value. Works robustly in all environments, all versions.

  • v1.0.2
  • 51.85
  • Published

diffable-html

Opinionated HTML formatter focused towards making HTML diffs readable.

  • v6.0.1
  • 51.85
  • Published

nlcst-to-string

nlcst utility to transform a tree to a string

  • v4.0.0
  • 51.81
  • Published

is-svg

Check if a string is SVG

  • v6.1.0
  • 51.80
  • Published

diacritics

remove diacritics from strings

  • v1.3.0
  • 51.77
  • Published

eol

Newline character converter

  • v0.10.0
  • 51.47
  • Published

printj

Pure-JS printf

  • v1.3.1
  • 51.44
  • Published

is-ip

Check if a string is an IP address

  • v5.0.1
  • 51.37
  • Published

pad-right

Right pad a string with zeros or a specified string. Fastest implementation.

  • v0.2.2
  • 51.30
  • Published

is-word-character

Check if a character is a word character

  • v2.0.1
  • 51.25
  • Published

html-comment-regex

Regular expression for matching HTML comments

  • v1.1.2
  • 51.22
  • Published

string.prototype.codepointat

A robust & optimized `String.prototype.codePointAt` polyfill, based on the ECMAScript 6 specification.

  • v1.0.1
  • 51.12
  • Published

string.fromcodepoint

A robust & optimized `String.fromCodePoint` polyfill, based on the ECMAScript 6 specification.

  • v1.0.3
  • 51.11
  • Published

is-valid-path

Returns true if a file path does not contain any invalid characters.

  • v0.1.1
  • 50.80
  • Published

to-no-case

Remove any existing casing from a string.

  • v1.0.2
  • 50.70
  • Published

case

Extensible string utility for converting, identifying and flipping string case

  • v1.6.3
  • 50.66
  • Published

@sindresorhus/base62

Encode & decode strings, bytes, and integers to Base62

  • v1.0.0
  • 50.36
  • Published

ansi-cyan

The color cyan, in ansi.

  • v0.1.1
  • 50.27
  • Published

sprintf-kit

sprintf parser and basic formatter

  • v2.0.2
  • 50.21
  • Published

tweetnacl-util

String encoding utilitlies extracted from TweetNaCl.js

  • v0.15.1
  • 50.21
  • Published

is-whitespace

Returns true if the value passed is all whitespace.

  • v0.3.0
  • 50.17
  • Published

parse-unit

parses number and unit, '20px' into [20, 'px']

  • v1.0.1
  • 50.14
  • Published

ansi-red

The color red, in ansi.

  • v0.1.1
  • 50.01
  • Published

to-space-case

Convert a string to space case.

  • v1.0.0
  • 49.78
  • Published

unescape

Convert HTML entities to HTML characters, e.g. `>` converts to `>`.

  • v1.0.1
  • 49.77
  • Published

string-split-by

Split string by any separator excluding brackets, quotes and escaped characters

  • v1.0.0
  • 49.66
  • Published

is-string-blank

The fast way to check if a string is blank

  • v1.0.1
  • 49.51
  • Published

parenthesis

Parse parentheses from a string

  • v3.1.8
  • 49.49
  • Published

string-format

String formatting inspired by Python's str.format()

  • v2.0.0
  • 49.37
  • Published

groq

Tagged template literal for Sanity.io GROQ-queries

  • v5.20.0
  • 49.21
  • Published

@hexagon/base64

Base64 and base64url to string or arraybuffer, and back. Node, Deno or browser.

  • v2.0.4
  • 49.15
  • Published

format-util

Lightweight format utility for the browser, based on util.format().

  • v1.0.5
  • 49.05
  • Published

has-glob

Returns `true` if an array has a glob pattern.

  • v1.0.0
  • 48.97
  • Published

line-column

Convert efficiently index to/from line-column in a string

  • v1.0.2
  • 48.92
  • Published

stringz

Zero-dependency unicode-aware string tools

  • v2.1.0
  • 48.89
  • Published

levenary

[![npm-version](https://img.shields.io/npm/v/levenary.svg)](https://www.npmjs.com/package/levenary) [![github-actions](https://github.com/tanhauhau/levenary/workflows/CI/badge.svg)](https://github.com/tanhauhau/levenary/actions)

  • v1.1.1
  • 48.87
  • Published

temp-write

Write data to a random temporary file

  • v6.0.1
  • 48.76
  • Published

is-alphanumeric

Check if a string only contains alphanumeric characters

  • v1.0.0
  • 48.65
  • Published

markdown-escape

escape Markdown control characters

  • v2.0.0
  • 48.47
  • Published

serialised-error

Serialises error object to normal object

  • v1.1.3
  • 48.32
  • Published

slug

slugifies even utf-8 chars!

  • v11.0.1
  • 48.24
  • Published

react-from-dom

Convert HTML/XML source code or DOM nodes to React elements

  • v0.7.5
  • 48.09
  • Published

to-camel-case

Convert a string to camel case.

  • v1.0.0
  • 48.04
  • Published

trim-off-newlines

Similar to String#trim() but removes only newlines

  • v1.0.3
  • 47.84
  • Published

is-html

Check if a string is HTML

  • v3.2.0
  • 47.79
  • Published

maxmin

Get a pretty output of the original, minified, gzipped size of a string or buffer: 130 B → 91 B → 53 B (gzip)

  • v4.1.0
  • 47.79
  • Published

is-odd

Returns true if the given number is odd, and is an integer that does not exceed the JavaScript MAXIMUM_SAFE_INTEGER.

  • v3.0.1
  • 47.77
  • Published

pad-left

Left pad a string with zeros or a specified string. Fastest implementation.

  • v2.1.0
  • 47.53
  • Published

string-to-stream

Convert a string into a stream (streams2)

  • v3.0.1
  • 47.16
  • Published

humanize-string

Convert a camelized/dasherized/underscored string into a humanized one: `fooBar-Baz_Faz` → `Foo bar baz faz`

  • v3.1.0
  • 47.02
  • Published

subsume

Embed data in other data and easily extract it when needed

  • v4.0.0
  • 46.97
  • Published

pad-component

Pad strings to a given length

    • v0.0.1
    • 46.97
    • Published

    quoted-printable

    A robust & character encoding–agnostic JavaScript implementation of the `Quoted-Printable` content transfer encoding as defined by RFC 2045.

    • v1.0.1
    • 46.91
    • Published

    next-line

    Iterator over lines in a string

    • v1.1.0
    • 46.73
    • Published

    url-regex

    Regular expression for matching URLs

    • v5.0.0
    • 46.72
    • Published

    @stdlib/regexp-regexp

    Return a regular expression to parse a regular expression string.

    • v0.2.3
    • 46.70
    • Published

    url-set-query

    small function to append a query string to a URL

    • v1.0.0
    • 46.65
    • Published

    strip-color

    Strip ANSI color codes from a string. No dependencies.

    • v0.1.0
    • 46.54
    • Published

    unicode-length

    Get the length of unicode strings

    • v2.1.0
    • 46.46
    • Published

    memory-streams

    Simple implmentation of Stream.Readable and Stream.Writable holding the data in memory.

    • v0.1.3
    • 46.44
    • Published

    number-to-words

    Contains some util methods for converting numbers into words, ordinal words and ordinal numbers.

    • v1.2.4
    • 46.44
    • Published

    fast-stream-to-buffer

    Consume a stream of data into a binary Buffer as efficiently as possible

    • v1.0.0
    • 46.43
    • Published

    pad

    Left and right string padding

    • v3.3.0
    • 46.31
    • Published

    xhr-request

    tiny http client for Node and the browser

    • v1.1.0
    • 46.25
    • Published

    url-pattern

    easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.

    • v1.0.3
    • 46.23
    • Published

    alter

    alters a string by replacing multiple range fragments in one fast pass

    • v0.2.0
    • 46.10
    • Published

    chai-string

    strings comparison matchers for chai

    • v1.6.0
    • 46.08
    • Published

    get-object

    Get a property from an object using dot (object path) notation.

    • v0.2.0
    • 45.91
    • Published

    to-snake-case

    Convert a string to snake case.

    • v1.0.0
    • 45.87
    • Published

    backslash

    parse string escapes (\n, \r, etc.)

    • v0.2.2
    • 45.83
    • Published

    streamifier

    Converts a Buffer/String into a readable stream

    • v0.1.1
    • 45.74
    • Published

    oneline

    Write nice template literals with newlines, but format as a single-line string

    • v2.0.0
    • 45.74
    • Published

    highlight-words

    Split a piece text into multiple chunks based on a search query, allowing you to highlight the matches.

    • v2.0.0
    • 45.71
    • Published

    @pivanov/utils

    A collection of personal utilities to live a happier life

    • v0.0.3
    • 45.67
    • Published

    simple-fmt

    maximally minimal string formatting library

    • v0.1.0
    • 45.67
    • Published

    is-even

    Return true if the given number is even.

    • v1.0.0
    • 45.64
    • Published

    runes2

    Unicode-aware JS string splitting, typescript version

    • v1.1.4
    • 45.43
    • Published

    domify

    Turn a HTML string into DOM elements, cross-platform

    • v3.0.0
    • 45.42
    • Published

    @phun-ky/typeof

    A set of JavaScript helper functions to check for types

    • v2.1.9
    • 45.42
    • Published

    esrever

    A fully Unicode-aware string reverser written in JavaScript.

    • v0.2.0
    • 45.42
    • Published

    @budibase/handlebars-helpers

    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.

    • v0.14.2
    • 45.37
    • Published

    replace-string

    Replace all substring matches in a string

    • v4.0.0
    • 45.31
    • Published

    string-strip-html

    Strip HTML tags from strings. No parser, accepts mixed sources.

    • v13.5.3
    • 45.14
    • Published