Skip to content

Instantly share code, notes, and snippets.

View gs-ysingh's full-sized avatar

Yogesh Singh gs-ysingh

View GitHub Profile
const HtmlWebPackPlugin = require('html-webpack-plugin');
const autoprefixer = require('autoprefixer');
const path = require('path');
module.exports = {
entry: __dirname + "/src/client/index.js",
devtool: "cheap-eval-source-map",
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'client.bundle.js',
<link rel="shortcut icon" href="favicon.ico" />
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon.png" />
<link rel="msapplication-TileColor" href="#0074ba" /> 
<link rel="msapplication-TileImage" href="/mstile-144x144.png" />
function kmpSearch(str, pattern) {
var arr = calculatePrefixTable(pattern);
var j = 0;
var i = 0;
var index = -1;
var len = pattern.length;
var strLength = str.length;
while(i < strLength) {
if(str.charAt(i) === pattern.charAt(j)) {
i++;
function deepCopy(source) {
return deepCopyHelper(source, {});
}
function deepCopyHelper(source, target) {
for(let key in source) {
const value = source[key];
if(typeof value !== "object") {
target[key] = value;
} else {