A function that generates a unique id for objects
npm or yarn
npm install object_id
yarn add object_id
cdn
<script src="https://unpkg.com/object_id"></script>
import objectId from 'object_id'
const id = objectId(obj, options?)
Option | Type | Default | Description |
---|---|---|---|
key |
String | '__unique_key_prop' |
The property name for id. |
enumerable |
Boolean | false |
If the id property is enumerable. |