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 🙏

© 2021 – Pkg Stats / Ryan Hefner




Passport.js authentication strategy for Salesforce Canvas App (POST signed requests)




Passport.js authentication strategy for Salesforce Canvas App (POST signed requests)


In order to use this Strategy, you'll need a Connected App with Canvas enabled, Canvas App URL that points to the authenticate endpoint, and Access Method set to Signed Request (POST).

npm install --save @broadly/passport-canvas-app


Create a strategy using the connected app consumer secret:

const strategy = new Strategy({
  consumerSecret: '....'
}, function verifyUser(token, profile, done) {
  return done(null, profile);


You will need to authenticate the canvas app endpoint, responding to POST (not GET) request:'/',
  function canvasAppPage(req, res) {
    res.render('index', {
      parameters: req.body.parameters,
      record:     req.body.record,
      user:       req.user

If you are using sessions, don't forget to limit the session duration, and to reject unauthenticated requests on all other routes/methods.

app.use(function requireAuthentication(req, res, next) {
  if (req.isAuthenticated())

User profile

The user profile is available from req.user:

=> {
  id:              '',
  organization_id: '00Dx00000001hxyEAA',
  user_id:         '005x0000001SyyEAAS',
  display_name:    'Sean Forbes',
  email:           '[email protected]'


If the apex:canvasApp component specifies any parameters, these parameters are available from req.body.parameters:

<apex:canvasApp parameters="{count: 2}" ... />
=> {
  count: 2 


If the canvas app appears in association with an object, information about that object, and its fields, are available from req.body.record:

=> {
  attributes: {
    type: 'Account',
    url: '/services/data/v36.0/sobjects/Account/001xx000003DGWiAAO'
  Id: '001xx000003DGWiAAO',
  Phone: '(555) 555-5555',
  Fax: '(555) 555-5555',
  BillingCity: 'Seattle'