| | | |
Offset 715, 80 lines modified | Offset 715, 88 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 | ·····*/ |
| |
741 | function·deprecate(fn,·msg)·{ | 746 | ····function·deprecate(fn,·msg)·{ |
742 | ····if·(config('noDeprecation'))·{ | 747 | ········if·(config('noDeprecation'))·{ |
743 | ········return·fn; | 748 | ············return·fn; |
744 | ····} | 749 | ········} |
| |
745 | ····var·warned·=·false; | 750 | ········var·warned·=·false; |
| |
746 | ····function·deprecated()·{ | 751 | ········function·deprecated()·{ |
747 | ········if·(!warned)·{ | 752 | ············if·(!warned)·{ |
748 | ············if·(config('throwDeprecation'))·{ | 753 | ················if·(config('throwDeprecation'))·{ |
749 | ················throw·new·Error(msg); | 754 | ····················throw·new·Error(msg); |
750 | ············}·else·if·(config('traceDeprecation'))·{ | 755 | ················}·else·if·(config('traceDeprecation'))·{ |
751 | ················console.trace(msg); | 756 | ····················console.trace(msg); |
752 | ············}·else·{ | 757 | ················}·else·{ |
753 | ················console.warn(msg); | 758 | ····················console.warn(msg); |
| 759 | ················} |
| 760 | ················warned·=·true; |
754 | ············} | 761 | ············} |
755 | ············warned·=·true; | 762 | ············return·fn.apply(this,·arguments); |
756 | ········} | 763 | ········} |
757 | ········return·fn.apply(this,·arguments); | |
758 | ····} | |
| |
759 | ····return·deprecated; | 764 | ········return·deprecated; |
760 | } | 765 | ····} |
| |
761 | /** | 766 | ····/** |
762 | ·*·Checks·`localStorage`·for·boolean·values·for·the·given·`name`. | 767 | ·····*·Checks·`localStorage`·for·boolean·values·for·the·given·`name`. |
763 | ·* | 768 | ·····* |
764 | ·*·@param·{String}·name | 769 | ·····*·@param·{String}·name |
765 | ·*·@returns·{Boolean} | 770 | ·····*·@returns·{Boolean} |
766 | ·*·@api·private | 771 | ·····*·@api·private |
767 | ·*/ | 772 | ·····*/ |
| |
768 | function·config(name)·{ | 773 | ····function·config(name)·{ |
769 | ····//·accessing·global.localStorage·can·trigger·a·DOMException·in·sandboxed·iframes | 774 | ········//·accessing·global.localStorage·can·trigger·a·DOMException·in·sandboxed·iframes |
770 | ····try·{ | 775 | ········try·{ |
771 | ········if·(!commonjsGlobal.localStorage)·return·false; | 776 | ············if·(!commonjsGlobal.localStorage)·return·false; |
772 | ····}·catch·(_)·{ | 777 | ········}·catch·(_)·{ |
773 | ········return·false; | 778 | ············return·false; |
| 779 | ········} |
| 780 | ········var·val·=·commonjsGlobal.localStorage[name]; |
| 781 | ········if·(null·==·val)·return·false; |
| 782 | ········return·String(val).toLowerCase()·===·'true'; |
774 | ····} | 783 | ····} |
| 784 | ····return·browser$9; |
775 | ····var·val·=·commonjsGlobal.localStorage[name]; | |
776 | ····if·(null·==·val)·return·false; | |
777 | ····return·String(val).toLowerCase()·===·'true'; | |
778 | } | 785 | } |
| |
779 | var·_stream_writable; | 786 | var·_stream_writable; |
780 | var·hasRequired_stream_writable; | 787 | var·hasRequired_stream_writable; |
| |
781 | function·require_stream_writable()·{ | 788 | function·require_stream_writable()·{ |
782 | ····if·(hasRequired_stream_writable)·return·_stream_writable; | 789 | ····if·(hasRequired_stream_writable)·return·_stream_writable; |
Offset 816, 15 lines modified | Offset 824, 15 lines modified |
816 | ····var·Duplex; | 824 | ····var·Duplex; |
817 | ····/*</replacement>*/ | 825 | ····/*</replacement>*/ |
| |
818 | ····Writable.WritableState·=·WritableState; | 826 | ····Writable.WritableState·=·WritableState; |
819 | ····/*<replacement>*/ | 827 | ····/*<replacement>*/ |
| |
820 | ····var·internalUtil·=·{ | 828 | ····var·internalUtil·=·{ |
821 | ········deprecate:·browser$9 | 829 | ········deprecate:·requireBrowser() |
822 | ····}; | 830 | ····}; |
823 | ····/*</replacement>*/ | 831 | ····/*</replacement>*/ |
| |
824 | ····/*<replacement>*/ | 832 | ····/*<replacement>*/ |
| |
Max diff block lines reached; 24/4599 bytes (0.52%) of diff not shown.
|