1.0.0 • Published 1 year ago

jees-ansi-regex v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

ANSI Regex ✨

Regular expression to handling ANSI escape codes !

  • Install

    npm i jees-ansi-regex                         #  📥 install
    import regex from 'jees-ansi-regex';          // 📦 import
  • Syntax

    const result = regex().?;                     /* ✨ have fun ✨  */
  • Examples

    TEST

    regex().test('\u001B[31m plain \u001B[0m');
    // => true
    
    regex().test(' plain ');
    // => false

    MATCH

    '\u001B[31mcake\u001B[0m'.match(regex());
    // => ['\u001B[31m', '\u001B[0m']
    
    '\u001B[31mcake\u001B[0m'.match(regex(true));
    // => ['\u001B[31m']

Documents


This package is part of the jees framework.


Made with ❤ by Maysara Elshewehy

1.0.0

1 year ago