This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const winston = require('winston'); | |
require('winston-daily-rotate-file'); | |
const path = require('path'); | |
const PROJECT_ROOT = path.join(__dirname, '..'); | |
const highlight = require('cli-highlight').highlight; | |
// const options = { | |
// file: { | |
// level: 'info', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const winston = require('winston'); | |
const { format } = winston; | |
const { combine, colorize, timestamp, printf } = format; | |
/** | |
* /** | |
* Use CallSite to extract filename and number, for more info read: https://v8.dev/docs/stack-trace-api#customizing-stack-traces | |
* @param numberOfLinesToFetch - optional, when we want more than one line back from the stacktrace | |
* @returns {string|null} filename and line number separated by a colon, if numberOfLinesToFetch > 1 we'll return a string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: this adds a filename and line number to winston's output | |
// Example output: 'info (routes/index.js:34) GET 200 /index' | |
var winston = require('winston') | |
var path = require('path') | |
var PROJECT_ROOT = path.join(__dirname, '..') | |
var logger = new winston.logger({ ... }) | |
// this allows winston to handle output from express' morgan middleware |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.fontSize": 16, | |
"terminal.integrated.fontSize": 16, | |
"window.zoomLevel": 0 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const multer = require('multer'); | |
const express = require('express'); | |
let MongoClient = require('mongodb').MongoClient; | |
let url = 'mongodb://localhost:27017/'; | |
const excelToJson = require('convert-excel-to-json'); | |
const app = express(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
module.exports = { | |
process(src, filename, config, options) { | |
return 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';'; | |
}, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import '@testing-library/jest-dom/extend-expect'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'], | |
setupFilesAfterEnv: ['<rootDir>/setupTests.js'], | |
transform: { | |
'^.+\\.(js|jsx|ts|tsx)$': '<rootDir>/node_modules/babel-jest', | |
'\\.(css|less|scss|sass)$': 'identity-obj-proxy', | |
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': | |
'<rootDir>/fileTransformer.js', | |
}, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', () => { | |
var myOpacity = 0; | |
var readMeter = document.getElementsByClassName('bsf-rt-display-label')[0]; | |
var readUnit = document.getElementsByClassName('bsf-rt-display-postfix')[0]; | |
var readColor = document.getElementsByClassName('bsf-rt-reading-time')[0]; | |
function MyFadeFunction() { | |
if (myOpacity < 1) { | |
myOpacity += 0.075; | |
setTimeout(function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.onscroll = function () { | |
var e = window, | |
a = 'inner'; | |
var viewportWidth; | |
var viewportHeight; | |
if (!('innerWidth' in window)) { | |
a = 'client'; | |
e = document.documentElement || document.body; | |
} | |
viewportWidth = { width: e[a + 'Width'] }; |