Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: playground
node v18.11.0
endpoint
share
tweet
const {Liquid, Drop} = require('liquidjs') class CollestionDrop extends Drop { liquidMethodMissing(key) { return [key, key.toUpperCase()] } valueOf() { return ["default", "collection"] } } const context = { collection: new CollestionDrop() } const engine = new Liquid() const template = ` collection: {{collection | join: ","}} collection.foo: {{collection.foo | join: "," }}"` engine.parseAndRender(template, context)
Created from: https://npm.runkit.com/playground
Loading…
Clone and edit this document