Skip to content

Instantly share code, notes, and snippets.

View sherlock1982's full-sized avatar

Nikolai Orekhov sherlock1982

View GitHub Profile
@sherlock1982
sherlock1982 / Publishers.SwitchMap.swift
Created December 9, 2019 09:26
Proper Combine switchMap operator based on OpenCombine sources
//
// Publishers.FlatMap.swift
//
// Created by Eric Patey on 16.08.2019.
// Modified by Nickolay Orekhov
// SwitchMap operator based on FlatMap
import Combine
// import COpenCombineHelpers
@sherlock1982
sherlock1982 / sample.js
Created October 26, 2018 11:53
Uglify error sample
var input = Array.from([17, 240, 159, 152, 128, 32]);
function utf8_read(buffer, start, end) {
var len = end - start;
if (len < 1)
return "";
var parts = null,
chunk = [],
i = 0, // char offset
t; // temporary