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

@s5ming/json

v1.0.2

Published

> import {extend} from '@s5ming/json' >

Readme

关于json的一些工具

引入

import {extend} from '@s5ming/json'

使用说明

extend

var newJson = extend(
    opts 你写入的json参数
    defau 默认的参数,当opt没有此key的时候,将会在defau里找
    config 配置参数{ //可不填写
        exclude:[字段]   此字段强制使用默认的字段
    }
)

parse

var json = parse(str)
//将字符串转成json,写它主要是因为JSON.parse不支持key不加引号的情况.这个支持
//但是这有个bug,就是value里有分号或者逗号的时候会出现异常.慎用.这个bug等我想修复的时候在修复吧 ~v~