@@ -31,7 +31,7 @@ function LRUCache (limit) {
3131 */
3232LRUCache . prototype . put = function ( key , value ) {
3333 var entry = { key :key , value :value } ;
34- // Note: No protection agains replacing, and thus orphan entries. By design.
34+ // Note: No protection against replacing, and thus orphan entries. By design.
3535 this . _keymap [ key ] = entry ;
3636 if ( this . tail ) {
3737 // link previous tail to the new tail (entry)
@@ -123,7 +123,7 @@ LRUCache.prototype.get = function(key, returnEntry) {
123123
124124/**
125125 * Check if <key> is in the cache without registering recent use. Feasible if
126- * you do not want to chage the state of the cache, but only "peek" at it.
126+ * you do not want to change the state of the cache, but only "peek" at it.
127127 * Returns the entry associated with <key> if found, or undefined if not found.
128128 */
129129LRUCache . prototype . find = function ( key ) {
@@ -178,7 +178,7 @@ LRUCache.prototype.remove = function(key) {
178178
179179/** Removes all entries */
180180LRUCache . prototype . removeAll = function ( ) {
181- // This should be safe, as we never expose strong refrences to the outside
181+ // This should be safe, as we never expose strong references to the outside
182182 this . head = this . tail = undefined ;
183183 this . size = 0 ;
184184 this . _keymap = { } ;
@@ -200,7 +200,7 @@ if (typeof Object.keys === 'function') {
200200
201201/**
202202 * Call `fun` for each entry. Starting with the newest entry if `desc` is a true
203- * value, otherwise starts with the oldest (head) enrty and moves towards the
203+ * value, otherwise starts with the oldest (head) entry and moves towards the
204204 * tail.
205205 *
206206 * `fun` is called with 3 arguments in the context `context`:
0 commit comments