node-wolfram-alpha
TypeScript icon, indicating that this package has built-in type declarations

1.2.5 • Public • Published

node-wolfram-alpha

An extremely tiny Wolfram Alpha API wrapper for Node.js

Features

✓ Single dependency (axios)

✓ Promise-based

✓ Full type definitions (response types extracted from Wolfram Docs)

Usage

import { WolframClient } from 'node-wolfram-alpha';
 
const client = new WolframClient('your api key');
 
// Query wolfram for 'population of France', but only return the first pod
const result = await client.query('population of France', { podindex: 1 });
 
// Or, do the same by passing in the whole, uri-encoded URL
const url = 'http://api.wolframalpha.com/v2/query?appid=YOUR_APP_ID&input=population%20of%20france&podindex=1';
const result = await client.getFromUrl(url);

All possible options that can be provided to the .query() method can be found at: https://products.wolframalpha.com/api/documentation/#parameter-reference

Building

If you would like to build the library from source, you can do it as following:

yarn
yarn run build

Readme

Keywords

none

Package Sidebar

Install

npm i node-wolfram-alpha

Weekly Downloads

0

Version

1.2.5

License

MIT

Unpacked Size

10.6 kB

Total Files

5

Last publish

Collaborators

  • greenchill