0.0.3 • Published 9 years ago

brassiere v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

brassiere

A node module for computing bra measurements. Supports various regional standards and length units

Installation

npm install brassiere

Standards supported

StandardCodeExample
Europe (EN 13402)eu70B
France, Belgium, Spainfr85B
ItalyitIIA
United Kingdomuk32B
United Statesus32B

Usage

var bra = require('brassiere');

bra.getSize('eu', '70 cm', '85 cm');
    // { band: 70, cup: 'B', unit: 'cm' }

bra.getSize('uk', '27.6 in', '33.5 in');
    // { band: 32, cup: 'C', unit: 'in' }

bra.getSize('us', '36.5"', '47"');
    // { band: 42, cup: 'DDD', unit: 'in' }

The brassiere module has a single function, getSize. For a standard specified as well as strings designating bust and underbust size it returns the band length and the cup name as an object.

If a measurement is given as a string consisting of a number and a unit, the values will be parsed using the js-quantities library. Thus, all common length units are supported (most importantly inches and centimeters). If the measurement is given as a number it will be treated as a centimeter value.

Note that the band length returned does not necessarily have the same unit as the input measurements. Instead, the unit is determined by the standard specified. For instance, European band lengths are always returned in the metric system, even if bust and underbust size are given in the imperial system:

bra.getSize('eu', '27.6 inches', '33.5 inches');
    // { band: 70, cup: 'B', unit: 'cm' }