This library is amazing, but it would be neat if I could also do:
docuri.stringify({
type: 'mytype',
id: 'myid',
subtype: 'mysubtype',
index: 'myindex',
version: 1
});
If you require the pouchdb-collate project, you could accomplish this:
var collate = require('pouchdb-collate');
collate.toIndexableString(2) < collate.toIndexableString(10); // true
In fact you could even stringify booleans or arrays or whatever you want. Ordering will be different for strings in PouchDB (ASCII vs ICU), but for numbers and booleans it should be the same across both. Then you could support semver:
docuri.stringify({
type: 'mytype',
id: 'myid',
subtype: 'mysubtype',
index: 'myindex',
version: [1, 10, 2]
});
This library is amazing, but it would be neat if I could also do:
If you require the pouchdb-collate project, you could accomplish this:
In fact you could even stringify booleans or arrays or whatever you want. Ordering will be different for strings in PouchDB (ASCII vs ICU), but for numbers and booleans it should be the same across both. Then you could support semver: