Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sg-haze

ZacBytes31MIT1.0.6

Parser for NEA haze api

sg, singapore, haze, nea, psi, parser, pm2.5

readme

sg-haze

Build Status

Parser for NEA haze api

Installation

Use the package manager npm to install sg-haze.

npm install sg-haze

Usage

const sghaze = require('sg-haze');

sghaze.getPSI(function(err, PSIData){
   console.log(PSIData) //logs entire PSIData object

   console.log(PSIData.NationalPSI) //logs National PSI (log the PSIData object to see what the object contains)
});

sghaze.getPM25(function(err, PM25Data){
   console.log(PM25Data) //logs entire PM25Data object

   console.log(PM25Data.NorthPM25) //logs National PSI (log the PM25Data object to see what the object contains)
   console.log(PM25Data.NorthHealthStatus) //logs North PM25 health status/level
});

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to test before making pull requests.

License

MIT