🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs
bundle
✨ .d.ts
bundle + type-checking
🧐 Source maps
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
def camel_to_snake(str): | |
""" | |
camelCase to snake_case | |
'camelCase' -> 'camel_case' | |
""" | |
return ''.join(map(lambda char:char if char.islower() else "_"+char.lower(), str)) | |
def snake_to_camel(str): | |
""" |
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
""" Python Script Object Notation (PSON) """ | |
# JSON alternative for Python. | |
def stringify(obj): | |
return str(obj) | |
def parse(string): | |
if string[0] == ' ': |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
import readline # for better console text edit experience | |
def isnumeric(number): | |
for num in range(10): | |
if str(number[-1])==str(num): | |
return True |
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
var inputs = document.querySelectorAll("input.js-toggler-target[value='Follow']"); | |
for(var i=0; i<inputs.length;i++) {inputs[i].click();} |
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
function httpRequest(url, method, data, success_callback, failure_callback) { | |
var xhr; | |
var data2 = []; | |
if (typeof data == 'object') { | |
for(var index in data) { | |
if (data.hasOwnProperty(index)) { | |
data2[data2.length] =index+'='+data[index]; | |
} | |
} |
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
var WeakMap = WeakMap || (function (Object) { | |
/*! (C) Andrea Giammarchi - Mit Style License */ | |
var | |
dP = Object.defineProperty, | |
hOP = Object.hasOwnProperty, | |
WeakMapPrototype = WeakMap.prototype, | |
i = 0 | |
; |