This commit is contained in:
orion 2023-11-04 13:38:47 -05:00
parent c72c268b37
commit 03835ee89d
Signed by: orion
GPG Key ID: 6D4165AE4C928719
2 changed files with 7 additions and 0 deletions

View File

@ -54,3 +54,6 @@ export const textImpl = n => () => n.text() || ''
/** @type {(_1: string) => (_2: CheerioNode) => () => CheerioNode} */ /** @type {(_1: string) => (_2: CheerioNode) => () => CheerioNode} */
export const findImpl = s => n => () => n.find(s) export const findImpl = s => n => () => n.find(s)
/** @type {(_1: string) => (_2: CheerioNode) => () => boolean} */
export const isImpl = s => n => () => n.is(s)

View File

@ -28,6 +28,7 @@ foreign import cssImpl :: CheerioNode -> Effect (Object String)
foreign import htmlImpl :: CheerioNode -> Effect String foreign import htmlImpl :: CheerioNode -> Effect String
foreign import textImpl :: CheerioNode -> Effect String foreign import textImpl :: CheerioNode -> Effect String
foreign import isImpl :: String -> CheerioNode -> Effect Boolean
foreign import findImpl :: String -> CheerioNode -> Effect CheerioNode foreign import findImpl :: String -> CheerioNode -> Effect CheerioNode
load :: String -> Effect CheerioNode load :: String -> Effect CheerioNode
@ -57,6 +58,9 @@ html = htmlImpl
text :: CheerioNode -> Effect String text :: CheerioNode -> Effect String
text = textImpl text = textImpl
is :: String -> CheerioNode -> Effect Boolean
is s = isImpl s
find :: String -> CheerioNode -> Effect (Array (CheerioNode)) find :: String -> CheerioNode -> Effect (Array (CheerioNode))
find s = toArrayImpl <=< findImpl s find s = toArrayImpl <=< findImpl s