~80b ponyfill for String.prototype.replaceAll() with good performance.
Why ponyfill? Because this is a proposal for a spec, and polyfilling it in-place before it gets solidified could break code that relies on an incorrect implementation.
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection | |
# requires pycryptodome lib (pip install pycryptodome) | |
import sys | |
import base64 | |
import os | |
import json | |
from Crypto.Cipher import AES |
import { useReducer } from 'react' | |
export function updateName(name: string) { | |
return <const>{ | |
type: 'UPDATE_NAME', | |
name | |
} | |
} | |
export function addPoints(points: number) { |
~80b ponyfill for String.prototype.replaceAll() with good performance.
Why ponyfill? Because this is a proposal for a spec, and polyfilling it in-place before it gets solidified could break code that relies on an incorrect implementation.
/** | |
`useChangeLog` - dev-mode helper hook to let you | |
know why a memoized component re-rendered! | |
Usage example: | |
const YourComponent = React.memo((props) => { | |
// Just drop this fella into your memo component's body. | |
useChangeLog(props); |
React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".
With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.
/* | |
Utility to analyze bundle chunks over versions. | |
Assumes: webpack has already created the bundle summary json file -> stats.json | |
Parameters: | |
version: (Optional) a string that labels the current bundle with the version | |
provided and saves the summary in a csv file. | |
Output: | |
If run the first time, generates a csv file bundleAnalaysis.csv, which |
#!/usr/bin/env sh | |
if [ "$1" != "" ]; then | |
sBatchList="" | |
sBatchMessage="$3" | |
while IFS=, read col1 col2 | |
do | |
sBatchList="$sBatchList $col1" |
// Usage: | |
// | |
// function loader() { | |
// return new Promise((resolve) => { | |
// if (process.env.LAZY_LOAD) { | |
// require.ensure([], (require) => { | |
// resolve(require('./SomeComponent').default); | |
// }); | |
// } | |
// }); |
Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.
All files were downloaded from https://cdnjs.com and named accordingly.
Output from ls
command is stripped out (irrelevant stuff)
$ ls -lhS
566K Jan 4 22:03 angular2.min.js
mocha --compilers js:babel/register,js:./test/css-modules-compiler.js --recursive -w |