Commit 651d0c85 authored by Aral Balkan's avatar Aral Balkan
Browse files

Refactor last change to improve clarity and remove log statement

parent 2f338e04
......@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](, and this project adheres to [Semantic Versioning](
## [2.0.4] - 2021-07-30
### Improved
- Minor: Refactored change in last release for clarity (“naming things is hard”). Removed log statement.
## [2.0.3] - 2021-07-30
### Fixed
......@@ -159,14 +159,13 @@ export default class JSTable extends EventEmitter {
// one exported in the first line of the table and populate it with
// the initial/compacted data provided for it on that line.
const matchLastNewline = /\n$/
const indexOfFirstNewline = matchLastNewline.exec(table).index
const initialData = table.substr(0, indexOfFirstNewline).replace('export const ', '')
const indexOfLastNewlineOnFirstLine = matchLastNewline.exec(table).index
const initialData = table.substr(0, indexOfLastNewlineOnFirstLine).replace('export const ', '')
let _
// Remove the first line.
table = table.substr(indexOfFirstNewline)
table = table.substr(indexOfLastNewlineOnFirstLine)
// Evaluate the remaining JavaScript operations in the log.
"name": "@small-tech/jsdb",
"version": "2.0.3",
"version": "2.0.4",
"description": "A zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for Small Web applications that persists to a JavaScript transaction log.",
"keywords": [
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment