Skip to content

Commit 78480fd

Browse files
committed
rename options.funcs to options.functions
1 parent 1b1615a commit 78480fd

6 files changed

Lines changed: 19 additions & 19 deletions

File tree

demo/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let funcs = {
2626

2727
$(function () {
2828
$('#txt').expressionBuilder({
29-
funcs: funcs,
29+
functions: funcs,
3030
variables: [
3131
{
3232
variableId: 1,

src/expression-builder-v2.js

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/expression-builder-v2.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/expression-builder-v2.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface ExpressionBuilderOption {
1717
suggestions?: 'up' | 'down',
1818
expression?: string,
1919
variables?: Array<ExpressionBuilderVariable>,
20-
funcs?: any,
20+
functions?: any,
2121
preventWrongInput?: boolean
2222
}
2323

@@ -444,8 +444,8 @@ jQuery.fn.extend({
444444
options.variables = options.variables || [];
445445
expressionInput.data('variables', options.variables);
446446

447-
options.funcs = options.funcs || [];
448-
expressionInput.data('funcs', options.funcs);
447+
options.functions = options.functions || [];
448+
expressionInput.data('funcs', options.functions);
449449

450450
let parent = $("<div class='exp-container' exp-id='" + id + "'></div>");
451451

@@ -477,12 +477,12 @@ jQuery.fn.extend({
477477
if (!options.variables)
478478
options.variables = expressionInput.data('variables');
479479

480-
if (!options.funcs)
481-
options.funcs = expressionInput.data('funcs');
480+
if (!options.functions)
481+
options.functions = expressionInput.data('funcs');
482482
}
483483

484484
parserOptions = {
485-
funcs: options.funcs,
485+
funcs: options.functions,
486486
variables: options.variables
487487
};
488488
}
@@ -947,12 +947,12 @@ jQuery.fn.extend({
947947
}
948948

949949
let funcCount = 1;
950-
for (let f in options.funcs) {
950+
for (let f in options.functions) {
951951
if (f.toString().toLowerCase().indexOf(varName.toLowerCase()) > -1) {
952952
let args = '';
953953

954954
//read the function signature
955-
options.funcs[f].toString().replace(/(function\s*[(](?:\\[\s\S]|[^)])*[)])/, function (text, func) {
955+
options.functions[f].toString().replace(/(function\s*[(](?:\\[\s\S]|[^)])*[)])/, function (text, func) {
956956
if (args != '')
957957
return;
958958

0 commit comments

Comments
 (0)