As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
var Q = require("q"); | |
var HTTP = require("q-http"); | |
function httpReadRetry(url, timeout, times) { | |
return HTTP.read(url) | |
.then(function (content) { | |
return content; | |
}, function (error) { | |
if (times == 0) | |
throw new Error("Can't read " + JSON.stringify(url)); |
license: gpl-3.0 | |
redirect: https://observablehq.com/@d3/indented-tree |
license: gpl-3.0 |
#!upstart | |
description "MyApp" | |
author "MyApp by charlie" | |
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
respawn | |
start on runlevel [23] | |
stop on shutdown |
angular.module('myApp.services', []) | |
.factory('UserFactory', function($http, $q) { | |
var service = { | |
// our factory definition | |
user: {}, | |
setName: function(newName) { | |
service.user['name'] = newName; | |
}, | |
setEmail: function(newEmail) { | |
service.user['email'] = newEmail; |
Author: Ari Lerner.
AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:
// webpack is a module bundler | |
// This means webpack takes modules with dependencies | |
// and emits static assets representing those modules. | |
// dependencies can be written in CommonJs | |
var commonjs = require("./commonjs"); | |
// or in AMD | |
define(["amd-module", "../file"], function(amdModule, file) { | |
// while previous constructs are sync | |
// this is async |
A multi-level groupBy for arrays inspired by D3's nest operator.
Nesting allows elements in an array to be grouped into a hierarchical tree
structure; think of it like the GROUP BY
operator in SQL, except you can have
multiple levels of grouping, and the resulting output is a tree rather than a
flat table. The levels in the tree are specified by key functions.
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"defaultParams": false, // enable default function parameters | |
"forOf": false, // enable for-of loops | |
"generators": false, // enable generators | |
"objectLiteralComputedProperties": false, // enable computed object literal property names |