open-index/open-npm huggingface dataset:
npm package: @skinnyjames/cronos
Description: Handle Big Big Time
Latest version: 1.0.2
Deprecated: this package has been moved to @skinnyjames/hourglass

## cronos

library for working with big dates

## usage

```
npm install @skinnyjames/cronos

```

```javascript 

const cronos = require('cronos')

let date = cronos(-31536000, new Date(2000, 0, 1,0,0,0))

console.log(date.friendly()) 

// -1 years From 1/1/2000

console.log(date.fromNow().years)

// -19

```
npm package: @skinnyjames/hourglass
Description: library for measuring relative time
Latest version: 1.2.1

# hourglass

library for working with relative time

[![Build Status](https://travis-ci.org/skinnyjames/hourglass.svg?branch=master)](https://travis-ci.org/skinnyjames/hourglass) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


## usage

```
npm install @skinnyjames/hourglass

```

or include dist/hourglass.js for use in the browser

```html
<script type="text/javascript" src="hourglass.js"></script>
<!-- hourglass now available via window -->

```

```javascript 

const hourglass = require('@skinnyjames/hourglass')

// Pass an object with a years, months, weeks, hours, minutes, seconds and a from property

let aYearAgo = hourglass({
  seconds: -31536000,
  from: new Date(2000, 0, 1, 0, 0, 0)
})

let twoThousandYearsAgo = hourglass({
  years: -2000,
  from: new Date(Date.now())
})

// or pass in as two parameters

let whenThePyramidsWereBuilt = hourglass(-146011680000, new Date(2000, 0, 1, 0, 0, 0, 0))

```

get the number of years elapsed

```javascript

console.log(whenThePyramidsWereBuilt.years)

> -4630

```

get the span in seconds in between two events

```javascript

let deathOfAlexanderTheGreat = hourglass(-73255805000, new Date(2000, 0, 1, 0, 0, 0, 0))

let spanInYears = (whenThePyramidsWereBuilt - deathOfAlexanderTheGreat) / hourglass.SECONDS_PER_YEAR

console.log(Math.round(spanInYears))

> 2307

```

find out the years elapsed from an arbitary date

```javascript

let future = new Date(8000, 0, 1, 0, 0, 0, 0)

console.log(deathOfAlexanderTheGreat.from(future).years)

> -8326

```

print a friendly date (in progress)


```javascript

console.log(aYearAgo.strftime('%years year and %months months from %date'))

> -1 year and 0 months from 1/1/2000

```

export to object

```javascript

exportObject = aYearAgo.export()

```

## development

please feel free to submit pull requests, report a bug, or just share your knowledge and ideas!
npm package: @skinnyjames/leaflet-canvas
Description: a canvas layer for leaflet
Author: Sean Gregory
Latest version: 1.0.6

# leaflet-canvas

a canvas layer for leaflet maps
derived from [Sumbera/gLayers.Leaflet](http://github.com/Sumbera/gLayers.Leaflet)

## usage

```
npm install @skinnyjames/leaflet-canvas

```


## test it out

```
git clone git@github.com:skinnyjames/leaflet-canvas.git
npm install 
npm run build
npm run dev
```
check out http://localhost:8080

### api

`draw` -> redraws the canvas layer

### events

* `drawing` -> invoked before each draw cycle

   exposes the canvas element, map, bounds, size, zoom, center and corner
   register this event to draw on the canvas

*  `click` -> invoked when the canvas is clicked 

   exposes getBufferedBounds in the event object

*  `mousemove` -> invoked on hover

   exposes getBufferedBounds in the event object

*  `move` -> invoked when the canvas moves

*  `moveend` -> invoked after a canvas move

*  `zoom`

*  `resize`

*  `mounted`

*  `unmounted`