diff xml/en/docs/njs/reference.xml @ 2414:3b7223f9aac8

njs-0.3.4
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 13 Aug 2019 18:09:40 +0300
parents dbf68c949522
children 080581ce888d
line wrap: on
line diff
--- a/xml/en/docs/njs/reference.xml	Wed Aug 07 21:04:14 2019 +0300
+++ b/xml/en/docs/njs/reference.xml	Tue Aug 13 18:09:40 2019 +0300
@@ -9,7 +9,7 @@
 <article name="Reference"
         link="/en/docs/njs/reference.html"
         lang="en"
-        rev="29">
+        rev="30">
 
 <section id="summary">
 
@@ -857,6 +857,26 @@
 </example>
 </tag-desc>
 
+<tag-name id="string_trimend"><literal>String.prototype.trimEnd()</literal></tag-name>
+<tag-desc>
+Removes whitespaces from the end of a string
+(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>).
+<example>
+>> '   abc  '.trimEnd()
+'   abc'
+</example>
+</tag-desc>
+
+<tag-name id="string_trimstart"><literal>String.prototype.trimStart()</literal></tag-name>
+<tag-desc>
+Removes whitespaces from the beginning of a string
+(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>).
+<example>
+>> '   abc  '.trimStart()
+'abc  '
+</example>
+</tag-desc>
+
 <tag-name id="encodeuri"><literal>encodeURI(<value>URI</value>)</literal></tag-name>
 <tag-desc>
 Encodes a URI by replacing each instance of certain characters
@@ -1217,6 +1237,20 @@
 </example>
 </tag-desc>
 
+<tag-name id="renamesync"><literal>renameSync(<value>oldPath</value>,
+<value>newPath</value>)</literal></tag-name>
+<tag-desc>
+Synchronously changes the name or location of a file from
+<literal>oldPath</literal> to <literal>newPath</literal>
+(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>).
+<example>
+>> var fs = require('fs')
+undefined
+>> var file = fs.renameSync('hello.txt', 'HelloWorld.txt')
+undefined
+</example>
+</tag-desc>
+
 </list>
 </para>