Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
vnls-promise
Advanced tools
Cross platform Promise.
On node nodejs
npm install vnls
npm install vnls-event
npm install vnls-promise
Then, somewhere at the top of your code
require('vnls');
require('vnls-event');
require('vnls-promise');
There is no need to bind it to a var because var VNLS is made global to the nodejs process so it's behavior is exactly like in a browser environment. All-though this IS a kind of pollution on nodejs.
In a browser (you may also download the file first):
<script type="text/javascript" src="https://raw.githubusercontent.com/jorritd/vnls/master/lib/vnls.min.js"></script>
<script type="text/javascript" src="https://raw.githubusercontent.com/jorritd/vnls-event/master/lib/vnls-event.min.js"></script>
<script type="text/javascript" src="https://raw.githubusercontent.com/jorritd/vnls-promise/master/lib/vnls-promise.min.js"></script>
var promise = VNLS.getObject('event',"Promise");
promise.Do('set a timeOut and 2 increments',
// Can we pass something
// extra to 'this' promise
function(promise){
callback_counter ++;
setTimeout(function(){
// promise.done();
setTimeout(function(){
promise.done();
},100);
},100);
},
function(promise){
callback_counter ++;
promise.done();
},
function(promise){
callback_counter ++;
promise.done();
}
).whenDone( function(){
success_called = true;
}).whenFail( function(){
error_called = true;
});
or:
promise.Do(
function(promise){
callback_counter ++;
promise.done();
},
function(promise){
callback_counter ++;
// This block is causing an error
// So the next block will be valid
promise.fail();
},
function(promise){
callback_counter ++;
promise.done();
}
).orDo(
function(promise){
callback_counter ++;
promise.done();
},
function(promise){
callback_counter ++;
promise.done();
},
function(promise){
callback_counter ++;
promise.done();
}
).whenDone( function(){
success_called = true;
}).whenFail( function(){
error_called = true;
});
or:
promise.Do(
function(promise){
promise.done();
}
).thenDo(
function(promise){
// console.log('Then called');
setTimeout(function(){
// console.log('READY');
// self.pOptions.current_level == 2 at this position
// console.log(u.inspect(promise),true);
promise.done();
},100);
}
).orDo(
function(promise){
// console.log('Or called');
// console.log('ERROR');
// console.log(u.inspect(promise),true);
promise.fail();
}
).whenDone( function(){
success_called = true;
}).whenFail( function(){
error_called = true;
});
npm install jasmine-node
npm install nodewatch
npm install uglify-js
npm install -g jake
For jake these are the commands:
jake compress
: build minified version in './lib/*'jake test
: run the specsjake autotest
: run the specs on a filechange for TDDFor testing in a browser environment just point your browser to 'specs/index.html'.
It should run the same specs as jake test
does. (The tests cover both browser and server)
FAQs
Promises
The npm package vnls-promise receives a total of 2 weekly downloads. As such, vnls-promise popularity was classified as not popular.
We found that vnls-promise 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.