Skip to content

Instantly share code, notes, and snippets.

View jacklinton's full-sized avatar

Jack Linton jacklinton

View GitHub Profile
@creationix
creationix / inspect.js
Created December 23, 2010 06:51
a custom object inspector to help me understand JavaScript
function escapeString(string) {
string = string.replace(/\\/g, "\\\\").
replace(/\n/g, "\\n").
replace(/\r/g, "\\r").
replace(/\t/g, "\\t");
if (string.indexOf("'") < 0) {
return "'" + string + "'";
}
string = string.replace(/"/g, "\\\"");
return '"' + string + '"';
@raarts
raarts / create-expo-web-app
Last active June 16, 2020 16:28
Script to create an Expo blank template, with react-native-web support
#!/bin/bash
#
# Create a RN project which includes react-native-web
# Takes one argument, the target directory (and app) name,
if [ $# -ne 1 ]
then
echo "usage: $0 <target-dir>"
exit 1
fi