0.2.0 • Published 2 years ago

funckage v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

FUNCKAGE

FUNCTIONS (We all know what this is.) - KAGE (shadow, shade, other side and shadows.)

LOCAL STORAGE

Add data to localStorage temporarily without the need to delete them manually.

import { store } from 'funckage'

const login (userData)=>{
  const response = await api.call("/login-url")
  const { token } = response;

  // default ttl of 24hours (key, data, ttl)
  store.setWithExpiry('token', token)
}

Then you can access it within the ttl;

import { store } from 'funckage'

const getUserData (userData)=>{
  // will return null if queried after ttl
  const token = store.getWithExpiry('token')

  const response = await api.call("/get-data-url", { headers: { 'auth-token': token } } )
  // use response in application
}

Arrays

Basically a package for custom Javascript Functions to be used in the shade of greater projects.

0.2.0

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.2

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.1

2 years ago

0.0.1

2 years ago