MCPcopy Index your code
hub / github.com/aralejs/base

github.com/aralejs/base @1.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.1.1 ↗ · + Follow
25 symbols 54 edges 4 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Base


Build Status Coverage Status

Base 是一个基础类,提供 Class、Events、Attribute 和 Aspect 支持。


使用说明

extend Base.extend(properties)

基于 Base 创建子类。例子:

/* pig.js */
define(function(require, exports, module) {
   var Base = require('base');

   var Pig = Base.extend({
       initialize: function(name) {
           this.name = name;
       },
       talk: function() {
           alert('我是' + this.name);
       }
   });

   module.exports = Pig;
});

具体用法请参考:Class 使用文档

Base 与 Class 的关系

Base 是使用 Class 创建的一个基础类,默认混入了 EventsAttribute 等模块:

/* base.js */
define(function(require) {

    var Class = require('class');
    var Events = require('events');
    var Aspect = require('./aspect');
    var Attribute = require('./attribute');

    var Base = Class.create({
        Implements: [Events, Aspect, Attribute],

        initialize: function(config) {
            ...
        },

        ...
    });

    ...
});

具体用法请参考:

Core symbols most depended-on inside this repo

isPlainObject
called by 7
src/attribute.js
merge
called by 4
src/attribute.js
isString
called by 2
src/attribute.js
isWindow
called by 2
src/attribute.js
isEmptyObject
called by 2
src/attribute.js
copySpecialProps
called by 2
src/attribute.js
normalize
called by 2
src/attribute.js
isEmptyAttrValue
called by 2
src/attribute.js

Shape

Function 25

Languages

TypeScript100%

Modules by API surface

src/attribute.js17 symbols
tests/base-spec.js3 symbols
src/aspect.js3 symbols
src/base.js2 symbols

For agents

$ claude mcp add base \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact