Skip to content

Instantly share code, notes, and snippets.

@ohjongin
ohjongin / objectKeysToLowerCase.js
Created September 11, 2018 07:34
Turn all the keys of an object to lower case
/** @summary objectKeysToLowerCase( input, deep, filter )
* returns a new object with all own keys converted to lower case.
* The copy can be shallow (default) or deep.
*
* Circular references is supported during deep copy and the output will have
* the same structure.
*
* By default only objects that have Object as constructor is copied.
* It can be changed with the "filter"-function.
*

Keybase proof

I hereby claim:

  • I am ohjongin on github.
  • I am ji5 (https://keybase.io/ji5) on keybase.
  • I have a public key ASC3gWMsPjY16gZdvOCl2TLeMF8nr_UdC44E9L4uxnLLfQo

To claim this, I am signing this object:

@ohjongin
ohjongin / env.js
Last active September 5, 2022 04:40
Set environment variables programtically
const hostname = 'sso.sisoul.kr'
// const env = require('env.json');
const env = {
"sso.sisoul.kr": {
"node_env": "production",
"api_server": "https://api.sisoul.kr"
},
"sso.dev.sisoul.kr": {
"node_env": "development",
"api_server": "https://api.dev.sisoul.kr"