mirror of
				https://github.com/1disk/edp445.git
				synced 2024-08-14 22:47:02 +00:00 
			
		
		
		
	Changed alot of things.
This commit is contained in:
		
							parent
							
								
									a5a0523e5a
								
							
						
					
					
						commit
						3513d5390c
					
				
					 2016 changed files with 336930 additions and 9 deletions
				
			
		
							
								
								
									
										33
									
								
								node_modules/semver/functions/parse.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								node_modules/semver/functions/parse.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,33 @@ | |||
| const { MAX_LENGTH } = require('../internal/constants') | ||||
| const { re, t } = require('../internal/re') | ||||
| const SemVer = require('../classes/semver') | ||||
| 
 | ||||
| const parseOptions = require('../internal/parse-options') | ||||
| const parse = (version, options) => { | ||||
|   options = parseOptions(options) | ||||
| 
 | ||||
|   if (version instanceof SemVer) { | ||||
|     return version | ||||
|   } | ||||
| 
 | ||||
|   if (typeof version !== 'string') { | ||||
|     return null | ||||
|   } | ||||
| 
 | ||||
|   if (version.length > MAX_LENGTH) { | ||||
|     return null | ||||
|   } | ||||
| 
 | ||||
|   const r = options.loose ? re[t.LOOSE] : re[t.FULL] | ||||
|   if (!r.test(version)) { | ||||
|     return null | ||||
|   } | ||||
| 
 | ||||
|   try { | ||||
|     return new SemVer(version, options) | ||||
|   } catch (er) { | ||||
|     return null | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| module.exports = parse | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue