FakeSharp 1.0.7

dotnet add package FakeSharp --version 1.0.7                
NuGet\Install-Package FakeSharp -Version 1.0.7                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FakeSharp" Version="1.0.7" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FakeSharp --version 1.0.7                
#r "nuget: FakeSharp, 1.0.7"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FakeSharp as a Cake Addin
#addin nuget:?package=FakeSharp&version=1.0.7

// Install FakeSharp as a Cake Tool
#tool nuget:?package=FakeSharp&version=1.0.7                

FakeSharp

version: v1.0.5 (shields.io) version: v1.0.0 (shields.io) version: v1.0.0 (shields.io)

Background

在应用开发过程中我们常常需要对输入参数进行检查,以剔除无效数据,增强程序的稳定性。这就需要我们生成大量的伪数据来进行测试,也即该库的主要功能。

Install

  1. Nuget 搜索 FakeSharp

    image-20220609152942809

  2. 点击右侧 下载链接 或使用包管理器下载

    image-20220609153037309

Usage

FakeSharp 目前支持手机号、银行卡号、身份证号、邮箱号的生成,相应的接口如下

生成器 接 口 校验地址
手机号 MobileNumber 云检号
银行卡号 CreditCard 银行卡号归属地查询
身份证号 IdentifyCard ip33
邮箱号 Email 邮箱侦探

上述的部分信息具有特定的校验规则(如:Luhn),可以通过上述校验地址来检验生成的伪数据是否合法

Q & A

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.7 433 9/12/2022
1.0.6 495 6/9/2022
1.0.5 432 6/8/2022
1.0.4 405 6/8/2022
1.0.3 417 6/7/2022
1.0.2 438 6/6/2022

🪄 允许指定身份证号前缀