【文件属性】:
文件名称:amd:AMD 的私有实现
文件大小:2KB
文件格式:ZIP
更新时间:2021-06-16 20:21:27
JavaScript
AMD
该模块实现了一个异步模块定义 API
例子
模块定义
amd . define ( 'MyCalculator' , [ ] , function ( ) {
function MyCalculator ( ) {
this . _value = 0 ;
}
MyCalculator . prototype . sum = function ( a , b ) {
if ( typeof b === 'undefined' ) {
this . _value += a ;
} else {
return a + b ;
}
} ;
MyCalculator . prototyp
【文件预览】:
amd-master
----amd.js(6KB)
----README.md(801B)