国产精品爱久久久久久久小说,女人扒开腿让男人桶到爽 ,亚洲欧美国产双大乳头,国产成人精品综合久久久久,国产精品制服丝袜无码,免费无码精品黄av电影,黑色丝袜无码中中文字幕,乱熟女高潮一区二区在线

    8個JavaScript庫可更好地處理本地存儲

    2020-9-3    seo達人

    Local Storage Bridge

    https://github.com/krasimir/l...

    如果你必須在同一個瀏覽器中從一個標簽頁發送消息到另一個標簽頁,你不必用艱難的方式。Local storage bridge在這里讓任務變得更簡單。

    基本使用:

    // 發送 lsbridge.send(‘app.message.error’, { error: ‘Out of memory’ });

    // 監聽 lsbridge.subscribe(‘app.message.error’, function(data) { console.log(data); // { error: ‘Out of memory’ } });

    Basil.js

    image

    Basil.js統一了session、localStorage和cookie,為你提供了一種處理數據的直接方法。

    基本使用:

    let basil = new Basil(options);
    
    basil.set(‘name’, ‘Amy’);
    basil.get(‘name’);
    basil.remove(‘name’);
    basil.reset();

    store.js

    https://github.com/marcuswest...

    Store.js像其他東西一樣處理數據存儲。但還有更多的功能,它的一個高級特性是讓你更深入地訪問瀏覽器支持。

    基本使用:

    store.set(‘book’, { title: ‘JavaScript’ }); // Store a book store.get(‘book’);

    // Get stored book store.remove(‘book’); // Remove stored book store.clearAll(); // Clear all keys

    lscache

    https://github.com/pamelafox/...

    它與localStorage API類似。事實上,它是localStorage的一個封裝器,并使用HTML5模擬memcaches函數。在上面的文檔中發現更多的功能。

    基本使用:

    lscache.set(‘name’, ‘Amy’, 5); // 數據將在5分鐘后過期 lscache.get(‘name’);

    Lockr

    image

    Lockr建立在localStorage API之上。它提供了一些有用的方法來更輕松地處理本地數據。

    是什么讓你要使用此庫而不是localStorage API?

    好吧,localStorage API僅允許你存儲字符串。如果要存儲數字,則需要先將該數字轉換為字符串。在Lockr中不會發生這種情況,因為Lockr允許你存儲更多的數據類型甚至對象。

    基本使用:

    Lockr.set(‘name’, ‘Amy’);
    Lockr.set(‘age’, 28);
    Lockr.set(‘books’, [{title: ‘JavaScript’, price: 11.0}, {title: ‘Python’, price: 9.0}]);

    Barn

    https://github.com/arokor/barn

    Barn在localStorage之上提供了一個類似Redis的API。如果持久性很重要,那么你將需要這個庫來保持數據狀態,以防發生錯誤。

    基本使用:

    let barn = new Barn(localStorage); // 原始類型 barn.set(‘name’, ‘Amy’); let name = barn.get(‘name’);

    // Amy // List barn.lpush(‘names’, ‘Amy’);

    barn.lpush(‘names’, ‘James’); let name1 = barn.rpop(‘names’); // Amy let name2 = barn.rpop(‘names’);

    // James

    localForage

    https://github.com/localForag...

    這個簡單而快速的庫將通過IndexedDB或WebSQL使用異步存儲來改善Web的脫機體驗。它類似于localStorage,但具有回調功能。

    基本使用:

    localforage.setItem(‘name’, ‘Amy’, function(error, value) { // Do something });
    
    localforage.getItem(‘name’, function(error, value) { if (error) { console.log(‘an error occurs’);
      } else { // Do something with the value }
    });

    很神奇的是它提供中文文檔

    crypt.io

    https://github.com/jas-/crypt.io

    crypt.io使用標準JavaScript加密庫實現安全的瀏覽器存儲。使用crypto.io時,有三個存儲選項:sessionStorage,localStorage或cookie。

    基本使用:

    let storage = crypto; let book = { title: ‘JavaScript’, price: 13 };
    
    storage.set(‘book’, book, function(error, results) { if (error) { throw error;
      } // Do something });
    
    storage.get(‘book’, function(error, results) { if (error) { throw error; 
    

    } // Do something });

    藍藍設計m.dzxscac.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 平面設計服務

    日歷

    鏈接

    個人資料

    藍藍設計的小編 http://m.dzxscac.cn

    存檔

    主站蜘蛛池模板: 国产精品成熟老女人视频| 亚洲操一操| 夜夜高潮夜夜爽夜夜爱| 免费69视频| 日本不卡视频一区二区| 国产三级在线观看完整版| 欧美极品少妇做受| 久久精品国产成人av| 久久94| 老熟女一区二区免费| 久久亚洲精品中文字幕一区| 成人亚洲综合| 成人性生交大片免费看r老牛网站| 欧美和黑人xxxx猛交视频| 色哟哟网站入口| 日本一码二码三码的区分| 人妻丝袜乱经典系列| 欧美日韩黄色| 精品福利视频导航| 日本强伦片中文字幕免费看| 日韩精品无码中文字幕电影| 少妇裸体挤奶汁奶水视频| 全程偷拍露脸中年夫妇| 中文字幕日韩人妻在线视频| 97精品伊人久久大香线蕉app| www国产在线| 国产在线中文字幕精品| 性一交一乱一伦一色一情丿按摩| 超碰999| 日本h在线观看| 亚洲中文字幕无码中文字| 亚洲中文字字幕在线乱码| 亚洲国产精品成人久久蜜臀| 色综合久久久久久| 特级精品毛片免费观看| 国产成人拍精品视频午夜网站| 精品人妻在线播放| 国产精品老热丝在线观看| 国产高潮流白浆免费观看| 色九九九| 国产一级伦理片|