Socket
Socket
Sign inDemoInstall

bom-weather-transform

Package Overview
Dependencies
7
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bom-weather-transform

Transforms for the bom-weather package.


Version published
Maintainers
1
Created

Readme

Source

bom-weather-transform

Build Status codecov

A set of output transforms for the bom-weather module to provide useful native javascript representations of Australian Bureau of Meteorology data. This library normalises data, removing superfluous structures, converting dates and times appropriately.

Usage

Distributions of bom-weather automatically transform output data using bom-weather-transform. If you would like to utilise a different version of bom-weather-transform with your installation of bom-weather you can do so as such:

import BomWeather from 'bom-weather';
import customBomWeatherTransform from `bom-weather-transform-custom`;

const weather = BomWeather({transforms: customBomWeatherTransform});

Transforms

The module exports a series of transforms which can be automatically utilised by bom-weather. The following transform functions are available.

observations(apiResult: Object<BOMObsRawResult>) - Coastal, Weather and Capital City Observations

Returns a BOMObsResult object ingesting a BOMObsRawResult object (A parsed representation of the BOM observation JSON) by transforming unix timestamps to Javascript dates, nullifying any fields which contain empty values, and normalising the header and notice properties.

Running Tests

bom-weather-transform has a series of built-in tests to validate the expected output of data structures transformed. These also perform unit testing on individual functions of these transforms.

These tests can be run using:

npm test

Custom Transforms

You can use this module as a base or template for building custom transformations for the bom-weather module.

Keywords

FAQs

Last updated on 17 Dec 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc