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

jrbasic

v1.1.0

Published

npm install jrbasic --save

Downloads

68

Readme

#jrbasic

npm install jrbasic --save

#简融基础

  /*fetch请求*/
  export const jrRequest = _jrRequest;
  export const getFetchPromise = _getFetchPromise;
  export const fetchGet = _fetchGet;
  export const fetchPost = _fetchPost;
  export const AjaxGet = _AjaxGet;
  export const AjaxPost = _AjaxPost;
  /*others其他*/
  export const remSet = _remSet;
  export const searchToObj = _searchToObj;
  export const checkTel = _checkTel;
  export const isIosAndroid = _isIosAndroid;
  /*log埋点*/
  export const addJrLog = _addJrLog;
  export const addGrowingLog = _addGrowingLog;
  /*cookie操作*/
  export const setCookie = _setCookie;
  export const getCookie = _getCookie;
  

#使用

import { jrRequest, AjaxPost, AjaxGet, remSet } from 'jrbasic';

###设置页面的rem单位

remSet(document, window);  设计稿宽度为375px  1rem相当于20px 

###路由参数转换

searchToObj("?letter=2&opp=23") ==>>> {letter:2, opp:23}

###action示例

export const getBanner = () => {
  return function (dispatch) {
      jrRequest({
          requestType: 'GET', /*请求方法GET/POST 不指定默认GET*/
          dispatch: dispatch, /*dispatch方法 必传参数*/
          jrApi: apiGetBanner, /*Api url 请求地址*/
          fetchPrm: {hello: '2'}, /*请求参数object形式*/
          requestingAction: requestPosts, /*请求过程中的action钩子*/
          successAction: bannerImagesSet, /*请求成功后的action钩子 必传*/
          errorAction: errorPosts, /*请求失败的action*/
          extra: extra /*action的第二个参数 自己定义*/
      });
  }
};

###基础动画样式(animate简融版)

引用方式 使用方式, 只需引用一次即可 不需要每个组件都import

import 'jrbasic/jrAnimate.less'

...

<p class="animated hinge flash">hello world</p>
<p class="animated bounceIn pulse">hello world</p>
<p class="animated fadeIn">hello world</p>
<p class="animated fadeInDown">hello world</p>
<p class="animated fadeOut">hello world</p>

使用例子参照包里的jrAnimateExample.html

或者 https://daneden.github.io/animate.css/