0.2.0 • Published 12 months ago

funckage v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months 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

12 months ago

0.1.8

12 months ago

0.1.7

12 months ago

0.1.9

12 months ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.2

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.1

1 year ago

0.0.1

1 year ago