fix: is
This commit is contained in:
parent
c72c268b37
commit
03835ee89d
@ -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)
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user