forked from MapComplete/MapComplete
		
	removed geojson
This commit is contained in:
		
							parent
							
								
									4d0f0e55f2
								
							
						
					
					
						commit
						d5b614fc44
					
				
					 88 changed files with 1835 additions and 4874 deletions
				
			
		|  | @ -4,22 +4,6 @@ import {UIEventSource} from "../UIEventSource"; | |||
|  * UIEventsource-wrapper around localStorage | ||||
|  */ | ||||
| export class LocalStorageSource { | ||||
|      | ||||
|     static GetParsed<T>(key: string, defaultValue : T) : UIEventSource<T>{ | ||||
|         return LocalStorageSource.Get(key).map( | ||||
|             str => { | ||||
|                 if(str === undefined){ | ||||
|                     return defaultValue | ||||
|                 } | ||||
|                 try{ | ||||
|                     return JSON.parse(str) | ||||
|                 }catch{ | ||||
|                     return defaultValue | ||||
|                 } | ||||
|             }, [],  | ||||
|             value => JSON.stringify(value) | ||||
|         ) | ||||
|     } | ||||
| 
 | ||||
|     static Get(key: string, defaultValue: string = undefined): UIEventSource<string> { | ||||
|         try { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue