Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

dbcombo-client

2.0.5 • Public • Published

DBComboClient

NPM Version NPM Downloads NPM License

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

Install

npm i dbcombo-client

DownloadsWeekly Downloads

27

Version

2.0.5

License

MIT

Unpacked Size

734 kB

Total Files

18

Last publish

Collaborators

  • avatar