mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Merge pull request #1839 from michaelficarra/issue1832
fixes #1832: speed up `CoffeeScript.eval` in browser script
This commit is contained in:
commit
97d1eedd5a
2 changed files with 3 additions and 2 deletions
File diff suppressed because one or more lines are too long
|
@ -4,8 +4,9 @@ CoffeeScript = require './coffee-script'
|
|||
CoffeeScript.require = require
|
||||
|
||||
# Use standard JavaScript `eval` to eval code.
|
||||
global ?= this
|
||||
CoffeeScript.eval = (code, options) ->
|
||||
eval CoffeeScript.compile code, options
|
||||
global.eval CoffeeScript.compile code, options
|
||||
|
||||
# Running code does not provide access to this scope.
|
||||
CoffeeScript.run = (code, options = {}) ->
|
||||
|
|
Loading…
Reference in a new issue