underscore javascript工具库支持seajs模块化

2023-05-26,,

underscore是一个很有用的js工具库,但是好像默认不支持seajs模块化

新建一个文件例如叫做xx.js 谈后,键入

define(function(require,exports,module) {

    这里将underscore源代码复制进来

});

这样在使使用时

var _ = require('lib/xx');

console.info(_.VERSION);

就可以了,

underscore javascript工具库支持seajs模块化的相关教程结束。

《underscore javascript工具库支持seajs模块化.doc》

下载本文的Word格式文档,以方便收藏与打印。