├── .gitignore ├── README.md ├── demo.js ├── index.js ├── lru.test.js ├── package-lock.json └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env 17 | *.local 18 | *.log 19 | *.log.gz 20 | 21 | # used by deploy-node-app 22 | tmp/ 23 | secrets/ 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LRU Cache 2 | 3 | ## Data Structures Used 4 | 1. Queue which is implemented using a doubly linked list. The maximum size of the queue will be equal to the total number of frames available (cache size). The most recently used pages will be near front end and least recently pages will be near the rear end. 5 | 2. A Hash with page number as key and address of the corresponding queue node as value. 6 | 7 | ### If you find this piece of work interesting, dont forget to give a `star` on github. 8 | 9 | ## Methods 10 | 11 | 1. `LRUCache.put(key, value)` : Add a key-value pair using this method. 12 | 2. `LRUCache.get(key)` : Returns the value for the key if present or returns `-1` if not. 13 | 3. `LRUCache.remove(key)` : Removes a key value pair, if present 14 | 4. `LRUCache.getCache()` : Fetches all the contents of the cache as a JSON Object. 15 | 5. `LRUCache.getKeysOfValue(val)` : Fetches all the keys with the provided value. 16 | 6. `LRUCache.getAllValues()` : Fetches all the values present in the Cache. 17 | 7. `LRUCache.getAllKeys()` : Fetches all the keys present in the Cache. 18 | 19 | ## Implementation 20 | ``` 21 | npm i lru-cache-js-map 22 | ``` 23 | 24 | ``` 25 | const LRUCache = require('lru-cache-js-map'); 26 | 27 | var cache = new LRUCache(100); 28 | 29 | for(var i=0; i < 100; i++){ 30 | cache.put(Math.floor(Math.random()*10), Math.random()*10000); 31 | } 32 | 33 | console.log(cache) 34 | ``` 35 | 36 | 37 | ## ! Happy Coding ! -------------------------------------------------------------------------------- /demo.js: -------------------------------------------------------------------------------- 1 | const LRUCache = require('./index'); 2 | 3 | var cache = new LRUCache(10); 4 | 5 | for(var i=0; i < 100; i++){ 6 | cache.put(Math.floor(Math.random()*100), Math.floor(Math.random()*10)); 7 | } 8 | 9 | console.log(cache.getAllValues()) 10 | // cache.getKeysOfValue(4); -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Doubly Linked List Implementation 3 | */ 4 | class Node { 5 | constructor(key, value, next = null, prev = null) { 6 | this.key = key; 7 | this.value = value; 8 | this.next = next; 9 | this.prev = prev; 10 | } 11 | } 12 | 13 | /** 14 | * @param {number} capacity 15 | */ 16 | var LRUCache = function(capacity) { 17 | this.size = 0; 18 | this.limit = capacity; 19 | this.cache = {}; 20 | this.head = null; 21 | this.tail = null; 22 | }; 23 | 24 | /** 25 | * @param {number} key 26 | * @return {number} 27 | */ 28 | LRUCache.prototype.get = function(key) { 29 | 30 | if(this.cache[key]){ 31 | const value = this.cache[key].value; 32 | 33 | // node removed from it's position and cache 34 | this.remove(key) 35 | 36 | // this.size--; 37 | // write node again to the head of LinkedList to make it most recently used 38 | this.put(key, value); 39 | 40 | return value; 41 | } 42 | return -1; 43 | }; 44 | 45 | /** 46 | * @param {number} key 47 | * @param {number} value 48 | * @return {void} 49 | */ 50 | LRUCache.prototype.put = function(key, value) { 51 | 52 | if(!this.head){ 53 | this.head = this.tail = new Node(key, value); 54 | }else{ 55 | const node = new Node(key, value, this.head); 56 | this.head.prev = node; 57 | this.head = node; 58 | } 59 | 60 | //Update the cache map 61 | if(this.cache[key]){ 62 | this.remove(key); 63 | this.cache[key] = this.head; 64 | this.size++; 65 | }else{ 66 | this.ensureLimit(); 67 | this.cache[key] = this.head; 68 | this.size++; 69 | } 70 | 71 | }; 72 | 73 | LRUCache.prototype.ensureLimit = function() { 74 | if(this.size == this.limit){ 75 | this.remove(this.tail.key); 76 | } 77 | }; 78 | 79 | LRUCache.prototype.remove = function(key) { 80 | const node = this.cache[key]; 81 | 82 | if(node == undefined) return; 83 | // console.log(node) 84 | 85 | if(node.prev !== null){ 86 | node.prev.next = node.next; 87 | }else{ 88 | this.head = node.next; 89 | } 90 | 91 | if(node.next !== null){ 92 | node.next.prev = node.prev; 93 | }else{ 94 | this.tail = node.prev 95 | } 96 | 97 | delete this.cache[key]; 98 | this.size--; 99 | }; 100 | 101 | LRUCache.prototype.getCache = function() { 102 | let contents = {}; 103 | for(let i in this.cache){ 104 | contents[i] = this.cache[i].value; 105 | } 106 | return contents; 107 | } 108 | 109 | 110 | LRUCache.prototype.getKeysOfValue = function(val){ 111 | let keys = []; 112 | for(let i in this.cache){ 113 | if(this.cache[i].value === val) 114 | keys.push(this.cache[i].key) 115 | } 116 | return keys; 117 | } 118 | 119 | LRUCache.prototype.getAllValues = function(){ 120 | let values = []; 121 | for(let i in this.cache){ 122 | values.push(this.cache[i].value) 123 | } 124 | return values; 125 | } 126 | 127 | LRUCache.prototype.getAllKeys = function(){ 128 | let keys = []; 129 | for(let i in this.cache){ 130 | keys.push(this.cache[i].key) 131 | } 132 | return keys; 133 | } 134 | 135 | module.exports = LRUCache; 136 | 137 | -------------------------------------------------------------------------------- /lru.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | const LRUCache = require('./index'); 3 | 4 | 5 | describe("Testing LRU Cache", () => { 6 | before(() => { 7 | console.log( "Starting all tests" ); 8 | }); 9 | 10 | after(() => { 11 | console.log( "Tests Over" ); 12 | }); 13 | 14 | describe("Test 1", () => { 15 | let Cache = new LRUCache(5); 16 | beforeEach(() => { 17 | Cache.put(1, "k1"); 18 | Cache.put(2, "k2"); 19 | Cache.put(3, "k3"); 20 | }) 21 | 22 | it("Cache.getAllValues() : Returns [k1, k2, k3]", () => { 23 | let correctRes = ['k1', 'k2', 'k3']; 24 | let actualRes = Cache.getAllValues(); 25 | for(let i=0; i < 3; i++){ 26 | assert.equal(correctRes[i], actualRes[i]); 27 | } 28 | }) 29 | 30 | it("Cache.getAllKeys() : Returns [1, 2, 3]", () => { 31 | let correctRes = [1, 2, 3]; 32 | let actualRes = Cache.getAllKeys(); 33 | for(let i=0; i < 3; i++){ 34 | assert.equal(correctRes[i], actualRes[i]); 35 | } 36 | }) 37 | 38 | it("Cache.getCache() : Returns {1: k1, 2: k2, 3: k3}", () => { 39 | let correctRes = {1: "k1", 2: "k2", 3: "k3"}; 40 | let actualRes = Cache.getCache(); 41 | for(let i=0; i < 3; i++){ 42 | assert.equal(correctRes[i], actualRes[i]); 43 | } 44 | }) 45 | 46 | it("Cache.getAllValues() : Returns [k1, k2, k3]", () => { 47 | Cache.put(4, 'k4'); 48 | let correctRes = ['k1', 'k2', 'k3', 'k4']; 49 | let actualRes = Cache.getAllValues(); 50 | for(let i=0; i < 4; i++){ 51 | assert.equal(correctRes[i], actualRes[i]); 52 | } 53 | }) 54 | 55 | }) 56 | }) -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lru-cache-js-map", 3 | "version": "1.0.6", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@ungap/promise-all-settled": { 8 | "version": "1.1.2", 9 | "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", 10 | "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" 11 | }, 12 | "ansi-colors": { 13 | "version": "4.1.1", 14 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 15 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" 16 | }, 17 | "ansi-regex": { 18 | "version": "3.0.0", 19 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", 20 | "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" 21 | }, 22 | "ansi-styles": { 23 | "version": "4.3.0", 24 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 25 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 26 | "requires": { 27 | "color-convert": "^2.0.1" 28 | } 29 | }, 30 | "anymatch": { 31 | "version": "3.1.2", 32 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 33 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 34 | "requires": { 35 | "normalize-path": "^3.0.0", 36 | "picomatch": "^2.0.4" 37 | } 38 | }, 39 | "argparse": { 40 | "version": "2.0.1", 41 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 42 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" 43 | }, 44 | "balanced-match": { 45 | "version": "1.0.2", 46 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 47 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 48 | }, 49 | "binary-extensions": { 50 | "version": "2.2.0", 51 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 52 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" 53 | }, 54 | "brace-expansion": { 55 | "version": "1.1.11", 56 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 57 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 58 | "requires": { 59 | "balanced-match": "^1.0.0", 60 | "concat-map": "0.0.1" 61 | } 62 | }, 63 | "braces": { 64 | "version": "3.0.2", 65 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 66 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 67 | "requires": { 68 | "fill-range": "^7.0.1" 69 | } 70 | }, 71 | "browser-stdout": { 72 | "version": "1.3.1", 73 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 74 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" 75 | }, 76 | "camelcase": { 77 | "version": "6.2.0", 78 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", 79 | "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==" 80 | }, 81 | "chalk": { 82 | "version": "4.1.2", 83 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 84 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 85 | "requires": { 86 | "ansi-styles": "^4.1.0", 87 | "supports-color": "^7.1.0" 88 | }, 89 | "dependencies": { 90 | "supports-color": { 91 | "version": "7.2.0", 92 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 93 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 94 | "requires": { 95 | "has-flag": "^4.0.0" 96 | } 97 | } 98 | } 99 | }, 100 | "chokidar": { 101 | "version": "3.5.2", 102 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", 103 | "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", 104 | "requires": { 105 | "anymatch": "~3.1.2", 106 | "braces": "~3.0.2", 107 | "fsevents": "~2.3.2", 108 | "glob-parent": "~5.1.2", 109 | "is-binary-path": "~2.1.0", 110 | "is-glob": "~4.0.1", 111 | "normalize-path": "~3.0.0", 112 | "readdirp": "~3.6.0" 113 | } 114 | }, 115 | "cliui": { 116 | "version": "7.0.4", 117 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 118 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 119 | "requires": { 120 | "string-width": "^4.2.0", 121 | "strip-ansi": "^6.0.0", 122 | "wrap-ansi": "^7.0.0" 123 | }, 124 | "dependencies": { 125 | "ansi-regex": { 126 | "version": "5.0.0", 127 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 128 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" 129 | }, 130 | "is-fullwidth-code-point": { 131 | "version": "3.0.0", 132 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 133 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" 134 | }, 135 | "string-width": { 136 | "version": "4.2.2", 137 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 138 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 139 | "requires": { 140 | "emoji-regex": "^8.0.0", 141 | "is-fullwidth-code-point": "^3.0.0", 142 | "strip-ansi": "^6.0.0" 143 | } 144 | }, 145 | "strip-ansi": { 146 | "version": "6.0.0", 147 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 148 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 149 | "requires": { 150 | "ansi-regex": "^5.0.0" 151 | } 152 | } 153 | } 154 | }, 155 | "color-convert": { 156 | "version": "2.0.1", 157 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 158 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 159 | "requires": { 160 | "color-name": "~1.1.4" 161 | } 162 | }, 163 | "color-name": { 164 | "version": "1.1.4", 165 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 166 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 167 | }, 168 | "concat-map": { 169 | "version": "0.0.1", 170 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 171 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 172 | }, 173 | "debug": { 174 | "version": "4.3.1", 175 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", 176 | "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", 177 | "requires": { 178 | "ms": "2.1.2" 179 | }, 180 | "dependencies": { 181 | "ms": { 182 | "version": "2.1.2", 183 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 184 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 185 | } 186 | } 187 | }, 188 | "decamelize": { 189 | "version": "4.0.0", 190 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 191 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" 192 | }, 193 | "diff": { 194 | "version": "5.0.0", 195 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", 196 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==" 197 | }, 198 | "emoji-regex": { 199 | "version": "8.0.0", 200 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 201 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" 202 | }, 203 | "escalade": { 204 | "version": "3.1.1", 205 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 206 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" 207 | }, 208 | "escape-string-regexp": { 209 | "version": "4.0.0", 210 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 211 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" 212 | }, 213 | "fill-range": { 214 | "version": "7.0.1", 215 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 216 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 217 | "requires": { 218 | "to-regex-range": "^5.0.1" 219 | } 220 | }, 221 | "find-up": { 222 | "version": "5.0.0", 223 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 224 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 225 | "requires": { 226 | "locate-path": "^6.0.0", 227 | "path-exists": "^4.0.0" 228 | } 229 | }, 230 | "flat": { 231 | "version": "5.0.2", 232 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 233 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==" 234 | }, 235 | "fs.realpath": { 236 | "version": "1.0.0", 237 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 238 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 239 | }, 240 | "fsevents": { 241 | "version": "2.3.2", 242 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 243 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 244 | "optional": true 245 | }, 246 | "get-caller-file": { 247 | "version": "2.0.5", 248 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 249 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" 250 | }, 251 | "glob": { 252 | "version": "7.1.7", 253 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", 254 | "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", 255 | "requires": { 256 | "fs.realpath": "^1.0.0", 257 | "inflight": "^1.0.4", 258 | "inherits": "2", 259 | "minimatch": "^3.0.4", 260 | "once": "^1.3.0", 261 | "path-is-absolute": "^1.0.0" 262 | } 263 | }, 264 | "glob-parent": { 265 | "version": "5.1.2", 266 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 267 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 268 | "requires": { 269 | "is-glob": "^4.0.1" 270 | } 271 | }, 272 | "growl": { 273 | "version": "1.10.5", 274 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 275 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" 276 | }, 277 | "has-flag": { 278 | "version": "4.0.0", 279 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 280 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" 281 | }, 282 | "he": { 283 | "version": "1.2.0", 284 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 285 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" 286 | }, 287 | "inflight": { 288 | "version": "1.0.6", 289 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 290 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 291 | "requires": { 292 | "once": "^1.3.0", 293 | "wrappy": "1" 294 | } 295 | }, 296 | "inherits": { 297 | "version": "2.0.4", 298 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 299 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 300 | }, 301 | "is-binary-path": { 302 | "version": "2.1.0", 303 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 304 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 305 | "requires": { 306 | "binary-extensions": "^2.0.0" 307 | } 308 | }, 309 | "is-extglob": { 310 | "version": "2.1.1", 311 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 312 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" 313 | }, 314 | "is-fullwidth-code-point": { 315 | "version": "2.0.0", 316 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 317 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" 318 | }, 319 | "is-glob": { 320 | "version": "4.0.1", 321 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 322 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 323 | "requires": { 324 | "is-extglob": "^2.1.1" 325 | } 326 | }, 327 | "is-number": { 328 | "version": "7.0.0", 329 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 330 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" 331 | }, 332 | "is-plain-obj": { 333 | "version": "2.1.0", 334 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 335 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" 336 | }, 337 | "is-unicode-supported": { 338 | "version": "0.1.0", 339 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 340 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" 341 | }, 342 | "isexe": { 343 | "version": "2.0.0", 344 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 345 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" 346 | }, 347 | "js-yaml": { 348 | "version": "4.1.0", 349 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 350 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 351 | "requires": { 352 | "argparse": "^2.0.1" 353 | } 354 | }, 355 | "locate-path": { 356 | "version": "6.0.0", 357 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 358 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 359 | "requires": { 360 | "p-locate": "^5.0.0" 361 | } 362 | }, 363 | "log-symbols": { 364 | "version": "4.1.0", 365 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 366 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 367 | "requires": { 368 | "chalk": "^4.1.0", 369 | "is-unicode-supported": "^0.1.0" 370 | } 371 | }, 372 | "minimatch": { 373 | "version": "3.0.4", 374 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 375 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 376 | "requires": { 377 | "brace-expansion": "^1.1.7" 378 | } 379 | }, 380 | "mocha": { 381 | "version": "9.1.1", 382 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.1.tgz", 383 | "integrity": "sha512-0wE74YMgOkCgBUj8VyIDwmLUjTsS13WV1Pg7l0SHea2qzZzlq7MDnfbPsHKcELBRk3+izEVkRofjmClpycudCA==", 384 | "requires": { 385 | "@ungap/promise-all-settled": "1.1.2", 386 | "ansi-colors": "4.1.1", 387 | "browser-stdout": "1.3.1", 388 | "chokidar": "3.5.2", 389 | "debug": "4.3.1", 390 | "diff": "5.0.0", 391 | "escape-string-regexp": "4.0.0", 392 | "find-up": "5.0.0", 393 | "glob": "7.1.7", 394 | "growl": "1.10.5", 395 | "he": "1.2.0", 396 | "js-yaml": "4.1.0", 397 | "log-symbols": "4.1.0", 398 | "minimatch": "3.0.4", 399 | "ms": "2.1.3", 400 | "nanoid": "3.1.23", 401 | "serialize-javascript": "6.0.0", 402 | "strip-json-comments": "3.1.1", 403 | "supports-color": "8.1.1", 404 | "which": "2.0.2", 405 | "wide-align": "1.1.3", 406 | "workerpool": "6.1.5", 407 | "yargs": "16.2.0", 408 | "yargs-parser": "20.2.4", 409 | "yargs-unparser": "2.0.0" 410 | } 411 | }, 412 | "ms": { 413 | "version": "2.1.3", 414 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 415 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 416 | }, 417 | "nanoid": { 418 | "version": "3.1.23", 419 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", 420 | "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==" 421 | }, 422 | "normalize-path": { 423 | "version": "3.0.0", 424 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 425 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" 426 | }, 427 | "once": { 428 | "version": "1.4.0", 429 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 430 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 431 | "requires": { 432 | "wrappy": "1" 433 | } 434 | }, 435 | "p-limit": { 436 | "version": "3.1.0", 437 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 438 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 439 | "requires": { 440 | "yocto-queue": "^0.1.0" 441 | } 442 | }, 443 | "p-locate": { 444 | "version": "5.0.0", 445 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 446 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 447 | "requires": { 448 | "p-limit": "^3.0.2" 449 | } 450 | }, 451 | "path-exists": { 452 | "version": "4.0.0", 453 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 454 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" 455 | }, 456 | "path-is-absolute": { 457 | "version": "1.0.1", 458 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 459 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 460 | }, 461 | "picomatch": { 462 | "version": "2.3.0", 463 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", 464 | "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" 465 | }, 466 | "randombytes": { 467 | "version": "2.1.0", 468 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 469 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 470 | "requires": { 471 | "safe-buffer": "^5.1.0" 472 | } 473 | }, 474 | "readdirp": { 475 | "version": "3.6.0", 476 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 477 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 478 | "requires": { 479 | "picomatch": "^2.2.1" 480 | } 481 | }, 482 | "require-directory": { 483 | "version": "2.1.1", 484 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 485 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" 486 | }, 487 | "safe-buffer": { 488 | "version": "5.2.1", 489 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 490 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" 491 | }, 492 | "serialize-javascript": { 493 | "version": "6.0.0", 494 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 495 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 496 | "requires": { 497 | "randombytes": "^2.1.0" 498 | } 499 | }, 500 | "string-width": { 501 | "version": "2.1.1", 502 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", 503 | "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", 504 | "requires": { 505 | "is-fullwidth-code-point": "^2.0.0", 506 | "strip-ansi": "^4.0.0" 507 | } 508 | }, 509 | "strip-ansi": { 510 | "version": "4.0.0", 511 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", 512 | "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", 513 | "requires": { 514 | "ansi-regex": "^3.0.0" 515 | } 516 | }, 517 | "strip-json-comments": { 518 | "version": "3.1.1", 519 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 520 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" 521 | }, 522 | "supports-color": { 523 | "version": "8.1.1", 524 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 525 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 526 | "requires": { 527 | "has-flag": "^4.0.0" 528 | } 529 | }, 530 | "to-regex-range": { 531 | "version": "5.0.1", 532 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 533 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 534 | "requires": { 535 | "is-number": "^7.0.0" 536 | } 537 | }, 538 | "which": { 539 | "version": "2.0.2", 540 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 541 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 542 | "requires": { 543 | "isexe": "^2.0.0" 544 | } 545 | }, 546 | "wide-align": { 547 | "version": "1.1.3", 548 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", 549 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", 550 | "requires": { 551 | "string-width": "^1.0.2 || 2" 552 | } 553 | }, 554 | "workerpool": { 555 | "version": "6.1.5", 556 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz", 557 | "integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==" 558 | }, 559 | "wrap-ansi": { 560 | "version": "7.0.0", 561 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 562 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 563 | "requires": { 564 | "ansi-styles": "^4.0.0", 565 | "string-width": "^4.1.0", 566 | "strip-ansi": "^6.0.0" 567 | }, 568 | "dependencies": { 569 | "ansi-regex": { 570 | "version": "5.0.0", 571 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 572 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" 573 | }, 574 | "is-fullwidth-code-point": { 575 | "version": "3.0.0", 576 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 577 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" 578 | }, 579 | "string-width": { 580 | "version": "4.2.2", 581 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 582 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 583 | "requires": { 584 | "emoji-regex": "^8.0.0", 585 | "is-fullwidth-code-point": "^3.0.0", 586 | "strip-ansi": "^6.0.0" 587 | } 588 | }, 589 | "strip-ansi": { 590 | "version": "6.0.0", 591 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 592 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 593 | "requires": { 594 | "ansi-regex": "^5.0.0" 595 | } 596 | } 597 | } 598 | }, 599 | "wrappy": { 600 | "version": "1.0.2", 601 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 602 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 603 | }, 604 | "y18n": { 605 | "version": "5.0.8", 606 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 607 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" 608 | }, 609 | "yargs": { 610 | "version": "16.2.0", 611 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 612 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 613 | "requires": { 614 | "cliui": "^7.0.2", 615 | "escalade": "^3.1.1", 616 | "get-caller-file": "^2.0.5", 617 | "require-directory": "^2.1.1", 618 | "string-width": "^4.2.0", 619 | "y18n": "^5.0.5", 620 | "yargs-parser": "^20.2.2" 621 | }, 622 | "dependencies": { 623 | "ansi-regex": { 624 | "version": "5.0.0", 625 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 626 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" 627 | }, 628 | "is-fullwidth-code-point": { 629 | "version": "3.0.0", 630 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 631 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" 632 | }, 633 | "string-width": { 634 | "version": "4.2.2", 635 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 636 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 637 | "requires": { 638 | "emoji-regex": "^8.0.0", 639 | "is-fullwidth-code-point": "^3.0.0", 640 | "strip-ansi": "^6.0.0" 641 | } 642 | }, 643 | "strip-ansi": { 644 | "version": "6.0.0", 645 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 646 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 647 | "requires": { 648 | "ansi-regex": "^5.0.0" 649 | } 650 | } 651 | } 652 | }, 653 | "yargs-parser": { 654 | "version": "20.2.4", 655 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", 656 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" 657 | }, 658 | "yargs-unparser": { 659 | "version": "2.0.0", 660 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 661 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 662 | "requires": { 663 | "camelcase": "^6.0.0", 664 | "decamelize": "^4.0.0", 665 | "flat": "^5.0.2", 666 | "is-plain-obj": "^2.1.0" 667 | } 668 | }, 669 | "yocto-queue": { 670 | "version": "0.1.0", 671 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 672 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" 673 | } 674 | } 675 | } 676 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lru-cache-js-map", 3 | "version": "1.0.7", 4 | "description": "An implementation of LRU Cache using Doubly Linked Lists and Maps with O(1) read and write time.", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "mocha lru.test.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/ahtrahdis7/lru-cache-js.git" 12 | }, 13 | "dependencies": { 14 | "mocha": "^9.1.1" 15 | }, 16 | "keywords": [ 17 | "LRU", 18 | "Cache", 19 | "Cache", 20 | "Javascript", 21 | "LRU", 22 | "Caching", 23 | "Implementaiton" 24 | ], 25 | "author": "Sidhartha Mallick", 26 | "license": "ISC", 27 | "bugs": { 28 | "url": "https://github.com/ahtrahdis7/lru-cache-js/issues" 29 | }, 30 | "homepage": "https://github.com/ahtrahdis7/lru-cache-js#readme" 31 | } 32 | --------------------------------------------------------------------------------