open-index/open-npm huggingface dataset:
npm package: @smart-erp/libs
Description: @smart-erp/libs is a collection of utility functions and classes designed to simplify common tasks in web development. It includes modules for formatting dates, currency values, and more.
Author: pphatdev
Latest version: 1.0.2

<p align="center">
<img src="https://raw.githubusercontent.com/turbotechlabs/node-libs/c533100e86746ac41d34c65b7371c786300890ef/logo.png?token=GHSAT0AAAAAACWUAQ4HCPZVS3KHFHIP6DQUZWPA4LQ" alt="@smart-erp/libs" width="200" height="200" />

# About `@smart-erp/libs` 📚

`@smart-erp/libs` is a collection of utility functions and classes designed to simplify common tasks in web development. It includes modules for formatting dates, currency values, and more.

# Installation
Install the package using npm:

```bash
npm install @smart-erp/libs --save
```

Via Git:
```bash
git clone https://github.com/turbotechlabs/node-libs.git
```
# Usage
## Format Class

The `Format` class provides date formatting functionality. [Read more](/doc/format.md)

```js
import { Format } from '@smart-erp/libs';

const dateString = '2023-05-15';
const formattedDate = Format.date(dateString);
console.log(formattedDate); // Output: May 15, 2023
```


### Currency Class
The `Currency` class offers methods for formatting currency values. [Read more](/doc/currency.md)

```js
import { Currency } from '@smart-erp/libs';

console.log(Currency.format(123.456)); // Output: "123.46"
console.log(Currency.formatWithComma(1234567.89)); // Output: "1,234,567.89"
```

### Merge Class
The `Merge` class is used to merge objects with URL search parameters.  [Read more](/doc/merge.md)
```js
import { Merge } from '@smart-erp/libs';

const options = { a: '1', b: '2' };
const searchParams = new URLSearchParams('b=3&c=4');
const result = Merge.object(options, searchParams);
console.log(result); // Output: { a: '1', b: '3', c: '4' }
```

### Thumbnail Class
The `Thumbnail` class generates HTML for thumbnail images.  [Read more](/doc/thumbnail.md)

```js
import { Thumbnail } from '@smart-erp/libs';

const thumbnailHtml = Thumbnail.list({
  url: 'https://example.com/image.jpg',
  alt: 'Example image'
});
console.log(thumbnailHtml);

```