climbing-grade.js

A simple javascript library for conversion of climbing grades

View the Project on GitHub Grantismo/climbing-grade.js

climbing-grade.js

climbing-grade.js converts climbing grades between different systems.

Currently supported systems include: French, Australian, South African, UIAA, Heuco, Font, British, YDS

Demo

System:
Grade:
Convert To:

Converted: 2

Installation

With node:

npm install climbing-grade

For the browser:

bower install climbing-grade
<script type="text/javascript" src="bower_components/climbing-grade/climbing-grade.js"></script>

or Minified

<script type="text/javascript" src="bower_components/climbing-grade/ClimbingGrade.min.js"></script>

Usage

Format a given grade in other grading systems

Node

var ClimbingGrade = require('climbing-grade'); 
var grade = new ClimbingGrade('9a', 'french');
grade.format('australian'); // '35'
grade.format('south_african'); // '37'
grade.format('uiaa'); // 'XI+'
grade.format('heuco'); // 'V13'
grade.format('font'); // '8B'
grade.format('british'); // 'E10 7c'
grade.format('yds'); // '5.14d'

Browser

<script type="text/javascript">
  var grade = new ClimbingGrade("9a", "french");
  alert(grade.format("yds"));
</script></script>

Supports ranges

var heuco = new ClimbingGrade('vb', 'heuco');
heuco.format('font'); // '1 to 3+'


var french = new ClimbingGrade('6c', 'french');
french.format('yds'); // '5.11a/5.11b'

Systems

Tests

jasmine

License

MIT