New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bjs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bjs - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

15

lib/bjs.js

@@ -9,9 +9,12 @@ #!/usr/bin/env node

got(API, function(error, body, response) {
body = JSON.parse(body);
console.log(body.events[0].where);
cb({
where: body.events[0].where,
when: body.events[0].when
})
if(!error) {
body = JSON.parse(body);
cb(null,{
where: body.events[0].where,
when: body.events[0].when
});
} else {
cb(error)
}
});
};

8

package.json
{
"name": "bjs",
"version": "1.0.0",
"version": "1.0.1",
"main": "lib/bjs.js",

@@ -17,2 +17,5 @@ "description": "Next BangaloreJS event on CLI.",

},
"scripts": {
"test": "mocha"
},
"bin": {

@@ -29,3 +32,4 @@ "bjs": "bin/bjs"

"grunt-contrib-nodeunit": "~0.2.0",
"grunt-contrib-watch": "~0.5.0"
"grunt-contrib-watch": "~0.5.0",
"mocha": "^2.3.3"
},

@@ -32,0 +36,0 @@ "dependencies": {

@@ -18,3 +18,3 @@ # bjs [![Build Status](https://secure.travis-ci.org/hemanth/node-bjs.png?branch=master)](http://travis-ci.org/hemanth/node-bjs)

bjs = require('bjs');
bjs.next(function(event){
bjs.next(function(error, event){
console.log(event);

@@ -21,0 +21,0 @@ });

'use strict';
var assert = require('assert');
var bjs = require('../lib/bjs.js');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actual, expected, [message])
test.deepEqual(actual, expected, [message])
test.notDeepEqual(actual, expected, [message])
test.strictEqual(actual, expected, [message])
test.notStrictEqual(actual, expected, [message])
test.throws(block, [error], [message])
test.doesNotThrow(block, [error], [message])
test.ifError(value)
*/
// Needs some fix.
exports['bjs'] = {
setUp: function(done) {
done();
},
'next': function(test) {
bjs.next(function(event){
setTimeout(function(){
console.log('dfd');
test.equal(event,'');
});
it('should return the next bangalorejs event', function (done) {
bjs.next(function(err,event) {
assert.strictEqual(Object.keys(event).length, 2);
done();
});
test.done();
}
};
});
exports.next = function(test) {
bjs.next(function(event){
setTimeout(function(){
test.equal(event,'123');
});
});
test.done();
};

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc