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

frontend-gitlab

v1.0.3

Published

GitLab api node module that does not require server-side dependencies.

Readme

frontend-gitlab

GitLab api node module that does not require server side dependencies.

Usage

The goal is to make a very light weight set of functions to access the gitlab api.

There's a mix of focused requests and more broad custom functions. And you can use composition to use credentials over and over. So import only the ones that you need.

Here's a couple of examples:

import {getIssues} from 'frontend-gitlab/requests/issues';
getIssues({url:'http://foo.gitlab.com', token:'abc123'})();

That will return promise that will resolve with a list of project issues.

A slightly more complicated example shows the value of composition:

import {getProjectIssues} from 'frontend-gitlab/requests/issues';
const projectIssues = getProjectIssues({url:'http://foo.gitlab.com', token:'abc123'});
//Return the closed issues
projectIssues(0, {'state':'closed'})
//Return the open issues
projectIssues(0, {'state':'open'})

You can also mix and match

import gitlab from 'frontend-gitlab';
import {projectIssues, getProjectIssues} from 'frontend-gitlab/requests/issues';

const creds = gitlab({url:'http://foo.gitlab.com', token:'abc123'})

creds(getIssues);
creds(getProjectIssues, 0, {
  'state':'open'
});

In this case, all you need to do is pass the function along with its arguments and you only need to add the credentials once.

This is a work in progress, so there are very little prebuilt functions. However, you should be able to do anything you want by creating a custom request with a few inputs.

Just get the path for the request you are making, pass a request type if needed and then an object for the parameters.

import {request} from 'frontend-gitlab/requests/custom'
const requester = request({url:'http://foo.gitlab.com', token:'abc123'});

// Default request type is GET
requester('projects/0/issues', {
    params: {
        'state':'closed'
    }
})

// Omit the options object if a simple git request:
fetchContributors = (projectNumber) => {
  return requester(`/projects/${projectNumber}/repository/contributors`)
}

// POST or any other method can be specified
requester('projects/0/issues', {
    requestType: {
        method: "POST"
    },
    params: {
        title: 'New Issue',
        labels: 'iteration-1',
        assignee_id: 1
    }
})

Everything returns a promise, so use as you would for any other request.