mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-18 10:07:11 +01:00
Update JavaScript documentation
This commit is contained in:
parent
d43d5ff84c
commit
10b4f445f7
3 changed files with 12 additions and 5 deletions
|
@ -7,9 +7,8 @@ module Docs
|
|||
end
|
||||
|
||||
def root
|
||||
css(*%w(#About_this_Reference+div #About_this_Reference #Comments~* #Comments)).remove
|
||||
|
||||
# Move "Global Objects" lists to the same level as the other ones
|
||||
css('#Global_Objects + p').remove
|
||||
div = at_css '#Global_Objects + div'
|
||||
div.css('h3').each { |node| node.name = 'h2' }
|
||||
at_css('#Global_Objects').replace(div.children)
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
module Docs
|
||||
class Javascript
|
||||
class EntriesFilter < Docs::EntriesFilter
|
||||
TYPES = %w(Array Boolean Date Function Intl JSON Math Number Object RegExp String)
|
||||
TYPES = %w(Array Boolean Date Function Intl JSON Map Math Number Object
|
||||
RegExp Set String Symbol WeakMap WeakSet)
|
||||
INTL_OBJECTS = %w(Collator DateTimeFormat NumberFormat)
|
||||
|
||||
def get_name
|
||||
|
@ -19,6 +20,7 @@ module Docs
|
|||
name
|
||||
else
|
||||
name = super
|
||||
name.remove! 'Functions.'
|
||||
name.remove! 'Functions and function scope.'
|
||||
name.remove! 'Operators.'
|
||||
name.remove! 'Statements.'
|
||||
|
@ -31,7 +33,7 @@ module Docs
|
|||
'Statements'
|
||||
elsif slug.start_with? 'Operators'
|
||||
'Operators'
|
||||
elsif slug.start_with? 'Functions_and_function_scope'
|
||||
elsif slug.start_with?('Functions_and_function_scope') || slug.start_with?('Functions')
|
||||
'Function'
|
||||
elsif slug.start_with? 'Global_Objects'
|
||||
object, method = *slug.remove('Global_Objects/').split('/')
|
||||
|
|
|
@ -17,8 +17,14 @@ module Docs
|
|||
/Global_Objects/Iterator
|
||||
/Global_Objects/Proxy
|
||||
/Reserved_Words
|
||||
/Functions/arguments
|
||||
/arrow_functions
|
||||
/rest_parameters)
|
||||
/rest_parameters
|
||||
/default_parameters
|
||||
/Strict_mode
|
||||
/Functions/rest_parameters
|
||||
/Methods_Index
|
||||
/Properties_Index)
|
||||
|
||||
# Duplicates
|
||||
options[:skip].concat %w(
|
||||
|
|
Loading…
Reference in a new issue