ai / nanoid

A tiny (124 bytes), secure, URL-friendly, unique string ID generator for JavaScript
https://zelark.github.io/nano-id-cc/
MIT License
24.33k stars 788 forks source link

`expo-random` has been deprecated #414

Closed silvestreh closed 6 months ago

silvestreh commented 1 year ago

Hi there! I just wanted to give you a quick heads up about expo-random being deprecated. It'll be removed in the next Expo SDK release.

I think you'll want to update index.native so that the import reads:

import * as Crypto from 'expo-crypto'

And a couple lines below that

export let random = Crypto.getRandomBytesAsync
ai commented 1 year ago

Can you send a PR? Since I am not a RN developer.

silvestreh commented 1 year ago

@ai thanks for the quick reply. Here's the PR https://github.com/ai/nanoid/pull/415 :)