Skip to content

BinaryBirds/swift-nanoid

Repository files navigation

Swift NanoID

A really simple NanoID implementation for the Swift programming language.

Install

Add the repository as a dependency:

.package(url: "https://github.com/binarybirds/swift-nanoid", from: "1.0.0"),

Add NanoID to the target dependencies:

.product(name: "NanoID", package: "swift-nanoid"),

Update the packages and you are ready.

Usage example

Basic example

import NanoID

let id = NanoID()
print(id)