inhabit-module-base
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -11,17 +11,17 @@ "use strict"; | ||
function InhabitModuleBase(configuration, dependencies) { | ||
if (!configuration) { | ||
throw Error('No configuration presented.'); | ||
} | ||
if (!configuration) { | ||
throw Error('No configuration presented.'); | ||
} | ||
if (!dependencies) { | ||
throw Error('No dependencies presented.'); | ||
} | ||
if (!dependencies) { | ||
throw Error('No dependencies presented.'); | ||
} | ||
if (!this.configuration) { | ||
this.configuration = {}; | ||
} | ||
if (!this.configuration) { | ||
this.configuration = {}; | ||
} | ||
this.name = this.constructor.name; | ||
this.name = this.constructor.name; | ||
this.inject(dependencies).configure(configuration); | ||
this.inject(dependencies).configure(configuration); | ||
} | ||
@@ -70,9 +70,9 @@ | ||
InhabitModuleBase.prototype.inject = function (dependencies) { | ||
this.$ = dependencies.$; | ||
this.handlebars = dependencies.handlebars; | ||
this.textClassificationService = dependencies.textClassificationService; | ||
this.searchEngineService = dependencies.searchEngineService; | ||
this.events = dependencies.events || { on: console.log.bind(console, 'There is not events') }; | ||
return this; | ||
this.$ = dependencies.$; | ||
this.handlebars = dependencies.handlebars; | ||
this.textClassificationService = dependencies.textClassificationService; | ||
this.searchEngineService = dependencies.searchEngineService; | ||
this.events = dependencies.events || { on: console.log.bind(console, 'There is not events') }; | ||
this.resourcesRoot = dependencies.resourcesRoot || "build/resources/"; | ||
return this; | ||
}; | ||
@@ -85,5 +85,5 @@ | ||
InhabitModuleBase.prototype.configure = function (configuration) { | ||
this.$.extend(true, this.configuration, configuration); | ||
this.$.extend(true, this.configuration, configuration); | ||
return this; | ||
return this; | ||
}; | ||
@@ -97,9 +97,9 @@ | ||
InhabitModuleBase.publish = function (Module) { | ||
MODULE_STORAGE.push(Module); | ||
MODULE_STORAGE.push(Module); | ||
}; | ||
function mustBeOverrided() { | ||
throw Error('This method must be overrided.'); | ||
throw Error('This method must be overrided.'); | ||
} | ||
module.exports = InhabitModuleBase; |
@@ -0,0 +0,0 @@ /** |
{ | ||
"name": "inhabit-module-base", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "A Base Module class for InHabit.", | ||
@@ -5,0 +5,0 @@ "main": "build/InhabitModuleBase.js", |
@@ -0,0 +0,0 @@ # inhabit-module-base [![npm version](https://badge.fury.io/js/inhabit-module-base.svg)](https://badge.fury.io/js/inhabit-module-base) [![Inline docs](http://inch-ci.org/github/rand0me/node-inhabit-module-base.svg?branch=master)](http://inch-ci.org/github/rand0me/node-inhabit-module-base) [![Code Climate](https://codeclimate.com/github/rand0me/node-inhabit-module-base/badges/gpa.svg)](https://codeclimate.com/github/rand0me/node-inhabit-module-base) |
@@ -74,3 +74,3 @@ "use strict"; | ||
this.events = dependencies.events || {on: console.log.bind(console, 'There is not events')}; | ||
this.resourcesRoot = dependencies.resourcesRoot || "build/resources/"; | ||
return this; | ||
@@ -77,0 +77,0 @@ }; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ var InhabitModuleBase = require('../src/InhabitModuleBase'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
28494
218
16
1