normalize-diacritics

Normalize diacritics in strings

MIT License

Downloads
47.8K
Stars
57
Committers
9

Bot releases are hidden (Show)

normalize-diacritics - v5.0.0 Latest Release

Published by motss 6 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/motss/normalize-diacritics/compare/v4.0.3...v5.0.0

normalize-diacritics - v4.0.3

Published by motss about 1 year ago

normalize-diacritics - v4.0.0

Published by motss almost 2 years ago

Announcement

This marks the first release of supporting moduleResolution: NodeNext in TypeScript and the similar in Node.js which bring native ES Modules outside of the web, notably changes includes:

  1. Strict specifier for all imports, e.g. .js;
  2. Extensive export map for latest Node.js and TypeScript

⚠️ If you find this version does not work for you, you can instead downgrade to v3 until you are ready to adopt moduleResolution: NodeNext in TypeScript and the similar in Node.js.

What's Changed

Full Changelog: https://github.com/motss/normalize-diacritics/compare/v3.0.10...v4.0.0

normalize-diacritics - v3.0.12

Published by motss almost 2 years ago

Announcement

This marks the last release of v3 as the next major version will only support the latest module resolution in Node.js and TypeScript aka NodeNext which is closer to the native ES Modules on the web.

  1. import and exports map
  2. Strict specifier in import paths unless specified in import map for specifier-less resolution

What's Changed

Full Changelog: https://github.com/motss/normalize-diacritics/compare/v3.0.8...v3.0.12

normalize-diacritics - v3.0.8

Published by motss over 2 years ago

Changes

  1. Convert bash scripts to shell scripts
  2. Lint all shell scripts with shellcheck
normalize-diacritics - v3.0.0

Published by motss about 3 years ago

Breaking change

  1. b4041b781ae43169762782fe851b74c1ec65553a - Output ES modules only

Changes

  1. Update dependencies including TypeScript 4.4
normalize-diacritics - v2.13.2

Published by motss over 3 years ago

Changes

  • Leverage exports in package.json to support both CommonJS and ES Modules for node@14 and above
normalize-diacritics - v2.12.0

Published by motss about 4 years ago

Changes

  • Update devDependencies to resolve vulnerability issues
normalize-diacritics - Fix critical bug when repeated characters are not normalized

Published by motss over 5 years ago

Changes

  • 🐛 Now each character in an input string receives its own copy of RegExp instance for normalization, due to a bug reported in #112 which was caused by reusing the same RegExp instance will cause its internal lastIndex state to be incremented and not reset thus failing subsequent matching character in the same string to produce false when calling .test() method.
normalize-diacritics - v2.4.0

Published by motss over 5 years ago

Notable changes

  • 👷 Optimize CI build
  • 💥 Drop IIFE in favor of UMD bundle
  • ✅ Improve test structure
  • 🔧 Update Rollup config file to build UMD bundle
  • ➕ Use @reallyland/tsconfig and @reallyland/tslint-config
  • ✨ Use shx for cross-platform commands support, e.g. rm -rf
  • 📝 Update doc to include Contributing section and new demo button
normalize-diacritics - v2.2.0

Published by motss over 5 years ago

Minor code refactoring to check if the JavaScript runtime in which the code executes comes with ICU data installed. If yes, it will use the native method String.prototype.normalize to normalize strings. Without required ICU data, String.prototype.normalize has no effect on the normalization.

In this release, a simple feature detection is added to do that for you and fallbacks when necessary. This is particularly useful for modern JavaScript/ TypeScript runtime such as deno which is built without ICU data.

normalize-diacritics -

Published by motss over 5 years ago

normalize-diacritics - v2.0.0

Published by motss over 5 years ago

Improved file structure for both the web and Node.js

Notable changes

Leverage file extension that favors each different module system and environment.

  1. Use .mjs for ES Modules on Node.js
import { normalize } from 'normalize-diacritics'; /** Use `index.mjs` */
  1. Use .js for CommonJS on Node.js
const { normalize } = require('normalize-diacritics'); /** Use `index.js` */
  1. Default .js for ES Modules on the web
<script type="module">
  import { normalize } from 'https://unpkg.com/normalize-diacritics@latest/dist/normalize-diacritics.js';
</script>
  1. Use .iife.js for IIFE on the web
<script src="https://unpkg.com/normalize-diacritics@latest/dist/normalize-diacritics.iife.js"></script>
<script>
  const { normalize } = window.NormalizeDiacritics;
</script>
normalize-diacritics - 🎉 v1.0.0 stable release

Published by motss almost 6 years ago

Notable changes:-

  1. Now ship with multiple bundles:

    a. esm - Targeting native ES modules such as TypeScript.
    b. cjs - Targeting Node.js with CommonJS.
    c. iife - Targeting older browsers by compiling to IIFE and ES5.

  2. Fixed a bug where single-character string is not being normalized.

  3. Alternatively, you can rely on third-party services to grab the bundle: unpkg and jsdelivr.

Deno support

It's cool to see this project gaining traction by the community. Because of that, I've decided to add more support for this particular project. It's officially supported as a deno package and is available at awesome-deno where it lists all the deno packages by the community.

Try it now as of today!

import { normalize } from 'https://denopkg.com/motss/[email protected]/index.ts';

(async () => {
  const str = 'söme stüff with áccènts';

  await normalize(str); // 'some stuff with accents'
})();
normalize-diacritics - Now in TypeScript with new features

Published by motss almost 7 years ago

  • 💥 A major rewrite of the entire package in TypeScript

  • ✨ : Revised the available methods the package offers, now it comes with async method by default and you can choose to use a sync-version of the method:

    • normalize(input) - Normalizing strings that contains accents/ diacritics via async/ await under the hood.
    • normalizeSync(input) - The synchronous version of the normalization method.

🔥 🔥 🔥Have fun!

Package Rankings
Top 2.85% on Npmjs.org
Badges
Extracted from project README
Follow me Version Node version MIT License Downloads Total downloads Packagephobia Bundlephobia ci codecov Code of Conduct Edit normalize-diacritics demo