dev-resources.site
for different kinds of informations.
What to use instead of `@ember/string`
Published at
10/20/2023
Categories
ember
javascript
strings
Author
nullvoxpopuli
Author
13 person written this
nullvoxpopuli
open
@ember/string
is trying to be phased out -- I've found that change-case
is a better alternative to @ember/string
, because it supports more transformations, is true native ESM, and can be anywhere, even outside of ember, or in plain html files!
Here is how you migrate:
camelize
If you use camelize
in @ember/string
, use this instead:
import { camelCase } from 'change-case';
capitalize
If you use capitalize
in @ember/string
, use this instead:
import { capitalCase } from 'change-case';
classify
If you use classify
in @ember/string
, use this instead:
import { pascalCase } from 'change-case';
dasherize
If you use dasherize
in @ember/string
, use this instead:
import { kebabCase } from 'change-case';
decamelize
If you use decamelize
in @ember/string
, use this instead:
import { snakeCase } from 'change-case';
underscore
If you use underscore
in @ember/string
, use this instead:
import { snakeCase } from 'change-case';
## w
If you use w
in @ember/string
, use this instead:
let result = `long string with words`.split(/\s+/);
// ^ ['long', 'string', 'with', 'words']
ember Article's
30 articles in total
Ember.js in 60 Seconds
read article
Intro to Ember.js Components
read article
The Top 7 Reasons You Should NOT Use Ember.js on Your Next Project
read article
why don't we have a slack channel?
read article
Installing EmberJS v2 addons from GitHub forks using PNPM
read article
Add custom layer to embe-leaflet
read article
Why Ember Wins My Heart Over React β€οΈ And Maybe Yours Too!
read article
Migrate from ember-cli-deploy-sentry to sentry-cli
read article
ERR_PNPM_BAD_PM_VERSION This project is configured to use vX of pnpm. Your current pnpm is vY
read article
Fixing Package Dependencies
read article
React inside Ember - The Second Chapter
read article
π Rendering Dynamic Components in Ember.js with Embroider
read article
How to use the new Ember theme for QUnit
read article
Effects in Ember
read article
unsupported ambiguity between helper and component
read article
12 common Ember errors to know: A definitive guide on handling EmberJS errors
read article
Demystifying Ember.js Development: How to Hire the Right Developer for YourΒ Project
read article
Is Angular.js or Ember.js the better choice for JavaScript frameworks?
read article
Integrations Series: Authentication And Connection
read article
Support for in/inter page linking / scrolling in EmberJS
read article
Ember-cli config
read article
GraphQL in Your Ember App with Glimmer Apollo
read article
Setting up Tailwind, the easy way
read article
Context leaking in EmberJS tests
read article
What to use instead of `@ember/string`
currently reading
Ember Language Server in Emacs
read article
Why Ember.js is designed for Enterprise Software Development
read article
Demystifying Ember Serialization: A Comprehensive Guide
read article
ember-cli is stuck on certain version
read article
React micro-frontend in ember app - Part 2
read article
Featured ones: