How to use Util method in wpt

Best JavaScript code snippet using wpt

entry.js

Source:entry.js Github

copy

Full Screen

1const base_platform_js = require('nej-commonjs/base/platform'); 2const index = require('nej-commonjs/index')3const base_chain_js = require('nej-commonjs/base/chain'); 4const base_config_js = require('nej-commonjs/base/config'); 5const base_constant_js = require('nej-commonjs/base/constant'); 6const base_element_js = require('nej-commonjs/base/element'); 7const base_event_js = require('nej-commonjs/base/event'); 8const base_global_js = require('nej-commonjs/base/global'); 9const base_klass_js = require('nej-commonjs/base/klass'); 10const base_util_js = require('nej-commonjs/base/util'); 11const util_event_js = require('nej-commonjs/util/event'); 12const util_ajax_dwr_js = require('nej-commonjs/util/ajax/dwr'); 13const util_ajax_jsonp_js = require('nej-commonjs/util/ajax/jsonp'); 14const util_ajax_message_js = require('nej-commonjs/util/ajax/message'); 15const util_ajax_rest_js = require('nej-commonjs/util/ajax/rest'); 16const util_ajax_tag_js = require('nej-commonjs/util/ajax/tag'); 17const util_ajax_xdr_js = require('nej-commonjs/util/ajax/xdr'); 18const util_animation_animation_js = require('nej-commonjs/util/animation/animation'); 19const util_animation_bezier_js = require('nej-commonjs/util/animation/bezier'); 20const util_animation_bounce_js = require('nej-commonjs/util/animation/bounce'); 21const util_animation_decelerate_js = require('nej-commonjs/util/animation/decelerate'); 22const util_animation_easein_js = require('nej-commonjs/util/animation/easein'); 23const util_animation_easeinout_js = require('nej-commonjs/util/animation/easeinout'); 24const util_animation_easeout_js = require('nej-commonjs/util/animation/easeout'); 25const util_animation_linear_js = require('nej-commonjs/util/animation/linear'); 26const util_audio_audio_js = require('nej-commonjs/util/audio/audio'); 27const util_cache_abstract_js = require('nej-commonjs/util/cache/abstract'); 28const util_cache_cache_js = require('nej-commonjs/util/cache/cache'); 29const util_cache_cache_list_base_js = require('nej-commonjs/util/cache/cache.list.base'); 30const util_cache_cache_list_js = require('nej-commonjs/util/cache/cache.list'); 31const util_cache_cache_share_js = require('nej-commonjs/util/cache/cache.share'); 32const util_cache_cookie_js = require('nej-commonjs/util/cache/cookie'); 33const util_cache_database_js = require('nej-commonjs/util/cache/database'); 34const util_cache_list_js = require('nej-commonjs/util/cache/list'); 35const util_cache_manager_js = require('nej-commonjs/util/cache/manager'); 36const util_cache_share_js = require('nej-commonjs/util/cache/share'); 37const util_cache_storage_js = require('nej-commonjs/util/cache/storage'); 38const util_calendar_calendar_js = require('nej-commonjs/util/calendar/calendar'); 39const util_chain_NodeList_js = require('nej-commonjs/util/chain/NodeList'); 40const util_chain_chainable_js = require('nej-commonjs/util/chain/chainable'); 41const util_chart_chart_js = require('nej-commonjs/util/chart/chart'); 42const util_clipboard_clipboard_js = require('nej-commonjs/util/clipboard/clipboard'); 43const util_clipper_clipper_js = require('nej-commonjs/util/clipper/clipper'); 44const util_clock_clock_js = require('nej-commonjs/util/clock/clock'); 45const util_color_color_js = require('nej-commonjs/util/color/color'); 46const util_counter_counter_js = require('nej-commonjs/util/counter/counter'); 47const util_cursor_cursor_js = require('nej-commonjs/util/cursor/cursor'); 48const util_cycler_cycler_js = require('nej-commonjs/util/cycler/cycler'); 49const util_dispatcher_dispatcher_2_js = require('nej-commonjs/util/dispatcher/dispatcher.2'); 50const util_dispatcher_dispatcher_js = require('nej-commonjs/util/dispatcher/dispatcher'); 51const util_dispatcher_module_base_js = require('nej-commonjs/util/dispatcher/module.base'); 52const util_dispatcher_module_js = require('nej-commonjs/util/dispatcher/module'); 53const util_dispatcher_regularModule_js = require('nej-commonjs/util/dispatcher/regularModule'); 54const util_dispatcher_test_js = require('nej-commonjs/util/dispatcher/test'); 55const util_dragger_dragger_js = require('nej-commonjs/util/dragger/dragger'); 56const util_dragger_simple_js = require('nej-commonjs/util/dragger/simple'); 57const util_editor_area_js = require('nej-commonjs/util/editor/area'); 58const util_editor_command_js = require('nej-commonjs/util/editor/command'); 59const util_editor_editor_js = require('nej-commonjs/util/editor/editor'); 60const util_editor_text_js = require('nej-commonjs/util/editor/text'); 61const util_editor_toolbar_js = require('nej-commonjs/util/editor/toolbar'); 62const util_effect_api_js = require('nej-commonjs/util/effect/api'); 63const util_effect_effect_api_js = require('nej-commonjs/util/effect/effect.api'); 64const util_effect_effect_js = require('nej-commonjs/util/effect/effect'); 65const util_encode_base64_js = require('nej-commonjs/util/encode/base64'); 66const util_encode_crc32_js = require('nej-commonjs/util/encode/crc32'); 67const util_encode_json_js = require('nej-commonjs/util/encode/json'); 68const util_encode_md5_js = require('nej-commonjs/util/encode/md5'); 69const util_encode_sha_md5_js = require('nej-commonjs/util/encode/sha.md5'); 70const util_es_array_js = require('nej-commonjs/util/es/array'); 71const util_event_event_js = require('nej-commonjs/util/event/event'); 72const util_file_paste_js = require('nej-commonjs/util/file/paste'); 73const util_file_save_js = require('nej-commonjs/util/file/save'); 74const util_file_select_js = require('nej-commonjs/util/file/select'); 75const util_flash_flash_js = require('nej-commonjs/util/flash/flash'); 76const util_focus_focus_js = require('nej-commonjs/util/focus/focus'); 77const util_form_form_js = require('nej-commonjs/util/form/form'); 78const util_helper_select_js = require('nej-commonjs/util/helper/select'); 79const util_highlight_touch_js = require('nej-commonjs/util/highlight/touch'); 80const util_history_history_js = require('nej-commonjs/util/history/history'); 81const util_history_history_override_js = require('nej-commonjs/util/history/history.override'); 82const util_history_manager_js = require('nej-commonjs/util/history/manager'); 83const util_hover_hover_js = require('nej-commonjs/util/hover/hover'); 84const util_lazy_image_js = require('nej-commonjs/util/lazy/image'); 85const util_lazy_loading_js = require('nej-commonjs/util/lazy/loading'); 86const util_lightbox_lightbox_js = require('nej-commonjs/util/lightbox/lightbox'); 87const util_list_holder_js = require('nej-commonjs/util/list/holder'); 88const util_list_module_js = require('nej-commonjs/util/list/module'); 89const util_list_module_pager_js = require('nej-commonjs/util/list/module.pager'); 90const util_list_module_waterfall_js = require('nej-commonjs/util/list/module.waterfall'); 91const util_list_page_js = require('nej-commonjs/util/list/page'); 92const util_list_waterfall_js = require('nej-commonjs/util/list/waterfall'); 93const util_media_audio_js = require('nej-commonjs/util/media/audio'); 94const util_media_flash_js = require('nej-commonjs/util/media/flash'); 95const util_media_media_js = require('nej-commonjs/util/media/media'); 96const util_media_playlist_js = require('nej-commonjs/util/media/playlist'); 97const util_page_base_js = require('nej-commonjs/util/page/base'); 98const util_page_page_base_js = require('nej-commonjs/util/page/page.base'); 99const util_page_page_js = require('nej-commonjs/util/page/page'); 100const util_page_page_simple_js = require('nej-commonjs/util/page/page.simple'); 101const util_page_simple_js = require('nej-commonjs/util/page/simple'); 102const util_placeholder_placeholder_js = require('nej-commonjs/util/placeholder/placeholder'); 103const util_query_nes_js = require('nej-commonjs/util/query/nes'); 104const util_query_query_js = require('nej-commonjs/util/query/query'); 105const util_range_range_js = require('nej-commonjs/util/range/range'); 106const util_region_region_zh_js = require('nej-commonjs/util/region/region.zh'); 107const util_region_zh_js = require('nej-commonjs/util/region/zh'); 108const util_resize_resize_js = require('nej-commonjs/util/resize/resize'); 109const util_scroll_scroll_simple_js = require('nej-commonjs/util/scroll/scroll.simple'); 110const util_scroll_simple_js = require('nej-commonjs/util/scroll/simple'); 111const util_scroll_smart_js = require('nej-commonjs/util/scroll/smart'); 112const util_selector_cascade_js = require('nej-commonjs/util/selector/cascade'); 113const util_selector_range_js = require('nej-commonjs/util/selector/range'); 114const util_selector_selector_js = require('nej-commonjs/util/selector/selector'); 115const util_selector_selector_range_js = require('nej-commonjs/util/selector/selector.range'); 116const util_slider_simple_js = require('nej-commonjs/util/slider/simple'); 117const util_slider_slider_js = require('nej-commonjs/util/slider/slider'); 118const util_slider_slider_simple_js = require('nej-commonjs/util/slider/slider.simple'); 119const util_slider_slider_x_js = require('nej-commonjs/util/slider/slider.x'); 120const util_slider_slider_xy_js = require('nej-commonjs/util/slider/slider.xy'); 121const util_slider_slider_y_js = require('nej-commonjs/util/slider/slider.y'); 122const util_slider_x_js = require('nej-commonjs/util/slider/x'); 123const util_slider_xy_js = require('nej-commonjs/util/slider/xy'); 124const util_slider_y_js = require('nej-commonjs/util/slider/y'); 125const util_sort_horizontal_js = require('nej-commonjs/util/sort/horizontal'); 126const util_sort_sortable_js = require('nej-commonjs/util/sort/sortable'); 127const util_sort_vertical_js = require('nej-commonjs/util/sort/vertical'); 128const util_suggest_at_js = require('nej-commonjs/util/suggest/at'); 129const util_suggest_suggest_js = require('nej-commonjs/util/suggest/suggest'); 130const util_tab_tab_js = require('nej-commonjs/util/tab/tab'); 131const util_tab_tab_view_js = require('nej-commonjs/util/tab/tab.view'); 132const util_tab_view_js = require('nej-commonjs/util/tab/view'); 133const util_template_jst_js = require('nej-commonjs/util/template/jst'); 134const util_template_tpl_js = require('nej-commonjs/util/template/tpl'); 135const util_template_trimpath_js = require('nej-commonjs/util/template/trimpath'); 136const util_timer_animation_js = require('nej-commonjs/util/timer/animation'); 137const util_timer_interval_js = require('nej-commonjs/util/timer/interval'); 138const util_toggle_toggle_js = require('nej-commonjs/util/toggle/toggle'); 139const util_ajax_loader_html_js = require('nej-commonjs/util/ajax/loader/html'); 140const util_ajax_loader_loader_js = require('nej-commonjs/util/ajax/loader/loader'); 141const util_ajax_loader_script_js = require('nej-commonjs/util/ajax/loader/script'); 142const util_ajax_loader_style_js = require('nej-commonjs/util/ajax/loader/style'); 143const util_ajax_loader_text_js = require('nej-commonjs/util/ajax/loader/text'); 144const util_ajax_proxy_flash_js = require('nej-commonjs/util/ajax/proxy/flash'); 145const util_ajax_proxy_frame_js = require('nej-commonjs/util/ajax/proxy/frame'); 146const util_ajax_proxy_proxy_js = require('nej-commonjs/util/ajax/proxy/proxy'); 147const util_ajax_proxy_upload_js = require('nej-commonjs/util/ajax/proxy/upload'); 148const util_ajax_proxy_xhr_js = require('nej-commonjs/util/ajax/proxy/xhr'); 149const util_data_portrait_portrait_js = require('nej-commonjs/util/data/portrait/portrait'); 150const util_data_region_zh_js = require('nej-commonjs/util/data/region/zh'); 151const util_dispatcher_dsp_group_js = require('nej-commonjs/util/dispatcher/dsp/group'); 152const util_dispatcher_dsp_node_js = require('nej-commonjs/util/dispatcher/dsp/node'); 153const util_dispatcher_dsp_single_js = require('nej-commonjs/util/dispatcher/dsp/single'); 154const util_dispatcher_dsp_util_js = require('nej-commonjs/util/dispatcher/dsp/util'); 155const util_editor_command_backcolor_js = require('nej-commonjs/util/editor/command/backcolor'); 156const util_editor_command_blockquote_js = require('nej-commonjs/util/editor/command/blockquote'); 157const util_editor_command_bold_js = require('nej-commonjs/util/editor/command/bold'); 158const util_editor_command_card_js = require('nej-commonjs/util/editor/command/card'); 159const util_editor_command_color_js = require('nej-commonjs/util/editor/command/color'); 160const util_editor_command_font_js = require('nej-commonjs/util/editor/command/font'); 161const util_editor_command_fontname_js = require('nej-commonjs/util/editor/command/fontname'); 162const util_editor_command_fontsize_js = require('nej-commonjs/util/editor/command/fontsize'); 163const util_editor_command_forecolor_js = require('nej-commonjs/util/editor/command/forecolor'); 164const util_editor_command_format_js = require('nej-commonjs/util/editor/command/format'); 165const util_editor_command_insertorderedlist_js = require('nej-commonjs/util/editor/command/insertorderedlist'); 166const util_editor_command_insertunorderedlist_js = require('nej-commonjs/util/editor/command/insertunorderedlist'); 167const util_editor_command_italic_js = require('nej-commonjs/util/editor/command/italic'); 168const util_editor_command_justifycenter_js = require('nej-commonjs/util/editor/command/justifycenter'); 169const util_editor_command_justifyleft_js = require('nej-commonjs/util/editor/command/justifyleft'); 170const util_editor_command_justifyright_js = require('nej-commonjs/util/editor/command/justifyright'); 171const util_editor_command_link_js = require('nej-commonjs/util/editor/command/link'); 172const util_editor_command_removeformat_js = require('nej-commonjs/util/editor/command/removeformat'); 173const util_editor_command_simple_js = require('nej-commonjs/util/editor/command/simple'); 174const util_editor_command_space_js = require('nej-commonjs/util/editor/command/space'); 175const util_editor_command_strikethrough_js = require('nej-commonjs/util/editor/command/strikethrough'); 176const util_editor_command_superscript_js = require('nej-commonjs/util/editor/command/superscript'); 177const util_editor_command_underline_js = require('nej-commonjs/util/editor/command/underline'); 178const util_editor_command_uploadimage_js = require('nej-commonjs/util/editor/command/uploadimage'); 179const NEJ_MAP = {180 index,181'base/chain': base_chain_js,182'base/config': base_config_js,183'base/constant': base_constant_js,184'base/element': base_element_js,185'base/event': base_event_js,186'base/global': base_global_js,187'base/klass': base_klass_js,188'base/platform': base_platform_js,189'base/util': base_util_js,190'util/event': util_event_js,191'util/ajax/dwr': util_ajax_dwr_js,192'util/ajax/jsonp': util_ajax_jsonp_js,193'util/ajax/message': util_ajax_message_js,194'util/ajax/rest': util_ajax_rest_js,195'util/ajax/tag': util_ajax_tag_js,196'util/ajax/xdr': util_ajax_xdr_js,197'util/animation/animation': util_animation_animation_js,198'util/animation/bezier': util_animation_bezier_js,199'util/animation/bounce': util_animation_bounce_js,200'util/animation/decelerate': util_animation_decelerate_js,201'util/animation/easein': util_animation_easein_js,202'util/animation/easeinout': util_animation_easeinout_js,203'util/animation/easeout': util_animation_easeout_js,204'util/animation/linear': util_animation_linear_js,205'util/audio/audio': util_audio_audio_js,206'util/cache/abstract': util_cache_abstract_js,207'util/cache/cache': util_cache_cache_js,208'util/cache/cache.list.base': util_cache_cache_list_base_js,209'util/cache/cache.list': util_cache_cache_list_js,210'util/cache/cache.share': util_cache_cache_share_js,211'util/cache/cookie': util_cache_cookie_js,212'util/cache/database': util_cache_database_js,213'util/cache/list': util_cache_list_js,214'util/cache/manager': util_cache_manager_js,215'util/cache/share': util_cache_share_js,216'util/cache/storage': util_cache_storage_js,217'util/calendar/calendar': util_calendar_calendar_js,218'util/chain/NodeList': util_chain_NodeList_js,219'util/chain/chainable': util_chain_chainable_js,220'util/chart/chart': util_chart_chart_js,221'util/clipboard/clipboard': util_clipboard_clipboard_js,222'util/clipper/clipper': util_clipper_clipper_js,223'util/clock/clock': util_clock_clock_js,224'util/color/color': util_color_color_js,225'util/counter/counter': util_counter_counter_js,226'util/cursor/cursor': util_cursor_cursor_js,227'util/cycler/cycler': util_cycler_cycler_js,228'util/dispatcher/dispatcher.2': util_dispatcher_dispatcher_2_js,229'util/dispatcher/dispatcher': util_dispatcher_dispatcher_js,230'util/dispatcher/module.base': util_dispatcher_module_base_js,231'util/dispatcher/module': util_dispatcher_module_js,232'util/dispatcher/regularModule': util_dispatcher_regularModule_js,233'util/dispatcher/test': util_dispatcher_test_js,234'util/dragger/dragger': util_dragger_dragger_js,235'util/dragger/simple': util_dragger_simple_js,236'util/editor/area': util_editor_area_js,237'util/editor/command': util_editor_command_js,238'util/editor/editor': util_editor_editor_js,239'util/editor/text': util_editor_text_js,240'util/editor/toolbar': util_editor_toolbar_js,241'util/effect/api': util_effect_api_js,242'util/effect/effect.api': util_effect_effect_api_js,243'util/effect/effect': util_effect_effect_js,244'util/encode/base64': util_encode_base64_js,245'util/encode/crc32': util_encode_crc32_js,246'util/encode/json': util_encode_json_js,247'util/encode/md5': util_encode_md5_js,248'util/encode/sha.md5': util_encode_sha_md5_js,249'util/es/array': util_es_array_js,250'util/event/event': util_event_event_js,251'util/file/paste': util_file_paste_js,252'util/file/save': util_file_save_js,253'util/file/select': util_file_select_js,254'util/flash/flash': util_flash_flash_js,255'util/focus/focus': util_focus_focus_js,256'util/form/form': util_form_form_js,257'util/helper/select': util_helper_select_js,258'util/highlight/touch': util_highlight_touch_js,259'util/history/history': util_history_history_js,260'util/history/history.override': util_history_history_override_js,261'util/history/manager': util_history_manager_js,262'util/hover/hover': util_hover_hover_js,263'util/lazy/image': util_lazy_image_js,264'util/lazy/loading': util_lazy_loading_js,265'util/lightbox/lightbox': util_lightbox_lightbox_js,266'util/list/holder': util_list_holder_js,267'util/list/module': util_list_module_js,268'util/list/module.pager': util_list_module_pager_js,269'util/list/module.waterfall': util_list_module_waterfall_js,270'util/list/page': util_list_page_js,271'util/list/waterfall': util_list_waterfall_js,272'util/media/audio': util_media_audio_js,273'util/media/flash': util_media_flash_js,274'util/media/media': util_media_media_js,275'util/media/playlist': util_media_playlist_js,276'util/page/base': util_page_base_js,277'util/page/page.base': util_page_page_base_js,278'util/page/page': util_page_page_js,279'util/page/page.simple': util_page_page_simple_js,280'util/page/simple': util_page_simple_js,281'util/placeholder/placeholder': util_placeholder_placeholder_js,282'util/query/nes': util_query_nes_js,283'util/query/query': util_query_query_js,284'util/range/range': util_range_range_js,285'util/region/region.zh': util_region_region_zh_js,286'util/region/zh': util_region_zh_js,287'util/resize/resize': util_resize_resize_js,288'util/scroll/scroll.simple': util_scroll_scroll_simple_js,289'util/scroll/simple': util_scroll_simple_js,290'util/scroll/smart': util_scroll_smart_js,291'util/selector/cascade': util_selector_cascade_js,292'util/selector/range': util_selector_range_js,293'util/selector/selector': util_selector_selector_js,294'util/selector/selector.range': util_selector_selector_range_js,295'util/slider/simple': util_slider_simple_js,296'util/slider/slider': util_slider_slider_js,297'util/slider/slider.simple': util_slider_slider_simple_js,298'util/slider/slider.x': util_slider_slider_x_js,299'util/slider/slider.xy': util_slider_slider_xy_js,300'util/slider/slider.y': util_slider_slider_y_js,301'util/slider/x': util_slider_x_js,302'util/slider/xy': util_slider_xy_js,303'util/slider/y': util_slider_y_js,304'util/sort/horizontal': util_sort_horizontal_js,305'util/sort/sortable': util_sort_sortable_js,306'util/sort/vertical': util_sort_vertical_js,307'util/suggest/at': util_suggest_at_js,308'util/suggest/suggest': util_suggest_suggest_js,309'util/tab/tab': util_tab_tab_js,310'util/tab/tab.view': util_tab_tab_view_js,311'util/tab/view': util_tab_view_js,312'util/template/jst': util_template_jst_js,313'util/template/tpl': util_template_tpl_js,314'util/template/trimpath': util_template_trimpath_js,315'util/timer/animation': util_timer_animation_js,316'util/timer/interval': util_timer_interval_js,317'util/toggle/toggle': util_toggle_toggle_js,318'util/ajax/loader/html': util_ajax_loader_html_js,319'util/ajax/loader/loader': util_ajax_loader_loader_js,320'util/ajax/loader/script': util_ajax_loader_script_js,321'util/ajax/loader/style': util_ajax_loader_style_js,322'util/ajax/loader/text': util_ajax_loader_text_js,323'util/ajax/proxy/flash': util_ajax_proxy_flash_js,324'util/ajax/proxy/frame': util_ajax_proxy_frame_js,325'util/ajax/proxy/proxy': util_ajax_proxy_proxy_js,326'util/ajax/proxy/upload': util_ajax_proxy_upload_js,327'util/ajax/proxy/xhr': util_ajax_proxy_xhr_js,328'util/data/portrait/portrait': util_data_portrait_portrait_js,329'util/data/region/zh': util_data_region_zh_js,330'util/dispatcher/dsp/group': util_dispatcher_dsp_group_js,331'util/dispatcher/dsp/node': util_dispatcher_dsp_node_js,332'util/dispatcher/dsp/single': util_dispatcher_dsp_single_js,333'util/dispatcher/dsp/util': util_dispatcher_dsp_util_js,334'util/editor/command/backcolor': util_editor_command_backcolor_js,335'util/editor/command/blockquote': util_editor_command_blockquote_js,336'util/editor/command/bold': util_editor_command_bold_js,337'util/editor/command/card': util_editor_command_card_js,338'util/editor/command/color': util_editor_command_color_js,339'util/editor/command/font': util_editor_command_font_js,340'util/editor/command/fontname': util_editor_command_fontname_js,341'util/editor/command/fontsize': util_editor_command_fontsize_js,342'util/editor/command/forecolor': util_editor_command_forecolor_js,343'util/editor/command/format': util_editor_command_format_js,344'util/editor/command/insertorderedlist': util_editor_command_insertorderedlist_js,345'util/editor/command/insertunorderedlist': util_editor_command_insertunorderedlist_js,346'util/editor/command/italic': util_editor_command_italic_js,347'util/editor/command/justifycenter': util_editor_command_justifycenter_js,348'util/editor/command/justifyleft': util_editor_command_justifyleft_js,349'util/editor/command/justifyright': util_editor_command_justifyright_js,350'util/editor/command/link': util_editor_command_link_js,351'util/editor/command/removeformat': util_editor_command_removeformat_js,352'util/editor/command/simple': util_editor_command_simple_js,353'util/editor/command/space': util_editor_command_space_js,354'util/editor/command/strikethrough': util_editor_command_strikethrough_js,355'util/editor/command/superscript': util_editor_command_superscript_js,356'util/editor/command/underline': util_editor_command_underline_js,357'util/editor/command/uploadimage': util_editor_command_uploadimage_js,358}359const nejRequire = (id) => {360 return NEJ_MAP[id] || NEJ_MAP[id + '.js']361}...

