New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gengojs-core-modules

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gengojs-core-modules - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

10

CHANGELOG.md

@@ -0,1 +1,11 @@

2.1.0 / 2015-10-08
==================
* Release v2.1.0.
* Minor Update
Simplified plugify.
Updated tests.
* Update
Updated change log.
2.0.9 / 2015-10-08

@@ -2,0 +12,0 @@ ==================

56

lib/modules/plugify.js

@@ -12,33 +12,33 @@ import _ from 'lodash';

constructor(plugins, options, defaults) {
log.debug(`class: ${Plugify.name}`, `process: constructor`);
// Local options
this.options = {};
this.defaults = {};
// Initialize the plugins
this.plugins = (() => {
if (_.isEmpty(defaults)) {
_.forEach(['api', 'backend', 'parser', 'header', 'localize', 'router'], item => {
this.defaults[this.normalize(item)] = () => {};
log.debug(`class: ${Plugify.name}`, `process: constructor`);
// Local options
this.options = {};
this.defaults = {};
// Initialize the plugins
this.plugins = (() => {
if (_.isEmpty(defaults)) {
_.forEach(['api', 'backend', 'parser', 'header', 'localize', 'router'], item => {
this.defaults[this.normalize(item)] = () => {};
});
return this.defaults;
}
_.forOwn(defaults, (value, key) => {
if (_.isFunction(value) && _.isPlainObject(value()))
this.defaults[key] = value();
});
return this.defaults;
}
_.forOwn(defaults, (value, key) => {
if (_.isFunction(value) && _.isPlainObject(value()))
this.defaults[key] = value();
})();
this.register(plugins);
_.forOwn(this.plugins, (value, key) => {
var name = value.package ? value.package.name : '';
log.info(
`class: ${Plugify.name}`,
`plugins: name - ${name}, type - ${key}, typeof - ${typeof value}`);
});
return this.defaults;
})();
this.register(plugins);
_.forOwn(this.plugins, (value, key) => {
var name = value.package ? value.package.name : '';
log.info(
`class: ${Plugify.name}`,
`plugins: name - ${name}, type - ${key}, typeof - ${typeof value}`);
});
_.defaultsDeep(options, this.options);
}
/**
* Registers the plugin
* @param {Function | Array | Object} The plugin to register
*/
_.defaultsDeep(options, this.options);
}
/**
* Registers the plugin
* @param {Function | Array | Object} The plugin to register
*/
register(plugins) {

@@ -45,0 +45,0 @@ log.debug(`class: ${Plugify.name}`, `process: register`);

{
"name": "gengojs-core-modules",
"version": "2.1.0",
"version": "2.1.1",
"description": "gengo.js core modules is a set of modules that helps the core to function properly.",

@@ -5,0 +5,0 @@ "main": "src/modules/index.js",

@@ -30,13 +30,2 @@ 'use strict';

var Plugify = (function () {
/**
* plugins - The user's plugins ( [], function, {} )
* options - The user's options ( {} )
* defaults - The gengojs-default-pack ( { //...// }, {} )
*
* Psuedo code:
* case 1: 'plugins' may be an array of random plugins.
* -> assert that each plugin are properly shipped
* ->
*/
function Plugify(plugins, options, defaults) {

@@ -81,2 +70,7 @@ var _this = this;

/**
* Registers the plugin
* @param {Function | Array | Object} The plugin to register
*/
_createClass(Plugify, [{

@@ -121,3 +115,3 @@ key: 'register',

/**
* Sets the attributes in the plugin
* Sets the attributes of the plugin
* @param {Object} plugin The plugin to set its attributes.

@@ -124,0 +118,0 @@ * @param {Object} options The options to apply

Sorry, the diff of this file is not supported yet

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