Socket
Socket
Sign inDemoInstall

base

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base - npm Package Compare versions

Comparing version 0.11.1 to 0.11.2

README.md

40

index.js
'use strict';
var util = require('util');
var utils = require('./utils');
var define = require('define-property');
var CacheBase = require('cache-base');
var Emitter = require('component-emitter');
var isObject = require('isobject');
var merge = require('mixin-deep');
var pascal = require('pascalcase');
var cu = require('class-utils');

@@ -11,3 +17,3 @@ /**

function namespace(name) {
var Cache = name ? utils.Cache.namespace(name) : utils.Cache;
var Cache = name ? CacheBase.namespace(name) : CacheBase;
var fns = [];

@@ -58,3 +64,3 @@

utils.Emitter(Base);
Emitter(Base);

@@ -66,3 +72,3 @@ /**

Base.prototype.initBase = function(config, options) {
this.options = utils.merge({}, this.options, options);
this.options = merge({}, this.options, options);
this.cache = this.cache || {};

@@ -74,3 +80,3 @@ this.define('registered', {});

this.define('_callbacks', this._callbacks);
if (utils.isObject(config)) {
if (isObject(config)) {
this.visit('set', config);

@@ -109,3 +115,3 @@ }

}
this.define('is' + utils.pascal(name), true);
this.define('is' + pascal(name), true);
this.define('_name', name);

@@ -197,6 +203,6 @@ this.define('_appname', name);

Base.prototype.define = function(key, val) {
if (utils.isObject(key)) {
if (isObject(key)) {
return this.visit('define', key);
}
utils.define(this, key, val);
define(this, key, val);
return this;

@@ -293,3 +299,3 @@ };

utils.define(Base, 'use', function(fn) {
define(Base, 'use', function(fn) {
fns.push(fn);

@@ -308,3 +314,3 @@ return Base;

utils.define(Base, 'run', function(obj, prop, arr) {
define(Base, 'run', function(obj, prop, arr) {
var len = arr.length, i = 0;

@@ -339,6 +345,6 @@ while (len--) {

utils.define(Base, 'extend', utils.cu.extend(Base, function(Ctor, Parent) {
define(Base, 'extend', cu.extend(Base, function(Ctor, Parent) {
Ctor.prototype.mixins = Ctor.prototype.mixins || [];
utils.define(Ctor, 'mixin', function(fn) {
define(Ctor, 'mixin', function(fn) {
var mixin = fn(Ctor.prototype, Ctor);

@@ -351,3 +357,3 @@ if (typeof mixin === 'function') {

utils.define(Ctor, 'mixins', function(Child) {
define(Ctor, 'mixins', function(Child) {
Base.run(Child, 'mixin', Ctor.prototype.mixins);

@@ -383,3 +389,3 @@ return Ctor;

utils.define(Base, 'mixin', function(fn) {
define(Base, 'mixin', function(fn) {
var mixin = fn(Base.prototype, Base);

@@ -406,3 +412,3 @@ if (typeof mixin === 'function') {

utils.define(Base, 'mixins', function(Child) {
define(Base, 'mixins', function(Child) {
Base.run(Child, 'mixin', Base.prototype.mixins);

@@ -426,4 +432,4 @@ return Base;

utils.define(Base, 'inherit', utils.cu.inherit);
utils.define(Base, 'bubble', utils.cu.bubble);
define(Base, 'inherit', cu.inherit);
define(Base, 'bubble', cu.bubble);
return Base;

@@ -430,0 +436,0 @@ }

{
"name": "base",
"description": "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.",
"version": "0.11.1",
"version": "0.11.2",
"homepage": "https://github.com/node-base/base",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Brian Woodward (https://github.com/doowb)"
],
"maintainers": [

@@ -14,2 +11,9 @@ "Brian Woodward (https://github.com/doowb)",

],
"contributors": [
"Brian Woodward (https://twitter.com/doowb)",
"John O'Donnell (https://github.com/criticalmash)",
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
"tunnckoCore (https://i.am.charlike.online)",
"(https://github.com/wtgtybhertgeghgtwtg)"
],
"repository": "node-base/base",

@@ -21,4 +25,3 @@ "bugs": {

"files": [
"index.js",
"utils.js"
"index.js"
],

@@ -33,10 +36,8 @@ "main": "index.js",

"dependencies": {
"arr-union": "^3.1.0",
"cache-base": "^0.8.4",
"class-utils": "^0.3.4",
"cache-base": "^1.0.1",
"class-utils": "^0.3.5",
"component-emitter": "^1.2.1",
"define-property": "^0.2.5",
"isobject": "^2.1.0",
"lazy-cache": "^2.0.1",
"mixin-deep": "^1.1.3",
"define-property": "^1.0.0",
"isobject": "^3.0.1",
"mixin-deep": "^1.2.0",
"pascalcase": "^0.1.1"

@@ -46,13 +47,14 @@ },

"gulp": "^3.9.1",
"gulp-eslint": "^2.0.0",
"gulp-format-md": "^0.1.9",
"gulp-istanbul": "^0.10.4",
"gulp-mocha": "^2.2.0",
"gulp-eslint": "^4.0.0",
"gulp-format-md": "^1.0.0",
"gulp-istanbul": "^1.1.2",
"gulp-mocha": "^3.0.1",
"helper-coverage": "^0.1.3",
"mocha": "^2.5.3",
"should": "^9.0.1",
"through2": "^2.0.1",
"verb-readme-generator": "^0.1.13"
"mocha": "^3.5.0",
"should": "^13.0.1",
"through2": "^2.0.3",
"verb-generate-readme": "^0.6.0"
},
"keywords": [
"base",
"boilerplate",

@@ -106,5 +108,4 @@ "cache",

"scaffold",
"verb",
"static-extend",
"verb-readme-generator"
"verb"
],

@@ -111,0 +112,0 @@ "lint": {

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