# HG changeset patch # User Yaroslav Zhuravlev # Date 1614875880 0 # Node ID 68c0566a375fd6a094f7e0f72c953aa0278b34fc # Parent 529114f1108a2f83654ebf2e8668e7505a586666 Documented njs global object in njs Refernce. diff --git a/xml/en/docs/njs/reference.xml b/xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml +++ b/xml/en/docs/njs/reference.xml @@ -9,7 +9,7 @@
+ rev="64">
@@ -816,6 +816,50 @@ The following log levels can be specifie
+
+ + +The njs object is a global object +that represents the current VM instance +(since 0.2.0). + + + + + +njs.version + +Returns a string with the current version of njs +(for example, “0.5.2”). + + +njs.dump(value) + +Returns the pretty-print string representation for a value. + + +njs.on + +Registers a callback for the specified VM event +(since 0.5.2). +An event may be one of the following strings: + + +exit + +is called before the VM is destroyed. +The callback is called without arguments. + + + + + + + + +
+ +