forked from sethvincent/random-access-idb
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from DougAnderson444/master
bring code up to speed
- Loading branch information
Showing
9 changed files
with
1,579 additions
and
1,480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
example/bundle.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
var random = require('../')('dbname') | ||
var cool = random('cool.txt') | ||
var RAI = require('../') | ||
const storage = RAI('dbname') | ||
var cool = storage('cool.txt') | ||
|
||
cool.write(100, Buffer.from('GREETINGS'), function (err) { | ||
if (err) return console.error(err) | ||
cool.read(104, 3, function (err, buf) { | ||
if (err) return console.error(err) | ||
console.log(buf.toString()) // TIN | ||
}) | ||
|
||
cool.read(100, 9, function (err, buf) { | ||
if (err) return console.error(err) | ||
console.log(buf.toString()) // GREETINGS | ||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<body> | ||
Example: Open dev console to see output<br /> | ||
<script src="bundle.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.