Learn about Centmin Mod LEMP Stack today
Register Now

Nginx [nginx-announce] njs-0.2.6

Discussion in 'Nginx and PHP-FPM news & discussions' started by eva2000, Nov 28, 2018.

  1. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    11:56 PM
    Nginx 1.25.x
    MariaDB 10.x

    I'm glad to announce a new release of NGINX JavaScript module (njs).

    This release proceeds to extend the coverage of ECMAScript 5.1

    - Added initial support for extending the existing prototypes. So,
    generic functions can be added to extend functionality of built-in

    : > String.prototype.myUpper = function() {return this.toUpperCase()}
    : [Function]
    : > 'abc'.myUpper()
    : 'ABC'

    You can learn more about njs:

    - Overview and introduction: http://nginx.org/en/docs/njs/
    - Presentation: https://youtu.be/Jc_L6UffFOs

    Feel free to try it and give us feedback on:

    - Github: https://github.com/nginx/njs/issues
    - Mailing list: http://mailman.nginx.org/mailman/listinfo/nginx-devel

    Changes with njs 0.2.6 27 Nov 2018


    *) Feature: making built-in prototypes mutable.

    *) Feature: making global object mutable.

    *) Feature: console.time() and console.timeEnd() methods.

    *) Feature: allowing variables and functions to be redeclared.

    *) Feature: extending Object.defineProperty() spec conformance.

    *) Feature: introduced quiet mode for CLI to handle simple
    expressions from stdin (echo "2**3" | njs -q -> 8).

    *) Feature: introduced compact form of backtraces to handle stack

    *) Improvement: improved wording for various exceptions.

    *) Bugfix: fixed closure values handling.

    *) Bugfix: fixed equality operator for various value types.

    *) Bugfix: fixed handling of "this" keyword in various scopes.

    *) Bugfix: fixed handling non-object values in Object.keys().

    *) Bugfix: fixed parsing of throw statement inside if statement.

    *) Bugfix: fixed parsing of newline after throw statement.

    *) Bugfix: fixed parsing of statements in if statement without

    *) Bugfix: fixed size uint32_t overflow in njs_array_expand().

    *) Bugfix: fixed typeof operator for object_value type.

    *) Bugfix: miscellaneous additional bugs have been fixed.
    nginx-announce mailing list

    Continue reading...