šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

x-weather

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

x-weather

A collection of web components implementing portions of the OpenWeatherMap API.

3.0.0
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
Ā 
Created
Source

<x-weather>

About

A collection of web components implementing portions of the OpenWeatherMap API.

Usage

Static Import Example:

Install:

npm i x-weather

Render:

<script type="module">
  import * as XWeather from './node_modules/x-weather/dist/esm/module.js'

  XWeather.defineCustomElements()
</script>
<x-weather
  appid="NOT_A_REAL_APP_ID"
  latitude="33.43"
  longitude="-112.11"
  placename="Phoenix, Arizona"
>
  <x-current primaryscale="f"></x-current>
  <x-forecast days="14" primaryscale="f"></x-forecast>
</x-weather>

Dynamic Import Example:

Render:

<script>
  import('https://unpkg.com/x-weather/dist/esm/defineCustomElements.js')
    .then(({
      defineCustomElements
    }) => {
      defineCustomElements()
    })
</script>
<x-weather
  appid="NOT_A_REAL_APP_ID"
  latitude="33.43"
  longitude="-112.11"
  placename="Phoenix, Arizona"
>
  <x-current primaryscale="f"></x-current>
  <x-forecast days="14" primaryscale="f"></x-forecast>
</x-weather>

Development

npm run start

Lint

npm run lint

Build

npm run build

Keywords

Web Components

FAQs

Package last updated on 15 Jun 2020

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