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
Show hidden characters
{ | |
"compilerOptions": { | |
/* Basic Options */ | |
"target": "ESNEXT" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, | |
"module": "ESNext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, | |
// "lib": [], /* Specify library files to be included in the compilation. */ | |
// "allowJs": true, /* Allow javascript files to be compiled. */ | |
// "checkJs": true /* Report errors in .js files. */, | |
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, | |
// "declaration": true, /* Generates corresponding '.d.ts' file. */ |
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
# encoding: utf-8 | |
require 'json' | |
require 'oj' | |
require 'benchmark' | |
require 'msgpack' | |
_data = {test: 'testdatatestdatatestdata', | |
data: 18358374659302536, | |
_float: 0.1332542572647585, |
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
# encoding: utf-8 | |
require "pstore" | |
require "msgpack" | |
require "json" | |
require "benchmark" | |
_data = {test: "testdatatestdatatestdata", | |
data: 18358374659302536, | |
_float: 0.1332542572647585, |
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
# encoding: utf-8 | |
require "rack" | |
require "msgpack" | |
module Rack | |
class MsgpackParamsParser | |
# Constants |
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
# encoding: utf-8 | |
require "pstore" | |
require "json" | |
require "benchmark" | |
_data = {test: "testdatatestdatatestdata", | |
data: 18358374659302536, | |
_float: 0.1332542572647585, | |
arr: [1,2,3,4,5,6,7,8,9,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,], | |
nested: {key: "key", arr: [1,1,1,000,32435,true,false]}, |
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
#encoding: utf-8 | |
require 'ostruct' | |
# OpenStructを拡張 | |
# Value以下ネストされたHashも全てOpenStructインスタンスとして展開します | |
class NestedOpenStruct < OpenStruct | |
def initialize(hash=nil) | |
@table = {} |
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
#encoding: utf-8 | |
class Hash | |
=begin | |
Hash.mergeをネストされた多重Hashに対応させたメソッド. | |
同一Keyの要素がHash同士である場合はHash.mergeによってマージします. | |
nil_clearがtrueの場合はtarget内のnil要素は全てnilで上書きされます. | |
=end | |
def deep_merge(target, nil_clear = false) | |
raise ArgumentError('Not Hash') unless target.kind_of?(Hash) |