fix: README links, line breaks between methods

This commit is contained in:
Mahdi Dibaiee 2015-04-21 17:15:54 +04:30
parent a45b11f921
commit 07a9e7968a
5 changed files with 9 additions and 3 deletions

View File

@ -42,7 +42,7 @@ Equation.registerConstant('N', () => {
Equation.solve('N'); // a number between 10 and 20 Equation.solve('N'); // a number between 10 and 20
``` ```
For a list of operators and constants see `[operators.js](https://github.com/mdibaiee/Equation.js/blob/master/lib/operators.js)` and `[constants.js](https://github.com/mdibaiee/Equation.js/blob/master/lib/constants.js)`. For a list of operators and constants see [`operators.js`](https://github.com/mdibaiee/Equation.js/blob/master/lib/operators.js) and [`constants.js`](https://github.com/mdibaiee/Equation.js/blob/master/lib/constants.js).
API API
=== ===

2
dist/index.js vendored
View File

@ -53,6 +53,7 @@ var Equation = {
return stack; return stack;
}, },
/** /**
* Creates an equation function which replaces variables * Creates an equation function which replaces variables
* in the given expression with the values specified in order, * in the given expression with the values specified in order,
@ -98,6 +99,7 @@ var Equation = {
registerOperator: function registerOperator(key, options) { registerOperator: function registerOperator(key, options) {
_operators2['default'][key] = options; _operators2['default'][key] = options;
}, },
registerConstant: function registerConstant(key, options) { registerConstant: function registerConstant(key, options) {
_constants2['default'][key] = options; _constants2['default'][key] = options;
} }

View File

@ -171,7 +171,7 @@ var flatten = (function (_flatten) {
exports.flatten = flatten; exports.flatten = flatten;
var removeSymbols = function removeSymbols(string) { var removeSymbols = function removeSymbols(string) {
return string.replace(/\W/g, ''); return string.toString().replace(/\W/g, '');
}; };
exports.removeSymbols = removeSymbols; exports.removeSymbols = removeSymbols;
},{}],3:[function(require,module,exports){ },{}],3:[function(require,module,exports){
@ -230,6 +230,7 @@ var Equation = {
return stack; return stack;
}, },
/** /**
* Creates an equation function which replaces variables * Creates an equation function which replaces variables
* in the given expression with the values specified in order, * in the given expression with the values specified in order,
@ -275,6 +276,7 @@ var Equation = {
registerOperator: function registerOperator(key, options) { registerOperator: function registerOperator(key, options) {
_operators2['default'][key] = options; _operators2['default'][key] = options;
}, },
registerConstant: function registerConstant(key, options) { registerConstant: function registerConstant(key, options) {
_constants2['default'][key] = options; _constants2['default'][key] = options;
} }

2
equation.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,7 @@ let Equation = {
return stack; return stack;
}, },
/** /**
* Creates an equation function which replaces variables * Creates an equation function which replaces variables
* in the given expression with the values specified in order, * in the given expression with the values specified in order,
@ -72,6 +73,7 @@ let Equation = {
registerOperator(key, options) { registerOperator(key, options) {
operators[key] = options; operators[key] = options;
}, },
registerConstant(key, options) { registerConstant(key, options) {
constants[key] = options; constants[key] = options;
} }