Skip to content
This repository has been archived by the owner on Mar 5, 2018. It is now read-only.

Latest commit

 

History

History
22 lines (16 loc) · 438 Bytes

identifiers.md

File metadata and controls

22 lines (16 loc) · 438 Bytes

Identifiers

Using createAddress

import { createAddress } from 'consus-core/identifiers';

let index = 0; // Index of the model/item in the Store's array
let type = 'model'; // 'model' or 'item'
createAddress(index, type);
// 'm8y7nEtAe'

Using readAddress

import { readAddress } from 'consus-core/identifiers';

readAddress('m8y7nEtAe');
// result.index === 0
// result.type === 'model'