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

peacetrue-js

v1.0.6

Published

js工具类及常用组件扩展

Downloads

7

Readme

= JS类库 peacetrue v1.0, 2019-06-13: SNAPSHOT :doctype: docbook :toc: left :numbered:

文档待完善 //TODO 文档待完善

== 前言 .参考

  • https://www.lodashjs.com/
  • http://es6.ruanyifeng.com/
  • https://webpack.js.org/guides/output-management/
  • https://webpack.js.org/configuration/devtool/
  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference

== 疑问 === 如何输出源码和压缩文件 开发模式下生成源码,生产环境下生成压缩代码

=== umd 生成的lib导出都是一个Module,module.default才是最终的内容,如何直接导出内容?

=== 如何排除内部模块引用

=== filename函数的入参结构 [source%nowrap,javascript]

{ noChunkHash: false, contentHashType: 'javascript', chunk: Chunk { id: 2, ids: [Array], debugId: 1001, name: 'PropertyPath', preventIntegration: false, entryModule: [NormalModule], _modules: [SortableSet], filenameTemplate: undefined, _groups: [SortableSet], files: [], rendered: false, hash: '455d3207fbfe2eaa2be68329f6048129', contentHash: [Object], renderedHash: '455d3207fbfe2eaa2be6', chunkReason: undefined, extraAsync: false, removedModules: undefined }, hash: 'b0a04b840b2fdf82db58' } }

=== externals参数结构

arguments: [Arguments] { '0': '/Users/xiayx/Documents/Projects/js-util', '1': './src/core.js', '2': [Function] } arguments: [Arguments] { '0': '/Users/xiayx/Documents/Projects/js-util', '1': './src/property-path.js', '2': [Function] } arguments: [Arguments] { '0': '/Users/xiayx/Documents/Projects/js-util', '1': './src/object.js', '2': [Function] } arguments: [Arguments] { '0': '/Users/xiayx/Documents/Projects/js-util/src', '1': './core', '2': [Function] } arguments: [Arguments] { '0': '/Users/xiayx/Documents/Projects/js-util/src', '1': './property-path', '2': [Function] }


== Core === isPrimitiveOrWrapper 是否原始类型或其封装类型。 原始类型包括boolean, number, string, function, 对应的封装类型为Boolean, Number, String, Function

.示例


== PropertyPath 嵌套对象中从根属性到叶子属性组成的路径。

例如: [source%nowrap,javascript]

let demo = { undefined: undefined, null: null, boolean: true, number: 1, string: "string", function: function () {}, array: [1, 'string', {name: 'hi array'}], object: {name: 'hi object'}, date: new Date(), }

  • array[3].name : 'hi array'
  • object.name : 'hi object'

== Object

== async-validator .参考

  • https://github.com/yiminghe/async-validator

=== requires 多个属性中至少有一个不为null 或者 undefined

=== depend 属性B依赖于属性A; 属性A有值,则属性B必须有值; 属性A无值,则属性B可以有值也可以无值。

=== unique 唯一性校验,支持多字段唯一性

== axios

配置默认axios