Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aminnairi/libsiren

Library of JavaScript functions for validating SIREN & SIRET numbers for french entreprises.
https://github.com/aminnairi/libsiren

Last synced: about 5 hours ago
JSON representation

Library of JavaScript functions for validating SIREN & SIRET numbers for french entreprises.

Awesome Lists containing this project

README

        

# libsiren

Library of JavaScript functions for validating SIREN & SIRET numbers of french entreprises.

## Usage

### Node

```shell
$ # NPM users
$ npm install @aminnairi/libsiren
$ # Yarn users
$ yarn add @aminnairi/libsiren
```

```javascript
// ESModule
import { isValidSiren, isValidSiret } from '@aminnairi/libsiren'
// CommonJS
const { isValidSiren, isValidSiret } = require('@aminnairi/libsiren')

isValidSiren(123456789)
isValidSiret(12345678901234)
```

### Web

Download the raw content of [`libsiren.js`](./libsiren.js)

```html



Test Page For libsiren




const { isValidSiren, isValidSiret } = libsiren

isValidSiren(123456789)
isValidSiret(12345678901234)

```

## Examples

```javascript
isValidSiren(123456789)
isValidSiren('123 456 789')

isValidSiret(12345678901234)
isValidSiret('123 456 789 01234')
```