Hi all,

we implemented most of core libs that will be part of jaggery2 with
nashorn.And we are going to start working on sever initializing process.

REPL for jaggery2 implemented.you can load a module through a require
keyword
eg : var os = require('os');

This require function is bind as global function to nashorn global
context.Global require and the require function user access via script
file, executes the same set of logic with different aspects.

*global require vs require*

There is no parent module when global require is executing.but if user
loads a module in javascript file using require function, there can be a
parent module which requesting to load that module.

But in global  require, there is no parent module request to load a module.

when user use REPL to load module, jaggery will load them relative to
current jaggery path


*Update*

queryString lib was added as a core library.this lib will be used for
queryString manipulation tasks.it contain two function which can be helpful
      1.) queryString.stringify()
      2.) queryString.parse()

*queryString.stringify*
       Serializes an object containing name:value pairs into a query
       string.Optionally overrides the default separator ('&') and
assignment (' = ')
       characters.
       eg:

*queryString.stringify({name:'buddhi', age:23, year:['one','two'] });*
*          result -> ' name=buddhi&age=23&year=one&year=two '*

*queryString.parse*
        Parse a query string to an object contains name:value
pairs.Optionally
        overrides the default separator (' &') and assignment (' = ')
characters.
        eg:

* queryString.parse('name=buddhi&age=23&year=one&year=two ')*
*           result -> {name:'buddhi', age:23, year:['one','two']}*

-- 
Thanks & Best Regards,

*Buddhi Nipun Mihara*
Software Engineer(intern)
WSO2, Inc.:http://wso2.com
lean.enterprise.middleware
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to