Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

conversion-library

fxss520132MIT0.0.16TypeScript support: included

conversion library, example as octalToBinary, eightToTwo, binaryToOctal, twoToEight, decimalToBinary, tenToTwo, binaryToDecimal, twoToTen, decimalToOtherBase, tenToOther, otherBaseToDecimal, otherToTen, ListNode, arrayToListNode, listNodeToArray, combinat

conversion, conversion-library, Decimal conversion, Data Structure, Color conversion, Int and roman, octalToBinary, eightToTwo, binaryToOctal, twoToEight, decimalToBinary, tenToTwo, binaryToDecimal, twoToTen, decimalToOtherBase, tenToOther, otherBaseToDecimal, otherToTen, ListNode, arrayToListNode, listNodeToArray, combinationArrangement, elTableRowSpan, arrayToTree, treeToArray, hexRrggbbToHexRgb, hexRgbToHexRrggbb, hexRgbsToRgbArray, hexRgbsToRgbObject, hexRgbsToRgb, rgbToRgbArray, rgbToRgbObject, rgbToHexRgbs, intToRoman, intArrayToRomanArray, romanToInt, romanArrayToIntArray, intToMoney, fahrenheitToCelsius, celsiusToFahrenheit, sizeConversionBase, sizeConversionArray, sizeConversionString, lengthConversionBase, areaConversionBase, weightConversionBase, numberToExponential, exponentialToNumber, speedConversionBase

readme

conversion-library

npm Coverage Status Download

npm i conversion-library

conversion library

import { tenToTwo } from 'conversion-library'

console.log(tenToTwo(10)) // '1010'

Decimal conversion

details: Conversion between 36 base systems such as binary, octal, decimal, etc, example as octalToBinary, eightToTwo, binaryToOctal, twoToEight, decimalToBinary, tenToTwo, binaryToDecimal, twoToTen, decimalToOtherBase, tenToOther, otherBaseToDecimal, otherToTen

Data Structure

details: Data Structure, example as ListNode, arrayToListNode, listNodeToArray, combinationArrangement, elTableRowSpan, arrayToTree, treeToArray

Color conversion

details: Color conversion, example as hexRrggbbToHexRgb, hexRgbToHexRrggbb, hexRgbsToRgbArray, hexRgbsToRgbObject, hexRgbsToRgb, rgbToRgbArray, rgbToRgbObject, rgbToHexRgbs

Int and roman

details: Convert integers and Roman numerals to each other, example as intToRoman, intArrayToRomanArray, romanToInt, romanArrayToIntArray

Int and money

details: Convert numbers to money, example as intToMoney

Fahrenheit and celsius

details: Temperature conversion, example as fahrenheitToCelsius, celsiusToFahrenheit

Size conversion

details: B/KB/MB/GB/TB/PB/EB/ZB/YB conversion, example as sizeConversionBase, sizeConversionArray, sizeConversionString

Length conversion

details: nm/纳米/um/微米/mm/毫米/cm/厘米/dm/分米/m/米/km/千米/公里/mile/英里/yd/码/ft/英尺/in/英寸/里/丈/尺/寸/分/n mile/海里 conversion, example as lengthConversionBase

Area conversion

details: m㎡/平方毫米/c㎡/平方厘米/d㎡/平方分米/㎡/平方米/h㎡/公顷/k㎡/平方千米/sq.in/平方英寸/sq.ft/平方英尺/sq.yd/平方码/acre/英亩/sq.mi/平方英里/平方丈/平方尺/平方寸/亩/分 conversion, example as areaConversionBase

Weight conversion

details: μg/微克/mg/毫克/g/克/kg/千克/t/吨/lb/磅/oz/盎司/担/斤/两/钱/克拉 conversion, example as weightConversionBase

Number conversion

details: Number conversion, example as numberToExponential, exponentialToNumber

Speed conversion

details: Speed conversion, example as speedConversionBase

String conversion

details: import change-case, change-case/keys, sponge-case, swap-case, title-case

changelog

Changelog

All notable changes to this project will be documented in this file. See commit-and-tag-version for commit guidelines.

0.0.16 (2024-12-20)

Features

0.0.15 (2024-11-22)

Features

  • add numberToExponential, exponentialToNumber (f76ddec)

0.0.14 (2024-11-13)

Features

  • add arrayToTree, treeToArray (577898c)

0.0.13 (2024-11-11)

Features

0.0.12 (2024-11-07)

Features

  • add fahrenheitToCelsius, celsiusToFahrenheit (a88baed)
  • add intToMoney (4e06199)
  • add sizeConversionArray, sizeConversionString (9ed2ae8)
  • add sizeConversionBase (bb3f4fd)

0.0.11 (2024-11-05)

Features

  • add intToRoman, intArrayToRomanArray, romanToInt, romanArrayToIntArray (fe3fa33)

0.0.10 (2024-10-30)

Features

0.0.9 (2024-10-28)

Features

  • add isHexColor to determine colors (53dfbfd)

0.0.8 (2024-09-30)

Features

  • add combinationArrangement function (26565e4)

0.0.7 (2024-08-30)

Features

0.0.6 (2024-07-26)

Features

0.0.5 (2024-07-20)

Features

0.0.4 (2024-07-20)

Features

0.0.3 (2024-07-19)

Features

0.0.2 (2024-07-19)

Features

  • docs use typedoc, types (21c580a)

0.0.1 (2024-07-18)

Features