Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
module.exports = {
env: { jest: true },
extends: '@day1co/eslint-config/common-ts',
env: {
jest: true,
node: true,
es2021: true
},
extends: [
'eslint:recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
parserOptions: { ecmaVersion: '2021', sourceType: 'module' },
plugins: ['import', '@typescript-eslint'],
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'prettier'],
root: true,
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
},
'prettier/prettier': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': 'error'
}
};
10 changes: 9 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
module.exports = {
...require('@day1co/prettier-config'),
semi: true,
trailingComma: 'es5',
singleQuote: true,
printWidth: 100,
tabWidth: 2,
useTabs: false,
bracketSpacing: true,
arrowParens: 'avoid',
endOfLine: 'lf',
};
53 changes: 53 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Pebbles Project Summary

This document provides a summary of the Pebbles project, a utility library for both frontend and backend development.

## Project Overview

Pebbles is a TypeScript-based project that offers a collection of utility modules to streamline common development tasks. The project is well-structured, with each utility module residing in its own directory, complete with its own tests.

## Key Technologies

- **Language:** TypeScript
- **Testing:** Jest
- **Linting:** ESLint
- **Formatting:** Prettier

## Core Modules

The project is composed of the following utility modules:

- **array-util:** Provides functions for array manipulation, such as `innerJoin` and `leftJoin`.
- **boolean-util:** Includes functions for boolean parsing, such as `parseBoolean`.
- **crypto-util:** Offers cryptographic functions like `sha256`, `createAesKey`, and base64 encoding/decoding.
- **date-util:** A comprehensive module for date and time manipulation, including formatting, parsing, and calculations.
- **exception:** A set of custom exception classes for handling various error scenarios, categorized into client and server exceptions.
- **http-client:** A wrapper around an HTTP client (likely `axios`) to simplify making HTTP requests.
- **logger:** A logging framework that provides a `LoggerFactory` for creating logger instances.
- **map-util:** Includes functions for grouping and keying data, such as `groupBy` and `groupByKey`.
- **misc-util:** A collection of miscellaneous utility functions, such as `getPagination`, `getRandomInt`, and `sleep`.
- **money-util:** Provides functions for currency formatting, such as `convertLocalCurrencyFormat`.
- **number-util:** Offers functions for number manipulation, including decimal rounding and checking for numeric values.
- **object-util:** A rich module for object operations, such as `deepClone`, `isEmpty`, `isEqualObject`, `merge`, `omit`, and `pick`.
- **search-util:** Includes a `binarySearch` function for efficient searching in sorted arrays.
- **string-util:** Provides a wide range of string manipulation functions, including `compactTextMessage`, `isValidEmail`, `maskPrivacy`, and `renderTemplate`.
- **time-range:** A `TimeRange` class for working with time intervals.
- **type-util:** Contains utility types and functions for working with TypeScript types.
- **unit-util:** Offers unit conversion utilities, such as `byteUnitConverter` and `moneyUnitConverter`.

## Scripts

The `package.json` file defines the following scripts:

- `build`: Compiles the TypeScript code.
- `clean`: Removes the `coverage`, `lib`, and `node_modules` directories.
- `lint`: Lints the source code using ESLint.
- `test`: Runs the tests using Jest.

## Dependencies

The project has the following key dependencies:

- **axios:** A promise-based HTTP client for the browser and Node.js.
- **mustache:** A logic-less template engine.
- **pino:** A fast, low-overhead logger.
53 changes: 53 additions & 0 deletions GEMINI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Pebbles Project Summary

This document provides a summary of the Pebbles project, a utility library for both frontend and backend development.

## Project Overview

Pebbles is a TypeScript-based project that offers a collection of utility modules to streamline common development tasks. The project is well-structured, with each utility module residing in its own directory, complete with its own tests.

## Key Technologies

- **Language:** TypeScript
- **Testing:** Jest
- **Linting:** ESLint
- **Formatting:** Prettier

## Core Modules

The project is composed of the following utility modules:

- **array-util:** Provides functions for array manipulation, such as `innerJoin` and `leftJoin`.
- **boolean-util:** Includes functions for boolean parsing, such as `parseBoolean`.
- **crypto-util:** Offers cryptographic functions like `sha256`, `createAesKey`, and base64 encoding/decoding.
- **date-util:** A comprehensive module for date and time manipulation, including formatting, parsing, and calculations.
- **exception:** A set of custom exception classes for handling various error scenarios, categorized into client and server exceptions.
- **http-client:** A wrapper around an HTTP client (likely `axios`) to simplify making HTTP requests.
- **logger:** A logging framework that provides a `LoggerFactory` for creating logger instances.
- **map-util:** Includes functions for grouping and keying data, such as `groupBy` and `groupByKey`.
- **misc-util:** A collection of miscellaneous utility functions, such as `getPagination`, `getRandomInt`, and `sleep`.
- **money-util:** Provides functions for currency formatting, such as `convertLocalCurrencyFormat`.
- **number-util:** Offers functions for number manipulation, including decimal rounding and checking for numeric values.
- **object-util:** A rich module for object operations, such as `deepClone`, `isEmpty`, `isEqualObject`, `merge`, `omit`, and `pick`.
- **search-util:** Includes a `binarySearch` function for efficient searching in sorted arrays.
- **string-util:** Provides a wide range of string manipulation functions, including `compactTextMessage`, `isValidEmail`, `maskPrivacy`, and `renderTemplate`.
- **time-range:** A `TimeRange` class for working with time intervals.
- **type-util:** Contains utility types and functions for working with TypeScript types.
- **unit-util:** Offers unit conversion utilities, such as `byteUnitConverter` and `moneyUnitConverter`.

## Scripts

The `package.json` file defines the following scripts:

- `build`: Compiles the TypeScript code.
- `clean`: Removes the `coverage`, `lib`, and `node_modules` directories.
- `lint`: Lints the source code using ESLint.
- `test`: Runs the tests using Jest.

## Dependencies

The project has the following key dependencies:

- **axios:** A promise-based HTTP client for the browser and Node.js.
- **mustache:** A logic-less template engine.
- **pino:** A fast, low-overhead logger.
Loading
Loading