Cf. https://docs.npmjs.com/misc/config#environment-variables
Does not affect npm:
$ npm_config__foo_registry='http://localhost:4873' npm run print-env | grep localhost
# prints nothing
Works, as expected:
'use strict'; | |
var pkg = require('./package.json'); | |
var gulp = require('gulp'); | |
var utils = require('gulp-util'); | |
var source = require('vinyl-source-stream'); | |
var isWatching = false; | |
var isProduction = process.env.NODE_ENV === 'production'; |
@mixin horizontal-gradient($from, $to, $stop: 100%) { | |
/* fallback/image non-cover color */ | |
background-color: $from; | |
/* Firefox 3.6+ */ | |
background-image: -moz-linear-gradient(left, $from 0%, $to $stop); | |
/* Safari 4+, Chrome 1+ */ | |
background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, $from), color-stop($stop, $to)); |
class Invoker { | |
invoke() { | |
return Invoker.convertFromStdin() | |
} | |
static async convertFromStdin() { | |
console.log('>>> convertFromStdin') | |
const data = await Invoker.readFromStdin() | |
console.log('<<< convertFromStdin', data) | |
} |
const variables = [] | |
function isDuplicate(program, index, programs) { | |
return programs.slice(i+1).contains(p => { | |
return p.program.genrePressCode !== program.program.genrePresseCode | |
}) | |
} | |
function mapProgram({language, idChannel}) { | |
return (program) => ({ |
// 'use strict'; | |
a = 32 | |
printA() | |
function printA() { | |
console.log(a) | |
} | |
a = 64 |
Cf. https://docs.npmjs.com/misc/config#environment-variables
Does not affect npm:
$ npm_config__foo_registry='http://localhost:4873' npm run print-env | grep localhost
# prints nothing
Works, as expected:
I hereby claim:
To claim this, I am signing this object:
var casper = require('casper').create(); | |
casper.start(); | |
casper.open('http://borisschapira.com/'); | |
casper.then(function dumpHeaders(){ | |
this.currentResponse.headers.forEach(function(header){ | |
console.log(header.name +': '+ header.value); | |
}); | |
}); |
$('.invbody-items:first tbody tr').map(function(){ | |
return parseInt($(this).find('td:eq(3)').text().trim(), 10); | |
}).get().reduce(function(left, right){ | |
return (left || 0) + (right || 0); | |
}); // total hours as a number |