Add option to decide behavior
See original GitHub issueYou can throw anything in JS, but it’s a bad practice. I’d like to have it fail rather than silently accept anything. Though, it’s not a good default, so should be opt-in.
Actually, there’s 3 possible behaviors:
- Always return an
object
. (wanted default) - Passthrough non-object values. (current default)
- Throw on non-object input.
I’d like 1
to be the default behavior, for consistency, but add an option to be able to opt into 2
(which is the current behavior) or 3
(which would be the strict behavior). This should be a single option.
Another benefit of 1
is that the TypeScript types can be better. We can guarantee it’s an object and we can also guarantee that the name
, message
, and stack
properties exist.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Provide Choices, Improve Behavior: Sometimes Intervention ...
Explore what makes choice making so beneficial for student behavior and development with how-to guidance, video examples, and a free choice ...
Read more >IEP Process: Special Considerations and Behavior
You will need to add a behavioral goal if behaviors are Tier 2, including Specially Designed Instruction. Option 2: A Functional Behavior ......
Read more >Choice Making
Instructors and parents can use various options of choice to encourage individual performance. For example, if a student has a chance to choose...
Read more >Behavior Intervention Plan (BIP): The Complete Guide to ...
A BIP is a blueprint for changing behavior. In a formal setting, it guides treatment and ensures that everyone responds to behaviors consistently....
Read more >Module 4: Defining the Behavior and Setting Goals
For instance, if your overall goal is to run for 60 minutes, do not make your behavioral definition to be 1 behavior =...
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
@semmel , you can install
util
in package.json for the browser.Requiring the Node.js built-in
util
package forutil.inspect
means thatserialize-error
no longer works in a browser?Otherwise I would be polite to add a build step to generate some distribution files for the browser using a
util
shim?