Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tracker-utils",
"version": "1.6.13",
"version": "1.6.14",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Synchronize package-lock.json with the new version.

The package.json version has been bumped to 1.6.14, but codebase context indicates that package-lock.json is out of sync (still reflecting 1.6.5).

Please run npm install (or use npm version) to update the lockfile and prevent version metadata drift during downstream installations.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 3, Synchronize the package-lock.json metadata with the
1.6.14 version declared in package.json by running npm install or npm version.
Ensure both the lockfile root package version and any corresponding package
metadata reflect 1.6.14 without changing dependency versions unnecessarily.

"description": "Tracker Utils",
"main": "index.js",
"scripts": {
Expand Down
19 changes: 19 additions & 0 deletions src/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@ class Redis {
return this._execute('hmget', key, toGetFields);
}

/**
* Delete one or more fields from a redis hash
* @param {String} key Hash key
* @param {...String} fields Field names to delete
*/
async hdel(key, ...fields) {
if (_.size(fields) == 0) {
return 0;
}
// Support passing a single array of fields: hdel(key, [f1, f2])
if (_.size(fields) == 1 && _.isArray(fields[0])) {
fields = fields[0];
}
if (_.size(fields) == 0) {
return 0;
}
return this._execute('hdel', key, ...fields);
}

async get(key) {
return this._execute('get', key);
}
Expand Down
Loading