[nginx-announce] njs-0.2.6

Dmitry Volyntsev xeioex at nginx.com
Tue Nov 27 15:26:43 UTC 2018



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.


More information about the nginx-announce mailing list