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

mvom

Package Overview
Dependencies
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mvom - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

createConnection/index.js

4

CHANGELOG.md
# CHANGELOG.md
## 0.3.4
###### _2019-05-30_
- Add TypeScript declaration file. @abair91
## 0.3.3

@@ -3,0 +7,0 @@ ###### _2019-05-16_

2

compileModel/index.js

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

* @async
* @param {string[]} ids - Array of document identifiers
* @param {string|string[]} ids - Array of document identifiers
* @returns {Promise.<Model[]>} Array of model instances

@@ -79,0 +79,0 @@ * @throws {InvalidParameterError} An invalid parameter was passed to the function

@@ -33,2 +33,9 @@ 'use strict';

/**
* Source of the error - always "mvom"
* @member {string} source
* @memberof BaseError
* @instance
*/
this.source = 'mvom';
/**
* Name of the class that was being instantiated

@@ -35,0 +42,0 @@ * @member {string} className

@@ -6,8 +6,4 @@ 'use strict';

});
exports.Schema = exports.Errors = undefined;
exports.createConnection = exports.Schema = exports.Errors = undefined;
var _Connection = require('./Connection');
var _Connection2 = _interopRequireDefault(_Connection);
var _Errors = require('./Errors');

@@ -21,10 +17,6 @@

var _InvalidParameter = require('./Errors/InvalidParameter');
var _createConnection = require('./createConnection');
var _InvalidParameter2 = _interopRequireDefault(_InvalidParameter);
var _createConnection2 = _interopRequireDefault(_createConnection);
var _dummyLogger = require('./utils/dummyLogger');
var _dummyLogger2 = _interopRequireDefault(_dummyLogger);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -47,33 +39,3 @@

Schema: _Schema2.default,
/**
* Create a new connection instance
* @function createConnection
* @memberof mvom
* @param {string} connectionManagerUri - URI of the connection manager which faciliates access to the mv database
* @param {string} account - Database account that connection will be used against
* @param {Object} [options = {}]
* @param {Object} [options.logger] - Logger object used for emitting log messages. winston is recommended, but any object with methods conforming to the names of the standard npm log levels will work.
* @param {number} [options.cacheMaxAge=3600] - Maximum age, in seconds, of the cache of db server tier information
* @param {number} [options.timeout=0] - Request timeout, in milliseconds; defaults to no timeout
* @returns {Connection} Connection instance
* @throws {InvalidParameterError} An invalid parameter was passed to the function
*/
createConnection: (connectionManagerUri, account, { logger = _dummyLogger2.default, cacheMaxAge = 3600, timeout = 0 } = {}) => {
if (connectionManagerUri == null) {
throw new _InvalidParameter2.default({ parameterName: 'connectionManagerUri' });
}
if (account == null) {
throw new _InvalidParameter2.default({ parameterName: 'account' });
}
if (!Number.isInteger(cacheMaxAge)) {
throw new _InvalidParameter2.default({ parameterName: 'cacheMaxAge' });
}
if (!Number.isInteger(timeout)) {
throw new _InvalidParameter2.default({ parameterName: 'timeout' });
}
// do some stuff
return new _Connection2.default({ connectionManagerUri, account, logger, cacheMaxAge, timeout });
}
createConnection: _createConnection2.default
};

@@ -83,2 +45,3 @@

exports.Errors = _Errors2.default;
exports.Schema = _Schema2.default;
exports.Schema = _Schema2.default;
exports.createConnection = _createConnection2.default;
{
"name": "mvom",
"author": "STORIS",
"version": "0.3.3",
"version": "0.3.4",
"description": "Multivalue Object Mapper",

@@ -6,0 +6,0 @@ "main": "./index.js",

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

* @param {Object} [definition = {}] - Data definition
* @param {Number[]} [definition.path = null] - 0-indexed Array path
* @param {string} [definition.path = null] - 1-index string path
* @param {string} [definition.dictionary = null] - Multivalue dictionary id

@@ -57,0 +57,0 @@ * @param {Boolean|Function} [definition.required = false] Indicates that a value is required when validating

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