
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
Iris is a library for handling HTTP (through XMLHttpRequest) and JSONP requests in a more high-level way. It uses promises to allow for more declarative and flexible handling of the responses from either side.
// HTTP example
var http = require('iris').http
http.get('/user/profile')
.timeout(10) // in seconds
.ok(function(data){
$('#user').html(data)
})
.timeouted(function(){
dialog.error('The operation timed out.')
})
.failed(function() {
dialog.error('Ooops, something went wrong.')
})
// JSONP example
var jsonp = require('iris').jsonp
jsonp.get('/user/posts')
.timeout(10)
.ok(function(data) {
$('#post-count').text(data.posts.length + ' posts.')
})
.timeouted(function() {
dialog.error('The operation timed out.')
})
.failed(function() {
dialog.error('Ooops, something went wrong.')
})
Iris depends on the following libraries:
Additionally, there's a dependency on the set of safely shim-able ECMAScript 5 features, which can be provided by a library like es5-shim.
you'll need node.js and npm. As soon as you got your hands on those beautiful thingies, you can just run the following in your project's directory.
$ npm install iris
Then require iris in your script:
var iris = require('iris')
iris.http.get('/za/warudo')
Then compile it (use --watch for added development-phase awesomeness):
$ browserify your-script.js -o bundle.js
Finally, just put it all in your page:
<html>
{{ ... }}
<body>
{{ lots of things may go here, too }}
<script src="/path/to/bundle.js"></script>
</body>
</html>
Iris is nicely hosted (and developed) on Github. You can download the lastest snapshot or clone the entire repository:
$ git clone git://github.com/killdream/iris.git
Use the Github tracker to report bugs or request features. Like a boss!
Fork, do your changes and send me a pull request if you want to~
For general support, you can send me an e-mail on quildreen@gmail.com
Iris is licensed under the delicious and permissive MIT
licence. You can happily copy, share, modify, sell or whatever — refer
to the actual licence text for less information:
$ less LICENCE.txt
FAQs
Sweet Promise-based XHR/JSONP library for browsers.
We found that iris 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
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.