Get the most out of your Centmin Mod LEMP stack
Become a Member

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

    54,389
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    9:39 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Hello,

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

    This release proceeds to extend the coverage of ECMAScript 5.1
    specification.

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

    : > 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

    Core:

    *) 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
    overflows.

    *) 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
    newline.

    *) 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
    nginx-announce@nginx.org
    http://mailman.nginx.org/mailman/listinfo/nginx-announce

    Continue reading...