dist/angular-webstorage.js
function (storageType) {

            var isStorageType = typeof storageType === 'undefined' ? false : true;

            var key,
                keys = [];

            if (isStorageType) {
                webStorage = $window[storageType];
                for (key in webStorage) {
                    keys.push(key);
                }
            } else {
                webStorage = $window.localStorage;
                for (key in webStorage) {
                    keys.push(key);
                }
                webStorage = $window.sessionStorage;
                for (key in webStorage) {
                    if (keys.indexOf(key) == -1) keys.push(key);
                }
            }

            return keys;
        }
function (storageType) {

            var isStorageType = typeof storageType === 'undefined' ? false : true;

            var key,
                keys = [];

            if (isStorageType) {
                webStorage = $window[storageType];
                for (key in webStorage) {
                    keys.push(key);
                }
            } else {
                webStorage = $window.localStorage;
                for (key in webStorage) {
                    keys.push(key);
                }
                webStorage = $window.sessionStorage;
                for (key in webStorage) {
                    if (keys.indexOf(key) == -1) keys.push(key);
                }
            }

            return keys;
        }
function ( storageType ) { var isStorageType = typeof storageType === 'undefined' ? false : true ; var key , keys = [ ] ; if ( isStorageType ) { webStorage = $window [ storageType ] ; for ( key in webStorage ) { keys . push ( key ) ; } } else { webStorage = $window . localStorage ; for ( key in webStorage ) { keys . push ( key ) ; } webStorage = $window . sessionStorage ; for ( key in webStorage ) { if ( keys . indexOf ( key ) == - 1 ) keys . push ( key ) ; } } return keys ; }
/*
Return array of keys from storage
- storageType: *optional* localStorage or sessionStorage
/ * Return array of keys from storage - storageType : * optional * localStorage or sessionStorage