Skip to content

Don't use eval for dictionary access. #22

Merged
merged 1 commit into from Mar 4, 2013

2 participants

@kuba-kubula

Eval is not needed here

@baryshev
Owner
baryshev commented Mar 4, 2013

This eval uses to get access to nested objects. For example:

{
  news : {
    list : '<ul>...</ul>',
    element : '<p>...</p>'
  },
  items : {
    list : '<ul>...</ul>',
    element : '<p>...</p>'
  }
}

With this eval we can access this templates by 'news.list' or 'items.element', without eval we can't do it.

@kuba-kubula

Is it ok now?

I'd like to get avoid of the eval here, just because the root can be much much larger than I want to evaluate.

@baryshev baryshev merged commit 41cd25e into baryshev:master Mar 4, 2013
@baryshev
Owner
baryshev commented Mar 4, 2013

0.4.11 published. Also i added Array.reduce compatibility function for old browsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.