Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Commit 3197d5c

Browse files
removing backticks
1 parent b81b7bc commit 3197d5c

File tree

1 file changed

+38
-26
lines changed

1 file changed

+38
-26
lines changed

README

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,83 @@
22

33
A cache manager evening out the W3C's localStorage and IE's userData.
44

5+
56
== What's new in this release?
67

78
See the CHANGELOG file for information on what's new.
89

10+
11+
== Requirements
12+
13+
A browser that supports caching via userData or localStorage.
14+
15+
Note: if the browser doesn't support these features, Squirrel will not
16+
be active, but it won't throw an error.
17+
18+
919
== Installation/Usage
1020

1121
Put Squirrel.js in a directory on your website, e.g. /js.
1222

1323
Then create a new Squirrel, passing it an id for your cache (which should
1424
be unique for your application):
1525

16-
`var $S = new Squirrel( 'scale-song' );`
26+
var $S = new Squirrel( 'scale-song' );
1727

1828
In IE, you can optionally supply a second argument for the number of
1929
seconds you want the cache to live:
2030

21-
`var $S = new Squirrel( 'scale-song', 10080 ); // store one week`
31+
var $S = new Squirrel( 'scale-song', 10080 ); // store one week
2232

2333
You can use Squirrel to store and retrieve info from the cache:
2434

25-
`$S.write( 'doe', 'ray' );`
26-
`$S.read( 'doe' ); // 'ray'`
35+
$S.write( 'doe', 'ray' );
36+
$S.read( 'doe' ); // 'ray'
2737

2838
You can even create sub-caches by supplying an optional string to beginning
2939
of these methods:
3040

31-
`$S.write( 'song', 'doe', 'a dear, a female dear' );`
32-
`$S.read( 'doe' ); // 'ray'`
33-
`$S.read( 'song', 'doe' ); // 'a dear, a female dear'`
41+
$S.write( 'song', 'doe', 'a dear, a female dear' );
42+
$S.read( 'doe' ); // 'ray'
43+
$S.read( 'song', 'doe' ); // 'a dear, a female dear'
3444

3545
With Squirrel, you can also clean up the cache using one of two methods:
36-
`remove()` (for individual keys) or `clear()` (for the cache or sub-caches):
46+
remove() (for individual keys) or clear() (for the cache or sub-caches):
3747

3848
// removing a single property from a sub-cache
39-
`$S.remove( 'song', 'doe' );`
40-
`$S.read( 'song', 'doe' ); // null`
41-
`$S.read( 'doe' ); // 'ray'`
49+
$S.remove( 'song', 'doe' );
50+
$S.read( 'song', 'doe' ); // null
51+
$S.read( 'doe' ); // 'ray'
4252

4353
// clearing a sub-cache
44-
`$S.write( 'song', 'doe', 'a dear, a female dear' );`
45-
`$S.write( 'song', 'ray', 'a drop of golden sun' );`
46-
`$S.clear( 'song' );`
47-
`$S.read( 'song', 'doe' ); // null`
48-
`$S.read( 'song', 'ray' ); // null`
49-
`$S.read( 'doe' ); // 'ray'`
54+
$S.write( 'song', 'doe', 'a dear, a female dear' );
55+
$S.write( 'song', 'ray', 'a drop of golden sun' );
56+
$S.clear( 'song' );
57+
$S.read( 'song', 'doe' ); // null
58+
$S.read( 'song', 'ray' ); // null
59+
$S.read( 'doe' ); // 'ray'
5060

5161
// removing a property form the main cache
52-
`$S.remove( 'doe' );`
53-
`$S.read( 'doe' ); // null`
62+
$S.remove( 'doe' );
63+
$S.read( 'doe' ); // null
5464

5565
// clearing the whole cache
56-
`$S.write( 'doe', 'ray' );`
57-
`$S.write( 'song', 'doe', 'a dear, a female dear' );`
58-
`$S.write( 'song', 'ray', 'a drop of golden sun' );`
59-
`$S.clear();`
60-
`$S.read( 'song', 'doe' ); // null`
61-
`$S.read( 'song', 'ray' ); // null`
62-
`$S.read( 'doe' ); // null`
66+
$S.write( 'doe', 'ray' );
67+
$S.write( 'song', 'doe', 'a dear, a female dear' );
68+
$S.write( 'song', 'ray', 'a drop of golden sun' );
69+
$S.clear();
70+
$S.read( 'song', 'doe' ); // null
71+
$S.read( 'song', 'ray' ); // null
72+
$S.read( 'doe' ); // null
73+
6374

6475
== The distribution
6576

6677
Besides the Squirrel.js files in /src, there's a complete
6778
test tree included (/tests) which holds assorted tests for Squirrel.js
6879
and a minified version in /min.
6980

81+
7082
== License
7183

7284
Squirrel.js is licensed under the terms of the MIT License, see

0 commit comments

Comments
 (0)