Use endsWith for readability
This commit is contained in:
		
							parent
							
								
									3e20ea5b2e
								
							
						
					
					
						commit
						bfed1475bb
					
				
					 3 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -7,7 +7,7 @@ function trim(text, g) {
 | 
			
		|||
export default function(src) {
 | 
			
		||||
	const fn = options => {
 | 
			
		||||
		const search = options.search;
 | 
			
		||||
		const g = search[search.length - 1] == 'g';
 | 
			
		||||
		const g = search.endsWith('g');
 | 
			
		||||
		const file = this.resourcePath.replace(/\\/g, '/');
 | 
			
		||||
		const replace = options.i18n ? global[options.replace].bind(null, {
 | 
			
		||||
			src: file,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue