Consistent interface
See original GitHub issueJust wanted to get your feedback on API consistency. I think we could do a lot more to make the API consistent and intuitive to use. Some examples:
to_past
,to_present
,to_past
functions return a mutated wrapped instance butamericanize
andbritishize
return just the changed text. Is that by design?Sentence.to_past
returns the mutatedSentence
instance but same doesn’t apply forText.to_past
. (I don’t know if there’s any way to fix that other than extending Array.prototype)- Unlike other wrappers,
(new NLP.term(...)).text
is a string property rather than a function.
Also, I think it might make things a lot less error-prone if we can make the entire library immutable (that’d break backwards compatibility, maybe offer an immutability helper?)
Issue Analytics
- State:
- Created 8 years ago
- Comments:17 (11 by maintainers)
Top Results From Across the Web
Why Consistency Is So Incredibly Important In UI Design
Consistent user interfaces facilitate communication. Use visual consistency to prioritize content, make it navigable, or highlight important ...
Read more >Consistent Interface
The consistency of an interface is important for the user while building an understanding of the system, developing a mental model of the...
Read more >Principle of Consistency and Standards in User Interface Design
Consistency limits the number of ways actions and operations are represented, ensuring that users do not have to learn new representations for ...
Read more >5 tips to build a consistent UI and improve your user experience
5 tips to build a consistent UI and improve your user experience · 1. Make it match your branding · 2. Find your...
Read more >Consistent User Interface - an overview | ScienceDirect Topics
Websites are designed with UI standards that make the layout, navigation, and functionality consistent across all pages. This consistency makes us more ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hey Matthew, yeah you know, we’ve got the api articulated over here, we should really just add a boolean for which methods are mutable right now. I’m re-doing the docs and will add that information in
@zenflow Or you could check out Ramda.