profile
viewpoint

yiminghe/async-validator 5987

validate form asynchronous

react-component/time-picker 396

React TimePicker

yiminghe/dom-align 239

Align DOM Node Flexibly

yiminghe/dom-scroll-into-view 137

scroll dom node into view automatically

yiminghe/css-animation 87

make css animation easier

yiminghe/add-dom-event-listener 38

add dom event listener. normalize ie and others

yiminghe/gregorian-calendar 20

gregorian calendar lib on browser and nodejs

yiminghe/gregorian-calendar-format 16

format gregorian-calendar

yiminghe/kison 16

A parser generator for javascript

push eventyiminghe/zscroller

yiminghe

commit sha a52cae5de310ecf0d1a752c5ddce9ed41852172e

optimize win

view details

push time in 10 days

push eventyiminghe/zscroller

yiminghe

commit sha 758bced35dfa457443ee68df03837a770082c82f

fix locking for mousewheel

view details

push time in 10 days

push eventyiminghe/pika-plugin-build-web-babel

yiminghe

commit sha 1fc5c4295d88c16f44b88c3e3a61d3d220a0283a

bump

view details

push time in 12 days

push eventyiminghe/pika-plugin-build-web-babel

xinyuehtx

commit sha b58d43bf2c1aaa975ab97b1b27855009a4719522

处理在resolve之后,id变为绝对路径的问题 在windows上会对引用对路径进行转换,这个时候获得的是绝对路径,不能以startwith(./)这样的方式处理

view details

xinyuehtx

commit sha 44e4ec9756a889da2d67aaa797cbb8dc6872f6aa

Update index.js 使用path.sep分割后进行判断

view details

yiminghe

commit sha ec1e57b76dac443c81ba656701c2e48e4adc5981

Merge pull request #2 from xinyuehtx/master 处理在resolve之后,id变为绝对路径的问题

view details

push time in 12 days

PR merged yiminghe/pika-plugin-build-web-babel

处理在resolve之后,id变为绝对路径的问题

在windows上会对引用对路径进行转换,这个时候获得的是绝对路径,不能以startwith(./)这样的方式处理

+9 -1

1 comment

1 changed file

xinyuehtx

pr closed time in 12 days

push eventyiminghe/pika-plugin-ts-types

yiminghe

commit sha 370559285f777b9f8b82e23caf44911aa2f98a2c

emitDeclarationOnly

view details

push time in 15 days

push eventyiminghe/pika-plugin-ts-types

yiminghe

commit sha b78e723f24140f9986e8ababfd4d2f2f6ba165d6

init

view details

push time in 15 days

push eventyiminghe/pika-plugin-ts-types

yiminghe

commit sha f0c0ae0d65d13bcb3e15e1ce611a8014fb70d93b

init

view details

push time in 15 days

create barnchyiminghe/pika-plugin-ts-types

branch : master

created branch time in 15 days

created repositoryyiminghe/pika-plugin-ts-types

A @pika/pack plugin: generate typescript types to dist-types

created time in 15 days

startedwebpack-contrib/webpack-bundle-analyzer

started time in 16 days

push eventyiminghe/zscroller

yiminghe

commit sha f22d87f9e2b8c65f0fa49a49bae57a3edb980b34

fix scrollbar mousedown

view details

push time in 16 days

pull request commentyiminghe/pika-plugin-build-web-babel

处理在resolve之后,id变为绝对路径的问题

用 \w:/ 判断?

xinyuehtx

comment created time in 18 days

push eventyiminghe/zscroller

yiminghe

commit sha c4d28d65eff16e0885a9ceb5ff4b82f0ff252f4c

optimize classname

view details

push time in 25 days

push eventyiminghe/zscroller

yiminghe

commit sha 99672fbf5a1ecd31c71e1bca73cf468dc78257b8

add active status

view details

push time in 25 days

Pull request review commentljharb/es-abstract

make compress friendly

 try { 	getInferredName = Function('s', 'return { [s]() {} }[s].name;'); } catch (e) {} -var inferred = function () {};+// eslint-disable-next-line no-new-func+var inferred = Function('var inferred = function () {}; return inferred;')();

https://javascript-minifier.com/

