Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@anandaroop/yat

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anandaroop/yat

A silly geolocation component

  • 1.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

yat

Yat is a simple client-side geolocation React component, made mostly to tinker with publishing npm packages.

You don't have to be a yat to use it.

Installation

yarn add @anandaroop/yat

Basic Usage

In your html:

<div id="root">
  <!-- component will mount here  -->
</div>  

In your javascript:

import React from 'react'
import ReactDOM from 'react-dom'
import Yat from '@anandaroop/yatyat'

ReactDOM.render(
  <Yat />,
  document.querySelector('#root')
)

Resulting in the html output:

-74.9938, 39.8526

Options

Let's support both lon,lat and lat,lon ordering.

import React from 'react'
import Yat from '@anandaroop/yatyat'

MyComponent = () =>
  <div>
    <p>Here's lon,lat ordering (the default)</p>
    <Yat order="lon,lat" />

    <p>Here's lat,lon ordering</p>
    <Yat order="lat,lon" />
  </div>

Development

Component source code lives under /src/components.

Implementations, specs and stories are all co-located under each component directory.

src/components/
└── Yat
    ├── __snapshots__
    ├── index.js
    ├── spec.js
    └── stories.js

Testing

Use Jest for behavior and snapshot testing

$ yarn test

Stories

Use Storybook for a nice developer experience, and to document

$ yarn run storybook
$ open http://localhost:6006

FAQs

Package last updated on 11 Aug 2017

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