Javascript Reference

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
 
(14 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
== Global Objects ==
 
== Global Objects ==
 
These are objects, functions or constructors that exists automatically in each script context.
 
These are objects, functions or constructors that exists automatically in each script context.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Global Functions#isNaN|isNaN()]]</font><br/>
+
* [[Javascript Global Functions#isNaN|isNaN()]]
<div class="yate-page-desc">Function that checks if its argument is Not A Number.</div>
+
Function that checks if its argument is Not A Number.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Global Functions#parseInt|parseInt()]]</font><br/>
+
* [[Javascript Global Functions#parseInt|parseInt()]]
<div class="yate-page-desc">Function that parses a string to an integer in an arbitrary base.</div>
+
Function that parses a string to an integer in an arbitrary base.
<div class="bullet">&nbsp;</div><font class="yate-page-title">NaN</font><br/>
+
* NaN
<div class="yate-page-desc">Static variable that is Not a Number.</div>
+
Static variable that is Not a Number.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Math|Math]]</font><br/>
+
* [[Javascript Math|Math]]
<div class="yate-page-desc">Static Math object.</div>
+
Static Math object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Object|Object()]]</font><br/>
+
* [[Javascript Object|Object()]]
<div class="yate-page-desc">Constructor of an Object object.</div>
+
Constructor of an Object object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Array|Array()]]</font><br/>
+
* [[Javascript Array|Array()]]
<div class="yate-page-desc">Constructor of an Array object.</div>
+
Constructor of an Array object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Function|Function()]]</font><br/>
+
* [[Javascript Function|Function()]]
<div class="yate-page-desc">Constructor of a Function object.</div>
+
Constructor of a Function object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript RegExp|RegExp()]]</font><br/>
+
* [[Javascript RegExp|RegExp()]]
<div class="yate-page-desc">Constructor of a Regular Expression object.</div>
+
Constructor of a Regular Expression object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Date|Date()]]</font><br/>
+
* [[Javascript Date|Date()]]
<div class="yate-page-desc">Constructor of a Date object.</div>
+
Constructor of a Date object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Message|Message()]]</font><br/>
+
* [[Javascript Message|Message()]]
<div class="yate-page-desc">Constructor of a Message object.</div>
+
Constructor of a Message object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript XML|XML()]]</font><br/>
+
* [[Javascript XML|XML()]]
<div class="yate-page-desc">Constructor of an XML object.</div>
+
Constructor of an XML object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Engine|Engine]]</font><br/>
+
* [[Javascript XPath|XPath()]]
<div class="yate-page-desc">Static Engine object.</div>
+
Constructor of an XPath (XML Path) object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript File|File]]</font><br/>
+
* [[Javascript Hasher|Hasher]]
<div class="yate-page-desc">Static File object.</div>
+
Constructor of a Hasher object.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Channel|Channel]]</font><br/>
+
* [[Javascript JSON|JSON]]
<div class="yate-page-desc">Static Channel object (present only in routing scripts).</div>
+
Static JSON parser object.
 +
* [[Javascript JPath|JPath()]]
 +
Constructor for JPath (JSON Path) object.
 +
* [[Javascript DNS|DNS]]
 +
Static DNS resolver object.
 +
* [[Javascript Engine|Engine]]
 +
Static Engine object.
 +
* [[Javascript Shared|Shared]]
 +
Global shared data.
 +
* [[Javascript SharedObjects|SharedObjects]]
 +
Global shared javascript objects.
 +
* [[Javascript MatchingItem|MatchingItem]]
 +
Constructor of a MatchingItem object.
 +
* [[Javascript Semaphore|Semaphore]]
 +
Constructor of a Semaphore object.
 +
* [[Javascript HashList|HashList]]
 +
Constructor of a HashList object.
 +
* [[Javascript URI|URI]]
 +
Constructor of a URI object.
 +
* [[Javascript File|File]]
 +
Static File object.
 +
* [[Javascript ConfigFile|ConfigFile]]
 +
Constructor of a ConfigFile object.
 +
* [[Javascript ConfigSection|ConfigSection]]
 +
Constructor of a ConfigSection object.
 +
* [[Javascript Channel|Channel]]
 +
Static Channel object (present only in routing scripts).
  
 
== String Functions ==
 
== String Functions ==
 
Yate's Javascript implementation does not include String or Number objects. Instead applicable methods are added to all kind of non-object values including those native to the Yate engine.
 
Yate's Javascript implementation does not include String or Number objects. Instead applicable methods are added to all kind of non-object values including those native to the Yate engine.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#length|length]]</font><br/>
+
 
