
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Easy module to create channels and their commands then retrieve the same with the power of Full Text search and synonym query expansion. Built to be independent, ready to run and use with multiple languages.
Easy module to create channels and their commands then retrieve the same with the power of Full Text search and synonym query expansion. Built to be independent, ready to run and use with multiple languages.
Jibu is written for small data projects with full text search requirements and some numeric search intelligence. But wait, that's not the main reason, so let's try again...
'Jibu' is Swahili for 'Answer'. It is a tiny data management system written to ensure that, as much as possible, it always gives an answer to your queries. In other words, think full text that works extra hard to ensure that you get an answer. An answer.
Of course, it does not manufacture answers so it will still return no results for queries that match no document, but whenever possible, especially where words and numbers (even as text) are used in queries, jibu will try its best to have a response.
Ok, if you enter a natural language query, jibu will translate it into a full text and a numeric query. We prioritize the full text query and use the numeric query to play the role of a reducer or expander of the results in a bid to ensure there's at least one result.
Where the numeric query is used to expand results, then those are tagged as mercy_results (Jibu, is out of pity, answering you anyway).
Jibu was developed as the data management module for Telegram bots. When you think of it, when you have a bot, you want it to use the vast data you train (read save) it on to give a response, some response. You also want that response to be intelligent, right?
Jibu is built to work on small projects where a bot has a couple of thousands of commands at most. Any other bigger project, Goddamnit! Get a proper database like Elasticsearch, come on!
Install using: npm install --save jibu
var path = require('path');
//JIBU options
var options={
db_path: path.join(__dirname,'data'), //this is the directory path to our pouchdb database
debug: true //default false
};
//initialize Library
var jj = require('./lib/jibu')(options);
//prepare some commands/documents to add into index
var docs =
[
{
channel:'Nairobi',
command: 'parties',
search:['party','bash','food','drinks', 'price 900'],
response:[
{
"name": "Godown Bash",
"where": "Godown Nairobi",
"who": "Ladies only 18+ years"
},
{
"name": "Back-to-school Party",
"where": "Nairobi High School",
"who": "All High School Students"
}
]
},
{
channel:'Nairobi',
command: 'fashion',
search:'clothes,shoes,belts,caps,fashion,design,kungara,nguo,kofia,kitenge'.split(','),
response:[
{
"designer": "Trendy Joys Designs",
"bio": "Best ladies designs in nairobi"
},
{
"designer": "Blah Fashions",
"bio": "Blah Blah Blah"
}
]
}
];
//set channel
var channel = 'NAIROBI';
//load index - NOT important, you will often never use this command
// jj.loadIndex(channel);
//Now add some new commands
jj.addCommands(docs, channel);
//this is how you remove commands from index
// jj.removeCommands(docs, channel);
// ready for some awesome queries
q= 'price is less than 500';
//run query
var results= jj.jibu(q, channel);
//log results
console.log(JSON.stringify(results,0,4));
// we can even do some interesting numeric queries to return lesser than, equal to or even greater than values
//the beauty of this search type is that it allows data entry in plain text or using mathematical symbols
// ready for some awesome queries
q= 'price of clothes is less than five thousand and more than 600';
//run query
var results= jj.jibu(q, channel);
//log results
console.log(JSON.stringify(results,0,4));
//this retuns the following results with the following metadata
/**
"meta": {
"query": "price of clothes is less than five thousand and more than 600",
"time": "66ms",
"results_count": 1,
"query_path": [
{
"query": "price of clothes is less than five thousand and more than 600",
"type": "Full Text",
"results_count": 2
},
{
"query": "number < 5000 && number > 600",
"type": "Numeric Reduce",
"results_count": 1
}
],
"mercy_results": false
}
**/
q= 'price <= 900';
//run query
var results= jj.jibu(q, channel);
//log results
console.log(JSON.stringify(results,0,4));
The query_path field tells us how the query was run.
If Full Text Query had found no results, the numericQuery would have automatically changed its role to that of expanding results rather than reducing.
FAQs
Easy module to create channels and their commands then retrieve the same with the power of Full Text search and synonym query expansion. Built to be independent, ready to run and use with multiple languages.
The npm package jibu receives a total of 7 weekly downloads. As such, jibu popularity was classified as not popular.
We found that jibu 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.