0.0.1 • Published 7 years ago

tag-reg v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Пример использования

    var dataStore = new TagRegistry();
    
    dataStore.set(["K1", "K2"], "AAA");
    console.log(dataStore.get(["K1", "K2"])); // AAA
    console.log(dataStore.get(["K2", "K1"])); // AAA

    dataStore.set(["K1", "K3", "K2"], "BBB");
    console.log(dataStore.get(["K1", "K2", "K3"])); // BBB
    console.log(dataStore.get(["K1", "K3", "K2"])); // BBB
    console.log(dataStore.get(["K2", "K1", "K3"])); // BBB
    console.log(dataStore.get(["K2", "K3", "K1"])); // BBB
    console.log(dataStore.get(["K3", "K1", "K2"])); // BBB
    console.log(dataStore.get(["K3", "K2", "K1"])); // BBB

Вывод:

$ node example1.js 
AAA
AAA
BBB
BBB
BBB
BBB
BBB
BBB