Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

Location:
imaps-frontend/node_modules/escape-string-regexp
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/escape-string-regexp/index.js

    rd565449 r0c6b92a  
    11'use strict';
    22
    3 var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
    4 
    5 module.exports = function (str) {
    6         if (typeof str !== 'string') {
     3module.exports = string => {
     4        if (typeof string !== 'string') {
    75                throw new TypeError('Expected a string');
    86        }
    97
    10         return str.replace(matchOperatorsRe, '\\$&');
     8        // Escape characters with special meaning either inside or outside character sets.
     9        // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
     10        return string
     11                .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
     12                .replace(/-/g, '\\x2d');
    1113};
  • imaps-frontend/node_modules/escape-string-regexp/license

    rd565449 r0c6b92a  
    1 The MIT License (MIT)
     1MIT License
    22
    3 Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
     3Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
    44
    5 Permission is hereby granted, free of charge, to any person obtaining a copy
    6 of this software and associated documentation files (the "Software"), to deal
    7 in the Software without restriction, including without limitation the rights
    8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    9 copies of the Software, and to permit persons to whom the Software is
    10 furnished to do so, subject to the following conditions:
     5Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    116
    12 The above copyright notice and this permission notice shall be included in
    13 all copies or substantial portions of the Software.
     7The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    148
    15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    21 THE SOFTWARE.
     9THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • imaps-frontend/node_modules/escape-string-regexp/package.json

    rd565449 r0c6b92a  
    11{
    2   "name": "escape-string-regexp",
    3   "version": "1.0.5",
    4   "description": "Escape RegExp special characters",
    5   "license": "MIT",
    6   "repository": "sindresorhus/escape-string-regexp",
    7   "author": {
    8     "name": "Sindre Sorhus",
    9     "email": "sindresorhus@gmail.com",
    10     "url": "sindresorhus.com"
    11   },
    12   "maintainers": [
    13     "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
    14     "Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)"
    15   ],
    16   "engines": {
    17     "node": ">=0.8.0"
    18   },
    19   "scripts": {
    20     "test": "xo && ava"
    21   },
    22   "files": [
    23     "index.js"
    24   ],
    25   "keywords": [
    26     "escape",
    27     "regex",
    28     "regexp",
    29     "re",
    30     "regular",
    31     "expression",
    32     "string",
    33     "str",
    34     "special",
    35     "characters"
    36   ],
    37   "devDependencies": {
    38     "ava": "*",
    39     "xo": "*"
    40   }
     2        "name": "escape-string-regexp",
     3        "version": "4.0.0",
     4        "description": "Escape RegExp special characters",
     5        "license": "MIT",
     6        "repository": "sindresorhus/escape-string-regexp",
     7        "funding": "https://github.com/sponsors/sindresorhus",
     8        "author": {
     9                "name": "Sindre Sorhus",
     10                "email": "sindresorhus@gmail.com",
     11                "url": "https://sindresorhus.com"
     12        },
     13        "engines": {
     14                "node": ">=10"
     15        },
     16        "scripts": {
     17                "test": "xo && ava && tsd"
     18        },
     19        "files": [
     20                "index.js",
     21                "index.d.ts"
     22        ],
     23        "keywords": [
     24                "escape",
     25                "regex",
     26                "regexp",
     27                "regular",
     28                "expression",
     29                "string",
     30                "special",
     31                "characters"
     32        ],
     33        "devDependencies": {
     34                "ava": "^1.4.1",
     35                "tsd": "^0.11.0",
     36                "xo": "^0.28.3"
     37        }
    4138}
  • imaps-frontend/node_modules/escape-string-regexp/readme.md

    rd565449 r0c6b92a  
    33> Escape RegExp special characters
    44
    5 
    65## Install
    76
    87```
    9 $ npm install --save escape-string-regexp
     8$ npm install escape-string-regexp
    109```
    11 
    1210
    1311## Usage
     
    1614const escapeStringRegexp = require('escape-string-regexp');
    1715
    18 const escapedString = escapeStringRegexp('how much $ for a unicorn?');
    19 //=> 'how much \$ for a unicorn\?'
     16const escapedString = escapeStringRegexp('How much $ for a 🦄?');
     17//=> 'How much \\$ for a 🦄\\?'
    2018
    2119new RegExp(escapedString);
    2220```
    2321
     22You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
    2423
    25 ## License
     24---
    2625
    27 MIT © [Sindre Sorhus](http://sindresorhus.com)
     26<div align="center">
     27        <b>
     28                <a href="https://tidelift.com/subscription/pkg/npm-escape-string-regexp?utm_source=npm-escape-string-regexp&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
     29        </b>
     30        <br>
     31        <sub>
     32                Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
     33        </sub>
     34</div>
Note: See TracChangeset for help on using the changeset viewer.