Comparing version 1.0.1 to 1.0.2
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.register = function (server, options, next) { | ||
exports.register = (server, options, next) => { | ||
const k7 = new K7(server, options); | ||
@@ -10,0 +10,0 @@ |
@@ -19,3 +19,2 @@ 'use strict'; | ||
options = options || {}; | ||
Hoek.assert(this instanceof internals.K7, 'K7 must be instantiated using new'); | ||
@@ -47,9 +46,9 @@ Hoek.assert(server, 'server required to create k7'); | ||
Hoek.assert(typeof Adapter === 'function', adapterName + ' must be a constructor function'); | ||
Hoek.assert(typeof Adapter === 'function', `${adapterName} must be a constructor function`); | ||
this.adapter = new Adapter(this.settings); | ||
Hoek.assert(typeof this.adapter.load === 'function', adapterName + ' must be a load function'); | ||
Hoek.assert(typeof this.adapter.load === 'function', `${adapterName} must be a load function`); | ||
this.database = this.adapter.load(); | ||
}; |
{ | ||
"name": "k7", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Connect your database with Hapijs made easy", | ||
@@ -28,4 +28,3 @@ "main": "index.js", | ||
"glob": "7.0.x", | ||
"hoek": "3.0.x", | ||
"snyk": "^1.11.3" | ||
"hoek": "3.0.x" | ||
}, | ||
@@ -32,0 +31,0 @@ "peerDependencies": { |
@@ -57,3 +57,3 @@ ![k7 Logo](images/k7.png) | ||
* **connectionOptions**: Is a common option, where you will specify the options passed for the connector. | ||
* **models**: Is a comoon option, where you will specify how we can find your models. **Default**: `models/*.js` In this option you can pass a String or an Array of files or glob patterns like: `**/model.js` | ||
* **models**: Is a common option, where you will specify how we can find your models. **Default**: `models/*.js` In this option you can pass a String or an Array of files or glob patterns like: `**/model.js` | ||
@@ -60,0 +60,0 @@ ## Where my Models? |
@@ -32,3 +32,3 @@ 'use strict'; | ||
register: require('../index'), | ||
options: options | ||
options | ||
}; | ||
@@ -57,3 +57,3 @@ | ||
register: require('../index'), | ||
options: options | ||
options | ||
}; | ||
@@ -81,3 +81,3 @@ | ||
register: require('../index'), | ||
options: options | ||
options | ||
}; | ||
@@ -84,0 +84,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
86998
- Removedsnyk@^1.11.3
- Removed@sentry-internal/tracing@7.120.0(transitive)
- Removed@sentry/core@7.120.0(transitive)
- Removed@sentry/integrations@7.120.0(transitive)
- Removed@sentry/node@7.120.0(transitive)
- Removed@sentry/types@7.120.0(transitive)
- Removed@sentry/utils@7.120.0(transitive)
- Removedboolean@3.2.0(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removeddetect-node@2.1.0(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes6-error@4.1.1(transitive)
- Removedescape-string-regexp@4.0.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedglobal-agent@3.0.0(transitive)
- Removedglobalthis@1.0.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhasown@2.0.2(transitive)
- Removedimmediate@3.0.6(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedlie@3.1.1(transitive)
- Removedlocalforage@1.10.0(transitive)
- Removedmatcher@3.0.0(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedroarr@2.15.4(transitive)
- Removedsemver@7.6.3(transitive)
- Removedsemver-compare@1.0.0(transitive)
- Removedserialize-error@7.0.1(transitive)
- Removedsnyk@1.1294.2(transitive)
- Removedsprintf-js@1.1.3(transitive)
- Removedtype-fest@0.13.1(transitive)