Skip to content

commuterjoy/js-scala-option

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scala's Option for JavaScript.

Idiomatically,

// Define an option with a value
var o = new Option("hello");

// Get that value
o.get(); 

// Get that value, or else provide a default
o.getOrElse("world"); 

// Or map over the value, transform it and return that instead (or provide a default)
o.map(function (value) {
  return value.toUpperCase();
}).getOrElse("nope!")

About

Scala's Option for JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published