Skip to content

Javascript Conversion Example / Coding Challenge

Notifications You must be signed in to change notification settings

ericpeers/converty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conversion Class - for a technical assesment

Installation:

   your prompt> npm install

this is really just to get the jasmine requirements for test running.

Example Usage:

debug.js:

   require("./conversion.js");
   var cv = new Conversion().convert(2, "feet").to("inch").execute()
   console.log(cv);

Then go type:

your prompt> node debug.js

Running tests:

There are a number of tests in specs/convertSpec.js. To run them:

   your prompt> node_modules/.bin/jasmine

Assumptions

  • Your conversions will fit within a numeric represntation in Node/JS.
  • You are sending down a string for units. Eventually I could support both enum and string by checking type.
  • Floats will work reasonably nicely. Maybe I should test further.
  • You, like me, like beer.

About

Javascript Conversion Example / Coding Challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published