]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Add moment.suppressDeprecationWarnings 1604/head
authorIskren Chernev <iskren.chernev@gmail.com>
Fri, 11 Apr 2014 06:33:03 +0000 (23:33 -0700)
committerIskren Chernev <iskren.chernev@gmail.com>
Fri, 11 Apr 2014 06:33:03 +0000 (23:33 -0700)
moment.js

index 0d45e33e2a95cf4a9c73aa69fee1f52fbeb2d44d..a068955db83783688e2cebb7b4f5305bf6699662 100644 (file)
--- a/moment.js
+++ b/moment.js
     function deprecate(msg, fn) {
         var firstTime = true;
         function printMsg() {
-            if (typeof console !== 'undefined' && console.warn) {
+            if (moment.suppressDeprecationWarnings === false &&
+                    typeof console !== 'undefined' && console.warn) {
                 console.warn("Deprecation warning: " + msg);
             }
         }
         return makeMoment(c);
     };
 
+    moment.suppressDeprecationWarnings = false;
+
     moment.createFromInputFallback = deprecate(
             "moment construction falls back to js Date. This is " +
             "discouraged and will be removed in upcoming major " +