Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.19 KB

DEPRECATIONS.md

File metadata and controls

43 lines (30 loc) · 1.19 KB

1.0.0

fmt

until: 2.0.0

id: ember-string-fmt

This utility was included to ease the transition from the internal Ember string package to this addon. We suggest that you update your code to use ES2015 template strings.

For example, if you have the following fmt uses:

import { fmt } from "@ember/string";

let firstName = "John";
let lastName = "Doe";

fmt("Hello %@ %@", firstName, lastName); // "Hello John Doe"
fmt("Hello %@2, %@1", firstName, lastName); // "Hello Doe, John"

You can instead use the following template strings:

import { fmt } from "@ember/string";

let firstName = "John";
let lastName = "Doe";

`Hello ${firstName} ${lastName}` // "Hello John Doe"
`Hello ${lastName}, ${firstName}` // "Hello Doe, John"

loc

until: 2.0.0

id: ember-string-loc

This utility was included to ease the transition from the internal Ember string package to this addon. You can consult the Ember deprecation guide for loc for further instructions on how to update your code.