Mercurial > hg > nginx-site
annotate xml/en/docs/njs_about.xml @ 2177:79297494d291
Added njs Crypto API.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 05 Jun 2018 18:23:38 +0300 |
parents | cd4889fdcfa4 |
children | 821807549005 |
rev | line source |
---|---|
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
2 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
3 <!-- |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
5 --> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
6 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
7 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
8 |
2128
59a3cc84f507
Renamed nginScript to njs
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2076
diff
changeset
|
9 <article name="About njs" |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
10 link="/en/docs/njs_about.html" |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
11 lang="en" |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
12 rev="20"> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
13 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
14 <section id="summary"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
15 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
16 <para> |
2128
59a3cc84f507
Renamed nginScript to njs
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2076
diff
changeset
|
17 njs is a subset of the JavaScript language that allows |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
18 implementing location and variable handlers in |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
19 <link doc="http/ngx_http_js_module.xml">http</link> and |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
20 <link doc="stream/ngx_stream_js_module.xml">stream</link>. |
2128
59a3cc84f507
Renamed nginScript to njs
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2076
diff
changeset
|
21 njs is created in compliance with |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
22 <link url="http://www.ecma-international.org/ecma-262/5.1/">ECMAScript 5.1</link> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
23 with some |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
24 <link url="http://www.ecma-international.org/ecma-262/6.0/">ECMAScript 6</link> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
25 extensions. |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
26 The compliance is still evolving. |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
27 </para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
28 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
29 </section> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
30 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
31 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
32 <section id="supported" name="What is currently supported"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
33 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
34 <para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
35 <list type="bullet"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
36 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
37 <listitem> |
1864
543f654ce08a
Fixed phrase about scopes in "About nginScript".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1850
diff
changeset
|
38 Boolean values, numbers, strings, objects, arrays, |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
39 functions, and regular expressions |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
40 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
41 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
42 <listitem> |
1867
e42f6c54ea5f
Added ES7 exponentiation operators support to "About nginScript".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1864
diff
changeset
|
43 ES5.1 operators, ES7 exponentiation operators |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
44 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
45 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
46 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
47 ES5.1 statements: <literal>var</literal>, <literal>if</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
48 <literal>else</literal>, <literal>switch</literal>, <literal>for</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
49 <literal>for in</literal>, <literal>while</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
50 <literal>do while</literal>, <literal>break</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
51 <literal>continue</literal>, <literal>return</literal>, <literal>try</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
52 <literal>catch</literal>, <literal>throw</literal>, <literal>finally</literal> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
53 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
54 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
55 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
56 ES6 <literal>Number</literal> and |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
57 <literal>Math</literal> properties and methods |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
58 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
59 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
60 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
61 <literal>String</literal> methods: |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
62 <list type="bullet"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
63 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
64 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
65 ES5.1: |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
66 <literal>fromCharCode</literal>, <literal>concat</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
67 <literal>slice</literal>, <literal>substring</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
68 <literal>substr</literal>, <literal>charAt</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
69 <literal>charCodeAt</literal>, <literal>indexOf</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
70 <literal>lastIndexOf</literal>, <literal>toLowerCase</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
71 <literal>toUpperCase</literal>, <literal>trim</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
72 <literal>search</literal>, <literal>match</literal>, <literal>split</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
73 <literal>replace</literal> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
74 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
75 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
76 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
77 ES6: |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
78 <literal>fromCodePoint</literal>, <literal>codePointAt</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
79 <literal>includes</literal>, <literal>startsWith</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
80 <literal>endsWith</literal>, <literal>repeat</literal> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
81 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
82 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
83 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
84 non-standard: |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
85 <literal>fromUTF8</literal>, <literal>toUTF8</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
86 <literal>fromBytes</literal>, <literal>toBytes</literal> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
87 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
88 </list> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
89 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
90 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
91 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
92 <listitem> |
2004
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
93 <literal>Object</literal> methods: |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
94 <list type="bullet"> |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
95 <listitem> |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
96 ES5.1: |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
97 <literal>create</literal> (support without properties list), |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
98 <literal>keys</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
99 <literal>defineProperty</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
100 <literal>defineProperties</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
101 <literal>getOwnPropertyDescriptor</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
102 <literal>getPrototypeOf</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
103 <literal>hasOwnProperty</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
104 <literal>isPrototypeOf</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
105 <literal>preventExtensions</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
106 <literal>isExtensible</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
107 <literal>freeze</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
108 <literal>isFrozen</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
109 <literal>seal</literal>, |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
110 <literal>isSealed</literal> |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
111 </listitem> |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
112 </list> |
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
113 |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
114 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
115 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
116 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
117 <literal>Array</literal> methods: |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
118 <list type="bullet"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
119 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
120 ES5.1: |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
121 <literal>isArray</literal>, <literal>slice</literal>, <literal>splice</literal>, |
1849
662822812f84
Missed whitespace added. A comma moved to the right place.
Maxim Konovalov <maxim@nginx.com>
parents:
1848
diff
changeset
|
122 <literal>push</literal>, <literal>pop</literal>, <literal>unshift</literal>, |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
123 <literal>shift</literal>, <literal>reverse</literal>, <literal>sort</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
124 <literal>join</literal>, <literal>concat</literal>, <literal>indexOf</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
125 <literal>lastIndexOf</literal>, <literal>forEach</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
126 <literal>some</literal>, <literal>every</literal>, <literal>filter</literal>, |
1848 | 127 <literal>map</literal>, <literal>reduce</literal>, |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
128 <literal>reduceRight</literal> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
129 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
130 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
131 <listitem> |
1954
bbc167d437c2
Added ES6 Array methods support to "About nginScript".
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1944
diff
changeset
|
132 ES6: |
bbc167d437c2
Added ES6 Array methods support to "About nginScript".
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1944
diff
changeset
|
133 <literal>of</literal>, <literal>fill</literal>, <literal>find</literal>, |
bbc167d437c2
Added ES6 Array methods support to "About nginScript".
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1944
diff
changeset
|
134 <literal>findIndex</literal> |
bbc167d437c2
Added ES6 Array methods support to "About nginScript".
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1944
diff
changeset
|
135 </listitem> |
bbc167d437c2
Added ES6 Array methods support to "About nginScript".
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1944
diff
changeset
|
136 |
bbc167d437c2
Added ES6 Array methods support to "About nginScript".
Andrey Zelenkov <zelenkov@nginx.com>
parents:
1944
diff
changeset
|
137 <listitem> |
1850
8eae6bc1ea22
Fixed array.prototype.includes to ES7, corrected grammar.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1849
diff
changeset
|
138 ES7: <literal>includes</literal> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
139 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
140 </list> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
141 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
142 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
143 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
144 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
145 ES5.1 <literal>Function</literal> methods: |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
146 <literal>call</literal>, <literal>apply</literal>, <literal>bind</literal> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
147 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
148 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
149 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
150 ES5.1 <literal>RegExp</literal> methods: |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
151 <literal>test</literal>, <literal>exec</literal> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
152 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
153 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
154 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
155 ES5.1 <literal>Date</literal> methods |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
156 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
157 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
158 <listitem> |
2071
838c503fd2f7
Documented JSON object support for njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2026
diff
changeset
|
159 ES5.1 <literal>JSON</literal> object |
838c503fd2f7
Documented JSON object support for njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2026
diff
changeset
|
160 </listitem> |
838c503fd2f7
Documented JSON object support for njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2026
diff
changeset
|
161 |
838c503fd2f7
Documented JSON object support for njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2026
diff
changeset
|
162 <listitem> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
163 ES5.1 global functions: |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
164 <literal>isFinite</literal>, <literal>isNaN</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
165 <literal>parseFloat</literal>, <literal>parseInt</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
166 <literal>decodeURI</literal>, <literal>decodeURIComponent</literal>, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
167 <literal>encodeURI</literal>, <literal>encodeURIComponent</literal> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
168 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
169 |
2076
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
170 <listitem> |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
171 <literal>Error</literal> objects: |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
172 <literal>Error</literal>, <literal>EvalError</literal>, |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
173 <literal>InternalError</literal>, <literal>RangeError</literal>, |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
174 <literal>ReferenceError</literal>, <literal>SyntaxError</literal>, |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
175 <literal>TypeError</literal>, <literal>URIError</literal> |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
176 </listitem> |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
177 |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
178 <listitem> |
2148
94a598ee1d49
Minor corrections in "njs About" and "njs Changes".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2130
diff
changeset
|
179 <literal>setTimeout()</literal> and <literal>clearTimeout()</literal> functions |
94a598ee1d49
Minor corrections in "njs About" and "njs Changes".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2130
diff
changeset
|
180 (0.2.0) |
2129
4212f4520070
Updated "About njs" with methods supported in njs-0.2.0.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2128
diff
changeset
|
181 </listitem> |
4212f4520070
Updated "About njs" with methods supported in njs-0.2.0.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2128
diff
changeset
|
182 |
4212f4520070
Updated "About njs" with methods supported in njs-0.2.0.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2128
diff
changeset
|
183 <listitem> |
2148
94a598ee1d49
Minor corrections in "njs About" and "njs Changes".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2130
diff
changeset
|
184 <link url="https://nodejs.org/api/fs.html#fs_file_system">Node.js style</link> |
94a598ee1d49
Minor corrections in "njs About" and "njs Changes".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2130
diff
changeset
|
185 <literal>File system</literal> methods: |
2076
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
186 <literal>fs.readFile</literal>, <literal>fs.readFileSync</literal>, |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
187 <literal>fs.appendFile</literal>, <literal>fs.appendFileSync</literal>, |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
188 <literal>fs.writeFile</literal>, <literal>fs.writeFileSync</literal> |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
189 </listitem> |
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
190 |
2129
4212f4520070
Updated "About njs" with methods supported in njs-0.2.0.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2128
diff
changeset
|
191 <listitem> |
2148
94a598ee1d49
Minor corrections in "njs About" and "njs Changes".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2130
diff
changeset
|
192 <link url="https://nodejs.org/api/crypto.html#crypto_class_hash">Node.js style</link> |
94a598ee1d49
Minor corrections in "njs About" and "njs Changes".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2130
diff
changeset
|
193 <literal>Crypto</literal> methods (0.2.0): |
2129
4212f4520070
Updated "About njs" with methods supported in njs-0.2.0.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2128
diff
changeset
|
194 <literal>crypto.createHash</literal>, |
4212f4520070
Updated "About njs" with methods supported in njs-0.2.0.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2128
diff
changeset
|
195 <literal>crypto.createHmac</literal> |
2148
94a598ee1d49
Minor corrections in "njs About" and "njs Changes".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2130
diff
changeset
|
196 |
2129
4212f4520070
Updated "About njs" with methods supported in njs-0.2.0.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2128
diff
changeset
|
197 </listitem> |
4212f4520070
Updated "About njs" with methods supported in njs-0.2.0.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2128
diff
changeset
|
198 |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
199 </list> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
200 </para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
201 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
202 </section> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
203 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
204 |
1850
8eae6bc1ea22
Fixed array.prototype.includes to ES7, corrected grammar.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1849
diff
changeset
|
205 <section id="not_supported" name="What is not supported yet"> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
206 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
207 <para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
208 <list type="bullet"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
209 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
210 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
211 ES6 <literal>let</literal> and <literal>const</literal> declarations |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
212 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
213 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
214 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
215 labels |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
216 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
217 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
218 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
219 <literal>arguments</literal> array |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
220 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
221 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
222 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
223 <literal>eval</literal> function |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
224 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
225 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
226 <listitem> |
2150
af5751930f95
Described new Function() as not supported in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2148
diff
changeset
|
227 <literal>new Function()</literal> constructor |
af5751930f95
Described new Function() as not supported in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2148
diff
changeset
|
228 </listitem> |
af5751930f95
Described new Function() as not supported in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2148
diff
changeset
|
229 |
af5751930f95
Described new Function() as not supported in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2148
diff
changeset
|
230 <listitem> |
2129
4212f4520070
Updated "About njs" with methods supported in njs-0.2.0.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2128
diff
changeset
|
231 <literal>setInterval</literal>, |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
232 <literal>setImmediate</literal> functions |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
233 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
234 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
235 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
236 non-integer fractions (<literal>.235</literal>), |
2076
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
237 binary literals (<literal>0b0101</literal>) |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
238 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
239 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
240 </list> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
241 </para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
242 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
243 </section> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
244 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
245 |
2130 | 246 <section id="changelog" name="Change Log"> |
247 | |
248 <para> | |
249 The complete list of njs changes is available | |
250 <link doc="njs/njs_changes.xml">here</link>. | |
251 </para> | |
252 </section> | |
253 | |
254 | |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
255 <section id="njs_api" name="njs API Reference"> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
256 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
257 <para> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
258 njs API reference is available |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
259 <link doc="njs/njs_api.xml">here</link>. |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
260 </para> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
261 </section> |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
262 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
263 |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
264 <section id="install" name="Download and install"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
265 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
266 <para> |
2128
59a3cc84f507
Renamed nginScript to njs
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2076
diff
changeset
|
267 njs is available in two modules: |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
268 <list type="bullet"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
269 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
270 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
271 <link doc="http/ngx_http_js_module.xml">ngx_http_js_module</link> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
272 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
273 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
274 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
275 <link doc="stream/ngx_stream_js_module.xml">ngx_stream_js_module</link> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
276 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
277 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
278 </list> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
279 Both modules are not built by default, |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
280 they should be either compiled from the sources |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
281 or installed as a Linux package. |
2174
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
282 In addition, the Linux package provides |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
283 njs command-line <link id="cli">utility</link>. |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
284 </para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
285 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
286 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
287 <section id="install_package" name="Installing as a Linux package"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
288 <para> |
2128
59a3cc84f507
Renamed nginScript to njs
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2076
diff
changeset
|
289 For Linux, njs modules |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
290 <link doc="../linux_packages.xml" id="dynmodules">packages</link> can be used: |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
291 <list type="bullet"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
292 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
293 <listitem> |
2128
59a3cc84f507
Renamed nginScript to njs
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2076
diff
changeset
|
294 <literal>nginx-module-njs</literal> — njs |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
295 <link doc="ngx_core_module.xml" id="load_module">dynamic</link> modules |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
296 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
297 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
298 <listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
299 <literal>nginx-module-njs-dbg</literal> — debug symbols for the |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
300 <literal>nginx-module-njs</literal> package |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
301 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
302 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
303 </list> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
304 </para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
305 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
306 </section> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
307 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
308 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
309 <section id="install_sources" name="Building from the sources"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
310 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
311 <para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
312 The <link url="http://hg.nginx.org/njs">repository</link> |
2128
59a3cc84f507
Renamed nginScript to njs
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2076
diff
changeset
|
313 with njs sources can be cloned with the following command: |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
314 (requires <link url="https://www.mercurial-scm.org">Mercurial</link> client): |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
315 <example> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
316 hg clone http://hg.nginx.org/njs |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
317 </example> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
318 Then the modules should be compiled using the |
2026
af51ec6b5489
Fixed typos in njs configure string examples.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2004
diff
changeset
|
319 <literal>--add-module</literal> configuration parameter: |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
320 <example> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
321 ./configure --add-module=<value>path-to-njs</value>/nginx |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
322 </example> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
323 The modules can also be built as |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
324 <link doc="ngx_core_module.xml" id="load_module">dynamic</link>: |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
325 <example> |
2026
af51ec6b5489
Fixed typos in njs configure string examples.
Sergey Kandaurov <pluknet@nginx.com>
parents:
2004
diff
changeset
|
326 ./configure --add-dynamic-module=<value>path-to-njs</value>/nginx |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
327 </example> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
328 </para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
329 |
2174
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
330 <para> |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
331 To build only njs command-line <link id="cli">utility</link>, run |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
332 <literal>./configure</literal> and <literal>make njs</literal> commands |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
333 from njs root directory. |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
334 The utility is available as <literal>./build/njs</literal>. |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
335 </para> |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
336 |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
337 </section> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
338 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
339 </section> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
340 |
2174
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
341 |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
342 <section id="cli" name="Command-line interface"> |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
343 |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
344 <para> |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
345 njs scripts development and debugging can be performed |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
346 from the command-line. |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
347 The command-line utility is available after the installation of |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
348 the Linux <link id="install_package">package</link> |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
349 or after building from the <link id="install_sources">sources</link>. |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
350 Compared to njs running inside nginx, |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
351 nginx objects |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
352 (<link doc="njs/njs_api.xml" id="http">HTTP</link> and |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
353 <link doc="njs/njs_api.xml" id="stream">Stream</link>) |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
354 are not available in the utility. |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
355 <example> |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
356 $ echo "2**3" | njs - |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
357 8 |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
358 |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
359 $ njs |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
360 >> var o = {a:[]} |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
361 undefined |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
362 |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
363 >> JSON.stringify(o, undefined,1) |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
364 { |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
365 "a": [ |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
366 |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
367 ] |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
368 } |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
369 >> |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
370 </example> |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
371 </para> |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
372 |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
373 </section> |
3b782a679237
Mentioned njs CLI in "About njs".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2150
diff
changeset
|
374 |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
375 </article> |