Importing other function collections

Parent Previous Next

Importing other EMCA function collections

With the development of projects like Node.JS and the like, there is more work being done on JavaScript outside the browser hosting environment. So there are many generically useful JavaScript function collections around.


This collection has proved very useful to me in Tw scripting, it is based on php syntax and is able to use the Php general help files as the functions names and attributes are mostly identical.


 http://phpjs.org/pages/home

Some very clever fellows have ported a considerable number of string
handling, array handling and other potentially very useful functions
across from php to EMCA style scripting, and made them all work as per
the PHP manual (documentation as it already exists).

 http://phpjs.org/functions/index

As said there would be many things that are too web orientated and
would never be used. And some stuff that wold be directly useful now.)

Even more cleverly they have made their 'library' customisable
pre-download so that a script-developer could define their own
package(s) as needed, with only QtScript relevant functions and
dependencies in it.

 http://phpjs.org/packages/configure


"Use PHP functions in JavaScript"

"php.js

"php.js is an open source project that brings high-level PHP functions
to low-level JavaScript platforms such as web browsers, browser
extensions ( Mozilla/Firefox, Chrome ), AIR, and SSJS engines like V8
( node.js, v8cgi ), Rhino, and SpiderMonkey ( CouchDB )

"If you want to perform high-level operations on these platforms, you
probably need to write JS that combines its lower-level functions and
build it up until you have something useful like: strip_tags(),
strtotime(), number_format(), wordwrap().

"That's what we are doing for you.

"Pure JavaScript so no additional components required


There are considerable number array and string handling routines ready to go.

An estimated 7-8, 000 lines of code.


I import the library run it through eval() and then use its prototype creation call to make an object available to QtScripting. More details below Modules and helper objects and helper_PhpJs.mod.

Created with the Personal Edition of HelpNDoc: Easy CHM and documentation editor