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
(function(global) { | |
"use strict"; | |
function Map() { | |
this.data = {} | |
} | |
Map.prototype = { | |
get: function(key) { | |
return this.data[key + "~"] | |
}, |
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
var h = require('virtual-dom/h'); | |
var createElement = require('virtual-dom/create-element'); | |
var VNode = require('virtual-dom/vnode/vnode'); | |
var div = new VNode('div', { | |
contentEditable: true | |
}); | |
var vdom = h('div', { | |
contentEditable: true |
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
var VNode = require('virtual-dom/vnode/vnode'); | |
var VText = require('virtual-dom/vnode/vtext'); | |
var createElement = require('virtual-dom/create-element'); | |
var patch = require('virtual-dom/patch'); | |
var diff = require('virtual-dom/diff'); | |
var convertHTML = require('html-to-vdom')({ | |
VNode: VNode, | |
VText: VText | |
}); |
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
var planout = require('planout'); | |
function getOwnPropertyDescriptors (obj) { | |
var descriptors = {}; | |
for (var prop in obj) { | |
if (obj.hasOwnProperty(prop)) { | |
descriptors[prop] = Object.getOwnPropertyDescriptor(obj, prop); | |
} | |
} | |
return descriptors; |
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
var planout = require('planout'); | |
function getOwnPropertyDescriptors (obj) { | |
var descriptors = {}; | |
for (var prop in obj) { | |
if (obj.hasOwnProperty(prop)) { | |
descriptors[prop] = Object.getOwnPropertyDescriptor(obj, prop); | |
} | |
} | |
return descriptors; |
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
var contentful = require('contentful') | |
var util = require('util') | |
var client = contentful.createClient({ | |
// This is the space ID. A space is like a project folder in Contentful terms | |
space: 'developer_bookshelf', | |
// This is the access token for this space. Normally you get both ID and the token in the Contentful web app | |
accessToken: '0b7f6x59a0' | |
}); | |
// This API call will request an entry with the specified ID from the space defined at the top, using a space-specific access token. |
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
{ | |
"name": "What is a collection", | |
"description": null, | |
"displayField": "plainText", | |
"fields": [ | |
{ | |
"id": "plainText", | |
"name": "plainText", | |
"type": "Text", | |
"localized": false, |
OlderNewer