asJavaScript

fun asJavaScript(): BsonJavaScript

Gets this value as a BsonJavaScript if it is one, otherwise throws exception

Return

a BsonJavaScript

Throws

if this value is not of the expected type