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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>LABjs Demo</title> | |
</head> | |
<body> | |
<!-- some stuff --> | |
<script src="/js/LAB.js"></script> |
/* | |
UPDATE: this has finally been pushed to npm as `fs.extra` | |
URL: https://github.com/coolaj86/utile-fs/tree/master/fs.extra | |
*/ | |
(function () { | |
"use strict"; | |
console.warn('[Deprecated] See https://github.com/coolaj86/utile-fs'); | |
var fs = require('fs') |
var express = require('express'); | |
var redis = require('redis'); | |
const serverType = process.argv[2]; | |
const serverHost = process.argv[3]; | |
const serverPort = parseInt(process.argv[4]); | |
const redisPort = 6379; | |
const redisHost = '127.0.0.1'; |
var chatData = JSON.stringify({ | |
timestamp: (currentDate.getTime() - currentDate.getMilliseconds()) / 1000 | |
, chat: { | |
employee_id: employeeId | |
, created_at: chat.created_at | |
, username: chat.chatname | |
, message: chat.message | |
} | |
}); |
I am working on a custom error constructor for my seed project. I had a few objectives in mind when I started.
// Lack of tail call optimization in JS | |
var sum = function(x, y) { | |
return y > 0 ? sum(x + 1, y - 1) : | |
y < 0 ? sum(x - 1, y + 1) : | |
x | |
} | |
sum(20, 100000) // => RangeError: Maximum call stack size exceeded | |
// Using workaround |
#!comment: This is a list of the top 100,000 most frequently-used English words | |
#!comment: according to Wiktionary. | |
#!comment: | |
#!comment: It was compiled in August 2005 and coalesced into a handy list for | |
#!comment: use in John the Ripper. | |
#!comment: | |
#!comment: | |
#!comment: Pull date: Sun Jan 15 22:03:54 2012 GMT | |
#!comment: | |
#!comment: Sources: |
Hi client library users / developers, this is what I think is the best approach to expose | |
EVAL / EVALSHA to the final user: | |
redis.eval and redis.evalsha -> exposed verbatim without any intermediate layer. | |
redis.script(... script body ...,arguments) -> use evalsha, revert to eval if the SHA was not definied. | |
redis.register("foobar","...script body...") -> Creates an entry into | |
a table with "foobar","script body",pre_computed_SHA so that I can use | |
directly: |