| | | |
Offset 715, 88 lines modified | Offset 715, 80 lines modified |
715 | ····return·state.objectMode·?·16·:·16·*·1024; | 715 | ····return·state.objectMode·?·16·:·16·*·1024; |
716 | } | 716 | } |
| |
717 | var·state·=·{ | 717 | var·state·=·{ |
718 | ····getHighWaterMark:·getHighWaterMark | 718 | ····getHighWaterMark:·getHighWaterMark |
719 | }; | 719 | }; |
| |
720 | var·browser$9; | |
721 | var·hasRequiredBrowser; | 720 | /** |
| 721 | ·*·Module·exports. |
| 722 | ·*/ |
| |
| 723 | var·browser$9·=·deprecate; |
722 | function·requireBrowser()·{ | |
723 | ····if·(hasRequiredBrowser)·return·browser$9; | |
724 | ····hasRequiredBrowser·=·1; | |
725 | ····/** | |
726 | ·····*·Module·exports. | |
727 | ·····*/ | |
| |
728 | ····browser$9·=·deprecate; | 724 | /** |
| 725 | ·*·Mark·that·a·method·should·not·be·used. |
| 726 | ·*·Returns·a·modified·function·which·warns·once·by·default. |
| 727 | ·* |
| 728 | ·*·If·`localStorage.noDeprecation·=·true`·is·set,·then·it·is·a·no-op. |
| 729 | ·* |
| 730 | ·*·If·`localStorage.throwDeprecation·=·true`·is·set,·then·deprecated·functions |
| 731 | ·*·will·throw·an·Error·when·invoked. |
| 732 | ·* |
| 733 | ·*·If·`localStorage.traceDeprecation·=·true`·is·set,·then·deprecated·functions |
| 734 | ·*·will·invoke·`console.trace()`·instead·of·`console.error()`. |
| 735 | ·* |
| 736 | ·*·@param·{Function}·fn·-·the·function·to·deprecate |
| 737 | ·*·@param·{String}·msg·-·the·string·to·print·to·the·console·when·`fn`·is·invoked |
| 738 | ·*·@returns·{Function}·a·new·"deprecated"·version·of·`fn` |
| 739 | ·*·@api·public |
| 740 | ·*/ |
| |
729 | ····/** | |
730 | ·····*·Mark·that·a·method·should·not·be·used. | |
731 | ·····*·Returns·a·modified·function·which·warns·once·by·default. | |
732 | ·····* | |
733 | ·····*·If·`localStorage.noDeprecation·=·true`·is·set,·then·it·is·a·no-op. | |
734 | ·····* | |
735 | ·····*·If·`localStorage.throwDeprecation·=·true`·is·set,·then·deprecated·functions | |
736 | ·····*·will·throw·an·Error·when·invoked. | |
737 | ·····* | |
738 | ·····*·If·`localStorage.traceDeprecation·=·true`·is·set,·then·deprecated·functions | |
739 | ·····*·will·invoke·`console.trace()`·instead·of·`console.error()`. | |
740 | ·····* | |
741 | ·····*·@param·{Function}·fn·-·the·function·to·deprecate | |
742 | ·····*·@param·{String}·msg·-·the·string·to·print·to·the·console·when·`fn`·is·invoked | |
743 | ·····*·@returns·{Function}·a·new·"deprecated"·version·of·`fn` | |
744 | ·····*·@api·public | |
745 | ·····*/ | |
| |
746 | ····function·deprecate(fn,·msg)·{ | 741 | function·deprecate(fn,·msg)·{ |
747 | ········if·(config('noDeprecation'))·{ | 742 | ····if·(config('noDeprecation'))·{ |
748 | ············return·fn; | 743 | ········return·fn; |
749 | ········} | 744 | ····} |
| |
750 | ········var·warned·=·false; | 745 | ····var·warned·=·false; |
| |
751 | ········function·deprecated()·{ | 746 | ····function·deprecated()·{ |
752 | ············if·(!warned)·{ | 747 | ········if·(!warned)·{ |
753 | ················if·(config('throwDeprecation'))·{ | 748 | ············if·(config('throwDeprecation'))·{ |
754 | ····················throw·new·Error(msg); | 749 | ················throw·new·Error(msg); |
755 | ················}·else·if·(config('traceDeprecation'))·{ | 750 | ············}·else·if·(config('traceDeprecation'))·{ |
756 | ····················console.trace(msg); | 751 | ················console.trace(msg); |
757 | ················}·else·{ | 752 | ············}·else·{ |
758 | ····················console.warn(msg); | 753 | ················console.warn(msg); |
759 | ················} | |
760 | ················warned·=·true; | |
761 | ············} | 754 | ············} |
762 | ············return·fn.apply(this,·arguments); | 755 | ············warned·=·true; |
763 | ········} | 756 | ········} |
| 757 | ········return·fn.apply(this,·arguments); |
| |
764 | ········return·deprecated; | |
765 | ····} | 758 | ····} |
| |
| 759 | ····return·deprecated; |
| 760 | } |
766 | ····/** | |
767 | ·····*·Checks·`localStorage`·for·boolean·values·for·the·given·`name`. | |
768 | ·····* | |
769 | ·····*·@param·{String}·name | |
770 | ·····*·@returns·{Boolean} | |
771 | ·····*·@api·private | |
772 | ·····*/ | |
| |
| 761 | /** |
| 762 | ·*·Checks·`localStorage`·for·boolean·values·for·the·given·`name`. |
| 763 | ·* |
| 764 | ·*·@param·{String}·name |
| 765 | ·*·@returns·{Boolean} |
| 766 | ·*·@api·private |
| 767 | ·*/ |
| |
773 | ····function·config(name)·{ | 768 | function·config(name)·{ |
774 | ········//·accessing·global.localStorage·can·trigger·a·DOMException·in·sandboxed·iframes | 769 | ····//·accessing·global.localStorage·can·trigger·a·DOMException·in·sandboxed·iframes |
775 | ········try·{ | 770 | ····try·{ |
776 | ············if·(!commonjsGlobal.localStorage)·return·false; | 771 | ········if·(!commonjsGlobal.localStorage)·return·false; |
777 | ········}·catch·(_)·{ | 772 | ····}·catch·(_)·{ |
778 | ············return·false; | 773 | ········return·false; |
779 | ········} | |
780 | ········var·val·=·commonjsGlobal.localStorage[name]; | |
781 | ········if·(null·==·val)·return·false; | |
782 | ········return·String(val).toLowerCase()·===·'true'; | |
783 | ····} | 774 | ····} |
784 | ····return·browser$9; | 775 | ····var·val·=·commonjsGlobal.localStorage[name]; |
| 776 | ····if·(null·==·val)·return·false; |
| 777 | ····return·String(val).toLowerCase()·===·'true'; |
785 | } | 778 | } |
| |
786 | var·_stream_writable; | 779 | var·_stream_writable; |
787 | var·hasRequired_stream_writable; | 780 | var·hasRequired_stream_writable; |
| |
788 | function·require_stream_writable()·{ | 781 | function·require_stream_writable()·{ |
789 | ····if·(hasRequired_stream_writable)·return·_stream_writable; | 782 | ····if·(hasRequired_stream_writable)·return·_stream_writable; |
Offset 824, 15 lines modified | Offset 816, 15 lines modified |
824 | ····var·Duplex; | 816 | ····var·Duplex; |
825 | ····/*</replacement>*/ | 817 | ····/*</replacement>*/ |
| |
826 | ····Writable.WritableState·=·WritableState; | 818 | ····Writable.WritableState·=·WritableState; |
827 | ····/*<replacement>*/ | 819 | ····/*<replacement>*/ |
| |
Max diff block lines reached; 183/4594 bytes (3.98%) of diff not shown.
|