npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details


  • User packages



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.


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




A React Native wrapper for Huawei Mobile Services





A React Native wrapper for Huawei Mobile Services

This wrapper includes;

  • HMS AnalyticsKit
  • HMS MapKit
  • HMS PushKit

🤔🤔🤔Looking for Contributors🤔🤔🤔

Getting started

$ npm install @el173/react-native-hms --save

Mostly automatic installation

$ react-native link @el173/react-native-hms

Add the AppGallery Connect service dependencies

  • Add the Maven repository address and AppGallery Connect service dependencies in the build.gradle file of your project.
maven {url ''}
classpath 'com.huawei.agconnect:agcp:'
  • Add the plug-in configuration and SDK version in the build.gradle file in the app directory.
apply plugin: 'com.huawei.agconnect'
implementation 'com.huawei.hms:hianalytics:'

Manual installation


  1. Open up android/app/src/main/java/[...]/
  • Add import com.el173.HmsPackage; to the imports at the top of the file
  • Add new HmsPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':@el173_react-native-hms'
    project(':@el173_react-native-hms').projectDir = new File(rootProject.projectDir,'../node_modules/@el173/react-native-hms/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      implementation project(':@el173_react-native-hms')

SDK Configuration

Huawei Developer Console

  1. You need to sign up with a Huawei Developer Account.
  2. Then setup of your app. The guide here.
  3. To configure the app you will need to get agconnect-services.json configuration file.
  4. Add the agconnect-services.json file to your android/app directory.

HMS Analytics Kit

Integration Preparations


SDK Permissions for HMS Analytics Kit

  • HUAWEI Analytics Kit requires the following permissions, which have been preset in HUAWEI Analytics Kit. You do not need to apply for permissions.
<!--Network permission -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Check the network status. -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!--AppGallery channel number query permission. -->
<uses-permission android:name="com.huawei.appmarket.service.commondata.permission.GET_COMMON_DATA" />

Proguard Rules

  • Before building the APK, configure obfuscation scripts to prevent HUAWEI Analytics Kit from being obfuscated. If obfuscation arises, HUAWEI Analytics Kit may not function properly.
# exclude HUAWEI Analytics Kit from obfuscation
-keep class**{*;}
-keep class com.huawei.updatesdk.**{*;}
-keep class**{*;}
-keep interface{*;}
-keep interface{*;}
-keep class com.huawei.hianalytics.CommonUtil{*;}
-keep class com.huawei.hianalytics.HaInterfaceModule{*;}
-keep class com.huawei.hianalytics.HaInterfacePackage{*;}
-keep class com.huawei.hianalytics.HaSdkInitProvider{*;}
-keep class com.huawei.hianalytics.LifeCycleListener{*;}

HMS Map Kit

Adding Permissions

  • To obtain the current device location, you need to add the following permissions in the AndroidManifest.xml file. In Android 6.0 and later, you need to apply for these permissions dynamically.
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
  • Import the following class to the file of your project.
  • Then add the following line to your getPackages method.
packages.add(new HMSMapsPackage());

Proguard Rules

-keepattributes *Annotation*
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes SourceFile,LineNumberTable
-keep class**{*;}
-keep class com.huawei.updatesdk.**{*;}
-keep class**{*;}


  • Check HMS/GMS Availability
import HMS from '@el173/react-native-hms';

isGMS = async () => {
	const isGMS = await HMS.Utils.isGMSAvailable();
	console.log('Your device is running on Google Mobile Services', isGMS);
	return isGMS;

isHMS = async () => {
	const isHMS = await HMS.Utils.isHMSAvailable();
	console.log('Your device is running on Huawei Mobile Services', isHMS);
	return isHMS;
  • Analytics Kit
import HMS from '@el173/react-native-hms';

setHmsEvent = () => {
	const eventObj={

Read more about HMS analytics:

  • MapKit
import HMS from '@el173/react-native-hms';

const MapView = HMS.MapView;

        latitude: 37.78825,
        longitude:  -122.4324,
        latitudeDelta:  0.0922,
        longitudeDelta:  0.0421,

Import other available map components

import {Marker, Polyline, ...} from '@el173/react-native-hms';
  • Push Kit

Generate HCM Token

import HMS from '@el173/react-native-hms';

getToken = () => {
		(retcode, token) => { 
		let msg = ''; 
		if (retcode == 0) { 
			// Handle notification here
			msg = msg + 'getToken result:' + token + '\n'; 
		} else { 
			msg = msg + 'getToken exception, error:' + token + '\n'; 

Register HCM notification listener and token change listener

import {RNRemoteMessage} from '@el173/react-native-hms';

createHCMNotificationListener = onRegister => {
    const eventEmitter = new NativeEventEmitter(NativeModules.ToastExample);
    this.listenerHMCPushMsg = eventEmitter.addListener(
      event => {
        const RNMessageParserSingled = new RNRemoteMessage(event.msg);
        const msg =
          RNMessageParserSingled.getData() +
          '\n' +
          RNMessageParserSingled.getDataOfMap() +
          '\n' +
          RNMessageParserSingled.getMessageId() +
        console.log('HCM notification received - ' + msg);

    const eventTokenEmitter = new NativeEventEmitter(
    this.listenerHCMToken = eventTokenEmitter.addListener(
      event => {
		// Handle notification here
        console.log('HCM token changed - ' + event.token);

  unHCMRegister = () => {

HMS Push FAQ :

Read more about HMS push: