This file contains 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
node_modules/ |
This file contains 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
//A walkthrough of this solution exists here: https://nickdrane.com/build-your-own-regex/ | |
function matchOne(pattern, text) { | |
if (!pattern) return true; | |
if (!text) return false; | |
return pattern === "." || text === pattern; | |
} | |
function search(pattern, text) { | |
if (pattern[0] === "^") { |
This file contains 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, { Component } from "react"; | |
import { render } from "react-dom"; | |
import Hello from "./Hello"; | |
import { createStore } from "redux"; | |
const shallowEqual = require("shallow-equal/objects"); | |
const store = createStore((oldState={}, action) => { | |
return Object.assign(oldState, { storeValue: action.storeValue }) | |
}); |