Skip to content

llnode.cc: Combine array-length and string-length arguments#124

Merged
hhellyer merged 1 commit intonodejs:masterfrom
hhellyer:length_argument
Aug 22, 2017
Merged

llnode.cc: Combine array-length and string-length arguments#124
hhellyer merged 1 commit intonodejs:masterfrom
hhellyer:length_argument

Conversation

@hhellyer
Copy link
Copy Markdown
Contributor

@hhellyer hhellyer commented Aug 21, 2017

When I reviewed PR #116 for @joyeecheung I noticed that we have separate length arguments to v8 inspect for Strings and Arrays when we can only be inspecting one or the other. This PR merges the two into --length as they can never both apply at the same time. It also supports a short option, -l, to the user quickly specify how many elements of either strings or arrays to display. The major usability improvement is that you can just specify -l instead of having to type out --array-length or --string-length.

I did consider using --count and -c instead and I'm happy to swap around if anyone thinks that's better.

Merge the string and array length arguments into one option
as they can never both apply at the same time. Support a short
option (-l) to the the user quickly specify how many elements
of either strings or arrays to display.
indutny

This comment was marked as off-topic.

joyeecheung

This comment was marked as off-topic.

cjihrig

This comment was marked as off-topic.

@hhellyer hhellyer merged commit f85f8fc into nodejs:master Aug 22, 2017
@hhellyer hhellyer deleted the length_argument branch August 22, 2017 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants