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

@hec9527/jsonp

v1.0.1

Published

A simple JSONP implementation base on typescript build by rollup

Downloads

3

Readme

jsonp

GitHub Size Version Files Bundle Download Issues Start

English

一个用Rollup打包并且使用typescript编写的jsonp实现

🚀 安装

使用npm安装

npm install jsonp --save

🎉 feature

  • 轻量

    gzip压缩后构建产物不到1kb

  • 类型安全

    由typescript编写,并且提供内置类型声明

  • 资源映射

    你可以使用source maps来逐步调试

  • 开源

    免费获得所有源码并且构建自己的产物

📚 API

jsonp(url, option, callback)
  • url (String) 请求的数据地址
  • option (Object) 选项,可选的
    • prefixString)jsonp回调函数的前缀
    • nameString) 自定义jsonp回调函数的函数名称
    • params (String) 查询字符串中回调函数的key,默认是callback
    • timeoutNumber) 请求的时间限制 (默认: 60*1000 毫秒)
    • dataObject) 其他查询字符串,值得注意的是,如果包含和回调函数key相同的key会被忽略
  • callbackFunction)请求的回调函数,第一个参数是错误信息,第二个参数是请求返回的数据

📃 许可证

MIT