1.2.9 • Published 2 years ago

@bbon/formatter v1.2.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@bbon/formatter

npm.io npm.io Build and tag publish NPM

값을 형식화된 문자열로 처리하기 위한 기능을 제공합니다.

설치 Installation

$ npm install @bbon/formatter
$ yarn add @bbon/formatter

사용 Usage

numberWithDelimiter

구분자로 구분된 숫자를 출력합니다.

import { StringFormatter } from '@bbon/formatter';

const formatter = new StringFormatter();
const numberValue = 1000;
const formattedValue = formatter.numberWithDelimiter(numberValue);

console.info(formattedValue); // '1,000'

fileSize

파일 크기를 읽기 편하게 출력합니다.

import { StringFormatter } from '@bbon/formatter';

const formatter = new StringFormatter();
const numberValue = 2.05 * 1024;
const formattedValue = formatter.fileSize(numberValue, formatter.formattedValue, ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB']);

console.info(formattedValue); // '2.05 KB'
1.2.8

2 years ago

1.2.9

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.0.2

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago