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

grayscale-user

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grayscale-user

做用户灰度方案

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

做用户灰度方案

根据userid做用户灰度, 前提uid是int类型

安装

npm install grayscale-user 或
yarn add grayscale-user

使用方法

需要3个参数,
参数一:【必填】灰度的比例,0-99的正整数或字符串,如: 26,表示灰度26%;
参数二:【选填】传入的userId的值,根据这个数字做灰度,
参数三:【选填】uid白名单,支持array 或 string

返回值: boolean值,true:在灰度范围内,false:表示不再灰度范围内

import grayscaleUser from "grayscale-user";

console.log("是否灰度:",grayscaleUser("灰度比例","userid",'白名单'));

Keywords

user

FAQs

Package last updated on 16 Dec 2020

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