mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
fix spacing for eslint
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
|
||||||
export default function searchFromNotes(data, search) {
|
export default function searchFromNotes(data, search){
|
||||||
let notes = data.noteMap.map((note) => note)
|
let notes = data.noteMap.map((note) => note)
|
||||||
if (search.trim().length === 0) return []
|
if (search.trim().length === 0) return []
|
||||||
let searchBlocks = search.split(' ')
|
let searchBlocks = search.split(' ')
|
||||||
@@ -15,17 +15,17 @@ export default function searchFromNotes(data, search) {
|
|||||||
return notes
|
return notes
|
||||||
}
|
}
|
||||||
|
|
||||||
function findByTag(notes, tag) {
|
function findByTag(notes, tag){
|
||||||
let regExp = new RegExp(_.escapeRegExp(tag), 'i')
|
let regExp = new RegExp(_.escapeRegExp(tag), 'i')
|
||||||
return notes.filter((note) => {
|
return notes.filter((note) => {
|
||||||
if(!_.isArray(note.tags)) return false
|
if (!_.isArray(note.tags)) return false
|
||||||
return note.tags.some((_tag) => {
|
return note.tags.some((_tag) => {
|
||||||
return _tag.match(regExp)
|
return _tag.match(regExp)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function findByWord(notes, block) {
|
function findByWord(notes, block){
|
||||||
let regExp = new RegExp(_.escapeRegExp(block), 'i')
|
let regExp = new RegExp(_.escapeRegExp(block), 'i')
|
||||||
return notes.filter((note) => {
|
return notes.filter((note) => {
|
||||||
if (_.isArray(note.tags) && note.tags.some((_tag) => {
|
if (_.isArray(note.tags) && note.tags.some((_tag) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user