github bramstein/url-template v3.0.0

latest release: v3.1.0
10 months ago

New Features ✨

  • Package is now distributed in the ECMAScript module syntax (see #36).
  • Definitions for TypeScript are now included out of the box (see #37).

Enhancements 📝

  • The the NPM package only includes the production files (see #23).

Breaking Changes 💥

  • Support for Bower has been dropped, use NPM or another package manager instead.
  • Some functions that were already marked as private are now no longer available (see #37).
  • Support for CommonJS modules has been dropped, use the ES module import instead (see migration guide).
  • The default export has been changed to a named export (see migration guide).

Migration 🚚

Use the new import

Previously when importing a default export would be provided with methods attached to it, this has been replaced with a named one.

This means the following code:

const template = require('url-template');
const emailUrlTemplate = template.parse('/{email}/{folder}/{id}');

Will become:

const { parseTemplate } = require('url-template');
const emailUrlTemplate = parseTemplate('/{email}/{folder}/{id}');

Or, alternatively if you are running an environment where ECMAScript modules are supported:

import { parseTemplate } from 'url-template';
const emailUrlTemplate = parseTemplate('/{email}/{folder}/{id}');


If you are a user of TypeScript you can remove @types/url-template from your project. The type definitions are now included in the package itself, so it is no longer required to keep a separate dependency around.

npm uninstall @types/url-template

Don't miss a new url-template release

NewReleases is sending notifications on new releases.