<div class="yate-page-desc">Property reflecting the length of a string.</div>
+
* [[Javascript Strings#length|length]]
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#charAt|charAt()]]</font><br/>
+
Property reflecting the length of a string.
<div class="yate-page-desc">Function that returns a character at a certain position in string.</div>
+
 
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#indexOf|indexOf()]]</font><br/>
+
* [[Javascript Strings#charAt|charAt()]]
<div class="yate-page-desc">Function that returns the position of a substring in another string.</div>
+
Function that returns a character at a certain position in string.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#substr|substr()]]</font><br/>
+
 
<div class="yate-page-desc">Function that returns a substring.</div>
+
* [[Javascript Strings#indexOf|indexOf()]]
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#match|match()]]</font><br/>
+
Function that returns the position of a substring in another string.
<div class="yate-page-desc">Function that matches a string against a Regular Expression.</div>
+
 
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#toLowerCase|toLowerCase()]]</font><br/>
+
* [[Javascript Strings#substr|substr()]]
<div class="yate-page-desc">Function that converts a string to lower case.</div>
+
Function that returns a substring.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#toUpperCase|toUpperCase()]]</font><br/>
+
 
<div class="yate-page-desc">Function that converts a string to upper case.</div>
+
* [[Javascript Strings#match|match()]]
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#trim|trim()]]</font><br/>
+
Function that matches a string against a Regular Expression.
<div class="yate-page-desc">Function that removes leading and trailing spaces from a string.</div>
+
 
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#sqlEscape|sqlEscape()]]</font><br/>
+
* [[Javascript Strings#toLowerCase|toLowerCase()]]
<div class="yate-page-desc">Function that performs SQL escaping on a string.</div>
+
Function that converts a string to lower case.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#startsWith|startsWith()]]</font><br/>
+
 
<div class="yate-page-desc">Function that checks if a string starts with a specific substring.</div>
+
* [[Javascript Strings#toUpperCase|toUpperCase()]]
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#endsWith|endsWith()]]</font><br/>
+
Function that converts a string to upper case.
<div class="yate-page-desc">Function that checks if a string ends with a specific substring.</div>
+
 
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#split|split()]]</font><br/>
+
* [[Javascript Strings#trim|trim()]]
<div class="yate-page-desc">Function that splits a string into an Array at a separator.</div>
+
Function that removes leading and trailing spaces from a string.
<div class="bullet">&nbsp;</div><font class="yate-page-title">[[Javascript Strings#toString|toString()]]</font><br/>
+
 
<div class="yate-page-desc">Function that converts a number to string using a specified numbering base.</div>
+
* [[Javascript Strings#sqlEscape|sqlEscape()]]
 +
Function that performs SQL escaping on a string.
 +
 
 +
* [[Javascript Strings#startsWith|startsWith()]]
 +
Function that checks if a string starts with a specific substring.
 +
 
 +
* [[Javascript Strings#endsWith|endsWith()]]
 +
Function that checks if a string ends with a specific substring.
 +
 
 +
* [[Javascript Strings#split|split()]]
 +
Function that splits a string into an Array at a separator.
 +
 
 +
* [[Javascript Strings#toString|toString()]]
 +
Function that converts a number to string using a specified numbering base.
 +
 
 +
[[Category:Javascript]] [[Category:Programmers]]

Latest revision as of 10:50, 10 September 2024

[edit] Keywords and Operators

[edit] Global Objects

These are objects, functions or constructors that exists automatically in each script context.

Function that checks if its argument is Not A Number.

Function that parses a string to an integer in an arbitrary base.

  • NaN

Static variable that is Not a Number.

Static Math object.

Constructor of an Object object.

Constructor of an Array object.

Constructor of a Function object.

Constructor of a Regular Expression object.

Constructor of a Date object.

Constructor of a Message object.

Constructor of an XML object.

Constructor of an XPath (XML Path) object.

Constructor of a Hasher object.

Static JSON parser object.

Constructor for JPath (JSON Path) object.

Static DNS resolver object.

Static Engine object.

Global shared data.

Global shared javascript objects.

Constructor of a MatchingItem object.

Constructor of a Semaphore object.

Constructor of a HashList object.

Constructor of a URI object.

Static File object.

Constructor of a ConfigFile object.

Constructor of a ConfigSection object.

Static Channel object (present only in routing scripts).

[edit] String Functions

Yate's Javascript implementation does not include String or Number objects. Instead applicable methods are added to all kind of non-object values including those native to the Yate engine.

Property reflecting the length of a string.

Function that returns a character at a certain position in string.

Function that returns the position of a substring in another string.

Function that returns a substring.

Function that matches a string against a Regular Expression.

Function that converts a string to lower case.

Function that converts a string to upper case.

Function that removes leading and trailing spaces from a string.

Function that performs SQL escaping on a string.

Function that checks if a string starts with a specific substring.

Function that checks if a string ends with a specific substring.

Function that splits a string into an Array at a separator.

Function that converts a number to string using a specified numbering base.

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers