核心KDCore是数学的心脏KDFramework。它导出了构建KDFramework所有必要功能。

例子:


{ KDObject } = require 'kdf-core'

user = new KDObject { id: 'user-1', name: 'John Doe' }

message = new KDObject { id: 1, delegate: user, text: 'Hello world!' }

{ id } = message.getDelegate()

console.log(id)  // =>; 'user-1'

{ text } = message.getData()

console.log(text)  // =>; 'Hello world'

安装:


npm install kdf-core