README
BuzzCasting Core
BuzzCasting Management of session
, data
, user
, and token
functions.
Getting started
Install it with npm:
npm install @touchflows/buzzcasting-core
Then import the different parts:
import BuzzCasting from '@touchflows/buzzcasting-core';
const BuzzCasting = require('@touchflows/buzzcasting-core');
SessionStorage
typed variables are stored in sessionStorage
with the prefix buzzcasting
. Getting the variable will retrieve it the way it was stored i.e. a string, an array, an object
import { BuzzCasting } from 'buzzcasting-core';
BuzzCasting.session.set('slide-0.posts', {data: [{id: 1, title: 'Post'}]}); // Set it
let posts = BuzzCasting.session.get('slide-0.posts'); // Get it
BuzzCasting.session.delete('slide-0.posts'); // Eat it