It's 2024. You should use tsup instead of this.
🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
✨ .d.ts bundle + type-checking
| 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): | |
| """ |
It's 2024. You should use tsup instead of this.
🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
✨ .d.ts bundle + type-checking
| """ Python Script Object Notation (PSON) """ | |
| # JSON alternative for Python. | |
| def stringify(obj): | |
| return str(obj) | |
| def parse(string): | |
| if string[0] == ' ': |
| #!/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 |
| var inputs = document.querySelectorAll("input.js-toggler-target[value='Follow']"); | |
| for(var i=0; i<inputs.length;i++) {inputs[i].click();} |
| 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]; | |
| } | |
| } |
| var WeakMap = WeakMap || (function (Object) { | |
| /*! (C) Andrea Giammarchi - Mit Style License */ | |
| var | |
| dP = Object.defineProperty, | |
| hOP = Object.hasOwnProperty, | |
| WeakMapPrototype = WeakMap.prototype, | |
| i = 0 | |
| ; |