Skip to content

Commit

Permalink
Set units enum singular value - Fix #29
Browse files Browse the repository at this point in the history
  • Loading branch information
haimkastner committed Mar 8, 2024
1 parent 19c2a4e commit 8fa3682
Show file tree
Hide file tree
Showing 126 changed files with 1,554 additions and 1,553 deletions.
1 change: 1 addition & 0 deletions generator-scripts/src/unit-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function buildEnum(enumName: string, units: UnitProperties[]): EnumDeclarationSt
members: units.map((unit: UnitProperties): EnumMemberStructure => ({
kind: StructureKind.EnumMember,
name: unit.pluralName,
value: unit.singularName,
docs: [unit.JSDoc ?? '']
})),
isExported: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unitsnet-js",
"version": "1.0.130",
"version": "2.0.0",
"description": "A better way to hold unit variables and easily convert to the destination unit",
"scripts": {
"prepublishOnly": "npm run generate && npm run test",
Expand Down
32 changes: 16 additions & 16 deletions src/absorbeddoseofionizingradiation.g.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
/** AbsorbedDoseOfIonizingRadiationUnits enumeration */
export enum AbsorbedDoseOfIonizingRadiationUnits {
/** The gray is the unit of ionizing radiation dose in the SI, defined as the absorption of one joule of radiation energy per kilogram of matter. */
Grays,
Grays = "Gray",
/** The rad is a unit of absorbed radiation dose, defined as 1 rad = 0.01 Gy = 0.01 J/kg. */
Rads,
Rads = "Rad",
/** */
Femtograys,
Femtograys = "Femtogray",
/** */
Picograys,
Picograys = "Picogray",
/** */
Nanograys,
Nanograys = "Nanogray",
/** */
Micrograys,
Micrograys = "Microgray",
/** */
Milligrays,
Milligrays = "Milligray",
/** */
Centigrays,
Centigrays = "Centigray",
/** */
Kilograys,
Kilograys = "Kilogray",
/** */
Megagrays,
Megagrays = "Megagray",
/** */
Gigagrays,
Gigagrays = "Gigagray",
/** */
Teragrays,
Teragrays = "Teragray",
/** */
Petagrays,
Petagrays = "Petagray",
/** */
Millirads,
Millirads = "Millirad",
/** */
Kilorads,
Kilorads = "Kilorad",
/** */
Megarads
Megarads = "Megarad"
}

/** Absorbed dose is a dose quantity which is the measure of the energy deposited in matter by ionizing radiation per unit mass. */
Expand Down
28 changes: 14 additions & 14 deletions src/acceleration.g.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
/** AccelerationUnits enumeration */
export enum AccelerationUnits {
/** */
MetersPerSecondSquared,
MetersPerSecondSquared = "MeterPerSecondSquared",
/** */
InchesPerSecondSquared,
InchesPerSecondSquared = "InchPerSecondSquared",
/** */
FeetPerSecondSquared,
FeetPerSecondSquared = "FootPerSecondSquared",
/** */
KnotsPerSecond,
KnotsPerSecond = "KnotPerSecond",
/** */
KnotsPerMinute,
KnotsPerMinute = "KnotPerMinute",
/** */
KnotsPerHour,
KnotsPerHour = "KnotPerHour",
/** */
StandardGravity,
StandardGravity = "StandardGravity",
/** */
NanometersPerSecondSquared,
NanometersPerSecondSquared = "NanometerPerSecondSquared",
/** */
MicrometersPerSecondSquared,
MicrometersPerSecondSquared = "MicrometerPerSecondSquared",
/** */
MillimetersPerSecondSquared,
MillimetersPerSecondSquared = "MillimeterPerSecondSquared",
/** */
CentimetersPerSecondSquared,
CentimetersPerSecondSquared = "CentimeterPerSecondSquared",
/** */
DecimetersPerSecondSquared,
DecimetersPerSecondSquared = "DecimeterPerSecondSquared",
/** */
KilometersPerSecondSquared,
KilometersPerSecondSquared = "KilometerPerSecondSquared",
/** */
MillistandardGravity
MillistandardGravity = "MillistandardGravity"
}

/** Acceleration, in physics, is the rate at which the velocity of an object changes over time. An object's acceleration is the net result of any and all forces acting on the object, as described by Newton's Second Law. The SI unit for acceleration is the Meter per second squared (m/s²). Accelerations are vector quantities (they have magnitude and direction) and add according to the parallelogram law. As a vector, the calculated net force is equal to the product of the object's mass (a scalar quantity) and the acceleration. */
Expand Down
34 changes: 17 additions & 17 deletions src/amountofsubstance.g.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
/** AmountOfSubstanceUnits enumeration */
export enum AmountOfSubstanceUnits {
/** */
Moles,
Moles = "Mole",
/** */
PoundMoles,
PoundMoles = "PoundMole",
/** */
Femtomoles,
Femtomoles = "Femtomole",
/** */
Picomoles,
Picomoles = "Picomole",
/** */
Nanomoles,
Nanomoles = "Nanomole",
/** */
Micromoles,
Micromoles = "Micromole",
/** */
Millimoles,
Millimoles = "Millimole",
/** */
Centimoles,
Centimoles = "Centimole",
/** */
Decimoles,
Decimoles = "Decimole",
/** */
Kilomoles,
Kilomoles = "Kilomole",
/** */
Megamoles,
Megamoles = "Megamole",
/** */
NanopoundMoles,
NanopoundMoles = "NanopoundMole",
/** */
MicropoundMoles,
MicropoundMoles = "MicropoundMole",
/** */
MillipoundMoles,
MillipoundMoles = "MillipoundMole",
/** */
CentipoundMoles,
CentipoundMoles = "CentipoundMole",
/** */
DecipoundMoles,
DecipoundMoles = "DecipoundMole",
/** */
KilopoundMoles
KilopoundMoles = "KilopoundMole"
}

/** Mole is the amount of substance containing Avagadro's Number (6.02 x 10 ^ 23) of real particles such as molecules,atoms, ions or radicals. */
Expand Down
8 changes: 4 additions & 4 deletions src/amplituderatio.g.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/** AmplitudeRatioUnits enumeration */
export enum AmplitudeRatioUnits {
/** */
DecibelVolts,
DecibelVolts = "DecibelVolt",
/** */
DecibelMicrovolts,
DecibelMicrovolts = "DecibelMicrovolt",
/** */
DecibelMillivolts,
DecibelMillivolts = "DecibelMillivolt",
/** */
DecibelsUnloaded
DecibelsUnloaded = "DecibelUnloaded"
}

/** The strength of a signal expressed in decibels (dB) relative to one volt RMS. */
Expand Down
32 changes: 16 additions & 16 deletions src/angle.g.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
/** AngleUnits enumeration */
export enum AngleUnits {
/** */
Radians,
Radians = "Radian",
/** */
Degrees,
Degrees = "Degree",
/** */
Arcminutes,
Arcminutes = "Arcminute",
/** */
Arcseconds,
Arcseconds = "Arcsecond",
/** */
Gradians,
Gradians = "Gradian",
/** */
NatoMils,
NatoMils = "NatoMil",
/** */
Revolutions,
Revolutions = "Revolution",
/** */
Tilt,
Tilt = "Tilt",
/** */
Nanoradians,
Nanoradians = "Nanoradian",
/** */
Microradians,
Microradians = "Microradian",
/** */
Milliradians,
Milliradians = "Milliradian",
/** */
Centiradians,
Centiradians = "Centiradian",
/** */
Deciradians,
Deciradians = "Deciradian",
/** */
Nanodegrees,
Nanodegrees = "Nanodegree",
/** */
Microdegrees,
Microdegrees = "Microdegree",
/** */
Millidegrees
Millidegrees = "Millidegree"
}

/** In geometry, an angle is the figure formed by two rays, called the sides of the angle, sharing a common endpoint, called the vertex of the angle. */
Expand Down
6 changes: 3 additions & 3 deletions src/apparentenergy.g.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** ApparentEnergyUnits enumeration */
export enum ApparentEnergyUnits {
/** */
VoltampereHours,
VoltampereHours = "VoltampereHour",
/** */
KilovoltampereHours,
KilovoltampereHours = "KilovoltampereHour",
/** */
MegavoltampereHours
MegavoltampereHours = "MegavoltampereHour"
}

/** A unit for expressing the integral of apparent power over time, equal to the product of 1 volt-ampere and 1 hour, or to 3600 joules. */
Expand Down
12 changes: 6 additions & 6 deletions src/apparentpower.g.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/** ApparentPowerUnits enumeration */
export enum ApparentPowerUnits {
/** */
Voltamperes,
Voltamperes = "Voltampere",
/** */
Microvoltamperes,
Microvoltamperes = "Microvoltampere",
/** */
Millivoltamperes,
Millivoltamperes = "Millivoltampere",
/** */
Kilovoltamperes,
Kilovoltamperes = "Kilovoltampere",
/** */
Megavoltamperes,
Megavoltamperes = "Megavoltampere",
/** */
Gigavoltamperes
Gigavoltamperes = "Gigavoltampere"
}

/** Power engineers measure apparent power as the magnitude of the vector sum of active and reactive power. Apparent power is the product of the root-mean-square of voltage and current. */
Expand Down
28 changes: 14 additions & 14 deletions src/area.g.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
/** AreaUnits enumeration */
export enum AreaUnits {
/** */
SquareKilometers,
SquareKilometers = "SquareKilometer",
/** */
SquareMeters,
SquareMeters = "SquareMeter",
/** */
SquareDecimeters,
SquareDecimeters = "SquareDecimeter",
/** */
SquareCentimeters,
SquareCentimeters = "SquareCentimeter",
/** */
SquareMillimeters,
SquareMillimeters = "SquareMillimeter",
/** */
SquareMicrometers,
SquareMicrometers = "SquareMicrometer",
/** The statute mile was standardised between the British Commonwealth and the United States by an international agreement in 1959, when it was formally redefined with respect to SI units as exactly 1,609.344 metres. */
SquareMiles,
SquareMiles = "SquareMile",
/** The yard (symbol: yd) is an English unit of length in both the British imperial and US customary systems of measurement equalling 3 feet (or 36 inches). Since 1959 the yard has been by international agreement standardized as exactly 0.9144 meter. A distance of 1,760 yards is equal to 1 mile. */
SquareYards,
SquareYards = "SquareYard",
/** */
SquareFeet,
SquareFeet = "SquareFoot",
/** In the United States, the foot was defined as 12 inches, with the inch being defined by the Mendenhall Order of 1893 as 39.37 inches = 1 m. This makes a U.S. survey foot exactly 1200/3937 meters. */
UsSurveySquareFeet,
UsSurveySquareFeet = "UsSurveySquareFoot",
/** */
SquareInches,
SquareInches = "SquareInch",
/** Based upon the international yard and pound agreement of 1959, an acre may be declared as exactly 4,046.8564224 square metres. */
Acres,
Acres = "Acre",
/** */
Hectares,
Hectares = "Hectare",
/** */
SquareNauticalMiles
SquareNauticalMiles = "SquareNauticalMile"
}

/** Area is a quantity that expresses the extent of a two-dimensional surface or shape, or planar lamina, in the plane. Area can be understood as the amount of material with a given thickness that would be necessary to fashion a model of the shape, or the amount of paint necessary to cover the surface with a single coat.[1] It is the two-dimensional analog of the length of a curve (a one-dimensional concept) or the volume of a solid (a three-dimensional concept). */
Expand Down
6 changes: 3 additions & 3 deletions src/areadensity.g.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** AreaDensityUnits enumeration */
export enum AreaDensityUnits {
/** */
KilogramsPerSquareMeter,
KilogramsPerSquareMeter = "KilogramPerSquareMeter",
/** Also known as grammage for paper industry. In fiber industry used with abbreviation 'gsm'. */
GramsPerSquareMeter,
GramsPerSquareMeter = "GramPerSquareMeter",
/** */
MilligramsPerSquareMeter
MilligramsPerSquareMeter = "MilligramPerSquareMeter"
}

/** The area density of a two-dimensional object is calculated as the mass per unit area. For paper this is also called grammage. */
Expand Down
12 changes: 6 additions & 6 deletions src/areamomentofinertia.g.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/** AreaMomentOfInertiaUnits enumeration */
export enum AreaMomentOfInertiaUnits {
/** */
MetersToTheFourth,
MetersToTheFourth = "MeterToTheFourth",
/** */
DecimetersToTheFourth,
DecimetersToTheFourth = "DecimeterToTheFourth",
/** */
CentimetersToTheFourth,
CentimetersToTheFourth = "CentimeterToTheFourth",
/** */
MillimetersToTheFourth,
MillimetersToTheFourth = "MillimeterToTheFourth",
/** */
FeetToTheFourth,
FeetToTheFourth = "FootToTheFourth",
/** */
InchesToTheFourth
InchesToTheFourth = "InchToTheFourth"
}

/** A geometric property of an area that reflects how its points are distributed with regard to an axis. */
Expand Down
Loading

0 comments on commit 8fa3682

Please sign in to comment.