Skip to content

The Answer to the Ultimate Question of Life, the Universe, and Everything

Notifications You must be signed in to change notification settings

muehre/the-answer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

The Answer

The Answer to the Ultimate Question of Life, the Universe, and Everything

Usage

import theAnswer from './index.ts'

theAnswer('What is the end of Pi?')
// Expected output: 42    

theAnswer('What is the Answer to the Ultimate Question of Life, the Universe, and Everything?')
// Expected output: 42    

//...

For more complex Questions it's also possible to use the Question builder

import theAnswer, {QuestionBuilder} from './index.ts'

const builder = new QuestionBuilder('What is the Answer to the Ultimate Question of Life, the Universe, and Everything')
builder.addCondition('on a sunny day');
builder.addCondition('in winter');
builder.addCondition('at evening');
builder.addCondition('while eating an ice cream');

theAnswer(builder.render())
// Expected output: 42

Versioning

Versioning is not required as the Interface neither the Answer will ever change.

About

The Answer to the Ultimate Question of Life, the Universe, and Everything

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published