1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

parse only cson files when reading notes

This commit is contained in:
Dick Choi
2016-09-20 21:00:49 +09:00
parent 1763dbcff1
commit 975e82710e

View File

@@ -17,6 +17,9 @@ function resolveStorageNotes (storage) {
notePathList = []
}
let notes = notePathList
.filter(function filterOnlyCSONFile (notePath) {
return /\.cson$/.test(notePath)
})
.map(function parseCSONFile (notePath) {
let data = CSON.readFileSync(path.join(notesDirPath, notePath))
data.key = path.basename(notePath, '.cson')