Regular Functions
function someMethod(){
console.log('Inside someMethod')
return true
}| const path = require( 'path' ); | |
| const webpack = require( 'webpack' ); | |
| const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
| module.exports = ( env, options ) => { | |
| return { | |
| entry: './src/block.js', | |
| output: { | |
| path: path.resolve( __dirname, 'build' ), |
| function downloadFile (url) { | |
| let name; | |
| fetch(url) | |
| .then((resp) => { | |
| resp.headers.forEach((header) => { | |
| if (header.includes("attachment")) { | |
| const filename = header.match(/filename="(.*)"/); | |
| name = filename[1]; | |
| } | |
| }); |
Heroku - https://heroku.com - Deploying Front & Backend
Netlify - https://netlify.com
Vercel (Zeit) - https://vercel.com - Deploying Front & Backend apps at free of cost
Firebase - https://firebase.com - Deploying Front & Backend apps at free of cost
| // time and time end | |
| console.time("This"); | |
| let total = 0; | |
| for (let j = 0; j < 10000; j++) { | |
| total += j | |
| } | |
| console.log("Result", total); | |
| console.timeEnd("This"); | |
| // Memory |
| # Import libraries | |
| from bs4 import BeautifulSoup | |
| from contextlib import closing | |
| import requests | |
| from requests import get | |
| from requests.exceptions import RequestException | |
| import time | |
| import sys | |
| import os | |
| import webbrowser |
| let | |
| env_dev = true, | |
| env_debug = false, | |
| //CSS | |
| sass = require('gulp-sass'), | |
| // autoprefixer = require('gulp-autoprefixer'), | |
| autoprefixer = require('autoprefixer'), | |
| minifyCSS = require('gulp-cssnano'), | |
| postcss = require('gulp-postcss'), |
| var path = require('path'); | |
| var sass = require('sass-loader'); | |
| var autoprefixer = require('autoprefixer'); | |
| var webpack = require('webpack'); | |
| var findCacheDir = require('find-cache-dir'); | |
| var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
| var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); | |
| var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); | |
| var getClientEnvironment = require('./env'); |