11 lines
		
	
	
		
			No EOL
		
	
	
		
			298 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			No EOL
		
	
	
		
			298 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
exports('runJS', (snippet) => {
 | 
						|
    if (IsDuplicityVersion() && GetInvokingResource() !== GetCurrentResourceName()) {
 | 
						|
        return [ 'Invalid caller.', false ];
 | 
						|
    }
 | 
						|
 | 
						|
    try {
 | 
						|
        return [ new Function(snippet)(), false ];
 | 
						|
    } catch (e) {
 | 
						|
        return [ false, e.toString() ];
 | 
						|
    }
 | 
						|
}); |