Un mongoID en json tiene la forma siguiente:
{
_id: {
$oid: "58ae6b11fd54e89021a96610",
}
}
//Please note I'm also using underscore each function for the iterations | |
//iCal -> jsCal | |
var icalEvents = ICal.parse(iCalStringData); | |
//jsCal->Component | |
var comp = new Component(icalEvents[1]); | |
//Get all VTIMEZONE iCalendar components | |
var vtimezones = comp.getAllSubcomponents("vtimezone"); | |
//Add all timezones in iCalendar object to TimezonService |
//From: https://www.typescriptlang.org/play?#code/C4TwDgpgBAEhA28D2AeACgJyZDwCWEAzlBAB7AQB2AJsRhAIbVKXwhSHAZ6UDmA2gF0AfFAC8UAN4AoKFDBYc+IgC4ombBFwFC0gL5QAZFABKEAMZIM1dIq3LC-SgFcAtgCMtggDRQXHrWFpaQB6EKhgAAtofgA6eI0lHUEoHgAzLWI8YCgGYgYI5zB4CGk050pzfBYoc3oGCjhEVET7HRJyKlooeuZWdk5uPiFhAApo5rUm5BQ4hLttIhEASilZHohgZwxKKAnkfWC6xkaEZFGZOQVNRcI1fgBySgZXCAffB4ZeN59159e1ABGABMAGZvOsvhA1AAWACsADZ9MtpEA | |
type Hello<Properties extends readonly string[]> = { | |
properties: Properties | |
} & Record<Properties[number], number> | |
// the [...Properties] infers it as a tuple | |
function createHello<Properties extends readonly string[]>(hello: Hello<[...Properties]>) { | |
return hello | |
} |
Un mongoID en json tiene la forma siguiente:
{
_id: {
$oid: "58ae6b11fd54e89021a96610",
}
}
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
const lightMachine = Machine({ | |
// not a parallel machine | |
id: 'light', | |
initial: 'green', | |
states: { | |
green: { | |
on: { TIMER: 'yellow' } | |
}, | |
yellow: { | |
on: { TIMER: 'red' } |
appSrc: [resolveApp('src'),resolveApp('node_modules/react-native-vector-icons')] |
<?php | |
// Display all SQL executed in Eloquent | |
//source: http://laravel-tricks.com/tricks/display-all-sql-executed-in-eloquent | |
Event::listen('illuminate.query', function($query){Log::debug($query);}); |
//This code is a simple adaptation from the index.js file in CryptoJS node module | |
(function (root, factory, undef) { | |
if (typeof exports === "object") { | |
// CommonJS | |
module.exports = exports = factory(require('./picker'), require('./picker.date'), require('./picker.time')); | |
} | |
else if (typeof define === "function" && define.amd) { | |
// AMD | |
define(['./picker','./picker.date', './picker.time'], factory); | |
} |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |