Skip to content

Commit

Permalink
Bugfix: ids could contain a dot
Browse files Browse the repository at this point in the history
  • Loading branch information
avinoamr committed Jun 27, 2015
1 parent e54b047 commit 1c413d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Cursor ( file ) {

Cursor.prototype._save = function( obj, callback ) {
if ( !obj.id ) {
obj.id = ( Math.random() * 1e17 ).toString( 36 );
obj.id = Math.random().toString( 36 ).substr( 2 );
}
fs.appendFile( this._file, JSON.stringify( obj ) + "\n", callback );
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dbstream-fs",
"version": "1.0.5",
"version": "1.0.6",
"description": "File-system based database compatible with the Database Stream API",
"main": "fs.js",
"scripts": {
Expand Down

0 comments on commit 1c413d9

Please sign in to comment.