npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@geostarters/common

v0.4.3

Published

ICGC JS common

Downloads

22

Readme

ICGC-COMMON

npm version

Build status

License

A Javascript lib with common functionalities to use across different projects.

INSTALLATION

npm i --save @geostarters/common

USAGE

Usage example with Svelte


import {GeoCommons} from "@geostarters/common/dist/commonjs";

 const geoCommons = new GeoCommons();

 geoCommons.getEmptyGeoJSON());

Usage with ES6 modules:

import * as ICGCCommon from " @geostarters/common";

Usage with Commonjs:

const Utils =  require("@geostarters/common");

Besides it, it is generated a single file package and its .map, using browserify:

dist/ICGCCommon.js

dist/ICGCCommon.map.js

DOCUMENTATION

DOCS API

Environment

Documenting the code

The documentation follows the JSDoc syntax.

To get started you can read the documentation.js start guide here or take a look at the provided example file here

Using types

Using flow provides a way to check for common syntax errors while calling functions. Flow provides a simple example of which kind of problems it can solve in their Type Annotations guide. There's also a list of annotations it supports there.

Writting tests

  • The project uses JEST.
  • test folder included

Provided scripts

  • build-dev: Creates a single file package with all the assertions intact to be ussed in browsers.
  • watch-dev: Watches the source
  • build-min: Creates a minified package with its map file and without assertions to be ussed in browsers
  • build-unflow: Builds ready-to-use modules in dist by removing flow types
  • build-react: Builds ready-to-use es modules in dist/es by removing flow types
  • build-modules: Builds ready-to-use commonjs modules in dist/commonjs
  • build-docs: Generates the documentation file
  • lint: Checks the code linting
  • lint-docs: Lints the documentation files
  • test: Runs the static type checker and runs the tests
  • test:unit: Runs the unit tests
  • test-flow: Runs the static type checks
  • test-cov: Runs the testing coverage

Folder structure

dist: Contains the built files generated by the scripts (dev package, minified package and map, commonjs folder and es folder)

src: Contains an index file that requires all the modules that should be exported and all the source files that compound the package.

test: Contains the unit and integration tests

License

Copyright (c) 2019 - Geostarters (MIT License) See LICENSE file for more info.