export const ACCOUNT_ID_KEY = 'account-id'
export const ACCOUNTS_KEY = 'accounts'
const get = (key, options = {}) => {
const value = localStorage.getItem(key)
return (options.parse)
? JSON.parse(value)
: value| // will return the route based on location | |
| console.log( | |
| VueRouter.prototype.resolve.call( // can be $router.resolve instead | |
| this.$router, | |
| '/my-path' | |
| ) | |
| ) | |
| // or |
| import http from '@/http' | |
| export const doLogin = (userInfo) => { | |
| return http().get(`/sanctum/csrf-cookie`).then(() => { | |
| return http().post(`/api/v1/common/login`, { | |
| email: userInfo.email, | |
| password: userInfo.password | |
| }).then((response) => { | |
| return response; | |
| }); |
Implementing a similiar Wordpress Shortcode feature in Javascript using Template Strings.
"In a nutshell, a shortcode is a small piece of code, indicated by brackets like
[this], that performs a dedicated function on your site."
In Javascript when can implement Shortcodes using Template Strings.
Pretend that we have a template page-template.html that contains a shortcode gallery which will be replaced by the code of AwesomeGallery.
The JSON.stringify() method converts a JavaScript object or value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.
const foo = {
baz: 'baz',
bar: 'bar'
}Hi,
My name is Rafael Kendrik, I'm a Brazilian Front-end Web Developer since 2015.
Most of my experience have been dedicated in Single Pages Applications (SPA) development.
I contributed for 2 years in Sices Solar Platform (https://plataformasicessolar.com.br), developing 2 clients in Vue.js (vuex, vue-router) working in Kolinalabs team.
I also contributed over 1 year in two projects developed in Angular.js.
Olá!
Meu nome é Rafael Kendrik, sou desenvolvedor Web Frontend há aproximadamente 5 anos.
Gostaria, por gentileza, de alguns minutos para apresentar um pouco da minha experiência profissional.
A maioria da minha experiência está dedicada em contribuições de desenvolvimento de SPAs.
Durante 2 anos contribui para um projeto de uma empresa Latino Americana chamada Sices Solar (https://plataformasicessolar.com.br) no desenvolvimento de dois clientes web em Vue.js (+vuex), trabalhando junto à KolinasLabs.
| UPDATE wp_options \ | |
| SET option_value=replace(option_value, 'url_curr', 'url_new') \ | |
| WHERE option_name='home' OR option_name='siteurl'; | |
| UPDATE wp_posts \ | |
| SET guid=replace(guid, 'url_curr','url_new'); | |
| UPDATE wp_posts \ | |
| SET post_content=replace(post_content, 'url_curr', 'url_new'); |
| /* X example - common non-blocking execution */ | |
| const x = 5 | |
| console.log('hello X', x) | |
| const plusOneX = (x) => { | |
| setTimeout(() => { | |
| // a bad reassign e.g.: | |
| x = x + 1 |
| const tree = { | |
| obj1: { | |
| obj2: { | |
| key1: 'key1' | |
| }, | |
| obj3: { | |
| obj4: { | |
| key2: 'key2' | |
| } | |
| } |