peacetrue-js

WebJar for peacetrue-js

License

License

ISC
Categories

Categories

JavaScript Languages
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

peacetrue-js
Last Version

Last Version

1.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

peacetrue-js
WebJar for peacetrue-js
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/peacetrue/peacetrue-js

Download peacetrue-js

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/peacetrue-js/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>peacetrue-js</artifactId>
    <version>1.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/peacetrue-js/
implementation 'org.webjars.npm:peacetrue-js:1.0.5'
// https://jarcasting.com/artifacts/org.webjars.npm/peacetrue-js/
implementation ("org.webjars.npm:peacetrue-js:1.0.5")
'org.webjars.npm:peacetrue-js:jar:1.0.5'
<dependency org="org.webjars.npm" name="peacetrue-js" rev="1.0.5">
  <artifact name="peacetrue-js" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='peacetrue-js', version='1.0.5')
)
libraryDependencies += "org.webjars.npm" % "peacetrue-js" % "1.0.5"
[org.webjars.npm/peacetrue-js "1.0.5"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : axios jar [0.19.0,0.20)
org.webjars.npm : qs jar [6.7.0,7)

Project Modules

There are no modules declared in this project.

JS类库

文档待完善

2. 疑问

2.1. 如何输出源码和压缩文件

开发模式下生成源码,生产环境下生成压缩代码

2.2. umd

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

2.3. 如何排除内部模块引用

2.4. filename函数的入参结构

 { 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' }
}

2.5. 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] }

3. Core

3.1. isPrimitiveOrWrapper

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

示例
 
    

4. PropertyPath

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

例如:

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'

5. Object

6. async-validator

6.1. requires

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

6.2. depend

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

6.3. unique

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

7. axios

配置默认axios

Versions

Version
1.0.5
1.0.3
1.0.1
1.0.0