@waterthetrees/tree-id

1.0.6 • Public • Published

tree-id

Generate a unique tree id based on properties of the tree (e.g. sourceId or city, species or scientific name, lat/lng coordinates).

Usage:

Install this library as a dependency in your project:

npm install --save @waterthetrees/tree-id

Import and use the module:

import { createIdForTree } from '@waterthetrees/tree-id';

const treeId = createIdForTree({
  species: 'Lagerstromia Indica',
  city: 'san_francisco',
  lat: 37.713225870641935,
  lng: -122.45009922742373,
});

console.log(treeId);
import { createIdForTree } from '@waterthetrees/tree-id';

const treeId = createIdForTree({
  scientific: 'Lagerstromia Indica',
  sourceId: 'san_francisco',
  lat: 37.713225870641935,
  lng: -122.45009922742373,
});

console.log(treeId);

Readme

Keywords

none

Package Sidebar

Install

npm i @waterthetrees/tree-id

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

6.72 kB

Total Files

9

Last publish

Collaborators

  • jazhen
  • zoobot