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

p-na

v0.4.25

Published

Na for Sk ~

Readme

Na for SK ~ 通用组件库


安装:

npm install p-na

使用:

import Na from 'p-na';

BI V2 pingback 合并常用参数

window.biParams = {
  "v":"9.1.5",
  "u": "01F49483-FD94-45AD-B6E4-408D867BFFD8",
  "pu": 123456,
  "dfp": "test"
}
Na.bi({"t": 21,"rpage": "newgift","block":"seven"},window.biParams);

a大于等于b

Na.compareVersion("9.1.0","9.1.5");

剪切板

var iqiyippsScheme = 123;
Na.Clipboard(iqiyippsScheme, 'copy', function() { 
  console.log(iqiyippsScheme);
}).start();

技术统计

Na.dau("test")

初始化bridge,数据注入

需要端内bridge支持

Na.getBridgeInit().then(function(data) {
    console.log(data)
  },
  function(reason,data) {
    console.log(reason);
  }
);

url参数获取

http://skua.iqiyi.com/ppsTask.html?t=22&rpage=test&block=block&rseat=rseat

console.log(Na.getParams())

{t: "22", rpage: "test", block: "block", rseat: "rseat"}

AB分组是否符合

Na.isAB("01F49483-FD94-45AD-B6E4-408D867BFFD8","12345678")

唤起

let p = {
 "biz_id": "100",
 "biz_subid": "112",
 "biz_plugin": "",
 "biz_params": {
  "biz_sub_id": "112",
  "biz_params": "selectedTab=8196",
  "biz_dynamic_params": "return_pageInfo=%7B%22returnId%22%3A%221%22%7D",
  "biz_extend_params": "",
  "biz_statistics": ""
 }
}

Na.openApp(p);
Na.openApp(p,apkUrl);
可选填apkUrl作为制定渠道包

openAppCofig(scheme,config)
// config.backupScheme 可指定剪切板内复制不同于唤起
// config.apkUrl 制定渠道包

新开webview方式打开H5

Na.openApp("https://www.baidu.com/");

站内页面默认来源统计

需要端内且 4项参数(t,rpage,block,rseat)同时存在时上报

Na.pb();

站外分享

支持域名 http://static.iqiyi.com http://nadouh5.iqiyi.com

Na.wxInit({
  "title":"title",
  "desc":"desc",
  "link":location.href,
  "img":"https://gss1.bdstatic.com/9vo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike72%2C5%2C5%2C72%2C24/sign=fb3301a5512c11dfcadcb771024e09b5/fcfaaf51f3deb48f15be6798f61f3a292cf578a5.jpg"
})

UA

Na.UA();
Na.UA().ios

获取营销域名

域名列表配置中心配置,异步api,需在回调内使用

Na.domain().then(function(data) {
    console.log(data);
    // http://9xjkm68u.020tmall.com
  },
  function(reason,data) {
    console.log(reason);
  }
);