Skip to content

Instantly share code, notes, and snippets.

View kachkaev's full-sized avatar
🇺🇦

Alexander Kachkaev kachkaev

🇺🇦
View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active May 6, 2024 13:26
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@mrtns
mrtns / README.md
Last active January 14, 2023 05:07
Markdown-based Literate Programming

R Ecosystem

  • R Markdown

    Use a productive notebook interface to weave together narrative text and code to produce elegantly formatted output. Use multiple languages including R, Python, and SQL.

Python Ecosystem

  • Pweave

    Pweave is a scientific report generator and a literate programming tool for Python. It can capture the results and plots from data analysis and works well with numpy, scipy and matplotlib.

  • podoc
@joyrexus
joyrexus / README.md
Created March 28, 2014 16:59
Nested grouping of arrays

nest.js

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.

See this fiddle for live demo.