Skip to content

Instantly share code, notes, and snippets.

View reggi's full-sized avatar
🪷

Tea Reggi reggi

🪷
View GitHub Profile
The idea is simple, all variables defined within a function are always returned and accessable outside of the function, no variables are ever "locked" inside a function.
* If it's called within a Prophesy the values declared within all Prophesys are retained in a shallow object.
* If it's called outside a Prophesy only the return property is returned.
* If there is no return property all properties are returned.
* Everything is maintained in a plain "Object". `{}`
```javascript
const add = new Prophesy((a, b) => [
() => ({a, b}),
{
"name": "abide",
"version": "1.0.0",
"description": "Collection of modules",
"keywords": [],
"license": "ISC",
"author": "",
"main": "index.js",
"scripts": {
"babel": "NODE_ENV=production lerna exec --parallel --bail=false -- npm run babel",

Hoping to not add to the noise, feel free to close.

In the example:

import { test } from "https://unpkg.com/deno_testing@0.0.5/testing.ts"
import { log } from "./util.ts"

The test function is pulled from a url that is cached. What happens if this test url also requires something from the file-system for instance ../meow.ts. Would it simply just keep following all the URLS and build the cache of everything that is on the given domain unless it runs into an error where a dep cannot be found? It would have to pull https://unpkg.com/meow.ts. I'd love to see a "sitemap" of all the dependencies download from all the given urls.

npm Versioning Bug

TLDR; this is about a specific versioning mishap that is happening with one of my packages. I have been in communication with npm about this issue since May 2nd.

Update: on May 7, 16:24 PDT I recieved this email from npm that this issue is a bug on their end.

I recently created a monorepo and I've been creating some small cli tools getting a feel for getting into open source at a larger scale so I've been publishing a lot of modules. I am having a rather complicated and odd npm issue and I wanted to document it.

The issue is with this package here @reggi/pkg.json-parse which many of my other packages depend on.

{
"_from": "@reggi/pkg.json-parse@latest",
"_id": "@reggi/pkg.json-parse@0.0.21",
"_inBundle": false,
"_integrity": "sha512-nLWWTP3L7zYBs4kwXF6dJodgXdg9rhj3v1/n2KEKojxIN6da4PKJnYqUnZRn4Mzbx93gXBA3e8ZXw/gv0P08RA==",
"_location": "/@reggi/pkg.json-parse",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
const {isPlainObject, isString, mapValues, includes} = require('lodash')
const piiProps = []
const blackoutBulk = (str) => str[0] + Array(str.length - 1).join('▮') + str[str.length - 1]
const blackoutAll = (str) => Array(str.length + 1).join('▮')
const blackout = (str) => (str.length < 5) ? blackoutAll(str) : blackoutBulk(str)
const checkPropPii = (val, key) => includes(piiProps, key) ? blackout(val) : val
const jsonStringify = (val) => {try { return JSON.parse(val) } catch (e) { return val }}
const jsonStringifyObj = (val) => isPlainObject(jsonStringify(val))
Code is like a house of cards.
Every layer is built upon the work you did in the previous.
Reliability and dependablity is of the utmost importance.

"The catalyst and the final clause"

Woods

  • balsa wood
  • basswood
  • poplar wood (needs chisel)
const assert = require('assert')
const BLUEBIRD = require('bluebird')

const nameAsync1 = async (name) => name
const nameAsync2 = (name) => Promise.resolve(name)
const nameAsync3 = (name) => BLUEBIRD.resolve(name)
const nameSync = (name) => name

const isPromise1 = (value) => Promise.resolve(value) === value