0.135.10000 • Published 2 years ago

@tybys/denostd v0.135.10000

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

denostd

Deno standard library porting for browser and Node.js

Usage

Install

$ npm install @tybys/denostd

Or repository and build from source:

$ git clone https://github.com/toyobayashi/denostd.git
$ cd denostd
$ npm run build

Output:

  • dist/cjs - Module: CommonJS, Target: ES5

  • dist/cjs-modern - Module: CommonJS, Target: ES2018 (Node.js environment default entry)

  • dist/esm - Module: ESNext, Target: ES5 (Webpack / Rollup default entry)

  • dist/esm-modern - Module: ESNext, Target: ES2018

  • dist/umd - Module: UMD, Target: ES5

Need polyfills for Promise, Symbol, WeakMap, TypedArray, globalThis, etc.

Browser

Full version:

<script src="https://cdn.jsdelivr.net/npm/@tybys/denostd/dist/umd/denostd.min.js"></script>
<script>
console.log(denostd);
denostd.fmt.printf.printf('%s', 'yo');
</script>

Standalone:

<script src="https://cdn.jsdelivr.net/npm/@tybys/denostd/dist/umd/fmt/printf.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@tybys/denostd/dist/umd/async/async.min.js"></script>
<script>
console.log(denostd.fmt);
console.log(denostd.async);
</script>

ES Module:

<script type="module">
import { async } from "https://cdn.jsdelivr.net/npm/@tybys/denostd/dist/esm-modern/index.js";
const d = async.deferred();
console.log(d instanceof Promise);
</script>

Node.js

Full version:

const denostd = require('@tybys/denostd')
denostd.fmt.printf.printf('%s', 'yo')

Standalone:

const printf = require('@tybys/denostd/dist/cjs-modern/std/fmt/printf.js')
printf.printf('%s', 'yo')

Webpack

Configuration:

module.exports = {
  // ...
  node: false // avoid bundling node polyfill
}

Full version:

import * as denostd from '@tybys/denostd'

Standalone:

import * as path from '@tybys/denostd/dist/esm/std/path/mod.js'

TypeScript

Full version:

import * as denostd from '@tybys/denostd'

Standalone:

import * as path from '@tybys/denostd/dist/esm/std/path/mod'

Available modules:

  • async
  • bytes
  • collections
  • datetime
  • encoding
    • ascii85
    • base32
    • base64
    • base64url
    • hex
    • toml
  • flags
  • fmt
    • bytes
    • colors
    • printf
  • hash
    • fnv
    • md5
    • sha1
    • sha3
    • sha256
    • sha512
  • path
  • testing
    • asserts
    • bench
  • uuid
0.135.10000

2 years ago

0.129.10000

2 years ago

0.113.10000

3 years ago

0.104.10000

3 years ago

0.100.10000

3 years ago

0.95.10000

3 years ago

0.97.10000

3 years ago

0.94.10000

3 years ago

0.93.10000

3 years ago

0.91.10000

3 years ago

0.88.10000

3 years ago

0.88.10001

3 years ago

0.87.10000

3 years ago

0.81.10000

3 years ago

0.79.10000

3 years ago

0.75.10000

4 years ago

0.71.10000

4 years ago

0.70.10000

4 years ago

0.68.10000

4 years ago

0.67.10000

4 years ago

0.66.10001

4 years ago

0.66.10000

4 years ago

0.65.10000

4 years ago

0.64.10000

4 years ago

0.63.10001

4 years ago

0.63.10000

4 years ago

0.62.10000

4 years ago

0.61.10000

4 years ago

0.60.10000

4 years ago

0.59.10001

4 years ago

0.59.10000

4 years ago

0.58.10000

4 years ago

0.57.10001

4 years ago

0.57.0

4 years ago

0.56.0

4 years ago