You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

jamments-front

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jamments-front

Jamments frontend API library

2.0.0
latest
npm
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Jamments front

This library is to be used with Jamments comment API.

Jamments is a self hosted commenting API that puts you in control. It's a dead simple REST API that seamlessly integrates with your already existing JAMstack.

This is the frontend API library for Jamments' API. Its aim is to ease Jamments integration within your code. You should go to the documentation for more details.

Also note that this library uses the Fetch API and that it might not be available in older browsers. If you're willing to support older browsers, you can easily polyfill it.

Install with npm or yarn

npm install --save jamments-front

And then just import it as any ES module.

import Jamments from 'jamments-front';

Usage

Here's how you post a new comment

jamments.postComment(slug, comment, name, email, parentId)
.then(() => {
    // comment successfully submitted to the api
})
.catch((err) => {
    // Houston, we had a problem
});

FAQs

Package last updated on 20 Mar 2021

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