• store.js


    // Store current user
    store.set('user', { name:'Marcus' })
    
    // Get current user
    store.get('user')
    
    // Remove current user
    store.remove('user')
    
    // Clear all keys
    store.clearAll()
    
    // Loop over all stored values
    store.each(function(value, key) {
    	console.log(key, '==', value)
    })
    

    Installation

    Using npm:

    // Example store.js usage with npm
    var store = require('store')
    store.set('user', { name:'Marcus' })
    store.get('user').name == 'Marcus'
    

    Using script tag(first download one of the[builds](dist /)):

    <!-- Example store.js usage with script tag -->
    <script src="path/to/my/store.legacy.min.js"></script>
    <script>
    store.set('user', { name:'Marcus' })
    store.get('user').name == 'Marcus'
    </script>
    
  • 相关阅读:
    JQuery学习之语法
    sysbench
    fio——IO基准测试
    Python待分析的模块
    Taglist
    tcprstat
    SQL注入
    Nytro MegaRaid
    dstat
    Python之hashlib模块
  • 原文地址:https://www.cnblogs.com/ar13/p/8185613.html
Copyright © 2020-2023  润新知