ArgueJS icon indicating copy to clipboard operation
ArgueJS copied to clipboard

arguments order

Open pelicanorojo opened this issue 11 years ago • 5 comments

From the example: __({start: [Number, 0], stop: Number, step: [Number, 1]})

In javascript, if I am not wrong, the objects haven't assured their properties order, so we may not have confidence that will be iterated in the order they are defined.

Then a setting like this __({ aString: String, aNumber: Number }) for a function called myFunction, could check as ok if we call the function with myFunction( 4444, 'aaaa' ) and the VM used invert the object properties order perhaps because decided use alphabetical order.

I found your library very usefull, and the notation too, but also need to note this potential problem.

__([{ aString: String }, { aNumber: Number ]) perhaps is better.

pelicanorojo avatar Jul 22 '13 18:07 pelicanorojo

Hello and welcome! That bug is known and described in issue https://github.com/zvictor/ArgueJS/issues/13. There is a pull request (https://github.com/zvictor/ArgueJS/pull/15) and a fork (https://github.com/johmoh/ArgueJS) solving that problem. The pull request describes the new notation.

johmoh avatar Jul 23 '13 11:07 johmoh

Ok, thanks for the reply!

pelicanorojo avatar Jul 23 '13 14:07 pelicanorojo

When will this pull request be merged? (if it will?)

fsparv avatar Dec 13 '13 00:12 fsparv

Sorry for the late response you get... The answer is: Maybe never... I don't know. There is not much (to be specific: there is no) activity in this repository. It seems to be dead.

If you can live with my fork then take my fork (https://github.com/johmoh/ArgueJS (argue2.js)). A "kind of" documentation of the interface can be found here: https://github.com/zvictor/ArgueJS/pull/15 And here you can find information about the different versions: https://github.com/zvictor/ArgueJS/pull/15#issuecomment-18320508 And here are examples: https://github.com/johmoh/ArgueJS/tree/master/examples

And of course: If there is any interest in my fork i will fix bugs if there are any (I do not expect some; the code is very well tested).

johmoh avatar Feb 20 '14 21:02 johmoh

@johmoh I was going to use this library, but "http://ejohn.org/blog/javascript-in-chrome/" convinced me that this issue is real. Your fork, however, doesn't seem to be in npm and doesn't seem to have an issue tracker, so I don't trust pulling it in either.

jadonk avatar Mar 19 '14 20:03 jadonk