├── .eslintrc.json ├── .github ├── eslint.json └── workflows │ └── node.js.yml ├── .gitignore ├── LICENSE ├── README.md ├── locale ├── ar-001.json ├── ar-AE.json ├── ar-BH.json ├── ar-DJ.json ├── ar-DZ.json ├── ar-EG.json ├── ar-EH.json ├── ar-ER.json ├── ar-IL.json ├── ar-IQ.json ├── ar-JO.json ├── ar-KM.json ├── ar-KW.json ├── ar-LB.json ├── ar-LY.json ├── ar-MA.json ├── ar-MR.json ├── ar-OM.json ├── ar-PS.json ├── ar-QA.json ├── ar-SA.json ├── ar-SD.json ├── ar-SO.json ├── ar-SS.json ├── ar-SY.json ├── ar-TD.json ├── ar-TN.json ├── ar-YE.json ├── ca-ES.json ├── cs-CZ.json ├── da-DK.json ├── de-CH.json ├── de-DE.json ├── en-CA.json ├── en-GB.json ├── en-IE.json ├── en-IN.json ├── en-US.json ├── es-BO.json ├── es-ES.json ├── es-MX.json ├── fi-FI.json ├── fr-CA.json ├── fr-FR.json ├── he-IL.json ├── hu-HU.json ├── it-IT.json ├── ja-JP.json ├── ko-KR.json ├── mk-MK.json ├── nl-NL.json ├── pl-PL.json ├── pt-BR.json ├── pt-PT.json ├── ru-RU.json ├── sl-SI.json ├── sv-SE.json ├── uk-UA.json └── zh-CN.json ├── package.json ├── rollup.config.js ├── src ├── defaultLocale.js ├── exponent.js ├── formatDecimal.js ├── formatGroup.js ├── formatNumerals.js ├── formatPrefixAuto.js ├── formatRounded.js ├── formatSpecifier.js ├── formatTrim.js ├── formatTypes.js ├── identity.js ├── index.js ├── locale.js ├── precisionFixed.js ├── precisionPrefix.js └── precisionRound.js ├── test ├── .eslintrc.json ├── arabicLocale-test.js ├── defaultLocale-test.js ├── format-test.js ├── format-trim-test.js ├── format-type-%-test.js ├── format-type-b-test.js ├── format-type-c-test.js ├── format-type-d-test.js ├── format-type-e-test.js ├── format-type-f-test.js ├── format-type-g-test.js ├── format-type-n-test.js ├── format-type-none-test.js ├── format-type-o-test.js ├── format-type-p-test.js ├── format-type-r-test.js ├── format-type-s-test.js ├── format-type-x-test.js ├── formatPrefix-test.js ├── formatSpecifier-test.js ├── locale-test.js ├── precisionFixed-test.js ├── precisionPrefix-test.js └── precisionRound-test.js └── yarn.lock /.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/.eslintrc.json -------------------------------------------------------------------------------- /.github/eslint.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/.github/eslint.json -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/.github/workflows/node.js.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.sublime-workspace 2 | .DS_Store 3 | dist/ 4 | node_modules 5 | npm-debug.log 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/README.md -------------------------------------------------------------------------------- /locale/ar-001.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-001.json -------------------------------------------------------------------------------- /locale/ar-AE.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-AE.json -------------------------------------------------------------------------------- /locale/ar-BH.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-BH.json -------------------------------------------------------------------------------- /locale/ar-DJ.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-DJ.json -------------------------------------------------------------------------------- /locale/ar-DZ.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-DZ.json -------------------------------------------------------------------------------- /locale/ar-EG.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-EG.json -------------------------------------------------------------------------------- /locale/ar-EH.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-EH.json -------------------------------------------------------------------------------- /locale/ar-ER.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-ER.json -------------------------------------------------------------------------------- /locale/ar-IL.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-IL.json -------------------------------------------------------------------------------- /locale/ar-IQ.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-IQ.json -------------------------------------------------------------------------------- /locale/ar-JO.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-JO.json -------------------------------------------------------------------------------- /locale/ar-KM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-KM.json -------------------------------------------------------------------------------- /locale/ar-KW.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-KW.json -------------------------------------------------------------------------------- /locale/ar-LB.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-LB.json -------------------------------------------------------------------------------- /locale/ar-LY.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-LY.json -------------------------------------------------------------------------------- /locale/ar-MA.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-MA.json -------------------------------------------------------------------------------- /locale/ar-MR.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-MR.json -------------------------------------------------------------------------------- /locale/ar-OM.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-OM.json -------------------------------------------------------------------------------- /locale/ar-PS.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-PS.json -------------------------------------------------------------------------------- /locale/ar-QA.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-QA.json -------------------------------------------------------------------------------- /locale/ar-SA.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-SA.json -------------------------------------------------------------------------------- /locale/ar-SD.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-SD.json -------------------------------------------------------------------------------- /locale/ar-SO.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-SO.json -------------------------------------------------------------------------------- /locale/ar-SS.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-SS.json -------------------------------------------------------------------------------- /locale/ar-SY.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-SY.json -------------------------------------------------------------------------------- /locale/ar-TD.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-TD.json -------------------------------------------------------------------------------- /locale/ar-TN.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-TN.json -------------------------------------------------------------------------------- /locale/ar-YE.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ar-YE.json -------------------------------------------------------------------------------- /locale/ca-ES.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ca-ES.json -------------------------------------------------------------------------------- /locale/cs-CZ.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/cs-CZ.json -------------------------------------------------------------------------------- /locale/da-DK.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/da-DK.json -------------------------------------------------------------------------------- /locale/de-CH.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/de-CH.json -------------------------------------------------------------------------------- /locale/de-DE.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/de-DE.json -------------------------------------------------------------------------------- /locale/en-CA.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/en-CA.json -------------------------------------------------------------------------------- /locale/en-GB.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/en-GB.json -------------------------------------------------------------------------------- /locale/en-IE.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/en-IE.json -------------------------------------------------------------------------------- /locale/en-IN.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/en-IN.json -------------------------------------------------------------------------------- /locale/en-US.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/en-US.json -------------------------------------------------------------------------------- /locale/es-BO.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/es-BO.json -------------------------------------------------------------------------------- /locale/es-ES.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/es-ES.json -------------------------------------------------------------------------------- /locale/es-MX.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/es-MX.json -------------------------------------------------------------------------------- /locale/fi-FI.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/fi-FI.json -------------------------------------------------------------------------------- /locale/fr-CA.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/fr-CA.json -------------------------------------------------------------------------------- /locale/fr-FR.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/fr-FR.json -------------------------------------------------------------------------------- /locale/he-IL.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/he-IL.json -------------------------------------------------------------------------------- /locale/hu-HU.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/hu-HU.json -------------------------------------------------------------------------------- /locale/it-IT.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/it-IT.json -------------------------------------------------------------------------------- /locale/ja-JP.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ja-JP.json -------------------------------------------------------------------------------- /locale/ko-KR.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ko-KR.json -------------------------------------------------------------------------------- /locale/mk-MK.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/mk-MK.json -------------------------------------------------------------------------------- /locale/nl-NL.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/nl-NL.json -------------------------------------------------------------------------------- /locale/pl-PL.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/pl-PL.json -------------------------------------------------------------------------------- /locale/pt-BR.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/pt-BR.json -------------------------------------------------------------------------------- /locale/pt-PT.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/pt-PT.json -------------------------------------------------------------------------------- /locale/ru-RU.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/ru-RU.json -------------------------------------------------------------------------------- /locale/sl-SI.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/sl-SI.json -------------------------------------------------------------------------------- /locale/sv-SE.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/sv-SE.json -------------------------------------------------------------------------------- /locale/uk-UA.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/uk-UA.json -------------------------------------------------------------------------------- /locale/zh-CN.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/locale/zh-CN.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/package.json -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/rollup.config.js -------------------------------------------------------------------------------- /src/defaultLocale.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/defaultLocale.js -------------------------------------------------------------------------------- /src/exponent.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/exponent.js -------------------------------------------------------------------------------- /src/formatDecimal.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/formatDecimal.js -------------------------------------------------------------------------------- /src/formatGroup.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/formatGroup.js -------------------------------------------------------------------------------- /src/formatNumerals.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/formatNumerals.js -------------------------------------------------------------------------------- /src/formatPrefixAuto.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/formatPrefixAuto.js -------------------------------------------------------------------------------- /src/formatRounded.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/formatRounded.js -------------------------------------------------------------------------------- /src/formatSpecifier.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/formatSpecifier.js -------------------------------------------------------------------------------- /src/formatTrim.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/formatTrim.js -------------------------------------------------------------------------------- /src/formatTypes.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/formatTypes.js -------------------------------------------------------------------------------- /src/identity.js: -------------------------------------------------------------------------------- 1 | export default function(x) { 2 | return x; 3 | } 4 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/index.js -------------------------------------------------------------------------------- /src/locale.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/locale.js -------------------------------------------------------------------------------- /src/precisionFixed.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/precisionFixed.js -------------------------------------------------------------------------------- /src/precisionPrefix.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/precisionPrefix.js -------------------------------------------------------------------------------- /src/precisionRound.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/src/precisionRound.js -------------------------------------------------------------------------------- /test/.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/.eslintrc.json -------------------------------------------------------------------------------- /test/arabicLocale-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/arabicLocale-test.js -------------------------------------------------------------------------------- /test/defaultLocale-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/defaultLocale-test.js -------------------------------------------------------------------------------- /test/format-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-test.js -------------------------------------------------------------------------------- /test/format-trim-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-trim-test.js -------------------------------------------------------------------------------- /test/format-type-%-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-%-test.js -------------------------------------------------------------------------------- /test/format-type-b-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-b-test.js -------------------------------------------------------------------------------- /test/format-type-c-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-c-test.js -------------------------------------------------------------------------------- /test/format-type-d-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-d-test.js -------------------------------------------------------------------------------- /test/format-type-e-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-e-test.js -------------------------------------------------------------------------------- /test/format-type-f-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-f-test.js -------------------------------------------------------------------------------- /test/format-type-g-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-g-test.js -------------------------------------------------------------------------------- /test/format-type-n-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-n-test.js -------------------------------------------------------------------------------- /test/format-type-none-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-none-test.js -------------------------------------------------------------------------------- /test/format-type-o-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-o-test.js -------------------------------------------------------------------------------- /test/format-type-p-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-p-test.js -------------------------------------------------------------------------------- /test/format-type-r-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-r-test.js -------------------------------------------------------------------------------- /test/format-type-s-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-s-test.js -------------------------------------------------------------------------------- /test/format-type-x-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/format-type-x-test.js -------------------------------------------------------------------------------- /test/formatPrefix-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/formatPrefix-test.js -------------------------------------------------------------------------------- /test/formatSpecifier-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/formatSpecifier-test.js -------------------------------------------------------------------------------- /test/locale-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/locale-test.js -------------------------------------------------------------------------------- /test/precisionFixed-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/precisionFixed-test.js -------------------------------------------------------------------------------- /test/precisionPrefix-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/precisionPrefix-test.js -------------------------------------------------------------------------------- /test/precisionRound-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/test/precisionRound-test.js -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d3/d3-format/HEAD/yarn.lock --------------------------------------------------------------------------------