You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					18 lines
				
				333 B
			
		
		
			
		
	
	
					18 lines
				
				333 B
			| 
								 
											4 years ago
										 
									 | 
							
								export default function symbolObservablePonyfill(root) {
							 | 
						||
| 
								 | 
							
									var result;
							 | 
						||
| 
								 | 
							
									var Symbol = root.Symbol;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									if (typeof Symbol === 'function') {
							 | 
						||
| 
								 | 
							
										if (Symbol.observable) {
							 | 
						||
| 
								 | 
							
											result = Symbol.observable;
							 | 
						||
| 
								 | 
							
										} else {
							 | 
						||
| 
								 | 
							
											result = Symbol('observable');
							 | 
						||
| 
								 | 
							
											Symbol.observable = result;
							 | 
						||
| 
								 | 
							
										}
							 | 
						||
| 
								 | 
							
									} else {
							 | 
						||
| 
								 | 
							
										result = '@@observable';
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									return result;
							 | 
						||
| 
								 | 
							
								};
							 |