Join the community today
Register Now

Nginx [nginx-announce] njs-0.2.7

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

  1. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    12:36 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Hello,

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

    This release proceeds to extend the coverage of ECMAScript specifications.

    - Added support for ES6 rest parameters syntax.
    Thanks to Alexander Pyshchev.

    : > var add = function(prev, curr) { return prev + curr }
    : undefined
    : > function sum(...args) { return args.reduce(add) }
    : undefined
    : > sum(1,2,3)
    : 6
    : > sum(1,2,3,4)
    : 10

    - Added ES8 Object.values() and Object.entries() methods.

    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.7 25 Dec 2018

    Core:

    *) Feature: rest parameters syntax (destructuring is not supported).
    Thanks to Alexander Pyshchev.

    *) Feature: added Object.entries() method.

    *) Feature: added Object.values() method.

    *) Improvement: code generator refactored and simplified.

    *) Bugfix: fixed automatic semicolon insertion.

    *) Bugfix: fixed assignment expression from compound assignment.

    *) Bugfix: fixed comparison of Byte and UTF8 strings.

    *) Bugfix: fixed type of iteration variable in for-in with array
    values.

    *) Bugfix: fixed building on paltforms without librt.

    *) Bugfix: miscellaneous bugs have been fixed.


    _______________________________________________
    nginx-announce mailing list
    nginx-announce@nginx.org
    http://mailman.nginx.org/mailman/listinfo/nginx-announce

    Continue reading...