Full Screen

Full Screen

test.js

Source:test.js Github

copy

Full Screen

1const fs = require('fs')2const path = require('path')3const files = [4 'base/chain.js',5 'base/config.js',6 'base/constant.js',7 'base/element.js',8 'base/event.js',9 'base/global.js',10 'base/klass.js',11 'base/platform.js',12 'base/util.js',13 'util/event.js',14 'util/ajax/dwr.js',15 'util/ajax/jsonp.js',16 'util/ajax/message.js',17 'util/ajax/rest.js',18 'util/ajax/tag.js',19 'util/ajax/xdr.js',20 'util/animation/animation.js',21 'util/animation/bezier.js',22 'util/animation/bounce.js',23 'util/animation/decelerate.js',24 'util/animation/easein.js',25 'util/animation/easeinout.js',26 'util/animation/easeout.js',27 'util/animation/linear.js',28 'util/audio/audio.js',29 'util/cache/abstract.js',30 'util/cache/cache.js',31 'util/cache/cache.list.base.js',32 'util/cache/cache.list.js',33 'util/cache/cache.share.js',34 'util/cache/cookie.js',35 'util/cache/database.js',36 'util/cache/list.js',37 'util/cache/manager.js',38 'util/cache/share.js',39 'util/cache/storage.js',40 'util/calendar/calendar.js',41 'util/chain/NodeList.js',42 'util/chain/chainable.js',43 'util/chart/chart.js',44 'util/clipboard/clipboard.js',45 'util/clipper/clipper.js',46 'util/clock/clock.js',47 'util/color/color.js',48 'util/counter/counter.js',49 'util/cursor/cursor.js',50 'util/cycler/cycler.js',51 'util/dispatcher/dispatcher.2.js',52 'util/dispatcher/dispatcher.js',53 'util/dispatcher/module.base.js',54 'util/dispatcher/module.js',55 'util/dispatcher/regularModule.js',56 'util/dispatcher/test.js',57 'util/dragger/dragger.js',58 'util/dragger/simple.js',59 'util/editor/area.js',60 'util/editor/command.js',61 'util/editor/editor.js',62 'util/editor/text.js',63 'util/editor/toolbar.js',64 'util/effect/api.js',65 'util/effect/effect.api.js',66 'util/effect/effect.js',67 'util/encode/base64.js',68 'util/encode/crc32.js',69 'util/encode/json.js',70 'util/encode/md5.js',71 'util/encode/sha.md5.js',72 'util/es/array.js',73 'util/event/event.js',74 'util/file/paste.js',75 'util/file/save.js',76 'util/file/select.js',77 'util/flash/flash.js',78 'util/focus/focus.js',79 'util/form/form.js',80 'util/helper/select.js',81 'util/highlight/touch.js',82 'util/history/history.js',83 'util/history/history.override.js',84 'util/history/manager.js',85 'util/hover/hover.js',86 'util/lazy/image.js',87 'util/lazy/loading.js',88 'util/lightbox/lightbox.js',89 'util/list/holder.js',90 'util/list/module.js',91 'util/list/module.pager.js',92 'util/list/module.waterfall.js',93 'util/list/page.js',94 'util/list/waterfall.js',95 'util/media/audio.js',96 'util/media/flash.js',97 'util/media/media.js',98 'util/media/playlist.js',99 'util/page/base.js',100 'util/page/page.base.js',101 'util/page/page.js',102 'util/page/page.simple.js',103 'util/page/simple.js',104 'util/placeholder/placeholder.js',105 'util/query/nes.js',106 'util/query/query.js',107 'util/range/range.js',108 'util/region/region.zh.js',109 'util/region/zh.js',110 'util/resize/resize.js',111 'util/scroll/scroll.simple.js',112 'util/scroll/simple.js',113 'util/scroll/smart.js',114 'util/selector/cascade.js',115 'util/selector/range.js',116 'util/selector/selector.js',117 'util/selector/selector.range.js',118 'util/slider/simple.js',119 'util/slider/slider.js',120 'util/slider/slider.simple.js',121 'util/slider/slider.x.js',122 'util/slider/slider.xy.js',123 'util/slider/slider.y.js',124 'util/slider/x.js',125 'util/slider/xy.js',126 'util/slider/y.js',127 'util/sort/horizontal.js',128 'util/sort/sortable.js',129 'util/sort/vertical.js',130 'util/suggest/at.js',131 'util/suggest/suggest.js',132 'util/tab/tab.js',133 'util/tab/tab.view.js',134 'util/tab/view.js',135 'util/template/jst.js',136 'util/template/tpl.js',137 'util/template/trimpath.js',138 'util/timer/animation.js',139 'util/timer/interval.js',140 'util/toggle/toggle.js',141 'util/ajax/loader/html.js',142 'util/ajax/loader/loader.js',143 'util/ajax/loader/script.js',144 'util/ajax/loader/style.js',145 'util/ajax/loader/text.js',146 'util/ajax/proxy/flash.js',147 'util/ajax/proxy/frame.js',148 'util/ajax/proxy/proxy.js',149 'util/ajax/proxy/upload.js',150 'util/ajax/proxy/xhr.js',151 'util/data/portrait/portrait.js',152 'util/data/region/zh.js',153 'util/dispatcher/dsp/group.js',154 'util/dispatcher/dsp/node.js',155 'util/dispatcher/dsp/single.js',156 'util/dispatcher/dsp/util.js',157 'util/editor/command/backcolor.js',158 'util/editor/command/blockquote.js',159 'util/editor/command/bold.js',160 'util/editor/command/card.js',161 'util/editor/command/color.js',162 'util/editor/command/font.js',163 'util/editor/command/fontname.js',164 'util/editor/command/fontsize.js',165 'util/editor/command/forecolor.js',166 'util/editor/command/format.js',167 'util/editor/command/insertorderedlist.js',168 'util/editor/command/insertunorderedlist.js',169 'util/editor/command/italic.js',170 'util/editor/command/justifycenter.js',171 'util/editor/command/justifyleft.js',172 'util/editor/command/justifyright.js',173 'util/editor/command/link.js',174 'util/editor/command/removeformat.js',175 'util/editor/command/simple.js',176 'util/editor/command/space.js',177 'util/editor/command/strikethrough.js',178 'util/editor/command/superscript.js',179 'util/editor/command/underline.js',180 'util/editor/command/uploadimage.js',181]182let content = ''183let kvs = ''184for (let file of files) {185 const objName = file.replace(/\/|\./g, '_')186 const key = file.replace('.js', '')187 content += `const ${objName} = require('nej-commonjs/${key}'); \n`188 kvs += `'${key}': ${objName},\n`189}190content += `191const NEJ_MAP = {192${kvs}193}194`...

Full Screen

Full Screen

util.js

Source:util.js Github

copy

Full Screen

1// Copyright 2014 Cognitect. All Rights Reserved.2//3// Licensed under the Apache License, Version 2.0 (the "License");4// you may not use this file except in compliance with the License.5// You may obtain a copy of the License at6//7// http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// distributed under the License is distributed on an "AS-IS" BASIS,11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12// See the License for the specific language governing permissions and13// limitations under the License.14goog.provide("com.cognitect.transit.util");15goog.require("goog.object");16goog.scope(function () {17 var util = com.cognitect.transit.util,18 gobject = goog.object;19 if (typeof Object.keys != "undefined") {20 util.objectKeys = function (obj) {21 return Object.keys(obj);22 };23 } else {24 util.objectKeys = function (obj) {25 return gobject.getKeys(obj);26 };27 }28 if (typeof Array.isArray != "undefined") {29 util.isArray = function (obj) {30 return Array.isArray(obj);31 };32 } else {33 util.isArray = function (obj) {34 return goog.typeOf(obj) === "array";35 };36 }37 /**38 * @const39 * @type {string}40 */41 util.chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";42 util.randInt = function (ub) {43 return Math.round(Math.random() * ub);44 };45 util.randHex = function () {46 return util.randInt(15).toString(16);47 };48 util.randomUUID = function () {49 var rhex = (0x8 | (0x3 & util.randInt(14))).toString(16),50 ret = util.randHex() + util.randHex() + util.randHex() + util.randHex() +51 util.randHex() + util.randHex() + util.randHex() + util.randHex() + "-" +52 util.randHex() + util.randHex() + util.randHex() + util.randHex() + "-" +53 "4" + util.randHex() + util.randHex() + util.randHex() + "-" +54 rhex + util.randHex() + util.randHex() + util.randHex() + "-" +55 util.randHex() + util.randHex() + util.randHex() + util.randHex() +56 util.randHex() + util.randHex() + util.randHex() + util.randHex() +57 util.randHex() + util.randHex() + util.randHex() + util.randHex();58 return ret;59 };60// https://github.com/davidchambers/Base64.js61 util.btoa = function (input) {62 if (typeof btoa != "undefined") {63 return btoa(input);64 } else {65 var str = String(input);66 for (67 var block, charCode, idx = 0, map = util.chars, output = '';68 str.charAt(idx | 0) || (map = '=', idx % 1);69 output += map.charAt(63 & block >> 8 - idx % 1 * 8)70 ) {71 charCode = str.charCodeAt(idx += 3 / 4);72 if (charCode > 0xFF) {73 throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");74 }75 block = block << 8 | charCode;76 }77 return output;78 }79 };80 /**81 * @suppress {uselessCode}82 */83 util.atob = function (input) {84 if (typeof atob != "undefined") {85 return atob(input);86 } else {87 var str = String(input).replace(/=+$/, '');88 if (str.length % 4 == 1) {89 throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");90 }91 for (92 var bc = 0, bs, buffer, idx = 0, output = '';93 buffer = str.charAt(idx++);94 ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,95 bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 096 ) {97 buffer = util.chars.indexOf(buffer);98 }99 return output;100 }101 };102 util.Uint8ToBase64 = function (u8Arr) {103 var CHUNK_SIZE = 0x8000,104 index = 0,105 length = u8Arr.length,106 result = '',107 slice = null;108 while (index < length) {109 slice = u8Arr.subarray(index, Math.min(index + CHUNK_SIZE, length));110 result += String.fromCharCode.apply(null, slice);111 index += CHUNK_SIZE;112 }113 return util.btoa(result);114 };115 util.Base64ToUint8 = function (base64) {116 var binary_string = util.atob(base64),117 len = binary_string.length,118 bytes = new Uint8Array(len);119 for (var i = 0; i < len; i++) {120 var ascii = binary_string.charCodeAt(i);121 bytes[i] = ascii;122 }123 return bytes;124 };...

