This package has been deprecated

Author message:

The @gooddata/numberjs package is deprecated and will no longer be maintained. Please use the @gooddata/number-formatter package instead, which provides the similar functionality.

@gooddata/numberjs
TypeScript icon, indicating that this package has built-in type declarations

4.1.0 • Public • Published

GoodData Number.js

It is a Flexible JS Formatting Library based on the MIT licensed https://code.google.com/p/flexible-js-formatting/ lib of Baron Schwartz.

It is collection of functions for formatting numbers using Excel-like formatting strings.

Usage

var number = require('@gooddata/numberjs');

number.numberFormat(value, format, undefined, this.get('locale').separators);
number.colors2Object(number.numberFormat(value, format, undefined, this.locale.separators));
number.FormatTranslator.translate2default(newFormat, this.separators);
number.FormatTranslator.translate2custom(format, this.COMPONENT.locale.separators);
number.containsNullConditionalFormat(this._getMetricFormat());

Development

Install Node.js and Yarn (for versions, see config).

To bootstrap the environment run the following the repository root:

$ yarn install --frozen-lockfile

Tests are executed using:

$ yarn test

Versioning

NPM package.json version number and RPM package version number are independent. NPM package.json version should reflect changes in code and RPM package version is supplied by build pipeline (gdcversion macro) to ensure smooth integration in GDC build flow.

For bower repository the bower.json version string is to be adjusted to always match the package.json.

RPM build

To build the gdc-numberjs RPM package, execute

$ ./build.sh

LICENCE

Copyright (C) 2007-2014, GoodData(R) Corporation. All rights reserved. Changes by GoodData are not covered by the below license

Copyright (C) 2006 Baron Schwartz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Readme

Keywords

none

Package Sidebar

Install

npm i @gooddata/numberjs

Weekly Downloads

614

Version

4.1.0

License

BSD-3-Clause

Unpacked Size

47.2 kB

Total Files

5

Last publish

Collaborators

  • ondrej.kvinta
  • hkad98
  • vasek.zmrhal
  • david.zoufaly
  • lienpham95
  • hoaimy
  • amilieta
  • kirill.kazakov.gd
  • bertold8
  • mkoldus
  • bich.nguyen
  • nghi.lam
  • good-andy
  • pjiranek
  • phong.nguyen
  • martin.milicka
  • hung.cao
  • artsiom.yeliseyenka.gooddata
  • rodri360
  • jaceksan
  • ivan.mjartan
  • lupko
  • tomas.kratochvil
  • jakub-sterba
  • stanislavhacker
  • vojtasii
  • pbenes
  • gooddata-ci
  • nikolacech
  • petrjanu
  • xmort
  • no23reason
  • matyas.kandl
  • utdnah
  • tuqt1005
  • tu.bui
  • my.duong
  • hang.ngo
  • scavnickyj
  • thao-luong
  • thuong.nguyen
  • huyen.nguyen
  • nestor_encinas
  • tmuchka
  • gdjan
  • tuan.tran_gd