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 🙏

© 2025 – Pkg Stats / Ryan Hefner

go-snippets

v0.1.3

Published

Some snippets for go,especially usefull for leetcode etc.

Downloads

5

Readme

Go Snippets

Logo

Currently we only offer some snippets for leetcode . below is the snippets table:

| prefix | description | | :----------- | :------------------------------ | | absi | abs for int | | maxi | max for int | | mini | min for int | | sumi | sum for ints | | avgi | avg for ints | | maxints | max for ints | | joinints | join ints to string | | limits | MaxInt and MinInt | | contains-str | String slice contains str | | treenode | type TreeNode struct | | dumptree | Dump Tree using level order | | listnode | type ListNode struct | | dumplistnode | Dump ListNode using level order | | reversearr | Reverse Ints Array | | reversestr | Reverse String | | pbasic | Basic file for problem | | pbinarytree | Binary Tree solution file stub | | p1darr | One Dimen Array Basic file stub | | p2darr | One Dimen Array Basic file stub |

And I have also add some slice tricks as snippet below: taken from SliceTricks

| prefix | description | | :------------ | :--------------------------------------------- | | range.map | range map | | range.arr | range array, slices | | range.str | range interate over unicode points,not bytes | | slice.av | Slice Append Vector | | slice.copy | Slice Copy | | slice.cut | a = append(a[:i], a[j:]...) | | slice.delete | a = append(a[:i], a[i+1:]...) | | slice.extend | a = append(a, make([]T, j)...) | | slice.insert | a = append(a[:i], append([]T{x}, a[i:]...)...) | | slice.unshift | a = append([]T{x}, a...) | | slice.push | a = append(a, x) | | slice.pop | x, a = a[0], a[1:] | | slice.popback | x, a = a[len(a) -1], a[:len(a) -1] |