PHP 8.2.30
Preview: common.js Size: 1016 B
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/winston/lib/winston/common.js

/**
 * common.js: Internal helper and utility functions for winston.
 *
 * (C) 2010 Charlie Robbins
 * MIT LICENCE
 */

'use strict';

const { format } = require('util');

/**
 * Set of simple deprecation notices and a way to expose them for a set of
 * properties.
 * @type {Object}
 * @private
 */
exports.warn = {
  deprecated(prop) {
    return () => {
      throw new Error(format('{ %s } was removed in winston@3.0.0.', prop));
    };
  },
  useFormat(prop) {
    return () => {
      throw new Error([
        format('{ %s } was removed in winston@3.0.0.', prop),
        'Use a custom winston.format = winston.format(function) instead.'
      ].join('\n'));
    };
  },
  forFunctions(obj, type, props) {
    props.forEach(prop => {
      obj[prop] = exports.warn[type](prop);
    });
  },
  forProperties(obj, type, props) {
    props.forEach(prop => {
      const notice = exports.warn[type](prop);
      Object.defineProperty(obj, prop, {
        get: notice,
        set: notice
      });
    });
  }
};

Directory Contents

Dirs: 2 × Files: 10

Name Size Perms Modified Actions
config DIR
- drwxr-xr-x 2026-02-21 00:54:00
Edit Download
- drwxr-xr-x 2026-02-21 00:54:00
Edit Download
1016 B lrw-r--r-- 2026-02-21 00:53:30
Edit Download
3.28 KB lrw-r--r-- 2026-02-21 00:53:36
Edit Download
3.07 KB lrw-r--r-- 2026-02-21 00:53:36
Edit Download
6.75 KB lrw-r--r-- 2026-02-21 00:53:38
Edit Download
1.47 KB lrw-r--r-- 2026-02-21 00:53:40
Edit Download
20.04 KB lrw-r--r-- 2026-02-21 00:53:54
Edit Download
1.38 KB lrw-r--r-- 2026-02-21 00:53:56
Edit Download
6.82 KB lrw-r--r-- 2026-02-21 00:53:56
Edit Download
1.32 KB lrw-r--r-- 2026-02-21 00:53:58
Edit Download
2.64 KB lrw-r--r-- 2026-02-21 00:53:58
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).