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

profile-components

v0.4.1

Published

A collection of web components for displaying profile information from various websites.

Downloads

30

Readme

profile-components

Web components which display profile information from various websites

Components

GitHubUser

GitHub user profile web component

Summary: Native web component which shows a GitHub user's profile content. Can use local data, fetch data from the GitHub rest API, or use a combination of both.
Element: github-user
Properties

| Name | Type | Description | | --- | --- | --- | | login | string | User's GitHub login | | avatar_url | string | URL to user's avatar | | name | string | User's name | | [fetch] | boolean | when true, fetches user from the GitHub api | | [username] | string | alias for login | | [bio] | string | User's biography content | | [following] | string | number of people user is following | | [followers] | string | number of followers | | [repos] | string | JSON stringified array of repositories | | [theme] | string | color theme for the component |

Example

<!-- import the web component -->
<script type="module" src="https://unpkg.com/profile-components/dist/github-user.js"></script>

<!-- use the custom element -->
<github-user login="scottnath" fetch="true"></github-user>

GitHubRepository

GitHub repository web component

Summary: Native web component which shows a GitHub repository's content. Can use local data, fetch data from the GitHub rest API, or use a combination of both.
Element: github-repository
Properties

| Name | Type | Description | | --- | --- | --- | | full_name | string | repository org and name, as in scottnath/profile-components | | [fetch] | boolean | when true, fetches repo from the GitHub api | | [name] | string | repo name | | [org] | string | repo owner organization's login, found at <REST_RESPONSE>.organization.login | | [description] | string | repo description | | [language] | string | programming language used in repo | | [stargazers_count] | string | number of stars | | [forks_count] | string | number of forks | | [subscribers_count] | string | number of watchers | | [itemprop] | string | Itemprop content to go with a containing component's itemscope | | [no_org] | string | Do not include the repo owner or organization | | [theme] | string | color theme for the component |

Example

<!-- import the web component -->
<script type="module" src="https://unpkg.com/profile-components/dist/github-repository.js"></script>

<!-- use the custom element -->
<github-repository full_name="scottnath/profile-components" fetch="true"></github-repository>

DevtoUser

dev.to user profile web component

Summary: Native web component which shows a dev.to user's profile content. Can use local data, or fetch data from the dev.to API, or use a combination of both.
Element: devto-user
Properties

| Name | Type | Description | | --- | --- | --- | | username | string | User's dev.to username | | [fetch] | boolean | when true, fetches user and posts from the Forem API | | [name] | string | The name of the user | | [summary] | string | The user's bio | | [joined_at] | string | The date the user joined | | [profile_image] | string | The URL of the user's profile image | | [post_count] | number | The number of posts the user has published | | [latest_post] | string | User's latest post content, JSON stringified | | [popular_post] | string | User's most popular post content, JSON stringified | | [theme] | string | color theme for the component |

Example

<!-- import the web component -->
<script type="module" src="https://unpkg.com/profile-components/dist/devto-user.js"></script>

<!-- use the custom element -->
<devto-user username="scottnath" fetch="true"></devto-user>

DevtoPost

dev.to post web component

Summary: Native web component which shows a dev.to (or forem.dev) post. Can use local data, fetch data from the dev.to API, or use a combination of both.
Element: devto-post
Properties

| Name | Type | Description | | --- | --- | --- | | id | number | Post ID | | title | string | Post title | | url | string | Post URL | | cover_image | string | Post cover image URL | | social_image | string | Post social image URL | | [fetch] | boolean | when true, fetches post from the Forem API |

Example

<!-- import the web component -->
<script type="module" src="https://unpkg.com/profile-components/dist/devto-post.js"></script>

<!-- use the custom element -->
<devto-post id="123456" fetch="true"></devto-post>