diff --git a/README.md b/README.md index 1eb6628..a49d881 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,10 @@ console.log(sortId1 < sortId2); console.log(sortId2 < sortId3); ``` +**Base Encoding and Lexicographic Order** + +It is important to realise that not all base-encodings preserve lexicographic sort order. The UUID (hex-encoding) and `base58btc` alphabet does, but the `base64` alphabet does not. Make sure to pick an appropriate base encoding if you are expecting to compare the `IdSortable` as base-encoded strings. + ## Installation ```sh diff --git a/docs/assets/js/search.js b/docs/assets/js/search.js index 05d6a29..9a47648 100644 --- a/docs/assets/js/search.js +++ b/docs/assets/js/search.js @@ -1 +1 @@ -window.searchData = {"kinds":{"1":"Module","64":"Function","128":"Class","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","4194304":"Type alias","16777216":"Reference"},"rows":[{"id":0,"kind":1,"name":"Id","url":"modules/Id.html","classes":"tsd-kind-module"},{"id":1,"kind":128,"name":"default","url":"classes/Id.default.html","classes":"tsd-kind-class tsd-parent-kind-module","parent":"Id"},{"id":2,"kind":2048,"name":"create","url":"classes/Id.default.html#create","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"Id.default"},{"id":3,"kind":512,"name":"constructor","url":"classes/Id.default.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited","parent":"Id.default"},{"id":4,"kind":2048,"name":"toString","url":"classes/Id.default.html#toString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-overwrite","parent":"Id.default"},{"id":5,"kind":2048,"name":"[toPrimitive]","url":"classes/Id.default.html#_toPrimitive_","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Id.default"},{"id":6,"kind":4194304,"name":"Id","url":"modules/Id.html#Id-1","classes":"tsd-kind-type-alias tsd-parent-kind-module","parent":"Id"},{"id":7,"kind":1,"name":"IdDeterministic","url":"modules/IdDeterministic.html","classes":"tsd-kind-module"},{"id":8,"kind":128,"name":"default","url":"classes/IdDeterministic.default.html","classes":"tsd-kind-class tsd-parent-kind-module","parent":"IdDeterministic"},{"id":9,"kind":512,"name":"constructor","url":"classes/IdDeterministic.default.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"IdDeterministic.default"},{"id":10,"kind":1024,"name":"namespaceData","url":"classes/IdDeterministic.default.html#namespaceData","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdDeterministic.default"},{"id":11,"kind":2048,"name":"get","url":"classes/IdDeterministic.default.html#get","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdDeterministic.default"},{"id":12,"kind":2048,"name":"next","url":"classes/IdDeterministic.default.html#next","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdDeterministic.default"},{"id":13,"kind":2048,"name":"[iterator]","url":"classes/IdDeterministic.default.html#_iterator_","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdDeterministic.default"},{"id":14,"kind":1,"name":"IdRandom","url":"modules/IdRandom.html","classes":"tsd-kind-module"},{"id":15,"kind":128,"name":"default","url":"classes/IdRandom.default.html","classes":"tsd-kind-class tsd-parent-kind-module","parent":"IdRandom"},{"id":16,"kind":512,"name":"constructor","url":"classes/IdRandom.default.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"IdRandom.default"},{"id":17,"kind":1024,"name":"randomSource","url":"classes/IdRandom.default.html#randomSource","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdRandom.default"},{"id":18,"kind":65536,"name":"__type","url":"classes/IdRandom.default.html#__type","classes":"tsd-kind-type-literal tsd-parent-kind-class","parent":"IdRandom.default"},{"id":19,"kind":2048,"name":"get","url":"classes/IdRandom.default.html#get","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdRandom.default"},{"id":20,"kind":2048,"name":"next","url":"classes/IdRandom.default.html#next","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdRandom.default"},{"id":21,"kind":2048,"name":"[iterator]","url":"classes/IdRandom.default.html#_iterator_","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdRandom.default"},{"id":22,"kind":1,"name":"IdSortable","url":"modules/IdSortable.html","classes":"tsd-kind-module"},{"id":23,"kind":128,"name":"default","url":"classes/IdSortable.default.html","classes":"tsd-kind-class tsd-parent-kind-module","parent":"IdSortable"},{"id":24,"kind":512,"name":"constructor","url":"classes/IdSortable.default.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"IdSortable.default"},{"id":25,"kind":1024,"name":"randomSource","url":"classes/IdSortable.default.html#randomSource","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":26,"kind":65536,"name":"__type","url":"classes/IdSortable.default.html#__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-class","parent":"IdSortable.default"},{"id":27,"kind":1024,"name":"clock","url":"classes/IdSortable.default.html#clock","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":28,"kind":65536,"name":"__type","url":"classes/IdSortable.default.html#__type","classes":"tsd-kind-type-literal tsd-parent-kind-class","parent":"IdSortable.default"},{"id":29,"kind":1024,"name":"nodeBits","url":"classes/IdSortable.default.html#nodeBits","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":30,"kind":1024,"name":"lastTs","url":"classes/IdSortable.default.html#lastTs","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":31,"kind":1024,"name":"_lastId","url":"classes/IdSortable.default.html#_lastId","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":32,"kind":1024,"name":"seqCounter","url":"classes/IdSortable.default.html#seqCounter","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":33,"kind":262144,"name":"lastId","url":"classes/IdSortable.default.html#lastId","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"IdSortable.default"},{"id":34,"kind":2048,"name":"get","url":"classes/IdSortable.default.html#get","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdSortable.default"},{"id":35,"kind":2048,"name":"next","url":"classes/IdSortable.default.html#next","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdSortable.default"},{"id":36,"kind":2048,"name":"[iterator]","url":"classes/IdSortable.default.html#_iterator_","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdSortable.default"},{"id":37,"kind":64,"name":"extractTs","url":"modules/IdSortable.html#extractTs","classes":"tsd-kind-function tsd-parent-kind-module","parent":"IdSortable"},{"id":38,"kind":64,"name":"extractSeq","url":"modules/IdSortable.html#extractSeq","classes":"tsd-kind-function tsd-parent-kind-module","parent":"IdSortable"},{"id":39,"kind":64,"name":"extractRand","url":"modules/IdSortable.html#extractRand","classes":"tsd-kind-function tsd-parent-kind-module","parent":"IdSortable"},{"id":40,"kind":1,"name":"index","url":"modules/index.html","classes":"tsd-kind-module"},{"id":41,"kind":1,"name":"utils","url":"modules/utils.html","classes":"tsd-kind-module"},{"id":42,"kind":64,"name":"randomBytes","url":"modules/utils.html#randomBytes","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":43,"kind":64,"name":"randomBits","url":"modules/utils.html#randomBits","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":44,"kind":64,"name":"nodeBits","url":"modules/utils.html#nodeBits","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":45,"kind":64,"name":"timeSource","url":"modules/utils.html#timeSource","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":46,"kind":64,"name":"take","url":"modules/utils.html#take","classes":"tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter","parent":"utils"},{"id":47,"kind":64,"name":"toString","url":"modules/utils.html#toString","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":48,"kind":64,"name":"fromString","url":"modules/utils.html#fromString","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":49,"kind":64,"name":"toUUID","url":"modules/utils.html#toUUID","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":50,"kind":64,"name":"fromUUID","url":"modules/utils.html#fromUUID","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":51,"kind":64,"name":"toMultibase","url":"modules/utils.html#toMultibase","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":52,"kind":64,"name":"fromMultibase","url":"modules/utils.html#fromMultibase","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":53,"kind":64,"name":"toBuffer","url":"modules/utils.html#toBuffer","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":54,"kind":64,"name":"fromBuffer","url":"modules/utils.html#fromBuffer","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":55,"kind":64,"name":"bytes2hex","url":"modules/utils.html#bytes2hex","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":56,"kind":64,"name":"hex2bytes","url":"modules/utils.html#hex2bytes","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":57,"kind":64,"name":"bytes2bits","url":"modules/utils.html#bytes2bits","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":58,"kind":64,"name":"bits2bytes","url":"modules/utils.html#bits2bytes","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":59,"kind":64,"name":"dec2bits","url":"modules/utils.html#dec2bits","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":60,"kind":64,"name":"dec2hex","url":"modules/utils.html#dec2hex","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":61,"kind":64,"name":"strChunks","url":"modules/utils.html#strChunks","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":62,"kind":64,"name":"roundPrecise","url":"modules/utils.html#roundPrecise","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":63,"kind":64,"name":"toFixedPoint","url":"modules/utils.html#toFixedPoint","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":64,"kind":64,"name":"fromFixedPoint","url":"modules/utils.html#fromFixedPoint","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":65,"kind":4194304,"name":"MultibaseFormats","url":"modules/utils.html#MultibaseFormats","classes":"tsd-kind-type-alias tsd-parent-kind-module","parent":"utils"},{"id":66,"kind":16777216,"name":"IdRandom","url":"modules/index.html#IdRandom","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"index"},{"id":67,"kind":16777216,"name":"IdDeterministic","url":"modules/index.html#IdDeterministic","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"index"},{"id":68,"kind":16777216,"name":"IdSortable","url":"modules/index.html#IdSortable","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"index"},{"id":69,"kind":16777216,"name":"utils","url":"modules/index.html#utils","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"index"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,27.586]],["parent/0",[]],["name/1",[1,27.586]],["parent/1",[0,2.657]],["name/2",[2,38.572]],["parent/2",[3,2.657]],["name/3",[4,27.586]],["parent/3",[3,2.657]],["name/4",[5,33.464]],["parent/4",[3,2.657]],["name/5",[6,38.572]],["parent/5",[3,2.657]],["name/6",[0,27.586]],["parent/6",[0,2.657]],["name/7",[7,30.099]],["parent/7",[]],["name/8",[1,27.586]],["parent/8",[7,2.899]],["name/9",[4,27.586]],["parent/9",[8,2.463]],["name/10",[9,38.572]],["parent/10",[8,2.463]],["name/11",[10,30.099]],["parent/11",[8,2.463]],["name/12",[11,30.099]],["parent/12",[8,2.463]],["name/13",[12,30.099]],["parent/13",[8,2.463]],["name/14",[13,30.099]],["parent/14",[]],["name/15",[1,27.586]],["parent/15",[13,2.899]],["name/16",[4,27.586]],["parent/16",[14,2.303]],["name/17",[15,33.464]],["parent/17",[14,2.303]],["name/18",[16,30.099]],["parent/18",[14,2.303]],["name/19",[10,30.099]],["parent/19",[14,2.303]],["name/20",[11,30.099]],["parent/20",[14,2.303]],["name/21",[12,30.099]],["parent/21",[14,2.303]],["name/22",[17,23.909]],["parent/22",[]],["name/23",[1,27.586]],["parent/23",[17,2.303]],["name/24",[4,27.586]],["parent/24",[18,1.599]],["name/25",[15,33.464]],["parent/25",[18,1.599]],["name/26",[16,30.099]],["parent/26",[18,1.599]],["name/27",[19,38.572]],["parent/27",[18,1.599]],["name/28",[16,30.099]],["parent/28",[18,1.599]],["name/29",[20,33.464]],["parent/29",[18,1.599]],["name/30",[21,38.572]],["parent/30",[18,1.599]],["name/31",[22,38.572]],["parent/31",[18,1.599]],["name/32",[23,38.572]],["parent/32",[18,1.599]],["name/33",[24,38.572]],["parent/33",[18,1.599]],["name/34",[10,30.099]],["parent/34",[18,1.599]],["name/35",[11,30.099]],["parent/35",[18,1.599]],["name/36",[12,30.099]],["parent/36",[18,1.599]],["name/37",[25,38.572]],["parent/37",[17,2.303]],["name/38",[26,38.572]],["parent/38",[17,2.303]],["name/39",[27,38.572]],["parent/39",[17,2.303]],["name/40",[28,25.579]],["parent/40",[]],["name/41",[29,9.855]],["parent/41",[]],["name/42",[30,38.572]],["parent/42",[29,0.949]],["name/43",[31,38.572]],["parent/43",[29,0.949]],["name/44",[20,33.464]],["parent/44",[29,0.949]],["name/45",[32,38.572]],["parent/45",[29,0.949]],["name/46",[33,38.572]],["parent/46",[29,0.949]],["name/47",[5,33.464]],["parent/47",[29,0.949]],["name/48",[34,38.572]],["parent/48",[29,0.949]],["name/49",[35,38.572]],["parent/49",[29,0.949]],["name/50",[36,38.572]],["parent/50",[29,0.949]],["name/51",[37,38.572]],["parent/51",[29,0.949]],["name/52",[38,38.572]],["parent/52",[29,0.949]],["name/53",[39,38.572]],["parent/53",[29,0.949]],["name/54",[40,38.572]],["parent/54",[29,0.949]],["name/55",[41,38.572]],["parent/55",[29,0.949]],["name/56",[42,38.572]],["parent/56",[29,0.949]],["name/57",[43,38.572]],["parent/57",[29,0.949]],["name/58",[44,38.572]],["parent/58",[29,0.949]],["name/59",[45,38.572]],["parent/59",[29,0.949]],["name/60",[46,38.572]],["parent/60",[29,0.949]],["name/61",[47,38.572]],["parent/61",[29,0.949]],["name/62",[48,38.572]],["parent/62",[29,0.949]],["name/63",[49,38.572]],["parent/63",[29,0.949]],["name/64",[50,38.572]],["parent/64",[29,0.949]],["name/65",[51,38.572]],["parent/65",[29,0.949]],["name/66",[13,30.099]],["parent/66",[28,2.463]],["name/67",[7,30.099]],["parent/67",[28,2.463]],["name/68",[17,23.909]],["parent/68",[28,2.463]],["name/69",[29,9.855]],["parent/69",[28,2.463]]],"invertedIndex":[["__type",{"_index":16,"name":{"18":{},"26":{},"28":{}},"parent":{}}],["_lastid",{"_index":22,"name":{"31":{}},"parent":{}}],["bits2bytes",{"_index":44,"name":{"58":{}},"parent":{}}],["bytes2bits",{"_index":43,"name":{"57":{}},"parent":{}}],["bytes2hex",{"_index":41,"name":{"55":{}},"parent":{}}],["clock",{"_index":19,"name":{"27":{}},"parent":{}}],["constructor",{"_index":4,"name":{"3":{},"9":{},"16":{},"24":{}},"parent":{}}],["create",{"_index":2,"name":{"2":{}},"parent":{}}],["dec2bits",{"_index":45,"name":{"59":{}},"parent":{}}],["dec2hex",{"_index":46,"name":{"60":{}},"parent":{}}],["default",{"_index":1,"name":{"1":{},"8":{},"15":{},"23":{}},"parent":{}}],["extractrand",{"_index":27,"name":{"39":{}},"parent":{}}],["extractseq",{"_index":26,"name":{"38":{}},"parent":{}}],["extractts",{"_index":25,"name":{"37":{}},"parent":{}}],["frombuffer",{"_index":40,"name":{"54":{}},"parent":{}}],["fromfixedpoint",{"_index":50,"name":{"64":{}},"parent":{}}],["frommultibase",{"_index":38,"name":{"52":{}},"parent":{}}],["fromstring",{"_index":34,"name":{"48":{}},"parent":{}}],["fromuuid",{"_index":36,"name":{"50":{}},"parent":{}}],["get",{"_index":10,"name":{"11":{},"19":{},"34":{}},"parent":{}}],["hex2bytes",{"_index":42,"name":{"56":{}},"parent":{}}],["id",{"_index":0,"name":{"0":{},"6":{}},"parent":{"1":{},"6":{}}}],["id.default",{"_index":3,"name":{},"parent":{"2":{},"3":{},"4":{},"5":{}}}],["iddeterministic",{"_index":7,"name":{"7":{},"67":{}},"parent":{"8":{}}}],["iddeterministic.default",{"_index":8,"name":{},"parent":{"9":{},"10":{},"11":{},"12":{},"13":{}}}],["idrandom",{"_index":13,"name":{"14":{},"66":{}},"parent":{"15":{}}}],["idrandom.default",{"_index":14,"name":{},"parent":{"16":{},"17":{},"18":{},"19":{},"20":{},"21":{}}}],["idsortable",{"_index":17,"name":{"22":{},"68":{}},"parent":{"23":{},"37":{},"38":{},"39":{}}}],["idsortable.default",{"_index":18,"name":{},"parent":{"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"30":{},"31":{},"32":{},"33":{},"34":{},"35":{},"36":{}}}],["index",{"_index":28,"name":{"40":{}},"parent":{"66":{},"67":{},"68":{},"69":{}}}],["iterator",{"_index":12,"name":{"13":{},"21":{},"36":{}},"parent":{}}],["lastid",{"_index":24,"name":{"33":{}},"parent":{}}],["lastts",{"_index":21,"name":{"30":{}},"parent":{}}],["multibaseformats",{"_index":51,"name":{"65":{}},"parent":{}}],["namespacedata",{"_index":9,"name":{"10":{}},"parent":{}}],["next",{"_index":11,"name":{"12":{},"20":{},"35":{}},"parent":{}}],["nodebits",{"_index":20,"name":{"29":{},"44":{}},"parent":{}}],["randombits",{"_index":31,"name":{"43":{}},"parent":{}}],["randombytes",{"_index":30,"name":{"42":{}},"parent":{}}],["randomsource",{"_index":15,"name":{"17":{},"25":{}},"parent":{}}],["roundprecise",{"_index":48,"name":{"62":{}},"parent":{}}],["seqcounter",{"_index":23,"name":{"32":{}},"parent":{}}],["strchunks",{"_index":47,"name":{"61":{}},"parent":{}}],["take",{"_index":33,"name":{"46":{}},"parent":{}}],["timesource",{"_index":32,"name":{"45":{}},"parent":{}}],["tobuffer",{"_index":39,"name":{"53":{}},"parent":{}}],["tofixedpoint",{"_index":49,"name":{"63":{}},"parent":{}}],["tomultibase",{"_index":37,"name":{"51":{}},"parent":{}}],["toprimitive",{"_index":6,"name":{"5":{}},"parent":{}}],["tostring",{"_index":5,"name":{"4":{},"47":{}},"parent":{}}],["touuid",{"_index":35,"name":{"49":{}},"parent":{}}],["utils",{"_index":29,"name":{"41":{},"69":{}},"parent":{"42":{},"43":{},"44":{},"45":{},"46":{},"47":{},"48":{},"49":{},"50":{},"51":{},"52":{},"53":{},"54":{},"55":{},"56":{},"57":{},"58":{},"59":{},"60":{},"61":{},"62":{},"63":{},"64":{},"65":{}}}]],"pipeline":[]}} \ No newline at end of file +window.searchData = {"kinds":{"1":"Module","64":"Function","128":"Class","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","4194304":"Type alias","16777216":"Reference"},"rows":[{"id":0,"kind":1,"name":"Id","url":"modules/Id.html","classes":"tsd-kind-module"},{"id":1,"kind":128,"name":"default","url":"classes/Id.default.html","classes":"tsd-kind-class tsd-parent-kind-module","parent":"Id"},{"id":2,"kind":2048,"name":"create","url":"classes/Id.default.html#create","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"Id.default"},{"id":3,"kind":512,"name":"constructor","url":"classes/Id.default.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited","parent":"Id.default"},{"id":4,"kind":2048,"name":"toString","url":"classes/Id.default.html#toString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-overwrite","parent":"Id.default"},{"id":5,"kind":2048,"name":"[toPrimitive]","url":"classes/Id.default.html#_toPrimitive_","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Id.default"},{"id":6,"kind":4194304,"name":"Id","url":"modules/Id.html#Id-1","classes":"tsd-kind-type-alias tsd-parent-kind-module","parent":"Id"},{"id":7,"kind":1,"name":"IdDeterministic","url":"modules/IdDeterministic.html","classes":"tsd-kind-module"},{"id":8,"kind":128,"name":"default","url":"classes/IdDeterministic.default.html","classes":"tsd-kind-class tsd-parent-kind-module","parent":"IdDeterministic"},{"id":9,"kind":512,"name":"constructor","url":"classes/IdDeterministic.default.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"IdDeterministic.default"},{"id":10,"kind":1024,"name":"namespaceData","url":"classes/IdDeterministic.default.html#namespaceData","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdDeterministic.default"},{"id":11,"kind":2048,"name":"get","url":"classes/IdDeterministic.default.html#get","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdDeterministic.default"},{"id":12,"kind":2048,"name":"next","url":"classes/IdDeterministic.default.html#next","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdDeterministic.default"},{"id":13,"kind":2048,"name":"[iterator]","url":"classes/IdDeterministic.default.html#_iterator_","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdDeterministic.default"},{"id":14,"kind":1,"name":"IdRandom","url":"modules/IdRandom.html","classes":"tsd-kind-module"},{"id":15,"kind":128,"name":"default","url":"classes/IdRandom.default.html","classes":"tsd-kind-class tsd-parent-kind-module","parent":"IdRandom"},{"id":16,"kind":512,"name":"constructor","url":"classes/IdRandom.default.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"IdRandom.default"},{"id":17,"kind":1024,"name":"randomSource","url":"classes/IdRandom.default.html#randomSource","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdRandom.default"},{"id":18,"kind":65536,"name":"__type","url":"classes/IdRandom.default.html#__type","classes":"tsd-kind-type-literal tsd-parent-kind-class","parent":"IdRandom.default"},{"id":19,"kind":2048,"name":"get","url":"classes/IdRandom.default.html#get","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdRandom.default"},{"id":20,"kind":2048,"name":"next","url":"classes/IdRandom.default.html#next","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdRandom.default"},{"id":21,"kind":2048,"name":"[iterator]","url":"classes/IdRandom.default.html#_iterator_","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdRandom.default"},{"id":22,"kind":1,"name":"IdSortable","url":"modules/IdSortable.html","classes":"tsd-kind-module"},{"id":23,"kind":128,"name":"default","url":"classes/IdSortable.default.html","classes":"tsd-kind-class tsd-parent-kind-module","parent":"IdSortable"},{"id":24,"kind":512,"name":"constructor","url":"classes/IdSortable.default.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"IdSortable.default"},{"id":25,"kind":1024,"name":"randomSource","url":"classes/IdSortable.default.html#randomSource","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":26,"kind":65536,"name":"__type","url":"classes/IdSortable.default.html#__type-1","classes":"tsd-kind-type-literal tsd-parent-kind-class","parent":"IdSortable.default"},{"id":27,"kind":1024,"name":"clock","url":"classes/IdSortable.default.html#clock","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":28,"kind":65536,"name":"__type","url":"classes/IdSortable.default.html#__type","classes":"tsd-kind-type-literal tsd-parent-kind-class","parent":"IdSortable.default"},{"id":29,"kind":1024,"name":"nodeBits","url":"classes/IdSortable.default.html#nodeBits","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":30,"kind":1024,"name":"lastTs","url":"classes/IdSortable.default.html#lastTs","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":31,"kind":1024,"name":"_lastId","url":"classes/IdSortable.default.html#_lastId","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":32,"kind":1024,"name":"seqCounter","url":"classes/IdSortable.default.html#seqCounter","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"IdSortable.default"},{"id":33,"kind":262144,"name":"lastId","url":"classes/IdSortable.default.html#lastId","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"IdSortable.default"},{"id":34,"kind":2048,"name":"get","url":"classes/IdSortable.default.html#get","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdSortable.default"},{"id":35,"kind":2048,"name":"next","url":"classes/IdSortable.default.html#next","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdSortable.default"},{"id":36,"kind":2048,"name":"[iterator]","url":"classes/IdSortable.default.html#_iterator_","classes":"tsd-kind-method tsd-parent-kind-class","parent":"IdSortable.default"},{"id":37,"kind":64,"name":"extractTs","url":"modules/IdSortable.html#extractTs","classes":"tsd-kind-function tsd-parent-kind-module","parent":"IdSortable"},{"id":38,"kind":64,"name":"extractSeq","url":"modules/IdSortable.html#extractSeq","classes":"tsd-kind-function tsd-parent-kind-module","parent":"IdSortable"},{"id":39,"kind":64,"name":"extractRand","url":"modules/IdSortable.html#extractRand","classes":"tsd-kind-function tsd-parent-kind-module","parent":"IdSortable"},{"id":40,"kind":1,"name":"index","url":"modules/index.html","classes":"tsd-kind-module"},{"id":41,"kind":1,"name":"utils","url":"modules/utils.html","classes":"tsd-kind-module"},{"id":42,"kind":64,"name":"randomBytes","url":"modules/utils.html#randomBytes","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":43,"kind":64,"name":"randomBits","url":"modules/utils.html#randomBits","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":44,"kind":64,"name":"nodeBits","url":"modules/utils.html#nodeBits","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":45,"kind":64,"name":"timeSource","url":"modules/utils.html#timeSource","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":46,"kind":64,"name":"take","url":"modules/utils.html#take","classes":"tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter","parent":"utils"},{"id":47,"kind":64,"name":"toString","url":"modules/utils.html#toString","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":48,"kind":64,"name":"fromString","url":"modules/utils.html#fromString","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":49,"kind":64,"name":"toUUID","url":"modules/utils.html#toUUID","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":50,"kind":64,"name":"fromUUID","url":"modules/utils.html#fromUUID","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":51,"kind":64,"name":"toMultibase","url":"modules/utils.html#toMultibase","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":52,"kind":64,"name":"fromMultibase","url":"modules/utils.html#fromMultibase","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":53,"kind":64,"name":"toBuffer","url":"modules/utils.html#toBuffer","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":54,"kind":64,"name":"fromBuffer","url":"modules/utils.html#fromBuffer","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":55,"kind":64,"name":"bytes2hex","url":"modules/utils.html#bytes2hex","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":56,"kind":64,"name":"hex2bytes","url":"modules/utils.html#hex2bytes","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":57,"kind":64,"name":"bytes2bits","url":"modules/utils.html#bytes2bits","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":58,"kind":64,"name":"bits2bytes","url":"modules/utils.html#bits2bytes","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":59,"kind":64,"name":"dec2bits","url":"modules/utils.html#dec2bits","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":60,"kind":64,"name":"dec2hex","url":"modules/utils.html#dec2hex","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":61,"kind":64,"name":"strChunks","url":"modules/utils.html#strChunks","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":62,"kind":64,"name":"roundPrecise","url":"modules/utils.html#roundPrecise","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":63,"kind":64,"name":"toFixedPoint","url":"modules/utils.html#toFixedPoint","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":64,"kind":64,"name":"fromFixedPoint","url":"modules/utils.html#fromFixedPoint","classes":"tsd-kind-function tsd-parent-kind-module","parent":"utils"},{"id":65,"kind":4194304,"name":"MultibaseFormats","url":"modules/utils.html#MultibaseFormats","classes":"tsd-kind-type-alias tsd-parent-kind-module","parent":"utils"},{"id":66,"kind":16777216,"name":"Id","url":"modules/index.html#Id","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"index"},{"id":67,"kind":16777216,"name":"IdRandom","url":"modules/index.html#IdRandom","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"index"},{"id":68,"kind":16777216,"name":"IdDeterministic","url":"modules/index.html#IdDeterministic","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"index"},{"id":69,"kind":16777216,"name":"IdSortable","url":"modules/index.html#IdSortable","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"index"},{"id":70,"kind":16777216,"name":"utils","url":"modules/index.html#utils","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"index"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,25.719]],["parent/0",[]],["name/1",[1,27.726]],["parent/1",[0,2.478]],["name/2",[2,38.712]],["parent/2",[3,2.672]],["name/3",[4,27.726]],["parent/3",[3,2.672]],["name/4",[5,33.604]],["parent/4",[3,2.672]],["name/5",[6,38.712]],["parent/5",[3,2.672]],["name/6",[0,25.719]],["parent/6",[0,2.478]],["name/7",[7,30.239]],["parent/7",[]],["name/8",[1,27.726]],["parent/8",[7,2.914]],["name/9",[4,27.726]],["parent/9",[8,2.478]],["name/10",[9,38.712]],["parent/10",[8,2.478]],["name/11",[10,30.239]],["parent/11",[8,2.478]],["name/12",[11,30.239]],["parent/12",[8,2.478]],["name/13",[12,30.239]],["parent/13",[8,2.478]],["name/14",[13,30.239]],["parent/14",[]],["name/15",[1,27.726]],["parent/15",[13,2.914]],["name/16",[4,27.726]],["parent/16",[14,2.317]],["name/17",[15,33.604]],["parent/17",[14,2.317]],["name/18",[16,30.239]],["parent/18",[14,2.317]],["name/19",[10,30.239]],["parent/19",[14,2.317]],["name/20",[11,30.239]],["parent/20",[14,2.317]],["name/21",[12,30.239]],["parent/21",[14,2.317]],["name/22",[17,24.049]],["parent/22",[]],["name/23",[1,27.726]],["parent/23",[17,2.317]],["name/24",[4,27.726]],["parent/24",[18,1.613]],["name/25",[15,33.604]],["parent/25",[18,1.613]],["name/26",[16,30.239]],["parent/26",[18,1.613]],["name/27",[19,38.712]],["parent/27",[18,1.613]],["name/28",[16,30.239]],["parent/28",[18,1.613]],["name/29",[20,33.604]],["parent/29",[18,1.613]],["name/30",[21,38.712]],["parent/30",[18,1.613]],["name/31",[22,38.712]],["parent/31",[18,1.613]],["name/32",[23,38.712]],["parent/32",[18,1.613]],["name/33",[24,38.712]],["parent/33",[18,1.613]],["name/34",[10,30.239]],["parent/34",[18,1.613]],["name/35",[11,30.239]],["parent/35",[18,1.613]],["name/36",[12,30.239]],["parent/36",[18,1.613]],["name/37",[25,38.712]],["parent/37",[17,2.317]],["name/38",[26,38.712]],["parent/38",[17,2.317]],["name/39",[27,38.712]],["parent/39",[17,2.317]],["name/40",[28,24.049]],["parent/40",[]],["name/41",[29,9.995]],["parent/41",[]],["name/42",[30,38.712]],["parent/42",[29,0.963]],["name/43",[31,38.712]],["parent/43",[29,0.963]],["name/44",[20,33.604]],["parent/44",[29,0.963]],["name/45",[32,38.712]],["parent/45",[29,0.963]],["name/46",[33,38.712]],["parent/46",[29,0.963]],["name/47",[5,33.604]],["parent/47",[29,0.963]],["name/48",[34,38.712]],["parent/48",[29,0.963]],["name/49",[35,38.712]],["parent/49",[29,0.963]],["name/50",[36,38.712]],["parent/50",[29,0.963]],["name/51",[37,38.712]],["parent/51",[29,0.963]],["name/52",[38,38.712]],["parent/52",[29,0.963]],["name/53",[39,38.712]],["parent/53",[29,0.963]],["name/54",[40,38.712]],["parent/54",[29,0.963]],["name/55",[41,38.712]],["parent/55",[29,0.963]],["name/56",[42,38.712]],["parent/56",[29,0.963]],["name/57",[43,38.712]],["parent/57",[29,0.963]],["name/58",[44,38.712]],["parent/58",[29,0.963]],["name/59",[45,38.712]],["parent/59",[29,0.963]],["name/60",[46,38.712]],["parent/60",[29,0.963]],["name/61",[47,38.712]],["parent/61",[29,0.963]],["name/62",[48,38.712]],["parent/62",[29,0.963]],["name/63",[49,38.712]],["parent/63",[29,0.963]],["name/64",[50,38.712]],["parent/64",[29,0.963]],["name/65",[51,38.712]],["parent/65",[29,0.963]],["name/66",[0,25.719]],["parent/66",[28,2.317]],["name/67",[13,30.239]],["parent/67",[28,2.317]],["name/68",[7,30.239]],["parent/68",[28,2.317]],["name/69",[17,24.049]],["parent/69",[28,2.317]],["name/70",[29,9.995]],["parent/70",[28,2.317]]],"invertedIndex":[["__type",{"_index":16,"name":{"18":{},"26":{},"28":{}},"parent":{}}],["_lastid",{"_index":22,"name":{"31":{}},"parent":{}}],["bits2bytes",{"_index":44,"name":{"58":{}},"parent":{}}],["bytes2bits",{"_index":43,"name":{"57":{}},"parent":{}}],["bytes2hex",{"_index":41,"name":{"55":{}},"parent":{}}],["clock",{"_index":19,"name":{"27":{}},"parent":{}}],["constructor",{"_index":4,"name":{"3":{},"9":{},"16":{},"24":{}},"parent":{}}],["create",{"_index":2,"name":{"2":{}},"parent":{}}],["dec2bits",{"_index":45,"name":{"59":{}},"parent":{}}],["dec2hex",{"_index":46,"name":{"60":{}},"parent":{}}],["default",{"_index":1,"name":{"1":{},"8":{},"15":{},"23":{}},"parent":{}}],["extractrand",{"_index":27,"name":{"39":{}},"parent":{}}],["extractseq",{"_index":26,"name":{"38":{}},"parent":{}}],["extractts",{"_index":25,"name":{"37":{}},"parent":{}}],["frombuffer",{"_index":40,"name":{"54":{}},"parent":{}}],["fromfixedpoint",{"_index":50,"name":{"64":{}},"parent":{}}],["frommultibase",{"_index":38,"name":{"52":{}},"parent":{}}],["fromstring",{"_index":34,"name":{"48":{}},"parent":{}}],["fromuuid",{"_index":36,"name":{"50":{}},"parent":{}}],["get",{"_index":10,"name":{"11":{},"19":{},"34":{}},"parent":{}}],["hex2bytes",{"_index":42,"name":{"56":{}},"parent":{}}],["id",{"_index":0,"name":{"0":{},"6":{},"66":{}},"parent":{"1":{},"6":{}}}],["id.default",{"_index":3,"name":{},"parent":{"2":{},"3":{},"4":{},"5":{}}}],["iddeterministic",{"_index":7,"name":{"7":{},"68":{}},"parent":{"8":{}}}],["iddeterministic.default",{"_index":8,"name":{},"parent":{"9":{},"10":{},"11":{},"12":{},"13":{}}}],["idrandom",{"_index":13,"name":{"14":{},"67":{}},"parent":{"15":{}}}],["idrandom.default",{"_index":14,"name":{},"parent":{"16":{},"17":{},"18":{},"19":{},"20":{},"21":{}}}],["idsortable",{"_index":17,"name":{"22":{},"69":{}},"parent":{"23":{},"37":{},"38":{},"39":{}}}],["idsortable.default",{"_index":18,"name":{},"parent":{"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"30":{},"31":{},"32":{},"33":{},"34":{},"35":{},"36":{}}}],["index",{"_index":28,"name":{"40":{}},"parent":{"66":{},"67":{},"68":{},"69":{},"70":{}}}],["iterator",{"_index":12,"name":{"13":{},"21":{},"36":{}},"parent":{}}],["lastid",{"_index":24,"name":{"33":{}},"parent":{}}],["lastts",{"_index":21,"name":{"30":{}},"parent":{}}],["multibaseformats",{"_index":51,"name":{"65":{}},"parent":{}}],["namespacedata",{"_index":9,"name":{"10":{}},"parent":{}}],["next",{"_index":11,"name":{"12":{},"20":{},"35":{}},"parent":{}}],["nodebits",{"_index":20,"name":{"29":{},"44":{}},"parent":{}}],["randombits",{"_index":31,"name":{"43":{}},"parent":{}}],["randombytes",{"_index":30,"name":{"42":{}},"parent":{}}],["randomsource",{"_index":15,"name":{"17":{},"25":{}},"parent":{}}],["roundprecise",{"_index":48,"name":{"62":{}},"parent":{}}],["seqcounter",{"_index":23,"name":{"32":{}},"parent":{}}],["strchunks",{"_index":47,"name":{"61":{}},"parent":{}}],["take",{"_index":33,"name":{"46":{}},"parent":{}}],["timesource",{"_index":32,"name":{"45":{}},"parent":{}}],["tobuffer",{"_index":39,"name":{"53":{}},"parent":{}}],["tofixedpoint",{"_index":49,"name":{"63":{}},"parent":{}}],["tomultibase",{"_index":37,"name":{"51":{}},"parent":{}}],["toprimitive",{"_index":6,"name":{"5":{}},"parent":{}}],["tostring",{"_index":5,"name":{"4":{},"47":{}},"parent":{}}],["touuid",{"_index":35,"name":{"49":{}},"parent":{}}],["utils",{"_index":29,"name":{"41":{},"70":{}},"parent":{"42":{},"43":{},"44":{},"45":{},"46":{},"47":{},"48":{},"49":{},"50":{},"51":{},"52":{},"53":{},"54":{},"55":{},"56":{},"57":{},"58":{},"59":{},"60":{},"61":{},"62":{},"63":{},"64":{},"65":{}}}]],"pipeline":[]}} \ No newline at end of file diff --git a/docs/classes/Id.default.html b/docs/classes/Id.default.html index bac633f..9935ceb 100644 --- a/docs/classes/Id.default.html +++ b/docs/classes/Id.default.html @@ -373,7 +373,7 @@
Base Encoding and Lexicographic Order
+It is important to realise that not all base-encodings preserve lexicographic sort order. The UUID (hex-encoding) and base58btc
alphabet does, but the base64
alphabet does not. Make sure to pick an appropriate base encoding if you are expecting to compare the IdSortable
as base-encoded strings.
IdInternal can be used as a string primitive - This type hack prevents TS from complaining + This type hack (as a number) prevents TS from complaining See: https://github.com/microsoft/TypeScript/issues/4538