Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

combo

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

combo

Combo lets you build static APIs.

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Combo

Combo lets you build static APIs.

This is achieved by processing a given data source into a folder structure containing JSON files (without extensions). This folder structure can be hosted on services such as GitLab Pages.

Name

The usefulness of this library comes from its ability to combine raw data with transformations in order to create useful, static APIs.

Notice

Combo is in early development. It will contain bugs and is subject to change at any time.

Installation

npm install combo

Example

import Combo from "combo";

type DataSource = {
  id: string;
  title: string;
}[];

const api = new Combo<DataSource>();

const v1 = api.addVersion("v1");
v1.addRouteFunction("list", (data) => {
  return data.reduce((obj, { id, title }) => {
    return { ...obj, [id]: title };
  }, {});
});

api.build([
  { id: "001", title: "Test 001" },
  { id: "002", title: "Test 002" },
  { id: "003", title: "Test 003" },
]);

Keywords

FAQs

Package last updated on 06 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc