Comparing version 0.11.1 to 0.11.2
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
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
32723
7
0
491
1
390
+ Addedassign-symbols@1.0.0(transitive)
+ Addedcache-base@1.0.1(transitive)
+ Addedcollection-visit@1.0.0(transitive)
+ Addeddefine-property@1.0.0(transitive)
+ Addedextend-shallow@3.0.2(transitive)
+ Addedhas-value@1.0.0(transitive)
+ Addedhas-values@1.0.0(transitive)
+ Addedis-descriptor@1.0.3(transitive)
+ Addedis-number@3.0.0(transitive)
+ Addedkind-of@4.0.0(transitive)
+ Addedmap-visit@1.0.0(transitive)
+ Addedobject-visit@1.0.1(transitive)
+ Addedset-value@2.0.1(transitive)
+ Addedsplit-string@3.1.0(transitive)
+ Addedunion-value@1.0.1(transitive)
+ Addedunset-value@1.0.0(transitive)
- Removedarr-union@^3.1.0
- Removedlazy-cache@^2.0.1
- Removedcache-base@0.8.5(transitive)
- Removedcollection-visit@0.2.3(transitive)
- Removedlazy-cache@2.0.2(transitive)
- Removedmap-visit@0.1.5(transitive)
- Removedobject-visit@0.3.4(transitive)
- Removedset-getter@0.1.1(transitive)
- Removedset-value@0.4.3(transitive)
- Removedunion-value@0.2.4(transitive)
- Removedunset-value@0.1.2(transitive)
Updatedcache-base@^1.0.1
Updatedclass-utils@^0.3.5
Updateddefine-property@^1.0.0
Updatedisobject@^3.0.1
Updatedmixin-deep@^1.2.0