rita 3.0.26 → 3.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/rita.cjs +5 -4
- package/dist/rita.cjs.map +1 -1
- package/dist/rita.js +5 -4
- package/dist/rita.js.map +1 -1
- package/dist/rita.min.js +46 -46
- package/dist/rita.min.js.map +1 -1
- package/package.json +5 -10
package/dist/rita.js
CHANGED
|
@@ -42580,10 +42580,11 @@ var RiTa = class _RiTa {
|
|
|
42580
42580
|
* Create a RiTa grammar instance
|
|
42581
42581
|
* @param {object} [rules] - the rules of the grammar
|
|
42582
42582
|
* @param {object} [context] - the context of the grammar
|
|
42583
|
+
* @param {object} [options] - options for the grammar
|
|
42583
42584
|
* @returns {RiGrammar} - a new RiGrammar instance
|
|
42584
42585
|
*/
|
|
42585
|
-
static grammar(rules, context) {
|
|
42586
|
-
return new RiGrammar(rules, context);
|
|
42586
|
+
static grammar(rules, context, options) {
|
|
42587
|
+
return new RiGrammar(rules, context, { ...options, RiTa: _RiTa });
|
|
42587
42588
|
}
|
|
42588
42589
|
/**
|
|
42589
42590
|
* Add a transform function to the RiScript parser
|
|
@@ -42624,7 +42625,7 @@ var RiTa = class _RiTa {
|
|
|
42624
42625
|
* @returns {string} the result of the evaluation
|
|
42625
42626
|
*/
|
|
42626
42627
|
static evaluate(script, context, options) {
|
|
42627
|
-
return _RiTa.riscript.evaluate(script, context, options);
|
|
42628
|
+
return _RiTa.riscript.evaluate(script, context, { ...options });
|
|
42628
42629
|
}
|
|
42629
42630
|
/**
|
|
42630
42631
|
* Creates a new RiMarkov object
|
|
@@ -43236,7 +43237,7 @@ markov_default.parent = RiTa;
|
|
|
43236
43237
|
stemmer_default.tokenizer = RiTa.tokenizer;
|
|
43237
43238
|
RiTa.SILENT = false;
|
|
43238
43239
|
RiTa.SILENCE_LTS = false;
|
|
43239
|
-
RiTa.VERSION = "3.0.
|
|
43240
|
+
RiTa.VERSION = "3.0.28";
|
|
43240
43241
|
RiTa.FIRST = 1;
|
|
43241
43242
|
RiTa.SECOND = 2;
|
|
43242
43243
|
RiTa.THIRD = 3;
|