File tree 2 files changed +19
-2
lines changed
2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const Builder = require ( './Builder' )
4
+ const Interpreter = require ( './Language/Interpreter' )
5
+
6
+ /**
7
+ * SRL facade for SRL Builder and SRL Language.
8
+ *
9
+ * @param {string } query
10
+ * @return {Builder }
11
+ */
12
+ function SRL ( query ) {
13
+ return query && typeof query === 'string' ?
14
+ new Interpreter ( query ) . builder :
15
+ new Builder ( )
16
+ }
17
+
18
+ module . exports = SRL ;
Original file line number Diff line number Diff line change 2
2
"name" : " srl" ,
3
3
"version" : " 0.1.0" ,
4
4
"description" : " Simple Regex Language" ,
5
- "main" : " index .js" ,
5
+ "main" : " lib/SRL .js" ,
6
6
"scripts" : {
7
7
"test" : " mocha" ,
8
8
"coverage" : " istanbul cover _mocha"
30
30
},
31
31
"homepage" : " https://simple-regex.com" ,
32
32
"devDependencies" : {
33
- "coveralls" : " ^2.11.12" ,
34
33
"istanbul" : " ^0.4.5" ,
35
34
"mocha" : " ^3.0.2" ,
36
35
"mocha-lcov-reporter" : " ^1.2.0"
You can’t perform that action at this time.
0 commit comments