squirrellyjs / squirrelly

Semi-embedded JS template engine that supports helpers, filters, partials, and template inheritance. 4KB minzipped, written in TypeScript β›Ί
https://squirrelly.js.org
MIT License
635 stars 83 forks source link

Add comment explaining setDefaultFilters('clear') #91

Closed first-timers[bot] closed 5 years ago

first-timers[bot] commented 5 years ago

πŸ†•β˜ First Timers Only

This issue is reserved for people who never contributed to Open Source before. We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you πŸ˜ƒ

About First Timers Only.

πŸŽƒπŸ’»πŸ‘• Hacktoberfest: Trick or Treat!

If you haven’t yet, sign up for Hacktoberfest to earn a limited edition T-shirt.

πŸ€” What you will need to know

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

:clipboard: Step by Step

@@ -37,7 +37,7 @@ export var defaultFilterCache = {
 }

 export function setDefaultFilters (obj) {
-  if (obj === 'clear') {
+  if (obj === 'clear') { // If someone calls Sqrl.setDefaultFilters('clear') it clears all default filters
     defaultFilters = {}
   } else {
     for (var key in obj) {

πŸ€”β“ Questions

Comment and we'll try to help as soon as possible πŸ˜ƒ

Can't find any open issues?

Try filtering by the 'available' label. If that doesn't work, head over to squirrelly.js.org and see if there are issues there.

amardeep24 commented 5 years ago

I'll start working on it.

nebrelbug commented 5 years ago

@amardeep24 great, thanks!