MCPcopy
hub / github.com/harttle/liquidjs / EmptyDrop

Class EmptyDrop

src/drop/empty-drop.ts:5–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import { isObject, isString, isArray, toValue } from '../util'
4
5export class EmptyDrop extends Drop implements Comparable {
6 public equals (value: any) {
7 if (value instanceof EmptyDrop) return false
8 value = toValue(value)
9 if (isString(value) || isArray(value)) return value.length === 0
10 if (isObject(value)) return Object.keys(value).length === 0
11 return false
12 }
13 public gt () {
14 return false
15 }
16 public geq () {
17 return false
18 }
19 public lt () {
20 return false
21 }
22 public leq () {
23 return false
24 }
25 public valueOf () {
26 return ''
27 }
28 static is (value: unknown) {
29 return value instanceof EmptyDrop
30 }
31}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…