Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: multiformats/js-mafmt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1903099088e0421d8f083dd141cf935527978391
Choose a base ref
...
head repository: multiformats/js-mafmt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 41dfe7c9b23efa1fa8212b3481a72760142439df
Choose a head ref

Commits on Nov 28, 2017

  1. test: add tests for the *-star addrs we recommend using (#20)

    * chore: update deps
    
    * test: add tests for the *-star addrs we recommend using
    daviddias authored Nov 28, 2017
    Copy the full SHA
    9df8d84 View commit details

Commits on Feb 12, 2018

  1. feat: /dns => /dnsaddr (#21)

    * /dns => /dnsaddr
    
    See multiformats/js-multiaddr@99a1aa4
    
    * fix: tests
    mkg20001 authored and daviddias committed Feb 12, 2018
    Copy the full SHA
    ecef5f4 View commit details
  2. chore: update deps

    daviddias committed Feb 12, 2018
    Copy the full SHA
    6181236 View commit details
  3. chore: update contributors

    daviddias committed Feb 12, 2018
    Copy the full SHA
    d701c29 View commit details
  4. Copy the full SHA
    02eb342 View commit details
  5. chore: update contributors

    daviddias committed Feb 12, 2018
    Copy the full SHA
    eb4d063 View commit details
  6. Copy the full SHA
    f231af2 View commit details

Commits on Feb 27, 2018

  1. docs: adds API docs (#22)

    alanshaw authored and daviddias committed Feb 27, 2018
    Copy the full SHA
    61955d2 View commit details

Commits on Apr 5, 2018

  1. chore: update deps

    daviddias committed Apr 5, 2018
    Copy the full SHA
    ea3a0b2 View commit details
  2. Copy the full SHA
    1c26a6e View commit details
  3. chore: update contributors

    daviddias committed Apr 5, 2018
    Copy the full SHA
    8657b68 View commit details
  4. Copy the full SHA
    274bef7 View commit details

Commits on May 30, 2018

  1. chore: create Jenkinsfile (#27)

    victorb authored and daviddias committed May 30, 2018
    Copy the full SHA
    2462fdf View commit details
  2. Copy the full SHA
    87c4202 View commit details

Commits on Jun 27, 2018

  1. Copy the full SHA
    ecbb187 View commit details

Commits on Aug 28, 2018

  1. chore: update dependencies (#29)

    License: MIT
    Signed-off-by: Alan Shaw <alan@tableflip.io>
    alanshaw authored and vasco-santos committed Aug 28, 2018
    Copy the full SHA
    02b9b75 View commit details
  2. Copy the full SHA
    f3dfbd4 View commit details
  3. Copy the full SHA
    de38b46 View commit details

Commits on Sep 12, 2018

  1. feat: add tcp over dns (#31)

    jacobheun authored and vasco-santos committed Sep 12, 2018
    Copy the full SHA
    acc9295 View commit details
  2. Copy the full SHA
    acce91c View commit details
  3. Copy the full SHA
    09c38d9 View commit details

Commits on Oct 27, 2018

  1. chore: Delete .travis.yml (#32)

    victorb authored and daviddias committed Oct 27, 2018
    Copy the full SHA
    9254664 View commit details

Commits on Dec 5, 2018

  1. Copy the full SHA
    953adce View commit details
  2. Copy the full SHA
    6bf3e62 View commit details
  3. Copy the full SHA
    ff8bbfe View commit details

Commits on Jan 8, 2019

  1. fix: reduce bundle size (#34)

    * fix: reduce bundle size
    
    * chore: update deps
    hugomrdias authored and vasco-santos committed Jan 8, 2019
    Copy the full SHA
    8a2eb6b View commit details
  2. Copy the full SHA
    e8c58c0 View commit details
  3. Copy the full SHA
    0dc5286 View commit details

Commits on Jan 25, 2019

  1. Copy the full SHA
    5187d59 View commit details
  2. Copy the full SHA
    fea50eb View commit details
  3. Copy the full SHA
    5f054d0 View commit details
  4. Revert "chore: release version v6.0.5"

    This reverts commit 5f054d0.
    vasco-santos committed Jan 25, 2019
    2
    Copy the full SHA
    eee56af View commit details

Commits on Jan 28, 2019

  1. Copy the full SHA
    abd7f1c View commit details

Commits on Feb 7, 2019

  1. feat: add /p2p-stardust (#35)

    This is part of the endeavor to replace ws-star with the newly created
    stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a
    reference
    
    Note: This PR depends on this pr to be merged and the package being
    updated first: multiformats/js-multiaddr#78
    mkg20001 authored and vasco-santos committed Feb 7, 2019
    Copy the full SHA
    9b0c199 View commit details
  2. Copy the full SHA
    dd3a474 View commit details
  3. Copy the full SHA
    1fb4869 View commit details

Commits on Feb 11, 2019

  1. Copy the full SHA
    7b7bbed View commit details

Commits on Feb 15, 2019

  1. chore: use travis (#38)

    vasco-santos authored Feb 15, 2019
    Copy the full SHA
    be174e4 View commit details

Commits on Feb 26, 2019

  1. feat: accept Buffer input (#39)

    README states that input can be a Buffer, but
    https://github.com/multiformats/js-mafmt/blob/v6.0.6/src/index.js#L148
    would fail due to missing Buffer.protoNames
    
    This commit moves validation to js-multiaddr and adds tests for
    object and buffer variants.
    
    License: MIT
    Signed-off-by: Marcin Rataj <lidel@lidel.org>
    lidel authored and vasco-santos committed Feb 26, 2019
    Copy the full SHA
    c2adc27 View commit details
  2. Copy the full SHA
    edf5319 View commit details
  3. Copy the full SHA
    3fc9234 View commit details

Commits on Aug 8, 2019

  1. feat: p2p and dns support (#42)

    jacobheun authored and vasco-santos committed Aug 8, 2019
    Copy the full SHA
    09160b5 View commit details
  2. Copy the full SHA
    f0f5be2 View commit details
  3. Copy the full SHA
    4fafcf2 View commit details

Commits on Sep 10, 2019

  1. chore: Update to latest multiaddr (p2p by default over ipfs) (#43)

    As multiaddr now defaults to using /p2p over /ipfs
    we no longer need the logic for both. /ipfs is still supported
    as demonstrated in the tests.
    jacobheun authored and vasco-santos committed Sep 10, 2019
    Copy the full SHA
    bbd2c1d View commit details
  2. Copy the full SHA
    c170827 View commit details
  3. Copy the full SHA
    55a5c03 View commit details

Commits on Sep 11, 2019

  1. Copy the full SHA
    674e7a8 View commit details
  2. Copy the full SHA
    3b2892f View commit details
  3. Copy the full SHA
    52d9a9e View commit details
Showing with 685 additions and 175 deletions.
  1. +8 −0 .aegir.js
  2. +8 −0 .github/dependabot.yml
  3. +1 −0 .gitignore
  4. +0 −7 .npmignore
  5. +47 −29 .travis.yml
  6. +210 −0 CHANGELOG.md
  7. +59 −7 README.md
  8. +0 −18 circle.yml
  9. +32 −21 package.json
  10. +155 −69 src/index.js
  11. +11 −0 src/types.d.ts
  12. +144 −24 test/index.spec.js
  13. +10 −0 tsconfig.json
8 changes: 8 additions & 0 deletions .aegir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict'

/** @type {import('aegir').PartialOptions} */
module.exports = {
build: {
bundlesizeMax: '12KB'
}
}
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "11:00"
open-pull-requests-limit: 10
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ coverage
.lock-wscript

build
docs

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
7 changes: 0 additions & 7 deletions .npmignore

This file was deleted.

76 changes: 47 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,50 @@
sudo: false
language: node_js
cache: npm
dist: bionic

matrix:
branches:
only:
- master
- /^release\/.*$/

stages:
- check
- test
- cov

node_js:
- 'lts/*'
- 'node'

os:
- linux
- osx
- windows

script: npm run test:node -- --cov
after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov

jobs:
include:
- node_js: 6
env: CXX=g++-4.8
- node_js: 8
env: CXX=g++-4.8
# - node_js: stable
# env: CXX=g++-4.8

script:
- npm run lint
- npm run test
- npm run coverage
- make test

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

after_success:
- npm run coverage-publish

addons:
firefox: 'latest'
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- os: windows
cache: false

- stage: check
script:
- npx aegir dep-check
- npm run lint

- stage: test
name: chrome
addons:
chrome: stable
script: npx aegir test -t browser -t webworker

- stage: test
name: firefox
addons:
firefox: latest
script: npx aegir test -t browser -t webworker -- --browser firefox

notifications:
email: false
210 changes: 210 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,213 @@
# [10.0.0](https://github.com/multiformats/js-mafmt/compare/v9.0.0...v10.0.0) (2021-07-07)


### chore

* upgrade multiaddr ([#81](https://github.com/multiformats/js-mafmt/issues/81)) ([2785b23](https://github.com/multiformats/js-mafmt/commit/2785b23d42fee537907ce3811ddce4ae107fc781))


### BREAKING CHANGES

* uses new major of multiaddr module



# [9.0.0](https://github.com/multiformats/js-mafmt/compare/v8.0.4...v9.0.0) (2021-04-11)



## [8.0.4](https://github.com/multiformats/js-mafmt/compare/v8.0.3...v8.0.4) (2021-01-13)


### Features

* add QUIC support ([#70](https://github.com/multiformats/js-mafmt/issues/70)) ([ac7d10c](https://github.com/multiformats/js-mafmt/commit/ac7d10c646f343edd3154bae504bc9a2dcd0d506))



## [8.0.3](https://github.com/multiformats/js-mafmt/compare/v8.0.2...v8.0.3) (2021-01-11)


### Bug Fixes

* add webrtc direct with p2p as valid P2P multiaddr ([#71](https://github.com/multiformats/js-mafmt/issues/71)) ([c8430c1](https://github.com/multiformats/js-mafmt/commit/c8430c1556edf687d22f2c00eb3b6ff96b580aa5))



## [8.0.2](https://github.com/multiformats/js-mafmt/compare/v8.0.1...v8.0.2) (2020-12-28)



<a name="8.0.1"></a>
## [8.0.1](https://github.com/multiformats/js-mafmt/compare/v7.1.0...v8.0.1) (2020-10-27)


### Bug Fixes

* replace node buffers with uint8arrays ([#59](https://github.com/multiformats/js-mafmt/issues/59)) ([022ab87](https://github.com/multiformats/js-mafmt/commit/022ab87))


### Features

* add dnsnaddr p2p ([95d5178](https://github.com/multiformats/js-mafmt/commit/95d5178))


### BREAKING CHANGES

* - Now uses a version of `multiaddr` than has a `.bytes` property instead of `.buffer`



<a name="8.0.0"></a>
# [8.0.0](https://github.com/multiformats/js-mafmt/compare/v7.1.0...v8.0.0) (2020-08-10)


### Bug Fixes

* replace node buffers with uint8arrays ([#59](https://github.com/multiformats/js-mafmt/issues/59)) ([022ab87](https://github.com/multiformats/js-mafmt/commit/022ab87))


### BREAKING CHANGES

* - Now uses a version of `multiaddr` than has a `.bytes` property instead of `.buffer`



<a name="7.1.0"></a>
# [7.1.0](https://github.com/multiformats/js-mafmt/compare/v7.0.1...v7.1.0) (2020-02-06)


### Features

* add typescript types + type tests ([#48](https://github.com/multiformats/js-mafmt/issues/48)) ([74830fa](https://github.com/multiformats/js-mafmt/commit/74830fa))



<a name="7.0.1"></a>
## [7.0.1](https://github.com/multiformats/js-mafmt/compare/v7.0.0...v7.0.1) (2020-01-23)


### Bug Fixes

* webrtc-star should not require the p2p codec ([#47](https://github.com/multiformats/js-mafmt/issues/47)) ([7112ab7](https://github.com/multiformats/js-mafmt/commit/7112ab7))



<a name="7.0.0"></a>
# [7.0.0](https://github.com/multiformats/js-mafmt/compare/v6.0.10...v7.0.0) (2019-09-11)



<a name="6.0.10"></a>
## [6.0.10](https://github.com/multiformats/js-mafmt/compare/v6.0.9...v6.0.10) (2019-09-11)



<a name="6.0.9"></a>
## [6.0.9](https://github.com/multiformats/js-mafmt/compare/v6.0.8...v6.0.9) (2019-09-10)



<a name="6.0.8"></a>
## [6.0.8](https://github.com/multiformats/js-mafmt/compare/v6.0.7...v6.0.8) (2019-08-08)


### Features

* p2p and dns support ([#42](https://github.com/multiformats/js-mafmt/issues/42)) ([09160b5](https://github.com/multiformats/js-mafmt/commit/09160b5))



<a name="6.0.7"></a>
## [6.0.7](https://github.com/multiformats/js-mafmt/compare/v6.0.6...v6.0.7) (2019-02-26)


### Features

* accept Buffer input ([#39](https://github.com/multiformats/js-mafmt/issues/39)) ([c2adc27](https://github.com/multiformats/js-mafmt/commit/c2adc27)), closes [/github.com/multiformats/js-mafmt/blob/v6.0.6/src/index.js#L148](https://github.com//github.com/multiformats/js-mafmt/blob/v6.0.6/src/index.js/issues/L148)



<a name="6.0.6"></a>
## [6.0.6](https://github.com/multiformats/js-mafmt/compare/v6.0.5...v6.0.6) (2019-02-07)


### Features

* add /p2p-stardust ([#35](https://github.com/multiformats/js-mafmt/issues/35)) ([9b0c199](https://github.com/multiformats/js-mafmt/commit/9b0c199)), closes [libp2p/js-libp2p-websocket-star#70](https://github.com/libp2p/js-libp2p-websocket-star/issues/70)



<a name="6.0.5"></a>
## [6.0.5](https://github.com/multiformats/js-mafmt/compare/v6.0.4...v6.0.5) (2019-01-25)


### Bug Fixes

* do not throw if multiaddr str is invalid, fixes [#25](https://github.com/multiformats/js-mafmt/issues/25) ([#36](https://github.com/multiformats/js-mafmt/issues/36)) ([5187d59](https://github.com/multiformats/js-mafmt/commit/5187d59))



<a name="6.0.4"></a>
## [6.0.4](https://github.com/multiformats/js-mafmt/compare/v6.0.3...v6.0.4) (2019-01-08)


### Bug Fixes

* reduce bundle size ([#34](https://github.com/multiformats/js-mafmt/issues/34)) ([8a2eb6b](https://github.com/multiformats/js-mafmt/commit/8a2eb6b))



<a name="6.0.3"></a>
## [6.0.3](https://github.com/multiformats/js-mafmt/compare/v6.0.2...v6.0.3) (2018-12-05)



<a name="6.0.2"></a>
## [6.0.2](https://github.com/whyrusleeping/js-mafmt/compare/v6.0.1...v6.0.2) (2018-09-12)


### Features

* add tcp over dns ([#31](https://github.com/whyrusleeping/js-mafmt/issues/31)) ([acc9295](https://github.com/whyrusleeping/js-mafmt/commit/acc9295))



<a name="6.0.1"></a>
## [6.0.1](https://github.com/whyrusleeping/js-mafmt/compare/v6.0.0...v6.0.1) (2018-08-28)


### Features

* adds HTTPS validation and HTTP(s) tests ([87c4202](https://github.com/whyrusleeping/js-mafmt/commit/87c4202))



<a name="6.0.0"></a>
# [6.0.0](https://github.com/whyrusleeping/js-mafmt/compare/v4.0.0...v6.0.0) (2018-04-05)



<a name="5.0.0"></a>
# [5.0.0](https://github.com/whyrusleeping/js-mafmt/compare/v4.0.0...v5.0.0) (2018-04-05)



<a name="4.0.0"></a>
# [4.0.0](https://github.com/whyrusleeping/js-mafmt/compare/v3.1.0...v4.0.0) (2018-02-12)



<a name="3.1.0"></a>
# [3.1.0](https://github.com/whyrusleeping/js-mafmt/compare/v3.0.2...v3.1.0) (2018-02-12)


### Features

* /dns => /dnsaddr ([#21](https://github.com/whyrusleeping/js-mafmt/issues/21)) ([ecef5f4](https://github.com/whyrusleeping/js-mafmt/commit/ecef5f4))



<a name="3.0.2"></a>
## [3.0.2](https://github.com/whyrusleeping/js-mafmt/compare/v3.0.1...v3.0.2) (2017-10-24)

66 changes: 59 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,64 @@
js-mafmt
========

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
[![Coverage Status](https://coveralls.io/repos/github/whyrusleeping/js-mafmt/badge.svg?branch=master)](https://coveralls.io/github/whyrusleeping/js-mafmt?branch=master)
[![Travis CI](https://travis-ci.org/whyrusleeping/js-mafmt.svg?branch=master)](https://travis-ci.org/whyrusleeping/js-mafmt)
[![Circle CI](https://circleci.com/gh/whyrusleeping/js-mafmt.svg?style=svg)](https://circleci.com/gh/whyrusleeping/js-mafmt)
[![Dependency Status](https://david-dm.org/whyrusleeping/js-mafmt.svg?style=flat-square)](https://david-dm.org/whyrusleeping/js-mafmt) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)
[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs)
[![Dependency Status](https://david-dm.org/multiformats/js-mafmt.svg?style=flat-square)](https://david-dm.org/multiformats/js-mafmt)
[![](https://img.shields.io/travis/multiformats/js-mafmt.svg?style=flat-square)](https://travis-ci.com/multiformats/js-mafmt)
[![codecov](https://img.shields.io/codecov/c/github/multiformats/js-mafmt.svg?style=flat-square)](https://codecov.io/gh/multiformats/js-mafmt)

> Javascript implementation of multiaddr validation
## Lead Maintainer

[Vasco Santos](https://github.com/vasco-santos).

## Install

```sh
npm install mafmt
```

## Usage

```js
const mafmt = require('mafmt')

mafmt.DNS.matches('/dns4/ipfs.io') // true
```

## API

#### `mafmt.<FORMAT>.matches(multiaddr)`

Where `<FORMAT>` may be:

| `<FORMAT>` | Description | Example(s) |
| --- | --- | --- |
| `DNS` | a "dns4" or "dns6" format multiaddr | `/dnsaddr/ipfs.io`
| `DNS4` | a "dns4" format multiaddr | `/dns4/ipfs.io` |
| `DNS6` | a "dns6" format multiaddr | `/dns6/protocol.ai/tcp/80` |
| `IP` | an "ip4" or "ip6" format multiaddr | `/ip4/127.0.0.1` <br> `/ip6/fc00::` |
| `TCP` | a "tcp" over `IP` format multiaddr | `/ip4/0.0.7.6/tcp/1234` |
| `UDP` | a "udp" over `IP` format multiaddr | `/ip4/0.0.7.6/udp/1234` |
| `QUIC` | a "quic" over `UDP` format multiaddr | `/ip4/1.2.3.4/udp/1234/quic` |
| `UTP` | a "utp" over `UDP` format multiaddr | `/ip4/1.2.3.4/udp/3456/utp` |
| `Websockets` | a "ws" over `TCP` or "ws" over `DNS` format multiaddr | `/ip4/1.2.3.4/tcp/3456/ws` <br> `/dnsaddr/ipfs.io/ws` |
| `WebSocketsSecure` | a "wss" over `TCP` or "wss" over `DNS` format multiaddr | `/ip6/::/tcp/0/wss` <br> `/dnsaddr/ipfs.io/wss` |
| `HTTP` | a "http" over `TCP` or `DNS` or "http" over `DNS` format multiaddr | `/ip4/127.0.0.1/tcp/90/http` <br> `/dnsaddr/ipfs.io/http` |
| `HTTPS` | a "https" over `TCP` or `DNS` or "https" over `DNS` format multiaddr | `/ip4/127.0.0.1/tcp/90/https` <br> `/dnsaddr/ipfs.io/https` |
| `WebRTCStar` | a "p2p" over "p2p-webrtc-star" over `Websockets` or "p2p" over "p2p-webrtc-star" over `WebSocketsSecure` format multiaddr | `/dnsaddr/ipfs.io/wss/p2p-webrtc-star/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4` |
| `WebSocketStar` | a "p2p" over "p2p-websocket-star" over `Websockets` or "p2p" over "p2p-websocket-star" over `WebSocketsSecure` or "p2p-websocket-star" over `Websockets` or "p2p-websocket-star" over `WebSocketsSecure` format multiaddr | `/ip4/1.2.3.4/tcp/3456/ws/p2p-websocket-star` <br> `/dnsaddr/localhost/ws/p2p-websocket-star/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4` |
| `WebRTCDirect` | a "p2p-webrtc-direct" over `HTTP` or "p2p-webrtc-direct" over `HTTPS` format multiaddr | `/ip4/1.2.3.4/tcp/3456/http/p2p-webrtc-direct` |
| `Reliable` | a `WebSockets` or `WebSocketsSecure` or `HTTP` or `HTTPS` or `WebRTCStar` or `WebRTCDirect` or `TCP` or `UTP` or `QUIC` format multiaddr | `/dnsaddr/ipfs.io/wss` |
| `Circuit` | | `/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4/p2p-circuit/p2p/QmUjNmr8TgJCn1Ao7DvMy4cjoZU15b9bwSCBLE3vwXiwgj` |
| `P2P` | "p2p", aka "ipfs", over `Reliable` or `WebRTCStar` or "p2p" format multiaddr | `/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4` <br> `/ip4/127.0.0.1/tcp/20008/ws/p2p/QmUjNmr8TgJCn1Ao7DvMy4cjoZU15b9bwSCBLE3vwXiwgj` |

Where `multiaddr` may be:

* a [Multiaddr](https://www.npmjs.com/package/multiaddr)
* a String
* a [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)

Returns `true`/`false`
Loading