# base-service-fran-dev

> Made with create-react-library

Latest version **1.3.24** (published 2026-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install base-service-fran-dev
pnpm add base-service-fran-dev
yarn add base-service-fran-dev
bun add base-service-fran-dev
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.3.24 |
| Published | 2026-02-21 |
| First published | 2022-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | * |
| Dependencies | 3 |
| Unpacked size | 146.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | fran-dev |
| Maintainers | fran-dev |

## Links

- npm: https://www.npmjs.com/package/base-service-fran-dev
- Repository: https://github.com/fran-dev/base-service
- Homepage: https://github.com/fran-dev/base-service#readme
- Issues: https://github.com/fran-dev/base-service/issues
- npm.io page: https://npm.io/package/base-service-fran-dev

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^1.13.5
- [notistack](https://npm.io/package/notistack.md) ^2.0.5
- [jwt-decode](https://npm.io/package/jwt-decode.md) ^3.1.2

## Recent versions

- 1.3.24 (latest) — 2026-02-21
- 1.4.0 — 2026-02-02
- 1.3.23 — 2025-10-17
- 1.3.22 — 2025-10-17
- 1.3.21 — 2025-10-17
- 1.3.20 — 2025-10-04
- 1.3.19 — 2025-06-29
- 1.3.18 — 2025-06-29
- 1.3.17 — 2025-06-29
- 1.3.16 — 2025-06-29
- 1.3.15 — 2025-02-13
- 1.3.14 — 2025-02-01
- 1.3.13 — 2025-02-01
- 1.3.12 — 2024-05-03
- 1.3.11 — 2024-05-03
- … 40 more at https://npm.io/package/base-service-fran-dev/versions

## README

# base-service

> Made with create-react-library

[![NPM](https://img.shields.io/npm/v/base-service.svg)](https://www.npmjs.com/package/base-service) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save base-service-fran-dev
```

## Usage

The main purpose is to create a class ob the basic methods for the API requests.
Create a service with your BASE_PATH and API endpoint and you will access to the following methods.
All methods use Axios request.  

-> postData(formdata)
   -> formdata is the data send to the API.
   -> postData has the POST method. 
   -> headers : "Content-Type":"application/json"
   -> Url pass as parameter on the constructor of your class. (endpioint of api)


Create (service).js file

```jsx

//Methods of BaseService

  async postData(formData){}
  async postDataAuth(formData, logout){}
  async editData(id, formData){}
  async editDataAuth(id, formData, logout){}
  async getAll(page, numberOfItems){}             //page & numberOfItems are optional defaults = ""
  async getAllAuth(logout, page, numberOfItems){} //page & numberOfItems are optional defaults = ""
  async getAllById(id){}          
  async getAllByIdAuth(id, logout){}
  async getById(id){}
  async deleteAuth(id, logout){}
  async delete(id, logout){}
  async filter(irequestFilter){} 
  // let irequestFilter = []
  // irequestFilter.push({'key':'X', 'value': '1'})
  // irequestFilter.push({'key':'y', 'value': '2'})
  // irequestFilter.push({'key':'z', 'value': '3'})
  async uploadDoc(formData, logout)

/////////////////////////////////

//service.js
import { BaseService } from 'base-service-fran-dev'
import { BASE_URL } from '../constants/constants'

export default class Service extends BaseService(){
  constructor(){
    const baseUrl = BASE_URL;
    const endpoint = "endpoint"
    super(baseUrl, endpoint);
  }
}
//////////////////////

//App.js

import Service from './service.js' //import service

async function functionName(){
    let Service = new Service();
    let response = await Service.postData({data})
}
logout()

```

## License

MIT © [fran-dev](https://github.com/fran-dev)

---
_Source: https://npm.io/package/base-service-fran-dev · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
