sonypradana/fake-nik

fake nik with valid data

v0.2.0 2023-01-09 08:46 UTC

This package is auto-updated.

Last update: 2024-12-15 08:56:24 UTC


README

fake nik logo

Total Downloads Start test past License

Faker Nik (Nomor Induk Kepedendudukan)

Generate fake nik with valid data, and can be controlled.

Install

using composer

composer require sonypradana/fake-nik --dev

Using

using helpers

fakeNIK()->generate();
// 3212135412780001 (16 digit random nik)

controlled faker

fakeNIK()
    ->jenisKelamin(JenisKelamin::Laki)
    ->provinsi(Provinsi::JAWA_TENGAH)
    ->usia(17)
    ->generate();
// 3324140501060002 (controll your faker)

fakeNIK()
    ->jenisKelamin(JenisKelamin::LAKI)
    ->date(new \DateTime('12-12-2012'))
    ->generate();
// 3424141212120018 (controll your faker)

Todo

  • add more tests
  • support generating 'kabupaten/kota' levels.
  • support generating 'kelurahan' levels.
  • type hityng 'kabupaten/kota'.
  • type hityng 'kelurahan'.

fake-nik is an open-sourced software licensed under the MIT license.