(function(){
  var xx=1;
  
  var infer=function (){};
  
  console.log(infer.name,xx);
  })();
yiminghe

comment created time in a month

PullRequestReviewEvent

Pull request review commentljharb/es-abstract

make compress friendly

 try { 	getInferredName = Function('s', 'return { [s]() {} }[s].name;'); } catch (e) {} -var inferred = function () {};+// eslint-disable-next-line no-new-func+var inferred = Function('var inferred = function () {}; return inferred;')();

try https://github.com/babel/minify

yiminghe

comment created time in a month

PullRequestReviewEvent

Pull request review commentljharb/es-abstract

make compress friendly

 try { 	getInferredName = Function('s', 'return { [s]() {} }[s].name;'); } catch (e) {} -var inferred = function () {};+// eslint-disable-next-line no-new-func+var inferred = Function('var inferred = function () {}; return inferred;')();

I don't think this is minifier's problem, because all minifiers(uglify,babel...) works the same way

yiminghe

comment created time in a month

PullRequestReviewEvent

Pull request review commentljharb/es-abstract

make compress friendly

 try { 	getInferredName = Function('s', 'return { [s]() {} }[s].name;'); } catch (e) {} -var inferred = function () {};+// eslint-disable-next-line no-new-func+var inferred = Function('var inferred = function () {}; return inferred;')();

webpack's builtin minifier, this is how minifier works by default.

yiminghe

comment created time in a month

PullRequestReviewEvent

Pull request review commentes-shims/Symbol.prototype.description

