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

Add .success property to check if last call was resolved #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 24, 2018

  1. Add .success property to check if last call was resolved

    Sometimes nodes are supposed to resolve to `undefined`, so we can't rely
    on that alone to check if an evaluation succeeded. This PR adds a
    property that you can check after calling `evaluate`:
    
    ```js
    var res = evaluate({ type: 'Identifier', name: 'undefined' })
    if (evaluate.success) console.log(res)
    else process.exit(1)
    ```
    goto-bus-stop committed Jan 24, 2018
    Configuration menu
    Copy the full SHA
    f77bfe0 View commit details
    Browse the repository at this point in the history