Get the visual width of a string - the number of columns required to display it
Escape RegExp special characters
A utility package to parse strings
Indent each line in a string
Modify strings, generate sourcemaps
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Path-based dirty-tracking instantiation of @dirtytalk/engine, for state containers and structural data.
Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, flexible
Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes
A minimal UTF8 implementation for number arrays.
LZ-based compression algorithm
Wordwrap a string with ANSI escape codes
Strip leading whitespace from each line in a string
Native Access to MacOS FSEvents
A minimal base64 implementation for number arrays.
Matches strings against configurable strings, globs, regular expressions, and/or functions
Utility to parse a string bytes to bytes and vice-versa
CLI arguments parser. Native port of python's argparse.
Repeat the given string n times. Fastest implementation for repeating a string.
A minimal path module to resolve Unix, Windows and URL paths alike.
Generate a unique character string suitible for use in files and URLs.
Get the command from a shebang
Strip redundant indentation and indent the string
type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax.
High-performance and concurrent string interning for general purpose use.
Interned string and more
Safe implementation of String#intern
This gem relies on a modified version of the open-source Carnegie Mellon University Pronouncing Dictionary (converting words to the International Phonetic Alphabet (IPA) instead of Arpabet).
A class that can read and write to Java properties files that behaves otherwise as a standard ruby Enumerable. The keys to this object can be provided as Strings or Symbols, but internally they are Symbols.
StaticLiteralParser is a RubyGems library that you can convert a String to a Ruby object, parsing the string as an executable Ruby code, but without actually executing it. This internally uses RubyVM::AbstractSyntaxTree to parse to construct the object.
The `Datetime Helper` was developed to provide a common approach to validating incoming datetime data, representing that data internally, serialising it back out into strings, and testing of date and time fields.
A class that can read and write to Java properties files that behaves otherwise as a standard ruby Enumerable. The keys to this object can be provided as Strings or Symbols, but internally they are Symbols.
A class that can read and write to Java properties files that behaves otherwise as a standard ruby Enumerable. The keys to this object can be provided as Strings or Symbols, but internally they are Symbols.
Creates a Set class with methods that allow you to construct and opperate on set instances. A 'Bignum' instance is used internally to store each element of the set. This allows very fast operations when comparing two set instances. Member elements can be represented as positive small integers, or characters. Sets can be constructed with integers, strings, characters, ranges, and arrays. When characters are used, the ordinate value sets the element bit of the internal Bignum.
This gem is designed for transformation of Ruby source code (eiher in the form of files or strings) to the Ruby nodes (syntax trees) used by Ruby MRI internals. Obtained nodes can be serialized to the platform-dependent binary or ASCII strings and restored and launched from serialized format. Such kind of transformation is irreversible and can be used for source code protection; the similar principle is used by RubyEncoder commercial software.
Sequence provides a unified api for access to sequential data types, like Strings, Arrays, Files, IOs, and Enumerations. This is the external iterator pattern (ruby's usual iterators are internal). Each sequence encapsulates some data and a current position within it. Some operations apply to data at (or relative to) the position, others are independant of position. The api contains operations for moving the position, and reading and writing data (with or without moving the position) forward or backward from the current position or anywhere. Its perhaps most unusual feature is the ability to scan for Regexps in not just Strings, but Files and any other type of sequence.
Huffnpuff implements a general purpose Huffman Coding system that uses a construction string which can implement any system. This also includes the bitfifo gem which allows variable length bit sequences to address the internal table of the Huffnpuff object instance. Huffman coding is essential for compression techniques such as MPEG, and PKZIP.
diffident: To show modest reserve, a gem to create and manipulate text diffs. This gem provides a pure ruby implementation of a diff tool. It gives access to several methods by which to get a diff from strings and ways to format the output. It also gives direct access to the internal diff structure so that you can manipulate and extend it any way you need to.