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

larvituser

Package Overview
Dependencies
Maintainers
3
Versions
266
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

larvituser - npm Package Compare versions

Comparing version 0.13.3 to 0.13.4

2

package.json
{
"name": "larvituser",
"version": "0.13.3",
"version": "0.13.4",
"author": {

@@ -5,0 +5,0 @@ "name": "Mikael 'Lilleman' Göransson",

@@ -442,3 +442,3 @@ 'use strict';

tasks.push(function (cb) {
userLib.create('user1', 'somepassword', { 'role' : ['customer', 'user']}, function (err, user) {
userLib.create('user1', 'somepassword', { 'role' : ['customer', 'user'], 'veryUnique': ['muchUnique']}, function (err, user) {
uuids.push(user.uuid);

@@ -539,2 +539,18 @@ if (err) throw err;

it('Get list of users where fieldData exists', function (done) {
const users = new userLib.Users();
users.matchExistingFields = ['veryUnique'];
users.get(function (err, userList, totalElements) {
if (err) throw err;
assert.strictEqual(totalElements, 1);
assert.strictEqual(userList.length, 1);
assert.strictEqual(userList[0].username, 'user1');
done();
});
});
it('Get users by uuid', function (done) {

@@ -541,0 +557,0 @@ const users = new userLib.Users();

@@ -49,2 +49,15 @@ 'use strict';

tasks.push(function (cb) {
if (that.matchExistingFields !== undefined) {
sqlWhere += 'AND uuid IN (\n';
sqlWhere += 'SELECT DISTINCT userUuid FROM user_users_data WHERE fieldUuid IN (\n';
sqlWhere += 'SELECT uuid FROM user_data_fields WHERE\n';
for (let i = 0; that.matchExistingFields[i] !== undefined; i ++) {
sqlWhere += 'name = ? OR ';
dbFields.push(that.matchExistingFields[i]);
}
sqlWhere = sqlWhere.substring(0, sqlWhere.length - 4) + '))\n';
}
if (that.matchAllFields !== undefined) {

@@ -51,0 +64,0 @@ for (const field in that.matchAllFields) {

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