mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Move matchesWholeWord into mathing file
This commit is contained in:
parent
a5333b1939
commit
c2bb2d9787
3 changed files with 7 additions and 8 deletions
|
|
@ -2,12 +2,9 @@
|
|||
import slugify from 'slugify'
|
||||
import axios from 'axios'
|
||||
|
||||
import { matchesWholeWord } from './matching.js'
|
||||
import { byTimeThenNull } from './sort-list.js'
|
||||
import { getVideoEndpoint } from './app-derived.js'
|
||||
|
||||
export function matchesWholeWord (needle, haystack) {
|
||||
return new RegExp('\\b' + needle + '\\b').test(haystack)
|
||||
}
|
||||
import parseDate from './parse-date'
|
||||
|
||||
const videoFeaturesApp = function (app, video) {
|
||||
|
|
|
|||
6
helpers/matching.js
Normal file
6
helpers/matching.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
// Match whole word
|
||||
export function matchesWholeWord (needle, haystack) {
|
||||
return new RegExp('\\b' + needle + '\\b').test(haystack)
|
||||
}
|
||||
|
||||
|
|
@ -1,10 +1,6 @@
|
|||
// import { allVideoAppsListSet } from '~/helpers/get-list.js'
|
||||
// import videoList from '~/static/video-list.json'
|
||||
|
||||
export function matchesWholeWord (needle, haystack) {
|
||||
return new RegExp('\\b' + needle + '\\b').test(haystack)
|
||||
}
|
||||
|
||||
export function appsRelatedToVideo ( video, allVideoAppsListSet ) {
|
||||
// console.log('allVideoAppsListSet', allVideoAppsListSet.length)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue