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
"use strict"; | |
var __importDefault = (this && this.__importDefault) || function (mod) { | |
return (mod && mod.__esModule) ? mod : { "default": mod }; | |
}; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
const regedit_1 = __importDefault(require("regedit")); | |
const os_1 = __importDefault(require("os")); | |
const architecture = os_1.default.arch(); | |
const path = architecture === 'x64' ? 'HKLM\\Software\\Wow6432Node\\Google\\Chrome\\Extensions\\kjjmmomgbglgdjaecbakemnmhoeebndj' : 'HKLM\Software\Google\Chrome\Extensions\kjjmmomgbglgdjaecbakemnmhoeebndj'; | |
// regedit.list('HKLM\\Software\\Wow6432Node\\Google\\Chrome\\', (err, result) => { |
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
process.env.EXTENSION_ID=ciffhdfhcbhceoebcokbfgjbgpanldkj | |
"use strict"; | |
var __importDefault = (this && this.__importDefault) || function (mod) { | |
return (mod && mod.__esModule) ? mod : { "default": mod }; | |
}; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
const fs_1 = __importDefault(require("fs")); | |
const os_1 = __importDefault(require("os")); | |
const { homedir: userDir } = os_1.default.userInfo(); | |
const { platform } = process; |
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
// Jest Snapshot v1, https://goo.gl/fbAQLP | |
exports[`App snapshot 1`] = ` | |
<App> | |
<div | |
className="app" | |
> | |
<Counter | |
onDecrement={[Function]} | |
onIncrement={[Function]} |
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
<div className="search-box"> | |
<label for="search">Wyszukaj:</label> | |
<input type="text" id="search" placeholder="Wyszukaj..." /> | |
</div> |
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
class Parent extends Component { | |
methodFromChild = () => null; | |
getMethodForMe = method => { | |
this.methodFromChild = method; | |
} | |
render() { | |
return <Child setFunctionReference={this.getMethodForMe} /> | |
} |
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
export default getWeather = city => new Promise((resolve, reject) => { | |
// Wysyłamy zapytanie do jakiegoś API o pogodę na dzisiaj | |
axios.get(`http://weather.api.com/today/${city}`) | |
.then(response => { | |
// ...czekamy aż serwer odeśle odpowiedź | |
// ...jeszcze chwilka i... | |
// JEST! | |
console.log(response) // { temp: 26, weather: 'sunny' } | |
// Skoro mamy już odpowiedź to możemy oznajmić wszystkim zainteresowanym, że nasz Promise jest resolved. |