components-helper
Advanced tools
Changelog
2.2.0
berak change
- index.js
+ index.cjs
- index.es.js
+ index.js
Changelog
2.1.4
feat
fix
Changelog
2.1.3
feat
Changelog
2.1.2
feat
fix
Changelog
2.0.0
feat
titleRegExp
tableRegExp
and fileNameRegExp
- const helper = require('../lib/index')
+ const helper = require('../lib/index').default
# or
- const helper = require('../lib/index')
+ const { main } = require('../lib/index')
It is recommended to replace regular strings with RegExp
{
- titleRegExp: '#+\\s+(.*)\\n+([^(#|\\n)]*)',
+ titleRegExp: /#+\s+(.*)\n+([^(#|\n)]*)/g,
- titleRegExp: '#+\\s+(.*)\\n+>\\s*([^(#|\\n)]*)',
+ titleRegExp: /#+\s+(.*)\n+>\s*([^(#|\n)]*)/g,
- tableRegExp: '#+\\s+(.*)\\n+(\\|?.+\\|.+)\\n\\|?\\s*:?-+:?\\s*\\|.+((\\n\\|?.+\\|.+)+)',
+ tableRegExp: /#+\s+(.*)\n+(\|?.+\|.+)\n\|?\s*:?-+:?\s*\|.+((\n\|?.+\|.+)+)/g,
- tableRegExp: '#+\\s+(.*\\s*Props|.*\\s*Events|.*\\s*Slots|.*\\s*Directives)\\s*\\n+(\\|?.+\\|.+)\\n\\|?\\s*:?-+:?\\s*\\|.+((\\n\\|?.+\\|.+)+)',
+ tableRegExp: /#+\s+(.*\s*Props|.*\s*Events|.*\s*Slots|.*\s*Directives)\n+(\|?.+\|.+)\n\|?\s*:?-+:?\s*\|.+((\n\|?.+\|.+)+)/g,
- fileNameRegExp: '\\/((\\w|-)+)\\.\\w+$',
+ fileNameRegExp: /\/((\w|-)+)\.\w+$/,
}