Giter Site home page Giter Site logo

topcoder-platform / expression-evaluator Goto Github PK

View Code? Open in Web Editor NEW
0.0 11.0 2.0 495 KB

This is a very simple version of a compiler expression evaluation. It can be used for parsing expressions without introducing the risk of script injection via `eval` method.

License: MIT License

JavaScript 100.00%

expression-evaluator's Introduction

Expression Evaluator

This is a very simple version of a compiler expression evaluation. It can be used for parsing expressions without introducing the risk of script injection via eval method.

Submission

For now we always should include updated prebuilt code into the repository. As for now for quick development we include this npm module directly as git repository.

To do so, run before commit:

npm run prepublish

Commands

  • npm run clean - Remove lib/ directory
  • npm test - Run tests with linting and coverage results.
  • npm run lint - Run ESlint with airbnb-config
  • npm run build - Babel will transpile ES6 => ES5 and minify the code.
  • npm run prepublish - Hook for npm. Do all the checks before publishing your module.

License

MIT © Topcoder Inc.

expression-evaluator's People

Contributors

maxceem avatar

Watchers

Justin Gasper avatar Chris McCann avatar Noah Heldman avatar James Cloos avatar Hamid Tavakoli avatar  avatar Thomas Kranitsas avatar Kiril Kartunov avatar Hentry Martin avatar Rishiraj Sahu avatar  avatar

Forkers

maxceem 775976100

expression-evaluator's Issues

Fix handling of undefined value for hasLength operator

As of now hasLength(null) == 0 returns true while hasLength(undefined) == 0 returns false. We need keep the behaviour for both null and undefined same for operator hasLength either it should return true as practically the array value passed to the operation in such case does not have any item in it or it should return false as theoretically a null or undefined value does not have any length.

@maxceem what do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.