Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
:q #JSI Introduction a simple module loader , you can use npm installed modules in web browser such as it work in nodejs!
npm install jsi -g
install and run example:
$ cd <webroot>
$ jsi example
$ open http://localhost:8080
command line
on [webroot]
$ jsi example --deplay hello world example
$ jsi start --start debug server
on [webroot]/[scriptroot]
$ jsi export -o temp.js main.js --export main.js as a single javascript file
(main.js variables on global namespace;
buf dependence modules is hidden, you can use require('modulename') to get it )
$ jsi export -o exported.js -ns xmldom xmldom --export package: export xmldom to a single script and exports variables on the namespace xmldom.
//advance useage: install a optimized external package on package system.
$ jsi install jquery --install a exter:qnal optimized package from npm $ jsi install ./workspace/xmldom --install a external optimized package from local filesystem
lite template example
//function template
var tpl = function(list){
return <div>
<c:if test='${var1>var2}'>test${value}</c:if>
<p> this is a xml style templete ${varName};
default syntax support for mostly javascript editor (E4X standard) </p>
</div>
}
//inline template render
var tpl = <div>
<p> this is a xml style templete ;
default syntax support for mostly javascript editor (E4X standard) </p>
</div>
//single template file
var tpl = liteXML("/path.tpl")
//partly template file(css3 selector)
var tpl = liteXML("/path.tpl#header")
javascript debug and compress
enable debug
javascript:document.cookie="JSI_DEBUG=true"
disable debug
javascript:document.cookie="JSI_DEBUG=false"
test route /route.js
content:
exports = [
//mock with json data
{path:"/service/login.do",data:{"auth-token":"sdeee23734ru3hfbvncm"}},
//mock from remote url
{path:"/service/user.do",remote:"http://test.com/user.do"},
//mock from local json file
{path:"/service/user.do",file:"./mock/user.json"},
//mock with nodejs request handle
{
path: /\/service\/user\/(\d+)/,
action: function(request,response,path,uid){
var headers = {"Content-Type":"text/json;charset=utf-8"};
response.writeHead(200, headers);
response.end(JSON.stringify({"uid":uid}));
return true;
}
}
]
FAQs
JavaScript Integration System.
The npm package jsi receives a total of 22 weekly downloads. As such, jsi popularity was classified as not popular.
We found that jsi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.