fix ownProperty

 var define = function defineGetter(getter) { 	}); }; +var copyStaticProperties = function copyStatProperties(ctorNew, ctorOld) {+	setProto(ctorNew, Object.getPrototypeOf(ctorOld));+	Object.defineProperties(ctorNew, Object.getOwnPropertyDescriptors(ctorOld));

cache is not needed, shim will run only once

yiminghe

comment created time in a month

PullRequestReviewEvent

push eventyiminghe/Symbol.prototype.description

yiminghe

commit sha 1c67fedb24314f48ab68301fa49a9c402d716b9a

fix ownProperty

view details

push time in a month

Pull request review commentljharb/es-abstract

make compress friendly

 try { 	getInferredName = Function('s', 'return { [s]() {} }[s].name;'); } catch (e) {} -var inferred = function () {};+// eslint-disable-next-line no-new-func+var inferred = Function('var inferred = function () {}; return inferred;')();

this module is depended by storybook, when you build storybook, this module is minified, and the last line of minified code is

module.exports = getInferredName && "inferred" === function() {}.name ? getInferredName : null

will always return null, generate bad result in same cases: https://github.com/es-shims/Symbol.prototype.description/pull/13

minifier will shorten the variable name or even remove it(in this case).

yiminghe

comment created time in a month

PullRequestReviewEvent

push eventyiminghe/Symbol.prototype.description

yiminghe

commit sha b75bf9ec3d524d5d4a2e4d459e8e63eeb2c9a61a

fix ownProperty

view details

push time in a month

push eventyiminghe/Symbol.prototype.description

yiminghe

commit sha ea1005443f6d67a0826d50df49112d1a35802fed

fix ownProperty

view details

push time in a month

pull request commentes-shims/Symbol.prototype.description

fix ownProperty

Can you provide a regression test?

Separately, the setProto is absolutely critical so the inheritance chain of Symbols is correct, so it must not be deleted.

I didn't delete setProto, it's inside copyStaticProperties

yiminghe

comment created time in a month

push eventyiminghe/Symbol.prototype.description

yiminghe

commit sha 9cd65abee80815bc4825d72f62d7bc2e6b1fcbac

fix ownProperty

view details

push time in a month

push eventyiminghe/Symbol.prototype.description

yiminghe

commit sha 513cf0ef3cf999367358e19b68a2c4d5d96ffb75

fix ownProperty

view details

push time in a month

push eventyiminghe/Symbol.prototype.description

yiminghe

commit sha 9d4d5385911df4c9d2bb61c5f24843964f48efc3

fix ownProperty

view details

push time in a month

push eventyiminghe/Symbol.prototype.description

yiminghe

commit sha 237684f47b7c83f97224c854155dafee87137ea7

fix ownProperty

view details

push time in a month

push eventyiminghe/es-abstract

yiminghe

commit sha 5d840d07f19c2d6e0c3e03300a7f53c658151e72

make compress friendly

view details

push time in a month

push eventyiminghe/Symbol.prototype.description

yiminghe

commit sha bd62e9c066024ecc76fa5d625a137a45dedc6399

fix ownProperty

view details

push time in a month

PR opened es-shims/Symbol.prototype.description

fix ownProperty

SymNew.hasOwnProperty('for') should be true

+3 -0

0 comment

1 changed file

pr created time in a month

create barnchyiminghe/Symbol.prototype.description

branch : fix-own-property

created branch time in a month

fork yiminghe/Symbol.prototype.description

Spec-compliant shim for Symbol.prototype.description proposal.

fork in a month

push eventyiminghe/es-abstract

yiminghe

commit sha f0cb3b1d4cfdb9e3add6a05de5fc9412c9e3c8cd

make compress friendly

view details

push time in a month

PR opened ljharb/es-abstract

make compress friendly

original after compress:

module.exports = getInferredName && "inferred" === function() {}.name ? getInferredName : null

making the result completely different

+2 -1

0 comment

1 changed file

pr created time in a month

create barnchyiminghe/es-abstract

branch : compress-friend

created branch time in a month

fork yiminghe/es-abstract

ECMAScript spec abstract operations.

fork in a month

fork yiminghe/Symbol.prototype.description

Spec-compliant shim for Symbol.prototype.description proposal.

fork in a month

CommitCommentEvent
PublicEvent

PR closed yiminghe/async-validator

fix: fix test error for #246

Now dateObject will always be a Date instance, so the judgment here needs to be changed.

for: https://github.com/yiminghe/async-validator/pull/246

+1 -6

2 comments

1 changed file

fxxjdedd

pr closed time in 2 months

Pull request review commentyiminghe/async-validator

fix: fix test error for #246

 const types = {     }   },   date(value) {-    return (-      typeof value.getTime === 'function' &&-      typeof value.getMonth === 'function' &&-      typeof value.getYear === 'function' &&-      !isNaN(value.getTime())-    );+    return value.toString() !== 'Invalid Date';

current implementation is ok.

fxxjdedd

comment created time in 2 months

Pull request review commentyiminghe/async-validator

fix: fix test error for #246

 const types = {     }   },   date(value) {-    return (-      typeof value.getTime === 'function' &&-      typeof value.getMonth === 'function' &&-      typeof value.getYear === 'function' &&-      !isNaN(value.getTime())-    );+    return value.toString() !== 'Invalid Date';

is this ecma standard?

fxxjdedd

comment created time in 2 months

pull request commentyiminghe/async-validator

fix: do not catch error

That's fair. But sometimes, users may make some stupid mistakes, and these mistakes are not thrown out, making it difficult for users to debug errors.

by default, errors are warned: Schema.warning

fxxjdedd

comment created time in 2 months

push eventyiminghe/async-validator

yiminghe

commit sha 37b65a8e5bd386486ffb47299bb6a0db72006626

bump

view details

yiminghe

commit sha 8e17b30624822c7421487414bfaa369bf1087b87

v3.4.0

view details

push time in 2 months

created tagyiminghe/async-validator

tagv3.4.0

validate form asynchronous

created time in 2 months

PR closed yiminghe/async-validator

fix: do not catch error

Hello @yiminghe , The exception is caught here but not thrown. Is there any reason? Or it's a bug?

+0 -1

1 comment

1 changed file

fxxjdedd

pr closed time in 2 months

pull request commentyiminghe/async-validator

fix: do not catch error

Do not want to pollute console or trigger error report. error should be handled by asyn-validator caller

fxxjdedd

comment created time in 2 months

push eventyiminghe/async-validator

fxxjdedd

commit sha d7861db371fde6c0c482fdffbb78cc632f199626

fix possible error when value is string type

view details

yiminghe

commit sha 35179e3e0d2401f708138bc2e30272e6ed1071be

Merge pull request #246 from fxxjdedd/patch-1 fix possible error when value is string type

view details

push time in 2 months

push eventyiminghe/async-validator

by

commit sha 83198adacf2d58bb179a6b1198f4e56f6561d47d

Update index.d.ts

view details

yiminghe

commit sha 6ac1aeea7118853eb25804453552dfd791ac858d

Merge pull request #245 from tolerance-go/patch-1 修改 defaultField ts 类型,支持递归

view details

push time in 2 months

push eventyiminghe/async-validator

mahovich

commit sha e4a8d51b5e05f69ca62327c5c5ce9fe741125459

doc: replace var with const

view details

mahovich

commit sha d4b7a8b7fcea3d170616500a7a85b41b00fc77af

doc: capitalized sentences

view details

mahovich

commit sha 7d0700e81154fc3c85332334c66646de4d68b083

doc: set and unify headers for code

view details

mahovich

commit sha 40feb2aad48d6d47a98ba660b395a6372d5aad21

doc: replace double quotes with single quotes Standardize quotes, as the examples have double quotes and single quotes

view details

mahovich

commit sha 5dd6e0baa2e80c7ce84c9e7f72f3a8169c819517

doc: add spaces for code unification - add space before the leading brace - add a space before the opening bracket of the 'if' operator - add spaces inside curly braces

view details

mahovich

commit sha 3c6d94c524d17e0607aa5e9f77708f001a9f998b

doc: remove and add padding

view details

mahovich

commit sha 2eaf7d26c7febe60d3d44b6487e4523088aa9327

doc: set semicolon at the end of instructions

view details

mahovich

commit sha 2c93e85cf11531902a5ca636d6621ff931ab046a

docs: rename schema class to Schema because class names are usually capitalized

view details

mahovich

commit sha c5e4d10a6c36d3a3c3569ef5fcbfa86e4a4bbe06

docs: remove extra quotes

view details

mahovich

commit sha f0048e33e2bf45ff26cfb5d3b5cdecfce9346b82

docs: add line feed between object parameters

view details

mahovich

commit sha 58cb1722901127adea64414e28711297d109eb42

docs: move items in a header by importance

view details

mahovich

commit sha 6d040d8f0a90ae6a3946a05581ed12e054ce33f5

docs: format multiline example

view details

mahovich

commit sha 65f5c9cccb18d374e31f5aba99bceb9c219bb558

docs: add line feed between object parameters

view details

mahovich

commit sha 55695a668748813ff6e8abcabf6ae9cc13848be8

docs: add trailing comma - bringing to a common style in readme - use the same writing style as in the module code

view details

yiminghe

commit sha e6fdb9876f4115023ddeff7e0e993e3bb0325a7b

Merge pull request #241 from mahovich/patch-13 docs: update readme

view details

push time in 2 months

PR merged yiminghe/async-validator

docs: update readme

Updates:

  • replace var with const
  • capitalized sentences
  • set and unify headers for code
  • replace double quotes with single quotes
  • add spaces for code unification
  • remove and add padding
  • set semicolon at the end of instructions
  • rename schema class to Schema
  • remove extra quotes
  • add line feed between object parameters
  • move items in a header by importance
  • format multiline example
  • add trailing comma
+131 -124

1 comment

1 changed file

mahovich

pr closed time in 2 months

push eventyiminghe/async-validator

mahovich

commit sha 14ef3d9d952b642941e218185cc72b12ed11d060

fix: do not change custom error texts

view details

mahovich

commit sha baed037e97baef65a13c3189cda6cc26dc04c8cf

test: do not change custom error texts

view details

mahovich

commit sha 5d68d84c6ba2873735cc3e8ef80a19a818b952fa

test: do not change custom error texts with parameter

view details

yiminghe

commit sha 87bfe09c0b3e09b839b4f32d401cf8f4dff4cac8

Merge pull request #240 from mahovich/patch-12 fix: do not change custom error texts

view details

push time in 2 months

PR merged yiminghe/async-validator

fix: do not change custom error texts

Fixes: #239

+49 -3

2 comments

2 changed files

mahovich

pr closed time in 2 months

issue closedyiminghe/async-validator

Incorrect processing of custom error texts

If a validator with custom error texts finds an error, then the result is not what was expected.

When executing this example:

const Validator = require('async-validator').default;

const validator = new Validator({
  name: { type: 'string', required: true, max: 10 },
  lastname: { type: 'string', required: true, max: 10 },
  age: { type: 'integer', min: 0, max: 130 }
});

validator.messages({
  required: 'This field is required',
  string: { max: 'Too many characters' },
  number: { range: 'Incorrect number' },
});

(async () => {
  const errorsData = await validator.validate(
    { name: 'Stuart Little', age: 142 },
  ).catch(({ errors }) => errors);

  console.log(errorsData);
})();

the following errors will be displayed:

// [
//   { message: 'Too many characters name 10', field: 'name' },
//   { message: 'This field is required lastname', field: 'lastname' },
//   { message: 'Incorrect number age 0 130', field: 'age' }
// ]

but other error messages were expected:

// [
//   { message: 'Too many characters', field: 'name' },
//   { message: 'This field is required', field: 'lastname' },
//   { message: 'Incorrect number', field: 'age' }
// ]

Custom error texts should not be changed by the module. For example, instead of 'Incorrect number age 0 130' should be 'Incorrect number'.

closed time in 2 months

mahovich

push eventyiminghe/async-validator

mahovich

commit sha 207f6657f04d2c680ca1160f84e42b645daf3315

chore: replace the protocol for links from http to https

view details

yiminghe

commit sha 6d81267fb00baede3bcf4586419d569a56fc190a

Merge pull request #238 from mahovich/patch-11 chore: replace the protocol for links from http to https

view details

push time in 2 months

push eventyiminghe/pika-plugin-build-web-babel

yiminghe

commit sha 0e0478a523acb463d1aed3a3e2e0bc681dd214a6

bump to rollup2

view details

push time in 2 months

push eventyiminghe/pika-plugin-build-web-babel

muyue

commit sha 52042d79c0e65f0b3ea33a235ce215e49e734d71

upgrade rollupv2

view details

muyue

commit sha 6a22be8e0fc05378449d69b47e14e650cc47551f

添加replace

view details

yiminghe

commit sha 658f342fa027f01954783fe79c76d2a360a6fd63

Merge pull request #1 from ErazerControl/muyue-branch upgrade rollup v2

view details

push time in 2 months

startedmillsp/medium

started time in 2 months

push eventyiminghe/zscroller

GH Pages Bot

commit sha 9c5e90bab2fd3cbd4f1972ee6e7c70cbd085259c

Deploy Storybook to GitHub Pages

view details

push time in 2 months

push eventyiminghe/zscroller

yiminghe

commit sha 887e3fac54d544c9f4e9aec6bbd759284441765b

fix demo

view details

push time in 2 months

push eventyiminghe/zscroller

GH Pages Bot

commit sha 3530a6c767d0aaa7040632536f365ff3d0a2ced5

Deploy Storybook to GitHub Pages

view details

push time in 2 months

push eventyiminghe/zscroller

yiminghe

commit sha 7639a883dacedc23d7f1c8017b873dad019c7ad8

optimize scroll

view details

push time in 2 months

push eventyiminghe/zscroller

yiminghe

commit sha 141e5cad1e32e9dce1a13209d5b304efa69bdfbc

add minIndicatorSize

view details

push time in 2 months

startedRichienb/char-regex

started time in 2 months

startedsallar/stringz

started time in 2 months

push eventyiminghe/zscroller

yiminghe

commit sha 50aa6fdc72037dec29f63cb303a948eaa069ff36

optimize types

view details

push time in 2 months

push eventyiminghe/zscroller

yiminghe

commit sha dd7fbe63bdd7848b5825dd8bdc050181bd9aa1e6

add zoom.

view details

push time in 2 months

startedottypes/json1

started time in 3 months

push eventyiminghe/zscroller

GH Pages Bot

commit sha 510c1b5c36095db726f6f9049976c1e70e780867

Deploy Storybook to GitHub Pages

view details

push time in 3 months

push eventyiminghe/zscroller

yiminghe

commit sha 95434f1442cc392103f88f4063f1a5d3b9cc363c

optimize 0 viewport content

view details

push time in 3 months

startedXample/ts-throwable

started time in 3 months

more