
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@feiye/easy-model
Advanced tools
MySQL easy model, easy query.
npm i @feiye/easy-model
const mysql = require('mysql');
const { model, Query } = require('@feiye/easy-model');
const conn = mysql.createConnection({
host: '127.0.0.1',
user: 'root',
database: 'test',
});
const query = new Query(conn);
const User = model('user');
// create
const id = await User(query).create({ name: 'yf', age: 11 });
console.log(id); // 1
// get and update
const user = await User(query).findByPk(id);
user.name = 'yefei';
user.save();
// find all
const users = await User(query).find().all();
// find limit
const users = await User(query).find().limit(10).all();
// find by where
const users = await User(query).find({ age: 11 }).all();
// get all count
const count = await User(query).count();
// get count by where
const count = await User(query).count({ age: 11 });
// or
const count = await User(query).find({ age: 11 }).count();
// exists
const exists = await User(query).exists({ id: 1 });
// or
const exists = await User(query).find({ age: 11 }).exists();
// update
const updatedCount = await User(query).find({ id: 1 }).update({ name: 'yf', age: 11 });
// delete
const user = await User(query).findByPk(1);
const deletedCount = await user.delete();
// transaction
query.transaction(() => {
const user = await User(query).findByPk(1);
await user.delete();
});
FAQs
MySQL easy model, easy query.
The npm package @feiye/easy-model receives a total of 0 weekly downloads. As such, @feiye/easy-model popularity was classified as not popular.
We found that @feiye/easy-model 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.