This is a useful package.json from an actual user, as opposed to an artificial/fabricated app. It should be fairly representative of the sort of things users do.
use crate::Score; | |
pub trait Measure: std::fmt::Debug + Sync + Send { | |
fn calculate(&self, scores: Vec<(&Score, f32)>) -> f32; | |
} | |
#[derive(Debug, Clone, Default)] | |
pub struct WeightedMeasure; | |
impl Measure for WeightedMeasure { |
[PROFILE] | |
[TITLE:WELL-PREPPED (0XABADIDEA STYLE)] | |
[SKILL:1:MINING:5] | |
[SKILL:1:HAMMER:2] | |
[SKILL:1:SWIMMING:2] | |
[SKILL:1:MELEE_COMBAT:1] | |
[SKILL:2:MINING:5] | |
[SKILL:2:SWORD:2] | |
[SKILL:2:CROSSBOW:2] | |
[SKILL:2:SWIMMING:1] |
// match ABNF | |
Match := 'match' '(' RHSExpr ')' '{' MatchClause* '}' | |
MatchClause := MatchClauseLHS '=>' FatArroyRHS MaybeASI | |
MatchClauseLHS := [MatcherExpr] (LiteralMatcher | ArrayMatcher | ObjectMatcher | JSVar) | |
MatcherExpr := LHSExpr | |
LiteralMatcher := LitRegExp | LitString | LitNumber | |
ArrayMatcher := '[' MatchClauseLHS [',', MatchClauseLHS]* ']' // and... whatever it takes to shove ...splat in there | |
ObjectMatcher := '{' (JSVar [':' MatchClauseLHS]) [',' (JSVar [':', MatchClauseLHS])]* '}' // see above note about ...splat |
'use strict' | |
const BB = require('bluebird') | |
const cacache = require('cacache') | |
const npa = require('npm-package-arg') | |
const pickManifest = require('npm-pick-manifest') | |
const ssri = require('ssri') | |
module.exports = cachedVersions |
#!/usr/bin/env node | |
if (process.mainModule === module) setImmediate(() => main(process.argv).catch(e => console.log(e.stack) && process.exit(1))) | |
async function main(argv) { | |
console.log(argv.slice(2)) | |
} |
#!/usr/bin/env node | |
console.log('yay gist') |
const Show = duck.define(a => { | |
show (a) {}, | |
toString () {} | |
}) |
// Requirements: | |
// Unidirectional (data flows down) | |
// Composable (detailed definitions can be specified at a lower level) | |
// Declarative types and defaults | |
// Minimal consing | |
// No bubbling of side effects to parents or siblings | |
// Efficient | |
// Warn about unspecified options being read or assigned? (or make it available to run in tests?) | |
// opts objects readable like plain objects (maybe?) |
Yes hi it's me
Hi! I'm Kat, and I want to throw my hat in as one of the nominees for Individual Membership Director for the Node.js Foundation. Why? Because the Foundation needs to do more for its individual members. All of them.
Do you have a place at the table?
JavaScript is one of the fastest-growing and most popular programming languages in the world, and Node is its primary platform for backend usage. npm's own userbase is estimated to be around 4 million, and downloads number at around 1.6 billion every week. Every single npm user is also a Node.js user in some capacity.
How many of those people have their interests represented in leadership? Which groups of people have we served best? Which groups do we never hear about? Who are the contributors, really? Do we want to change that? How could we?