question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Completion callback for loadAll

See original GitHub issue

It would be most useful for working in async promises or observables if loadAll and safeLoadAll also accepted a callback for when the stream of documents has ended.

For completeness, it might also be useful to have a callback for errors.

Glancing at the implementation I’m also a little bit surprised that the documents aren’t emitted immediately as they finish parsing, as you would suppose from the public API.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
puzrincommented, Nov 9, 2017

Promise.resolve().then(() => yaml.safeLoad(...))

😃

1reaction
puzrincommented, May 11, 2016

I’m not sure if it’s possible to do true document-level streaming with current architecture. When we designed this parser, we intentionally dropped such mode because it’s almost never needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jQuery loading images with complete callback - Stack Overflow
I wanted this functionality and definitely did not want to have to load all the images when the page renders. My images are...
Read more >
.load() | jQuery API Documentation
If a "complete" callback is provided, it is executed after post-processing and HTML insertion has been performed. The callback is fired once for...
Read more >
Addressables.LoadAsset(s)Async | Addressables | 1.15.2
The callback parameter is called individually for each asset loaded by the operation. Given that the load operation are asynchronous the ...
Read more >
org.yaml.snakeyaml.Yaml.loadAll java code examples - Tabnine
The exception that is thrown when a handshake could not be completed successfully. LogFactory (org.apache.commons.logging). Factory for creating Log instances, ...
Read more >
Defining a completion callback - Sybase Infocenter
A completion callback routine calls any Client-Library or CS-Library routine except cs_objects (CS_SET), ct_init, ct_exit, ct_setloginfo, and ct_getloginfo.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found