Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongoose-auto-api.models

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-auto-api.models - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

14

js/tests/test.js

@@ -1,2 +0,2 @@

var assert, info, should;
var assert, models, should;

@@ -7,3 +7,3 @@ assert = require('chai').assert;

info = require('../index');
models = require('../index');

@@ -13,15 +13,15 @@ // Main import

it('Returns object', function() {
return info.should.be.a('object');
return models.should.be.a('object');
});
it('User Auth info exists', function() {
return assert.equal(info.userAuth != null, true);
return assert.equal(models.userAuth != null, true);
});
it('User Auth "model" key exists', function() {
return assert.equal(info.userAuth.modelName != null, true);
return assert.equal(models.userAuth.modelName != null, true);
});
it('Secret Key info exists', function() {
return assert.equal(info.secretKey != null, true);
return assert.equal(models.secretKey != null, true);
});
return it('Secret Key "model" key exists', function() {
return assert.equal(info.secretKey.modelName != null, true);
return assert.equal(models.secretKey.modelName != null, true);
});

@@ -28,0 +28,0 @@ });

@@ -11,3 +11,3 @@ var bcrypt, encryptField, listCreateHook, listCreateMethod, saveEncryptHook, saveEncryptMethod, updateEncryptHook, updateEncryptMethod;

SALT_WORK_FACTOR = 10;
if (recType = 'doc' && !doc.isModified(key) && !doc.isNew) {
if (recType = 'doc' && !rec.isModified(key) && !rec.isNew) {
return;

@@ -17,3 +17,3 @@ }

salt = (await bcrypt.genSalt(SALT_WORK_FACTOR));
doc[key] = (await bcrypt.hash(doc[key], salt));
rec[key] = (await bcrypt.hash(rec[key], salt));
} catch (error1) {

@@ -26,3 +26,3 @@ error = error1;

}
return doc;
return rec;
};

@@ -29,0 +29,0 @@

{
"name": "mongoose-auto-api.models",
"version": "0.0.1",
"version": "0.0.2",
"description": "Automatic Mongoose REST API - Module to generate models",

@@ -49,2 +49,2 @@ "main": "./js/index.js",

}
}
}

@@ -1,2 +0,2 @@

# Mongoose Auto API - Models Modules
# Mongoose Auto API - Models Module
[![Build Status](https://travis-ci.org/edmundpf/mongoose-auto-api-models.svg?branch=master)](https://travis-ci.org/edmundpf/mongoose-auto-api-models)

@@ -3,0 +3,0 @@ [![npm version](https://badge.fury.io/js/mongoose-auto-api.models.svg)](https://badge.fury.io/js/mongoose-auto-api.models)

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