Search results

512 packages found

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

published version 4.1.3, 3 years ago2616 dependents licensed under $MIT
150,323,479

Get the shortest leading whitespace from lines in a string

published version 1.0.1, 5 years ago803 dependents licensed under $MIT
96,810,564

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

published version 2.0.0, 4 years ago52 dependents licensed under $MIT
17,984,068

Similar to String#trim() but removes only newlines

published version 1.0.3, 4 years ago114 dependents licensed under $MIT
3,556,936

Test if a value is a regular expression string.

published version 0.2.2, 10 months ago72 dependents licensed under $Apache-2.0
1,521,102

Test if a value is a string.

published version 0.2.2, 10 months ago278 dependents licensed under $Apache-2.0
2,087,750

Insert supplied variable values into a format string.

published version 0.2.2, 10 months ago942 dependents licensed under $Apache-2.0
2,082,905

Replace search occurrences with a replacement string.

published version 0.2.2, 10 months ago20 dependents licensed under $Apache-2.0
2,017,896

Convert between POSIX and Windows paths.

published version 0.2.2, 10 months ago6 dependents licensed under $Apache-2.0
2,013,879

Generate string from a token array by interpolating values.

published version 0.2.2, 10 months ago2 dependents licensed under $Apache-2.0
2,082,424

Tokenize a string into an array of string parts and format identifier objects.

published version 0.2.2, 10 months ago2 dependents licensed under $Apache-2.0
2,083,129

Convert a string to lowercase.

published version 0.3.0, 10 months ago12 dependents licensed under $Apache-2.0
1,523,618

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

published version 1.0.1, 11 years ago38 dependents licensed under $MIT
1,251,893

Iterator over lines in a string

published version 1.1.0, 10 years ago4 dependents licensed under $MIT
1,820,747

Allocate a buffer containing a provided string.

published version 0.2.2, 10 months ago92 dependents licensed under $Apache-2.0
1,602,829

Convert a string into a stream (streams2)

published version 3.0.1, 6 years ago265 dependents licensed under $MIT
1,094,069

Regular expression matching for URL's. Maintained, safe, and browser-friendly version of url-regex. Resolves CVE-2020-7661. Works in Node v10.12.0+ and browsers.

published version 4.0.0, 2 years ago96 dependents licensed under $MIT
786,453

Split lines into an array of lines

published version 3.0.0, 4 years ago91 dependents licensed under $MIT
695,707

Safely remove repeating whitespace from HTML text.

published version 1.0.0, 6 years ago20 dependents licensed under $MIT
613,600

3x as fast as `is-whitespace` and `whitespace-regex` thanks to `is-string-blank`. This package is a simple function that accepts an argument and returns `true` if it is a string AND it is not blank. Supports Node and Browser environments.

published version 0.0.2, 6 years ago29 dependents licensed under $MIT
531,391