mirror of
				https://github.com/robertkrimen/otto
				synced 2025-10-26 20:28:49 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			277 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			277 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package otto
 | |
| 
 | |
| // Boolean
 | |
| 
 | |
| func builtinBoolean(call FunctionCall) Value {
 | |
| 	return toValue(toBoolean(call.Argument(0)))
 | |
| }
 | |
| 
 | |
| func builtinNewBoolean(self *_object, _ Value, argumentList []Value) Value {
 | |
| 	return toValue(self.runtime.newBoolean(valueOfArrayIndex(argumentList, 0)))
 | |
| }
 | 
