import Immutable from "immutable" ; import slug from "github-slugid" ; class GlossaryEntry extends Immutable . Record ( { name : String ( ) , description : String ( ) , } ) { getName ( ) { return this . get ( "name" ) ; } getDescription ( ) { return this . get ( "description" ) ; } /**
     Get identifier for this entry
     */ getID ( ) { return GlossaryEntry . nameToID ( this . getName ( ) ) ; } /**
     Normalize a glossary entry name into a unique id
     */ static nameToID ( name ) { return slug ( name ) ; } } export default GlossaryEntry ;