inhabit-module-base
Advanced tools
Comparing version 1.3.0 to 1.3.2
"use strict"; | ||
var usedContent = []; | ||
var MODULE_STORAGE = global.__ark_app__.apps; | ||
@@ -84,3 +83,3 @@ | ||
InhabitModuleBase.prototype.configure = function (configuration) { | ||
this.$.extend(true, this.configuration, configuration); | ||
this.$.extend(true, {}, this.configuration, configuration); | ||
@@ -87,0 +86,0 @@ return this; |
@@ -0,0 +0,0 @@ /** |
{ | ||
"name": "inhabit-module-base", | ||
"version": "1.3.0", | ||
"version": "1.3.2", | ||
"description": "A Base Module class for InHabit.", | ||
@@ -5,0 +5,0 @@ "main": "build/InhabitModuleBase.js", |
@@ -1,1 +0,25 @@ | ||
# inhabit-module-base | ||
# 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) | ||
A base module for building an InHabit Module. | ||
## Installation | ||
```sh | ||
npm install --save-dev inhabit-module-base | ||
``` | ||
## Usage ES5 | ||
```javascript | ||
var InhabitModuleBase = require('inhabit-module-base'); | ||
function MyModule(configuration, dependencies) { | ||
InhabitModuleBase.call(this, configuration, dependencies); | ||
... | ||
} | ||
MyModule.prototype = Object.create(InhabitModuleBase.prototype); | ||
MyModule.prototype.constructor = MyModule; | ||
... | ||
InhabitModuleBase.publish(MyModule); | ||
``` |
"use strict"; | ||
var usedContent = []; | ||
var MODULE_STORAGE = global.__ark_app__.apps; | ||
@@ -74,3 +73,3 @@ | ||
this.searchEngineService = dependencies.searchEngineService; | ||
this.events = dependencies.events || { on: console.log.bind(console, 'There is not events') }; | ||
this.events = dependencies.events || {on: console.log.bind(console, 'There is not events')}; | ||
@@ -84,4 +83,4 @@ return this; | ||
*/ | ||
InhabitModuleBase.prototype.configure = function(configuration) { | ||
this.$.extend(true, this.configuration, configuration); | ||
InhabitModuleBase.prototype.configure = function (configuration) { | ||
this.$.extend(true, {}, this.configuration, configuration); | ||
@@ -96,3 +95,3 @@ return this; | ||
*/ | ||
InhabitModuleBase.publish = function (Module) { | ||
InhabitModuleBase.publish = function (Module) { | ||
MODULE_STORAGE.push(Module); | ||
@@ -99,0 +98,0 @@ }; |
@@ -0,0 +0,0 @@ /** |
@@ -6,3 +6,2 @@ 'use strict'; | ||
var tape = require('tape'), | ||
InhabitModuleBase = require('../src/InhabitModuleBase'), | ||
TestModule = require('./TestModule'); | ||
@@ -9,0 +8,0 @@ |
@@ -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
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
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
25
25354
17
216