Full Screen

Full Screen

is.js

Source:is.js Github

copy

Full Screen

1/* */ 2(function(Buffer) {3 var assert = require('assert');4 var util = require('../../util');5 suite('is');6 test('util.isArray', function() {7 assert.equal(true, util.isArray([]));8 assert.equal(true, util.isArray(Array()));9 assert.equal(true, util.isArray(new Array()));10 assert.equal(true, util.isArray(new Array(5)));11 assert.equal(true, util.isArray(new Array('with', 'some', 'entries')));12 assert.equal(false, util.isArray({}));13 assert.equal(false, util.isArray({push: function() {}}));14 assert.equal(false, util.isArray(/regexp/));15 assert.equal(false, util.isArray(new Error()));16 assert.equal(false, util.isArray(Object.create(Array.prototype)));17 });18 test('util.isRegExp', function() {19 assert.equal(true, util.isRegExp(/regexp/));20 assert.equal(true, util.isRegExp(RegExp()));21 assert.equal(true, util.isRegExp(new RegExp()));22 assert.equal(false, util.isRegExp({}));23 assert.equal(false, util.isRegExp([]));24 assert.equal(false, util.isRegExp(new Date()));25 assert.equal(false, util.isRegExp(Object.create(RegExp.prototype)));26 });27 test('util.isDate', function() {28 assert.equal(true, util.isDate(new Date()));29 assert.equal(true, util.isDate(new Date(0)));30 assert.equal(false, util.isDate(Date()));31 assert.equal(false, util.isDate({}));32 assert.equal(false, util.isDate([]));33 assert.equal(false, util.isDate(new Error()));34 assert.equal(false, util.isDate(Object.create(Date.prototype)));35 });36 test('util.isError', function() {37 assert.equal(true, util.isError(new Error()));38 assert.equal(true, util.isError(new TypeError()));39 assert.equal(true, util.isError(new SyntaxError()));40 assert.equal(false, util.isError({}));41 assert.equal(false, util.isError({42 name: 'Error',43 message: ''44 }));45 assert.equal(false, util.isError([]));46 assert.equal(true, util.isError(Object.create(Error.prototype)));47 });48 test('util._extend', function() {49 assert.deepEqual(util._extend({a: 1}), {a: 1});50 assert.deepEqual(util._extend({a: 1}, []), {a: 1});51 assert.deepEqual(util._extend({a: 1}, null), {a: 1});52 assert.deepEqual(util._extend({a: 1}, true), {a: 1});53 assert.deepEqual(util._extend({a: 1}, false), {a: 1});54 assert.deepEqual(util._extend({a: 1}, {b: 2}), {55 a: 1,56 b: 257 });58 assert.deepEqual(util._extend({59 a: 1,60 b: 261 }, {b: 3}), {62 a: 1,63 b: 364 });65 });66 test('util.isBuffer', function() {67 assert.equal(true, util.isBuffer(new Buffer(4)));68 assert.equal(true, util.isBuffer(Buffer(4)));69 assert.equal(true, util.isBuffer(new Buffer(4)));70 assert.equal(true, util.isBuffer(new Buffer([1, 2, 3, 4])));71 assert.equal(false, util.isBuffer({}));72 assert.equal(false, util.isBuffer([]));73 assert.equal(false, util.isBuffer(new Error()));74 assert.equal(false, util.isRegExp(new Date()));75 assert.equal(true, util.isBuffer(Object.create(Buffer.prototype)));76 });...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var util = require('wptoolkit').Util;2var util = require('wptoolkit').Util;3var util = require('wptoolkit').Util;4var util = require('wptoolkit').Util;5var util = require('wptoolkit').Util;6var util = require('wptoolkit').Util;7var util = require('wptoolkit').Util;8var util = require('wptoolkit').Util;9var util = require('wptoolkit').Util;10var util = require('wptoolkit').Util;11var util = require('wptoolkit').Util;12var util = require('wptoolkit').Util;

Full Screen

Using AI Code Generation

copy

Full Screen

1var wptools = require('wptools');2var util = require('util');3console.log(util.inspect(wptools, {showHidden: false, depth: null}));4var wptools = require('wptools');5var util = require('util');6console.log(util.inspect(wptools, {showHidden: false, depth: null}));7var wptools = require('wptools');8var util = require('util');9console.log(util.inspect(wptools, {showHidden: false, depth: null}));10var wptools = require('wptools');11var util = require('util');12console.log(util.inspect(wptools, {showHidden: false, depth: null}));13var wptools = require('wptools');14var util = require('util');15console.log(util.inspect(wptools, {showHidden: false, depth: null}));16var wptools = require('wptools');17var util = require('util');18console.log(util.inspect(wptools, {showHidden: false, depth: null}));19var wptools = require('wptools');20var util = require('util');21console.log(util.inspect(wptools, {showHidden: false, depth: null}));22var wptools = require('wptools');23var util = require('util');24console.log(util.inspect(wptools, {showHidden: false, depth: null}));25var wptools = require('wptools');26var util = require('util');27console.log(util.inspect(wptools, {showHidden: false, depth: null}));28var wptools = require('wptools');29var util = require('util');

Full Screen

Using AI Code Generation

copy

Full Screen

1var wptools = require('wptools');2var util = wptools.util;3util.getWikiFromDomain('en.wikipedia.org', function (err, wiki) {4 if (err) {5 console.log(err);6 } else {7 console.log(wiki);8 }9});10Copyright (c) 2014-2015 Sam Reed

Full Screen

Using AI Code Generation

copy

Full Screen

1var Util = require('wptoolkit').Util;2var str = "This is a string";3console.log(Util.reverseString(str));4var Util = require('wptoolkit').Util;5var str = "This is a string";6console.log(Util.reverseString(str));7var Util = require('wptoolkit').Util;8var str = "This is a string";9console.log(Util.reverseString(str));10var Util = require('wptoolkit').Util;11var str = "This is a string";12console.log(Util.reverseString(str));13var Util = require('wptoolkit').Util;14var str = "This is a string";15console.log(Util.reverseString(str));16var Util = require('wptoolkit').Util;17var str = "This is a string";18console.log(Util.reverseString(str));19var Util = require('wptoolkit').Util;20var str = "This is a string";21console.log(Util.reverseString(str));22var Util = require('wptoolkit').Util;23var str = "This is a string";24console.log(Util.reverseString(str));25var Util = require('wptoolkit').Util;26var str = "This is a string";27console.log(Util.reverseString(str));28var Util = require('wptoolkit').Util;29var str = "This is a string";30console.log(Util.reverseString(str));31var Util = require('wptoolkit').Util;32var str = "This is a string";33console.log(Util.reverseString(str));

Full Screen

Using AI Code Generation

copy

Full Screen

1var wptools = require('wptools');2var util = wptools.util;3var wikipage = util.wikiPage('Albert Einstein');4util.getWikiText(wikipage, function(err, data) {5 console.log(data);6});7util.getWikiText('Albert Einstein', function(err, data) {8 console.log(data);9});10var wptools = require('wptools');11var util = wptools.util;12util.getWikiText('Albert Einstein', function(err, data) {13 console.log(data);14});15var wptools = require('wptools');16var util = wptools.util;17util.getWikiText('Albert Einstein', function(err, data) {18 console.log(data);19});20var wptools = require('wptools');21var util = wptools.util;22util.getWikiText('Albert Einstein', function(err, data) {23 console.log(data);24});25var wptools = require('wptools');26var util = wptools.util;27util.getWikiText('Albert Einstein', function(err, data) {28 console.log(data);29});30var wptools = require('wptools');31var util = wptools.util;32util.getWikiText('Albert Einstein', function(err, data) {33 console.log(data);34});35var wptools = require('wptools');36var util = wptools.util;37util.getWikiText('Albert Einstein', function(err, data) {38 console.log(data);39});40var wptools = require('wptools');41var util = wptools.util;42util.getWikiText('Albert Einstein', function(err, data) {43 console.log(data);44});45var wptools = require('wptools');

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('wpt');2var util = wpt.Util;3var fs = require('fs');4var filePath = "C:\\Users\\user\\Desktop\\test.txt";5var fileContent = "Hello World";6util.writeToFile(filePath, fileContent, function (err) {7 if (err) {8 console.log(err);9 } else {10 console.log("File written successfully");11 }12});13var wpt = require('wpt');14var util = wpt.Util;15var fs = require('fs');16var filePath = "C:\\Users\\user\\Desktop\\test.txt";17util.readFromFile(filePath, function (err, data) {18 if (err) {19 console.log(err);20 } else {21 console.log("File content: " + data);22 }23});24var wpt = require('wpt');25var util = wpt.Util;26var filePath = "C:\\Users\\user\\Desktop\\test.txt";27var fileName = util.getFileName(filePath);28console.log("File name: " + fileName);29var wpt = require('wpt');30var util = wpt.Util;31var filePath = "C:\\Users\\user\\Desktop\\test.txt";32var fileExtension = util.getFileExtension(filePath);33console.log("File extension: " + fileExtension);34var wpt = require('wpt');35var util = wpt.Util;36var fs = require('fs');37var filePath = "C:\\Users\\user\\Desktop\\test.txt";38util.getFileSize(filePath, function (err, size) {39 if (err) {40 console.log(err);41 } else {42 console.log("File size: " + size);43 }44});

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run wpt automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful