Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/aminnairi/libsiren
- Owner: aminnairi
- License: gpl-3.0
- Created: 2018-09-08T12:49:35.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-09T09:20:19.000Z (about 6 years ago)
- Last Synced: 2024-10-16T11:32:45.060Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 } = libsirenisValidSiren(123456789)
isValidSiret(12345678901234)
```
## Examples
```javascript
isValidSiren(123456789)
isValidSiren('123 456 789')isValidSiret(12345678901234)
isValidSiret('123 456 789 01234')
```