Socket
Book a DemoInstallSign in
Socket

astrocite-googlebooks

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astrocite-googlebooks

Converts Google Books API responses to CSL JSON

0.16.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

astrocite-googlebooks

A helper library for converting Google Books API JSON to CSL JSON.

See astrocite for more details.

API

toCSL(apiResponse, isChapter = false)

Returns: Array<CSL.Data>

apiResponse

Type: Object

The entire JSON response received from the Google Books volumes API.

isChapter

Type: boolean

Use this to set title to the appropriate field when you intend to use the data for citing an individual chapter.

Usage

import { toCSL } from 'astrocite-googlebooks';

// Assume apiResponse is the JSON received from the Google Books volume API
const cslJSON = toCSL(apiResponse);

// Citing a chapter
const chapterCslJSON = toCSL(apiResponse, true);

FAQs

Package last updated on 24 Oct 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.