docs: website for LiquidJS

This commit is contained in:
harttle
2020-03-28 17:21:07 +08:00
parent 0633dbeabb
commit 3e42d6b1b0
422 changed files with 14509 additions and 50335 deletions
@@ -1,6 +1,6 @@
import { isFunction } from '../util/underscore'
export interface IComparable {
export interface Comparable {
equals: (rhs: any) => boolean;
gt: (rhs: any) => boolean;
geq: (rhs: any) => boolean;
@@ -8,6 +8,6 @@ export interface IComparable {
leq: (rhs: any) => boolean;
}
export function isComparable (arg: any): arg is IComparable {
export function isComparable (arg: any): arg is Comparable {
return arg && isFunction(arg.equals)
}
+2 -2
View File
@@ -1,8 +1,8 @@
import { Drop } from './drop'
import { IComparable } from './icomparable'
import { Comparable } from './comparable'
import { isObject, isString, isArray } from '../util/underscore'
export class EmptyDrop extends Drop implements IComparable {
export class EmptyDrop extends Drop implements Comparable {
public equals (value: any) {
if (isString(value) || isArray(value)) return value.length === 0
if (isObject(value)) return Object.keys(value).length === 0
+2 -2
View File
@@ -1,9 +1,9 @@
import { Drop } from './drop'
import { IComparable } from './icomparable'
import { Comparable } from './comparable'
import { isNil, toValue } from '../util/underscore'
import { BlankDrop } from '../drop/blank-drop'
export class NullDrop extends Drop implements IComparable {
export class NullDrop extends Drop implements Comparable {
public equals (value: any) {
return isNil(toValue(value)) || value instanceof BlankDrop
}
+1 -1
View File
@@ -1,4 +1,4 @@
import { isComparable } from '../drop/icomparable'
import { isComparable } from '../drop/comparable'
import { isFunction } from '../util/underscore'
import { isTruthy } from '../render/boolean'
+3 -1
View File
@@ -1,3 +1,5 @@
import { FilterImpl } from './filter-impl'
export type FilterImplOptions = (this: FilterImpl, value: any, ...args: any[]) => any
export interface FilterImplOptions {
(this: FilterImpl, value: any, ...args: any[]): any;
}
+1
View File
@@ -9,6 +9,7 @@ export { isFalsy, isTruthy } from './render/boolean'
export { TagToken } from './tokens/tag-token'
export { Context } from './context/context'
export { Template } from './template/template'
export { FilterImplOptions } from './template/filter/filter-impl-options'
export { TagImplOptions } from './template/tag/tag-impl-options'
export { ParseStream } from './parser/parse-stream'
export { Token } from './tokens/token'