dbcombo-client
v2.0.5
Published
dbcombo browser client
Downloads
39
Readme
DBComboClient
Install
npm install dbcombo-client --save
Useage
In NodeJS
var DBComboClient = require('dbcombo-client');
console.log(DBComboClient.stringify([0, 31, 93, 92, 94]));
console.log(DBComboClient.parse('Y31000000Y1Y1'));
// Y31000000Y1Y1
// [0, 31, 92, 93, 94]
Browser for Seajs
<script src="node_modules/dbcombo-client/dist/seajs-plugin.js"></script>
Seajs Config
seajs.config(
{
DBComboFileIndex: {}, // uri => {index, deps, file}
DBComboFile: 'https://www.example.com/db.js', // dbfile uri, append merge key width it
DBComboFileExtname: '_db', // ext dbfile uri, default "_db", set false to ignore
// Append extname for `db.js`.
// Do not use `db.js` directly for combo uri.
// A file can not be an folder and file simultaneously.
DBComboExcludes: function(uri){return false}, // RegExp / Function
DBComboDelayRequest: true, // delay request for merge more deps
DBComboDelayRequestMaxUri: 30, // not merge when over max length
});
Combo Uri Exapmle
https://www.example.com/db.js_db/Yg0W21X/W35X/W35X/W35X/W35X/V.js
Url parse server power by DBCombo