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
| var winston = require('winston'); // https://github.com/flatiron/winston | |
| var logger = new (winston.Logger)({ | |
| transports: [ | |
| new (winston.transports.Console)(), | |
| new (winston.transports.File)({ filename : 'winston.log', timestamp: true, /*maxsize: 2000, maxFiles: 5*/ }) | |
| ] | |
| }); | |
| process.on('uncaughtException', function (err) { |
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
| var $selector = $('div'); | |
| $selector.data('oHeight',$selector.height()).css('height','auto').data('nHeight',$selector.height()).height($selector.data('oHeight')).animate({height: $selector.data('nHeight')},400); |
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
| var obj = {b: 3, c: 2, a: 1}; | |
| _.sortKeysBy(obj); | |
| // {a: 1, b: 3, c: 2} | |
| _.sortKeysBy(obj, function (value, key) { | |
| return value; | |
| }); | |
| // {a: 1, c: 2, b: 3} |
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
| {... | |
| "scripts": { | |
| "postinstall": "node patch.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
| import React, { useState, useEffect } from 'react' | |
| import PropTypes from 'prop-types' | |
| import { checkIsAuthenticated, authSignUp, authLogin, authLogout } from '../../services/auth' | |
| export const AuthContext = React.createContext({}) | |
| export default function Auth({ children }) { | |
| const [isAuthenticated, setIsAuthenticated] = useState(false) | |
| const [isLoading, setIsLoading] = useState(true) |