New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

treasuryio

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

treasuryio

NodeJS client for treasury.io

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-75%
Maintainers
3
Weekly downloads
 
Created
Source

treasuryiojs

This is a treasury.io client for JavaScript. It can return a csv or a json response depending on whether you pass either string as the second argument..

Install

npm install --save treasuryio

In NodeJS

Run with a json response

var treasuryio = require('treasuryio')
treasuryio('SELECT * FROM t1 LIMIT 10', 'json', function (err, response) {
  if (err) {
    console.log(err)
  }
  console.log(response)
})

Run with a csv response

var treasuryio = require('treasuryio')

treasuryio('SELECT * FROM t1 LIMIT 10', 'csv', function (err, response) {
  if (err) {
    console.log(err)
  }
  console.log(response)
})

In the browser

The usage is exactly the same in the browser except you don't need the line var treasuryio = require('treasuryio'). The only catch is you need to load the dsv module in your HTML like so:

<script src="dsv.min.js"></script>

You can grab copy this file from here.

Test

To test that it works in the browser, open this page. You should see the first ten rows of of t1, Operating Cash Balance.

To test that it works in node, run

npm install
npm test

It should print the first ten rows from t1, "Operating Cash Balance" as csv and json.

FAQs

Package last updated on 15 Oct 2016

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