• rxjs


    1. npm root 查看包安装目录

    2. npm root -g

    Use the npm root -g command for find out your global npm path.

    If you are looking for the executable that npm installed, maybe because you would like to put it in your PATH, you can simply do

    npm bin

    or

    npm bin -g


    3. 查看当前项目安装的包的版本:

    npm list --depth=0

    The command npm root will tell you the effective installation directory of your npm packages.

    If your current working directory is a node package or a sub-directory of a node package, npm root will tell you the local installation directory. npm root -g will show the global installation root regardless of current working directory.

     -------------------------------------------------------

    import { Observable, from, of, interval } from 'rxjs';
    import { filter, map, scan, take } from 'rxjs/operators';
    
    
    const source = interval(1000)
    source.pipe(filter(val => val%2 ==0), scan((x,y)=>x+y), take(4)).subscribe(val => console.log(val));
    

      执行结果如下:

     原因分析:

    https://www.jianshu.com/p/d8cb71554008

  • 相关阅读:
    html
    jQuery
    Python基础(一)
    excel中怎样批量取消隐藏工作表
    AD密码过期查询
    @Controller和@RestController的区别
    编写一个JPA测试用例
    SpringBoot(二)——使用Mysql和JPA
    Linux命令大全
    Centos7安装Mysql
  • 原文地址:https://www.cnblogs.com/oxspirt/p/11813204.html
Copyright © 2020-2023  润新知