From 2a500bf1eb484ac8a8bcb9b1164ea95d2aafb949 Mon Sep 17 00:00:00 2001 From: Denys-Bushulyak Date: Tue, 3 Feb 2015 14:59:07 +0200 Subject: [PATCH] remove unused code --- chain.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/chain.js b/chain.js index 6695433..a92571b 100644 --- a/chain.js +++ b/chain.js @@ -4,14 +4,10 @@ function Chain(items) { var _index = 0; var _items = items.slice(0) || []; - var _hashTable = []; //Wraping all arrays at items into chain for (var index in _items) { - var hash = getHash(_items[index]); - _hashTable[hash] = _items[index]; - for (var i in _items[index]) { if (Array.isArray(_items[index][i])) { _items[index][i] = Chain(_items[index][i]); @@ -19,12 +15,6 @@ function Chain(items) { } } - function getHash(obj) { - var hash = btoa(JSON.stringify(obj)); - - return hash.substr(Math.random() * 100, 5); - } - function _next() { _index++; @@ -103,10 +93,6 @@ function Chain(items) { return _current(); } - function _getHashTable() { - return _hashTable; - } - return { next : _next, prev : _prev, @@ -120,7 +106,6 @@ function Chain(items) { goToEnd : _goToEnd, getItems : _getItems, beginFrom : _beginFrom, - getIndex : _getIndex, - getHashTable: _getHashTable + getIndex : _getIndex }; } \ No newline at end of file