Skip to content

Instantly share code, notes, and snippets.

@smonn
smonn / curry.js
Last active October 20, 2015 15:53
curry method for javascript with support for context
// curry(fn[, context[, arity[, params...]]])
var curry = function (fn, context, arity) {
var args = Array.prototype.slice.call(arguments, 0);
if (!context) {
context = context || undefined;
args[1] = context;
}
if (!arity) {
import Foundation
class WebRequest: NSObject {
let request: NSMutableURLRequest
init(method: String, url: String) {
self.request = NSMutableURLRequest(URL: NSURL(string: url)!)
self.request.HTTPMethod = method
}
@smonn
smonn / package.json
Last active June 28, 2022 15:59
Reproduce issue with fast-json-stringify v5 and @sinclair/typebox
{
"name": "fjs-v5-typebox",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "ts-node src/index.ts"
},
"dependencies": {
"@sinclair/typebox": "0.23.5",
"fast-json-stringify": "5.0.3"