---
labels: ['NerfDart', 'module']
description: 'Maps a URL to an identifier.'
---

```ts
import { nerfDart } from 'nerf-dart'

nerfDart('http://registry.npmjs.org')
//> //registry.npmjs.org/
```

Originally from npm. Taken from <https://github.com/npm/cli/blob/latest/workspaces/config/lib/nerf-dart.js> and made available as a standalone package for easier reuse.
