Setting NODE_ENV=production
causes these libraries and tools to behave as follows:
npm:
install
will not install devDependenciesshrinkwrap
will not install devDependenciesprune
will remove devDependencies
yarn:
var me = Services.wm.getMostRecentWindow(null); | |
Cu.import('resource://gre/modules/osfile.jsm'); | |
var pathProfilesIni = OS.Path.join(OS.Constants.Path.userApplicationDataDir, 'profiles.ini'); | |
me.alert(pathProfilesIni); | |
//apparently theres for profiles made in default prof dir: | |
//localDir = C:\Users\ali57233\AppData\Local\Mozilla\Firefox\Profiles\czbm1ps9.rnd1 | |
//rootDir = C:\Users\ali57233\AppData\Roaming\Mozilla\Firefox\Profiles\czbm1ps9.rnd1 | |
//for custom prof dir localDir and rootDir are same |
var each = function (Array) {"use strict"; | |
/*! all you need to `each(obj, cb [,context])` | |
* @author WebReflection | |
* @license WTFPL - http://en.wikipedia.org/wiki/WTFPL | |
* @gist https://gist.github.com/2294934 | |
*/ | |
var | |
toString = {}.toString, | |
hasOwnProperty = {}.hasOwnProperty, | |
array = toString.call([]), |
/** | |
* Polyfill for "fixing" IE's lack of support (IE < 9) for applying slice | |
* on host objects like NamedNodeMap, NodeList, and HTMLCollection | |
* (technically, since host objects are implementation-dependent, | |
* IE doesn't need to work this way). Also works on strings, | |
* fixes IE to allow an explicit undefined for the 2nd argument | |
* (as in Firefox), and prevents errors when called on other | |
* DOM objects. | |
* @license MIT, GPL, do whatever you want | |
-* @see https://gist.github.com/brettz9/6093105 |
function jml (elName, atts, children) {'use strict'; | |
var el = typeof elName === 'string' ? document.createElement(elName) : elName; | |
if (atts && Array.isArray(atts)) { | |
children = atts; | |
} | |
else if (atts) { | |
Object.keys(atts).forEach(function (att) { | |
var attVal = atts[att]; | |
if (att === '$on') { | |
return Object.keys(attVal).forEach(function (ev) { |
// target is the backing object | |
let target = { length: 0 }, | |
proxy = new Proxy(target, { | |
set(trapTarget, key, value) { | |
let numericKey = Number(key), | |
keyIsInteger = Number.isInteger(numericKey); | |
// special case for length property - only need to worry if length is | |
// shorter than number of array items |
Setting NODE_ENV=production
causes these libraries and tools to behave as follows:
npm:
install
will not install devDependenciesshrinkwrap
will not install devDependenciesprune
will remove devDependenciesyarn:
// Microrouter based on history.pushState. | |
// All thrills, no frills. | |
// Usage: | |
// | |
// var h = urlstate(callback); | |
// h.push('#foo') | |
function urlstate(callback) { | |
// Since `history.pushState` doesn't fire `popstate`, we can use this function | |
// instead. Will update history state and call `callback` with currently | |
// showing `url`. |
sprintf`There are ${0} monkeys in the ${1}.`( '10', 'tree' );
// > There are 10 monkeys in the tree.
const linkTemplate = sprintf`<a href="${0}" ${2}>${1}</a>`;
linkTemplate('/contact/', 'Contact Us');
linkTemplate('https://example.com', 'Open Preview', 'target="_blank"');