npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

apiplaqueimmatriculation

v1.0.0

Published

Client JavaScript simple pour l'API Plaque Immatriculation /plaque /vin

Downloads

129

Readme

API Plaque Immatriculation - Client JavaScript

Client JavaScript simple et professionnel pour l'API Plaque Immatriculation.

🚀 Installation

npm install apiplaqueimmatriculation

📖 Utilisation

Basique

const ApiPlaqueImmatriculation = require('apiplaqueimmatriculation');

const api = new ApiPlaqueImmatriculation('VOTRE_TOKEN');

// Recherche par plaque
const data = await api.getPlaque('AA-123-BC', 'FR');
console.log(data);

Avec gestion d'erreurs

try {
    const data = await api.getPlaque('AA-123-BC', 'FR');
    console.log('Véhicule trouvé:', data);
} catch (error) {
    console.error('Erreur:', error.message);
}

Avec options

const api = new ApiPlaqueImmatriculation('VOTRE_TOKEN', {
    timeout: 5000,  // 5 secondes
    baseUrl: 'https://api.apiplaqueimmatriculation.com'
});

React

import { useState } from 'react';
import ApiPlaqueImmatriculation from 'apiplaqueimmatriculation';

const api = new ApiPlaqueImmatriculation('VOTRE_TOKEN');

function RechercheVehicule() {
    const [immat, setImmat] = useState('');
    const [data, setData] = useState(null);
    const [loading, setLoading] = useState(false);

    const rechercher = async () => {
        setLoading(true);
        try {
            const result = await api.getPlaque(immat, 'FR');
            setData(result);
        } catch (error) {
            alert(error.message);
        }
        setLoading(false);
    };

    return (
        <div>
            <input 
                value={immat} 
                onChange={(e) => setImmat(e.target.value)}
                placeholder="AA-123-BC"
            />
            <button onClick={rechercher} disabled={loading}>
                {loading ? 'Recherche...' : 'Rechercher'}
            </button>
            {data && <pre>{JSON.stringify(data, null, 2)}</pre>}
        </div>
    );
}

Next.js (Server Component)

import ApiPlaqueImmatriculation from 'apiplaqueimmatriculation';

const api = new ApiPlaqueImmatriculation(process.env.API_TOKEN);

export default async function VehiculePage({ params }) {
    const data = await api.getPlaque(params.immat, 'FR');
    
    return (
        <div>
            <h1>{data.marque} {data.modele}</h1>
            <p>Année: {data.annee}</p>
        </div>
    );
}

🌍 Pays supportés

FR, ES, DE, IT, NL, PT, NL

console.log(ApiPlaqueImmatriculation.PAYS_SUPPORTES);

🔑 Obtenir un token

Rendez-vous sur apiplaqueimmatriculation.com pour créer un compte et obtenir votre token API.

📝 API

new ApiPlaqueImmatriculation(token, options)

Crée une instance du client.

Paramètres:

  • token (string) - Token d'authentification API
  • options (object) - Options facultatives
    • timeout (number) - Timeout en ms (défaut: 10000)
    • baseUrl (string) - URL de base de l'API

getPlaque(immatriculation, pays)

Recherche les informations d'un véhicule.

Paramètres:

  • immatriculation (string) - Plaque d'immatriculation
  • pays (string) - Code pays ISO (défaut: 'FR')

Retourne: Promise<Object> - Données du véhicule

checkToken()

Vérifie la validité du token.

Retourne: Promise<boolean>

📄 Licence

MIT © apiplaqueimmatriculation

🐛 Bugs & Support

GitHub Issues

🇫🇷 FR , 🇪🇸 ES , 🇬🇧 UK , 🇩🇪 DE ,🇮🇹 IT, 🇵🇹 PT,🇳🇱NL


## `.npmignore`

node_modules/ .git/ .gitignore *.test.js .env