UNPKG

430 BJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = getRtlRegex;
7function getRtlRegex(rtl, rtlRegex) {
8 if (rtl && rtlRegex) {
9 throw new Error('rtl and rtl_regex were both provided. Please use only one of these.');
10 }
11
12 // If rtl is set, match all story names
13 if (rtl) {
14 return (/.*/gim
15 );
16 }
17
18 if (rtlRegex) {
19 return new RegExp(rtlRegex);
20 }
21
22 return null;
23}
\No newline at end of file