<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
const object = {a: 1, b: 2} | |
const array = [3,4] | |
// Value expression | |
const foo = {...object, c: 3} // == {a: 1, b: 2, c: 3} | |
const bar = [...array, 5, 6] // == [3, 4, 5, 6] | |
// Destructuring assignment | |
{ | |
const {a, ...rest} = foo // a == {a: 1}; rest == {b: 2, c: 3} |
// Disable mobile zoom on focus | |
{ | |
// Customise the selector value as necessary | |
const selector = '[data-nozoom]' | |
const $viewport = | |
document.querySelector('meta[name=viewport]') | |
?? | |
Object.assign(document.createElement('meta'), {name: 'viewport'}) | |
const $scale0 = Object.assign($viewport.cloneNode(), {content: 'user-scalable=0'}) |
import {ordinals, defaultRange, rangeFromOrdinal, Calendar} from './DateRange.js' | |
const state = { | |
...rangeFromOrdinal('Today'), | |
showCalendar : false, | |
} | |
m.mount(document.body, { | |
view: () => [ | |
m('form', |
<span | |
class="ordinal" | |
data-number="22"> | |
22 | |
</span> | |
<span | |
class="ordinal" | |
data-number="0"> | |
0 | |
</span> |
<?php | |
// src/YourApp/Bundle/YourBundle/Twig/ToArrayExtension.php | |
namespace Appcito\Bundle\CoreBundle\Twig; | |
/** | |
* A simple twig extension that adds a to_array filter | |
* It will convert an object to array so that you can iterate over it's properties | |
*/ | |
class ToArrayExtension extends \Twig_Extension |
Backbone.sync = function(method, model, options) { | |
// App.db is my database connection | |
if(_.isNull(App.db)) console.error('No Database connection!'); | |
var query = BackboneDb.createQuery(method, model, options); | |
if (method === "read") { | |
var data = App.db.execute(query); | |
var resultJSON = BackboneDb.resultToJSON(data); | |
console.log(resultJSON); |
<style type="text/css"> | |
a.user-image { | |
background: transparent no-repeat top left; | |
display: block; | |
text-indent: -999em; | |
width: 50px; | |
height: 50px; | |
border-radius: 5px; | |
box-shadow: 0px 0px 3px #666; | |
} |
xuorig
is worth following twitter / GitHubconst { execute, introspectionQuery, parse } = require('graphql'); | |
const { schema } = require('../index'); | |
describe('graphql', () => { | |
describe('index', () => { | |
describe('schema', () => { | |
it('should be a an object', () => { | |
expect(typeof schema).toBe('object'); | |
}); |