Skip to content

Commit 31d5cc0

Browse files
committed
Cleanup of coffee code
Use FS function instead of undocumented feature
1 parent c88b160 commit 31d5cc0

File tree

3 files changed

+3482
-3477
lines changed

3 files changed

+3482
-3477
lines changed

coffee/api.coffee

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#@copyright Ophir LOJKINE
22

3-
apiTemp = Runtime.stackAlloc(4);
3+
apiTemp = Runtime.stackAlloc(4)
44

55
# Constants are defined in api-data.coffee
6-
SQLite = {};
6+
SQLite = {}
77

88
### Represents an prepared statement.
99
@@ -374,7 +374,8 @@ class Database
374374
### Exports the contents of the database to a binary array
375375
@return [Uint8Array] An array of bytes of the SQLite3 database file
376376
###
377-
'export': -> new Uint8Array FS.root.contents[@filename].contents
377+
'export': -> FS.readFile @filename, encoding:'binary'
378+
378379

379380
### Close the database, and all associated prepared statements.
380381

0 commit comments

Comments
 (0)