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
| const initialState = { | |
| // | |
| } | |
| const reducer = (state, action) => { | |
| switch (action.type) { | |
| default: | |
| return state | |
| } | |
| } |
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 Link from components/common/Link": { | |
| "prefix": "gcl", | |
| "body": "import Link from 'components/common/Link'" | |
| }, | |
| "border test": { | |
| "prefix": "b1", | |
| "body": "border: '1px solid red'," | |
| }, | |
| "border test2": { |
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
| POST https://test.someapi.com/v1/account/user/login/ | |
| Content-Type: application/json | |
| { "email": "[email protected]", "password": 1 } |
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
| function createAccount( | |
| username = '', | |
| password = '', | |
| nickname = '', | |
| email = '', | |
| gender = 'Male', | |
| bio = '', | |
| subscription = 'Basic', | |
| callback, | |
| ) { |
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
| function createAccount({ | |
| username = '', | |
| password = '', | |
| nickname = '', | |
| email = '', | |
| gender = 'Male', | |
| bio = '', | |
| subscription = 'Basic', | |
| callback, | |
| }) { |
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
| function createAccount({ | |
| password = '', | |
| nickname = '', | |
| email = '', | |
| gender = 'Male', | |
| bio = '', | |
| subscription = 'Basic', | |
| callback, | |
| }) { | |
| if (!password || !email) { |
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
| createAccount({ | |
| password: 'applebee123x123', | |
| email: '[email protected]', | |
| bio: 'My bio', | |
| callback: function cb(err, data) { | |
| if (err) { | |
| console.error(err) | |
| } | |
| // do something with data | |
| }, |
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
| getPhoto('../nemo_the_fish.jpg') | |
| .applyFilter('grayscale', '100%') | |
| .rotate(100) | |
| .scale(1.5) |
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
| const createWarrior = function createWarrior(name) { | |
| let hp = 100 | |
| let battleCryInterval = 0 | |
| return { | |
| bash: function(target) { | |
| target.reduceHp((target.getHp() - 10)) | |
| return this | |
| }, | |
| // Increase the wrarior's health by 60, decrementing it by 1 every second for 60 seconds |
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
| $(window).resize(function() { | |
| $('#logbox').append('<div>The window resized</div>') | |
| }) |