cleaned up method
This commit is contained in:
93
src/convert/definitions/area.js
Normal file
93
src/convert/definitions/area.js
Normal file
@@ -0,0 +1,93 @@
|
||||
var metric
|
||||
, imperial;
|
||||
|
||||
metric = {
|
||||
mm2: {
|
||||
name: {
|
||||
singular: 'Square Millimeter'
|
||||
, plural: 'Square Millimeters'
|
||||
}
|
||||
, to_anchor: 1/1000000
|
||||
}
|
||||
, cm2: {
|
||||
name: {
|
||||
singular: 'Centimeter'
|
||||
, plural: 'Centimeters'
|
||||
}
|
||||
, to_anchor: 1/10000
|
||||
}
|
||||
, m2: {
|
||||
name: {
|
||||
singular: 'Square Meter'
|
||||
, plural: 'Square Meters'
|
||||
}
|
||||
, to_anchor: 1
|
||||
}
|
||||
, ha: {
|
||||
name: {
|
||||
singular: 'Hectare'
|
||||
, plural: 'Hectares'
|
||||
}
|
||||
, to_anchor: 10000
|
||||
}
|
||||
, km2: {
|
||||
name: {
|
||||
singular: 'Square Kilometer'
|
||||
, plural: 'Square Kilometers'
|
||||
}
|
||||
, to_anchor: 1000000
|
||||
}
|
||||
};
|
||||
|
||||
imperial = {
|
||||
'in2': {
|
||||
name: {
|
||||
singular: 'Square Inch'
|
||||
, plural: 'Square Inches'
|
||||
}
|
||||
, to_anchor: 1/144
|
||||
}
|
||||
, yd2: {
|
||||
name: {
|
||||
singular: 'Square Yard'
|
||||
, plural: 'Square Yards'
|
||||
}
|
||||
, to_anchor: 9
|
||||
}
|
||||
, ft2: {
|
||||
name: {
|
||||
singular: 'Square Foot'
|
||||
, plural: 'Square Feet'
|
||||
}
|
||||
, to_anchor: 1
|
||||
}
|
||||
, ac: {
|
||||
name: {
|
||||
singular: 'Acre'
|
||||
, plural: 'Acres'
|
||||
}
|
||||
, to_anchor: 43560
|
||||
}
|
||||
, mi2: {
|
||||
name: {
|
||||
singular: 'Square Mile'
|
||||
, plural: 'Square Miles'
|
||||
}
|
||||
, to_anchor: 27878400
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
metric: metric
|
||||
, imperial: imperial
|
||||
, _anchors: {
|
||||
metric: {
|
||||
unit: 'm2'
|
||||
, ratio: 10.7639
|
||||
}
|
||||
, imperial: {
|
||||
unit: 'ft2'
|
||||
, ratio: 1/10.7639
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user