data-cache.js

A Map sub-class backed by a persistant store

이 스크립트는 직접 설치하는 용도가 아닙니다. 다른 스크립트에서 메타 지시문 // @require https://update.greasyforks.org/scripts/31448/206062/data-cachejs.js을(를) 사용하여 포함하는 라이브러리입니다.

작성자
spiralx
버전
1.0.0
생성일
2017-07-14
갱신일
2017-07-14
크기
4.88KB
라이선스
해당 없음

data-cache.js

Example: Quick tester cache

For playing with in DevTools.

c = ((key, data) => {
  function getter() { console.info('getter(): %o', data); return data }
  function setter(value) { console.info('setter(%o)', value); data = value }

  return new DataCache({ getter, setter, debug: true })
})('test', { name: 'bob', items: ['foo', 'bar'] })
Example: User Script
const cache = new DataCache({
  getter: GM_getValue,
  setter: GM_setValue,
  key: 'repos'
})

cache.set('favourites', [ 'json-schema-faker/json-schema-faker', 'angular/angular', 'jquery/jquery' ])
长期地址
遇到问题?请前往 GitHub 提 Issues。