Hello,
I'm glad to announce a new release of NGINX JavaScript module (njs).
This release proceeds to extend the coverage of ECMAScript
specifications.
Notable new features:
- querystring module.
: var qs = require('querystring');
:
: function fix_args(args) {
: args = qs.parse(args);
:
: args.t2 = args.t;
: delete args.t;
:
: return qs.stringify(args);
: }
:
: fix_args("t=1&v=%41%42") -> "v=AB&t2=1"
- TextDecoder/TextEncoder.
: >> (new TextDecoder()).decode(new Uint8Array([206,177,206,178]))
: 'αβ'
You can learn more about njs:
- Overview and introduction: http://nginx.org/en/docs/njs/
- Presentation: https://youtu.be/Jc_L6UffFOs
- Using node modules with njs:
http://nginx.org/en/docs/njs/node_modules.html
- Writing njs code using TypeScript definition files:
http://nginx.org/en/docs/njs/typescript.html
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.4.3 11 Aug 2020
Core:
*) Feature: added Query String module.
*) Feature: improved fs.mkdir() to support recursive directory
creation.
Thanks to Artem S. Povalyukhin.
*) Feature: improved fs.rmdir() to support recursive directory removal.
Thanks to Artem S. Povalyukhin.
*) Feature: introduced UTF-8 decoder according to WHATWG encoding spec.
*) Feature: added TextEncoder/TextDecoder implementation.
*) Bugfix: fixed parsing return statement without semicolon.
*) Bugfix: fixed njs_number_to_int32() for big-endian platforms.
*) Bugfix: fixed unit test on big-endian platforms.
*) Bugfix: fixed regexp-literals parsing with '=' characters.
*) Bugfix: fixed pre/post increment/decrement in assignment
operations.
_______________________________________________
nginx-announce mailing list
nginx-announce@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-announce