mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 12:20:40 -07:00
feat: rename to defaultOperators and Operators
This commit is contained in:
committed by
Jun Yang
parent
18055c8855
commit
8734e2e6ce
@@ -3,11 +3,11 @@ import { Context } from '../context/context'
|
||||
import { isFunction } from '../util/underscore'
|
||||
import { isTruthy } from '../render/boolean'
|
||||
|
||||
export interface OperatorMap {
|
||||
export interface Operators {
|
||||
[key: string]: (lhs: any, rhs: any, ctx: Context) => boolean;
|
||||
}
|
||||
|
||||
export const Operators: OperatorMap = {
|
||||
export const defaultOperators: Operators = {
|
||||
'==': (l: any, r: any) => {
|
||||
if (isComparable(l)) return l.equals(r)
|
||||
if (isComparable(r)) return r.equals(l)
|
||||
|
||||
Reference in New Issue
Block a user