mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
📝 Doc params in window.coffee
This commit is contained in:
parent
a1ce1c9ef6
commit
8b83918a24
@ -1,9 +1,8 @@
|
||||
# Public: Measure how long a function takes to run.
|
||||
#
|
||||
# * description:
|
||||
# A {String} description that will be logged to the console.
|
||||
# * fn:
|
||||
# A {Function} to measure the duration of.
|
||||
# description - A {String} description that will be logged to the console when
|
||||
# the function completes.
|
||||
# fn - A {Function} to measure the duration of.
|
||||
#
|
||||
# Returns the value returned by the given function.
|
||||
window.measure = (description, fn) ->
|
||||
@ -15,13 +14,11 @@ window.measure = (description, fn) ->
|
||||
|
||||
# Public: Create a dev tools profile for a function.
|
||||
#
|
||||
# * description:
|
||||
# A {String} descrption that will be available in the Profiles tab of the dev
|
||||
# tools.
|
||||
# * fn:
|
||||
# A {Function} to profile.
|
||||
# description - A {String} description that will be available in the Profiles
|
||||
# tab of the dev tools.
|
||||
# fn - A {Function} to profile.
|
||||
#
|
||||
# Return the value returned by the given function.
|
||||
# Returns the value returned by the given function.
|
||||
window.profile = (description, fn) ->
|
||||
measure description, ->
|
||||
console.profile(description)
|
||||
|
Loading…
Reference in New Issue
Block a user