[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong factory example in extension.md? #1053

Closed
grondilu opened this issue Mar 1, 2018 · 1 comment
Closed

wrong factory example in extension.md? #1053

grondilu opened this issue Mar 1, 2018 · 1 comment

Comments

@grondilu
Copy link
grondilu commented Mar 1, 2018

In docs/core/extension.md, the factory example is :

exports.factory = function (type, config, load, typed) {
  var add = load(require('mathjs/lib/function/arithmetic/add'));

  return myFunction (a, b) {
    // ...
  }
};

That can't be right. "return foo(args) { ... }" is not a valid syntax.

Was it instead

  return function (a, b) {
    // ...
  }

?

or


  return function myFunction (a, b) {
    // ...
  }

?

@grondilu grondilu changed the title wrong factory example in extension.md wrong factory example in extension.md? Mar 1, 2018
@josdejong
Copy link
Owner

Thanks! Fixed via 9bb441b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants