Skip to content

SonyPradana/fake-nik

Repository files navigation

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.