Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@insertish/zangodb
Advanced tools
ZangoDB is a MongoDB-like interface for HTML5 IndexedDB that supports most of the familiar filtering, projection, sorting, updating and aggregation features of MongoDB, for usage in the web browser.
let db = new zango.Db('mydb', { people: ['age'] });
let people = db.collection('people');
let docs = [
{ name: 'Frank', age: 20 },
{ name: 'Thomas', age: 33 },
{ name: 'Todd', age: 33 },
{ name: 'John', age: 28 },
{ name: 'Peter', age: 33 },
{ name: 'George', age: 28 }
];
people.insert(docs).then(() => {
return people.find({
name: { $ne: 'John' },
age: { $gt: 20 }
}).group({
_id: { age: '$age' },
count: { $sum: 1 }
}).project({
_id: 0,
age: '$_id.age'
}).sort({
age: -1
}).forEach(doc => console.log('doc:', doc));
}).catch(error => console.error(error));
Which outputs:
doc: { count: 3, age: 33 }
doc: { count: 1, age: 28 }
ZangoDB is available as an npm package, and the web-browser build can be downloaded here or embedded:
<script src="https://unpkg.com/zangodb@latest/dist/zangodb.min.js"></script>
For certain web browsers, such as Internet Explorer, the Babel polyfill is required and must be loaded before ZangoDB:
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.23.0/polyfill.min.js"></script>
ZangoDB then can be accessed using the global variable zango
.
To install ZangoDB for usage with node:
$ npm install zangodb
In both cases, an implementation of IndexedDB is required. For environments without a native implementation of IndexedDB, Fake IndexedDB can be used:
global.indexedDB = require('fake-indexeddb');
global.IDBKeyRange = require('fake-indexeddb/lib/FDBKeyRange');
The following filter operators are supported: $and
, $or
, $not
, $nor
, $eq
, $ne
, $gt
, $gte
, $lt
, $lte
, $in
, $nin
, $elemMatch
, $regex
, and $exists
.
Expression operators can be used in combination with the group and projection operators.
The following expression operators are supported: $literal
, $add
, $subtract
, $multiply
, $divide
, $mod
, $abs
, $ceil
, $floor
, $ln
, $log10
, $pow
, $sqrt
, $trunc
, $concat
, $toLower
, $toUpper
, $concatArrays
, $dayOfMonth
, $year
, $month
, $hour
, $minute
, $second
, and $millisecond
.
The following update operators are supported: $set
, $unset
, $rename
, $inc
, $mul
, $min
, $max
, $push
, $pop
, $pullAll
, $pull
, and $addToSet
.
The following group operators are supported: $sum
, $avg
, $min
, $max
, $push
, and $addToSet
.
The following aggregation pipeline stages are supported: $match
, $project
, $group
, $unwind
, $sort
, $skip
, and $limit
.
MIT, please view the LICENSE file.
FAQs
Fork of ZangoDB - MongoDB-like interface for HTML5 IndexedDB
The npm package @insertish/zangodb receives a total of 1 weekly downloads. As such, @insertish/zangodb popularity was classified as not popular.
We found that @insertish/zangodb 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.