New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

async-values

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-values

## How to try

latest
npmnpm
Version
0.2.8
Version published
Maintainers
1
Created
Source

async-values

How to try

yarn install && yarn dev

See the demo code in src/routes/index.svelte

How to build component library

yarn install && yarn package

files are in dist folder

How to build demo application

yarn install && yarn build

files are in build folder

How to use Watcher in my project

import { watch, watchStream } from 'async-values';

// activate plugin in the top level file of the project
onMount(() => isDev && AVWatch.activate(true));

// watch Subject
const userId = new BehaviorSubject(0);
const subscription = watchStream('userId', userId);

// watch stream pipe chain
const user = userId.pipe(
	watch('user', 'beforeFetch'),
	switchMap((userId) => fromFetch('//my-api.com/users/' + userId)),
	watch('user', 'afterFetch'),
	switchMap((response) => response.json()),
	watch('user', 'afterParsing'),
);

// Press Ctrl + Alt to view the Watcher

// While the Watcher is open, press H for help and shortcuts

FAQs

Package last updated on 14 Feb 2022

Did you know?

Socket

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.

Install

Related posts