mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-26 09:05:10 +00:00
1 line
No EOL
19 KiB
JSON
1 line
No EOL
19 KiB
JSON
{"_id":"xregexp","_rev":"56-042d1533d210fb6c442ee98f0a63a3a4","name":"xregexp","description":"Extended regular expressions","dist-tags":{"latest":"3.2.0"},"versions":{"1.5.0":{"name":"xregexp","version":"1.5.0","description":"The one of a kind JavaScript regular expression library.","author":{"name":"Steven Levithan","email":"steves_list@hotmail.com"},"contributors":[{"name":"Bjarke Walling","email":"bwp@bwp.dk"}],"repository":{"type":"git","url":"git://github.com/walling/xregexp.git"},"main":"./index.js","engines":{"node":">= 0.4.0"},"_npmJsonOpts":{"file":"/home/bjarke/.npm/xregexp/1.5.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"xregexp@1.5.0","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.13","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"ae377617bd0ca52ca3656d10fd5c07ef7fe6f018","tarball":"https://registry.npmjs.org/xregexp/-/xregexp-1.5.0.tgz"},"scripts":{},"directories":{}},"1.5.1":{"name":"xregexp","version":"1.5.1","description":"The one of a kind JavaScript regular expression library.","author":{"name":"Steven Levithan","email":"steves_list@hotmail.com"},"contributors":[{"name":"Bjarke Walling","email":"bwp@bwp.dk"}],"repository":{"type":"git","url":"git://github.com/walling/xregexp.git"},"main":"./index.js","engines":{"node":">= 0.4.0"},"_npmUser":{"name":"walling","email":"bwp@bwp.dk"},"_id":"xregexp@1.5.1","dependencies":{},"devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-2","_nodeVersion":"v0.6.8","_defaultsLoaded":true,"dist":{"shasum":"c8f11b7bd696d60f912a292ceae11d02959b7d57","tarball":"https://registry.npmjs.org/xregexp/-/xregexp-1.5.1.tgz"},"maintainers":[{"name":"walling","email":"bwp@bwp.dk"}],"directories":{}},"1.5.2":{"name":"xregexp","version":"1.5.2","description":"The one of a kind JavaScript regular expression library.","author":{"name":"Steven Levithan","email":"steves_list@hotmail.com"},"contributors":[{"name":"Bjarke Walling","email":"bwp@bwp.dk"}],"repository":{"type":"git","url":"git://github.com/walling/xregexp.git"},"main":"./index.js","engines":{"node":">= 0.4.0"},"_npmUser":{"name":"walling","email":"bwp@bwp.dk"},"_id":"xregexp@1.5.2","dependencies":{},"devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-2","_nodeVersion":"v0.6.8","_defaultsLoaded":true,"dist":{"shasum":"7e8e27bbbb5fc950569f8d94706e8841a477f53f","tarball":"https://registry.npmjs.org/xregexp/-/xregexp-1.5.2.tgz"},"maintainers":[{"name":"walling","email":"bwp@bwp.dk"}],"directories":{}},"1.5.3":{"name":"xregexp","version":"1.5.3","description":"The one of a kind JavaScript regular expression library.","author":{"name":"Steven Levithan","email":"steves_list@hotmail.com"},"contributors":[{"name":"Bjarke Walling","email":"bwp@bwp.dk"}],"repository":{"type":"git","url":"git://github.com/walling/xregexp.git"},"main":"./index.js","engines":{"node":">= 0.4.0"},"_npmUser":{"name":"walling","email":"bwp@bwp.dk"},"_id":"xregexp@1.5.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.4","_nodeVersion":"v0.6.12","_defaultsLoaded":true,"dist":{"shasum":"73bcd99eaff37dee3b941e204d4440267f47ac2c","tarball":"https://registry.npmjs.org/xregexp/-/xregexp-1.5.3.tgz"},"maintainers":[{"name":"walling","email":"bwp@bwp.dk"}],"directories":{}},"2.0.0":{"name":"xregexp","version":"2.0.0","homepage":"http://xregexp.com/","author":{"name":"Steven Levithan","email":"steves_list@hotmail.com"},"license":"MIT","repository":{"type":"git","url":"git://github.com/slevithan/XRegExp.git"},"description":"Extended JavaScript regular expressions","keywords":["regex","regexp"],"main":"./xregexp-all.js","scripts":{"test":"node tests/node-qunit.js"},"devDependencies":{"qunit":">= 0.2.x"},"_npmUser":{"name":"slevithan","email":"steves_list@hotmail.com"},"_id":"xregexp@2.0.0","dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"52a63e56ca0b84a7f3a5f3d61872f126ad7a5943","tarball":"https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz"},"maintainers":[{"name":"walling","email":"bwp@bwp.dk"},{"name":"slevithan","email":"steves_list@hotmail.com"}],"directories":{}},"3.0.0":{"name":"xregexp","version":"3.0.0","description":"Extended regular expressions","homepage":"http://xregexp.com/","author":{"name":"Steven Levithan","email":"steves_list@hotmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/slevithan/xregexp.git"},"keywords":["regex","regexp"],"main":"xregexp-all.js","files":["LICENSE","xregexp-all.js"],"scripts":{"build":"./tools/concatenate-source.sh"},"gitHead":"8183679d136bda6c0d015160a912ce2e54375917","bugs":{"url":"https://github.com/slevithan/xregexp/issues"},"_id":"xregexp@3.0.0","_shasum":"a04f25d9ffe16c1aee40ed521a1b1366e8d34636","_from":".","_npmVersion":"2.14.3","_nodeVersion":"3.3.1","_npmUser":{"name":"slevithan","email":"steves_list@hotmail.com"},"dist":{"shasum":"a04f25d9ffe16c1aee40ed521a1b1366e8d34636","tarball":"https://registry.npmjs.org/xregexp/-/xregexp-3.0.0.tgz"},"maintainers":[{"name":"slevithan","email":"steves_list@hotmail.com"}],"directories":{}},"3.1.0":{"name":"xregexp","version":"3.1.0","description":"Extended regular expressions","homepage":"http://xregexp.com/","author":{"name":"Steven Levithan","email":"steves_list@hotmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/slevithan/xregexp.git"},"keywords":["regex","regexp"],"main":"./src/index.js","files":["src"],"scripts":{"build":"browserify src/index.js --standalone XRegExp > xregexp-all.js"},"devDependencies":{"browserify":"^12.0.1"},"gitHead":"bbd5b1c2f759bdf278192be5df70af16342ffa4d","bugs":{"url":"https://github.com/slevithan/xregexp/issues"},"_id":"xregexp@3.1.0","_shasum":"14d8461e0bdd38224bfee5039a0898fc42fcd336","_from":".","_npmVersion":"2.14.3","_nodeVersion":"3.3.1","_npmUser":{"name":"slevithan","email":"steves_list@hotmail.com"},"dist":{"shasum":"14d8461e0bdd38224bfee5039a0898fc42fcd336","tarball":"https://registry.npmjs.org/xregexp/-/xregexp-3.1.0.tgz"},"maintainers":[{"name":"slevithan","email":"steves_list@hotmail.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/xregexp-3.1.0.tgz_1456271836601_0.7557942552957684"},"directories":{}},"3.1.1":{"name":"xregexp","version":"3.1.1","description":"Extended regular expressions","homepage":"http://xregexp.com/","author":{"name":"Steven Levithan","email":"steves_list@hotmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/slevithan/xregexp.git"},"keywords":["regex","regexp","regular expression","unicode"],"main":"./src/index.js","files":["src"],"scripts":{"build":"browserify src/index.js --standalone XRegExp > xregexp-all.js"},"devDependencies":{"browserify":"^12.0.1"},"gitHead":"37413619ea9f03638bfa92e038e4b4c15645d446","bugs":{"url":"https://github.com/slevithan/xregexp/issues"},"_id":"xregexp@3.1.1","_shasum":"8ee18d75ef5c7cb3f9967f8d29414a6ca5b1a184","_from":".","_npmVersion":"2.14.3","_nodeVersion":"3.3.1","_npmUser":{"name":"slevithan","email":"steves_list@hotmail.com"},"dist":{"shasum":"8ee18d75ef5c7cb3f9967f8d29414a6ca5b1a184","tarball":"https://registry.npmjs.org/xregexp/-/xregexp-3.1.1.tgz"},"maintainers":[{"name":"slevithan","email":"steves_list@hotmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/xregexp-3.1.1.tgz_1463265906533_0.49629145418293774"},"directories":{}},"3.2.0":{"name":"xregexp","version":"3.2.0","description":"Extended regular expressions","homepage":"http://xregexp.com/","author":{"name":"Steven Levithan","email":"steves_list@hotmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/slevithan/xregexp.git"},"keywords":["regex","regexp","regular expression","unicode"],"main":"xregexp-all.js","files":["src","xregexp-all.js","LICENSE"],"scripts":{"build":"browserify src/index.js --standalone XRegExp > xregexp-all.js","pretest":"npm run build","test":"jasmine JASMINE_CONFIG_PATH=tests/jasmine.json"},"devDependencies":{"browserify":"^12.0.1","jasmine":"^2.5.3"},"gitHead":"ddf24c536821faf2493625ed6bdc3cb5ce2c6fdd","bugs":{"url":"https://github.com/slevithan/xregexp/issues"},"_id":"xregexp@3.2.0","_shasum":"cb3601987bfe2695b584000c18f1c4a8c322878e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"slevithan","email":"steves_list@hotmail.com"},"dist":{"shasum":"cb3601987bfe2695b584000c18f1c4a8c322878e","tarball":"https://registry.npmjs.org/xregexp/-/xregexp-3.2.0.tgz"},"maintainers":[{"name":"slevithan","email":"steves_list@hotmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/xregexp-3.2.0.tgz_1492375969417_0.5849070467520505"},"directories":{}}},"maintainers":[{"name":"slevithan","email":"steves_list@hotmail.com"}],"time":{"modified":"2017-07-04T16:43:27.473Z","created":"2011-06-30T16:20:48.897Z","1.5.0":"2011-06-30T16:20:49.667Z","1.5.1":"2012-02-23T19:19:22.617Z","1.5.2":"2012-03-06T15:14:53.317Z","1.5.3":"2012-03-09T13:11:09.388Z","2.0.0":"2012-05-25T21:45:04.860Z","3.0.0":"2015-09-22T06:51:49.796Z","3.1.0":"2016-02-23T23:57:17.190Z","3.1.1":"2016-05-14T22:45:09.822Z","3.2.0":"2017-04-16T20:52:51.514Z"},"author":{"name":"Steven Levithan","email":"steves_list@hotmail.com"},"repository":{"type":"git","url":"git+https://github.com/slevithan/xregexp.git"},"users":{"kastor":true,"leesei":true,"citguy":true,"akiva":true,"schnittstabil":true,"alpigc":true,"f124275809":true,"vwal":true,"antanst":true,"diegoperini":true,"jota":true,"eirikbirkeland":true,"slevithan":true,"aslezak":true,"qqcome110":true,"retorillo":true,"abhisekp":true,"krot47":true,"gkodes":true,"nickytonline":true,"zorak":true,"grandsong":true,"ahmed-dinar":true,"krzych93":true},"homepage":"http://xregexp.com/","keywords":["regex","regexp","regular expression","unicode"],"license":"MIT","readme":"# XRegExp 3.2.0\r\n\r\n[](https://travis-ci.org/slevithan/xregexp)\r\n\r\nXRegExp provides augmented (and extensible) JavaScript regular expressions. You get modern syntax and flags beyond what browsers support natively. XRegExp is also a regex utility belt with tools to make your grepping and parsing easier, while freeing you from regex cross-browser inconsistencies and other annoyances.\r\n\r\nXRegExp supports all native ES6 regular expression syntax. It supports Internet Explorer 5.5+, Firefox 1.5+, Chrome, Safari 3+, and Opera 11+. You can use it with Node.js or as a RequireJS module.\r\n\r\n## Performance\r\n\r\nXRegExp compiles to native `RegExp` objects. Therefore regexes built with XRegExp perform just as fast as native regular expressions. There is a tiny extra cost when compiling a pattern for the first time.\r\n\r\n## Usage examples\r\n\r\n```js\r\n// Using named capture and flag x (free-spacing and line comments)\r\nvar date = XRegExp(`(?<year> [0-9]{4} ) -? # year\r\n (?<month> [0-9]{2} ) -? # month\r\n (?<day> [0-9]{2} ) # day`, 'x');\r\n\r\n// XRegExp.exec gives you named backreferences on the match result\r\nvar match = XRegExp.exec('2017-02-22', date);\r\nmatch.year; // -> '2017'\r\n\r\n// It also includes optional pos and sticky arguments\r\nvar pos = 3;\r\nvar result = [];\r\nwhile (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\\d+)>/, pos, 'sticky')) {\r\n result.push(match[1]);\r\n pos = match.index + match[0].length;\r\n}\r\n// result -> ['2', '3', '4']\r\n\r\n// XRegExp.replace allows named backreferences in replacements\r\nXRegExp.replace('2017-02-22', date, '${month}/${day}/${year}');\r\n// -> '02/22/2017'\r\nXRegExp.replace('2017-02-22', date, (match) => {\r\n return match.month + '/' + match.day + '/' + match.year;\r\n});\r\n// -> '02/22/2017'\r\n\r\n// XRegExps compile to RegExps and work perfectly with native methods\r\ndate.test('2017-02-22');\r\n// -> true\r\n\r\n// The only caveat is that named captures must be referenced using numbered\r\n// backreferences if used with native methods\r\n'2017-02-22'.replace(date, '$2/$3/$1');\r\n// -> '02/22/2017'\r\n\r\n// Use XRegExp.forEach to extract every other digit from a string\r\nvar evens = [];\r\nXRegExp.forEach('1a2345', /\\d/, (match, i) => {\r\n if (i % 2) evens.push(+match[0]);\r\n});\r\n// evens -> [2, 4]\r\n\r\n// Use XRegExp.matchChain to get numbers within <b> tags\r\nXRegExp.matchChain('1 <b>2</b> 3 <B>4 \\n 56</B>', [\r\n XRegExp('(?is)<b>.*?</b>'),\r\n /\\d+/\r\n]);\r\n// -> ['2', '4', '56']\r\n\r\n// You can also pass forward and return specific backreferences\r\nvar html = '<a href=\"http://xregexp.com/\">XRegExp</a>' +\r\n '<a href=\"http://www.google.com/\">Google</a>';\r\nXRegExp.matchChain(html, [\r\n {regex: /<a href=\"([^\"]+)\">/i, backref: 1},\r\n {regex: XRegExp('(?i)^https?://(?<domain>[^/?#]+)'), backref: 'domain'}\r\n]);\r\n// -> ['xregexp.com', 'www.google.com']\r\n\r\n// Merge strings and regexes into a single pattern with updated backreferences\r\nXRegExp.union(['a+b*c', /(dog)\\1/, /(cat)\\1/], 'i', {conjunction: 'or'});\r\n// -> /a\\+b\\*c|(dog)\\1|(cat)\\2/i\r\n```\r\n\r\nThese examples give the flavor of what's possible, but XRegExp has more syntax, flags, methods, options, and browser fixes that aren't shown here. You can also augment XRegExp's regular expression syntax with addons (see below) or write your own. See [xregexp.com](http://xregexp.com/) for details.\r\n\r\n## Addons\r\n\r\nYou can either load addons individually, or bundle all addons with XRegExp by loading `xregexp-all.js`.\r\n\r\n### Unicode\r\n\r\nIf not using `xregexp-all.js`, first include the Unicode Base script and then one or more of the addons for Unicode blocks, categories, properties, or scripts.\r\n\r\nThen you can do this:\r\n\r\n```js\r\n// Test the Unicode category L (Letter)\r\nvar unicodeWord = XRegExp('^\\\\pL+$');\r\nunicodeWord.test('Русский'); // -> true\r\nunicodeWord.test('日本語'); // -> true\r\nunicodeWord.test('العربية'); // -> true\r\n\r\n// Test some Unicode scripts\r\nXRegExp('^\\\\p{Hiragana}+$').test('ひらがな'); // -> true\r\nXRegExp('^[\\\\p{Latin}\\\\p{Common}]+$').test('Über Café.'); // -> true\r\n```\r\n\r\nBy default, `\\p{…}` and `\\P{…}` support the Basic Multilingual Plane (i.e. code points up to `U+FFFF`). You can opt-in to full 21-bit Unicode support (with code points up to `U+10FFFF`) on a per-regex basis by using flag `A`. This is called *astral mode*. You can automatically add flag `A` for all new regexes by running `XRegExp.install('astral')`. When in astral mode, `\\p{…}` and `\\P{…}` always match a full code point rather than a code unit, using surrogate pairs for code points above `U+FFFF`.\r\n\r\n```js\r\n// Using flag A to match astral code points\r\nXRegExp('^\\\\pS$').test('💩'); // -> false\r\nXRegExp('^\\\\pS$', 'A').test('💩'); // -> true\r\nXRegExp('(?A)^\\\\pS$').test('💩'); // -> true\r\n// Using surrogate pair U+D83D U+DCA9 to represent U+1F4A9 (pile of poo)\r\nXRegExp('(?A)^\\\\pS$').test('\\uD83D\\uDCA9'); // -> true\r\n\r\n// Implicit flag A\r\nXRegExp.install('astral');\r\nXRegExp('^\\\\pS$').test('💩'); // -> true\r\n```\r\n\r\nOpting in to astral mode disables the use of `\\p{…}` and `\\P{…}` within character classes. In astral mode, use e.g. `(\\pL|[0-9_])+` instead of `[\\pL0-9_]+`.\r\n\r\nXRegExp uses Unicode 9.0.0.\r\n\r\n### XRegExp.build\r\n\r\nBuild regular expressions using named subpatterns, for readability and pattern reuse:\r\n\r\n```js\r\nvar time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', {\r\n hours: XRegExp.build('{{h12}} : | {{h24}}', {\r\n h12: /1[0-2]|0?[1-9]/,\r\n h24: /2[0-3]|[01][0-9]/\r\n }),\r\n minutes: /^[0-5][0-9]$/\r\n});\r\n\r\ntime.test('10:59'); // -> true\r\nXRegExp.exec('10:59', time).minutes; // -> '59'\r\n```\r\n\r\nNamed subpatterns can be provided as strings or regex objects. A leading `^` and trailing unescaped `$` are stripped from subpatterns if both are present, which allows embedding independently-useful anchored patterns. `{{…}}` tokens can be quantified as a single unit. Any backreferences in the outer pattern or provided subpatterns are automatically renumbered to work correctly within the larger combined pattern. The syntax `({{name}})` works as shorthand for named capture via `(?<name>{{name}})`. Named subpatterns cannot be embedded within character classes.\r\n\r\nSee also: *[Creating Grammatical Regexes Using XRegExp.build](http://blog.stevenlevithan.com/archives/grammatical-patterns-xregexp-build)*.\r\n\r\n### XRegExp.matchRecursive\r\n\r\nMatch recursive constructs using XRegExp pattern strings as left and right delimiters:\r\n\r\n```js\r\nvar str = '(t((e))s)t()(ing)';\r\nXRegExp.matchRecursive(str, '\\\\(', '\\\\)', 'g');\r\n// -> ['t((e))s', '', 'ing']\r\n\r\n// Extended information mode with valueNames\r\nstr = 'Here is <div> <div>an</div></div> example';\r\nXRegExp.matchRecursive(str, '<div\\\\s*>', '</div>', 'gi', {\r\n valueNames: ['between', 'left', 'match', 'right']\r\n});\r\n/* -> [\r\n{name: 'between', value: 'Here is ', start: 0, end: 8},\r\n{name: 'left', value: '<div>', start: 8, end: 13},\r\n{name: 'match', value: ' <div>an</div>', start: 13, end: 27},\r\n{name: 'right', value: '</div>', start: 27, end: 33},\r\n{name: 'between', value: ' example', start: 33, end: 41}\r\n] */\r\n\r\n// Omitting unneeded parts with null valueNames, and using escapeChar\r\nstr = '...{1}.\\\\{{function(x,y){return {y:x}}}';\r\nXRegExp.matchRecursive(str, '{', '}', 'g', {\r\n valueNames: ['literal', null, 'value', null],\r\n escapeChar: '\\\\'\r\n});\r\n/* -> [\r\n{name: 'literal', value: '...', start: 0, end: 3},\r\n{name: 'value', value: '1', start: 4, end: 5},\r\n{name: 'literal', value: '.\\\\{', start: 6, end: 9},\r\n{name: 'value', value: 'function(x,y){return {y:x}}', start: 10, end: 37}\r\n] */\r\n\r\n// Sticky mode via flag y\r\nstr = '<1><<<2>>><3>4<5>';\r\nXRegExp.matchRecursive(str, '<', '>', 'gy');\r\n// -> ['1', '<<2>>', '3']\r\n```\r\n\r\n`XRegExp.matchRecursive` throws an error if it scans past an unbalanced delimiter in the target string.\r\n\r\n## Installation and usage\r\n\r\nIn browsers (bundle XRegExp with all of its addons):\r\n\r\n```html\r\n<script src=\"xregexp-all.js\"></script>\r\n```\r\n\r\nUsing [npm](https://www.npmjs.com/):\r\n\r\n```bash\r\nnpm install xregexp\r\n```\r\n\r\nIn [Node.js](http://nodejs.org/):\r\n\r\n```js\r\nvar XRegExp = require('xregexp');\r\n```\r\n\r\nIn an AMD loader like [RequireJS](http://requirejs.org/):\r\n\r\n```js\r\nrequire({paths: {xregexp: 'xregexp-all'}}, ['xregexp'], (XRegExp) => {\r\n console.log(XRegExp.version);\r\n});\r\n```\r\n\r\n## About\r\n\r\nXRegExp copyright 2007-2017 by [Steven Levithan](http://stevenlevithan.com/). Unicode data generators by [Mathias Bynens](http://mathiasbynens.be/), adapted from [unicode-data](http://git.io/unicode). XRegExp's syntax extensions and flags come from [Perl](http://www.perl.org/), [.NET](http://www.microsoft.com/net), etc.\r\n\r\nAll code, including addons, tools, and tests, is released under the terms of the [MIT License](http://mit-license.org/).\r\n\r\nLearn more at [xregexp.com](http://xregexp.com/).\r\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/slevithan/xregexp/issues"},"_attachments":{},"_etag":"W/\"595bc5af-4cd2\"","_lastModified":"Tue, 04 Jul 2017 16:43:27 GMT","_cached":true} |