_______ ________ _________ ________ ___ ___ ________
|\ ___ \ |\ ____\|\___ ___\\ ___ \|\ \ |\ \|\ __ \
\ \ __/|\ \ \___|\|___ \ \_\ \ \_|\ \ \ \ \ \ \ \ \|\ /_
\ \ \_|/_\ \_____ \ \ \ \ \ \ \ \\ \ \ \ \ \ \ \ __ \
\ \ \_|\ \|____|\ \ \ \ \ \ \ \_\\ \ \ \____\ \ \ \ \|\ \
\ \_______\____\_\ \ \ \__\ \ \_______\ \_______\ \__\ \_______\
\|_______|\_________\ \|__| \|_______|\|_______|\|__|\|_______|
\|_________|
The estdlib is a standard library for the browser and node.js built on modern ecmascript.
- 💪 Type strong, write in typescript
- 📦 Use native ESM to achieve a smaller packaging volume
- 🚀 Excellent performance
- 🛠️ Purer functional style
# npm
npm i estdlib --save
# pnpm
pnpm add estdlib
- ES Module
import * as _ from 'estdlib'
import { first, isBoolean, add } from 'estdlib'
import * as assert from 'estdlib/assert'
import { isArray, isBoolean } from 'estdlib/assert'
import flatten from 'estdlib/array/flatten'
- CommonJS
const estdlib = require('estdlib')
const { head, isBoolean, add } = require('estdlib')
const assert = require('estdlib/assert')
const { isArray, isBoolean } = require('estdlib/assert')
- CDN
<!-- note that using latest is taking a significant risk that estdlib API changes could break your code -->
<!-- <script src="https://unpkg.com/estdlib@latest/dist/estdlib.min.js"></script> -->
<script src="https://unpkg.com/estdlib@latest/dist/estdlib.js"></script>
<script type="module">
import * as _ from 'https://unpkg.com/estdlib@latest/dist/estdlib.esm.js'
</script>
- Deno
import * as R from "https://deno.land/x/estdlib@latest/mod.ts"
// using nest.land
import * as R from "https://x.nest.land/estdlib@latest/mod.ts"
See the full documentation here
unpkg
jsdelivr
cdnjs
Running the test suite:
npm run test
Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
Automated browser & CI test runs are available.
Contributions are welcome and appreciated! Check out the contributing guide before you dive in.