
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
An observable Async/Await. An example for "Learn JavaScript with Eric Elliott"
Write asynchronous code that looks synchronous:
const myFunc = function* (param1, param2, param3) {
const result = yield fetchSomething(); // returns promise
// waits for promise and uses promise result
yield result + ' 2';
yield param1;
yield param2;
yield param3;
}
Pass it into ogen() and get back an observable that you can subscribe to:
const onNext = val => console.log(val);
const onError = err => console.log(err);
const onComplete = () => console.log('done.');
const asyncFunc = ogen(myFunc);
// Call the async function and pass params.
asyncFunc('a param', 'another param', 'more params!')
.subscribe(onNext, onError, onComplete);
// future value
// future value 2
// a param
// another param
// more params!
// done.
Obviously, this relies on generators. Works OK with Babel, Node v4+. Does not work in any IE without polyfills.
Should work in most other modern browsers.
An online course series for application developers. Ready to jump in? Learn more.
FAQs
An observable Async/Await. Write async code that looks synchronous.
The npm package ogen receives a total of 936 weekly downloads. As such, ogen popularity was classified as not popular.
We found that ogen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.