Socket
Socket
Sign inDemoInstall

deanglify

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    deanglify

Convert between British and American spellings


Version published
Weekly downloads
5
increased by66.67%
Maintainers
1
Install size
16.3 kB
Created
Weekly downloads
 

Readme

Source

British-American-conversion

v.0.0.1

Simple find and replace to Anglify on de-Anglify some text

The list of words comes straight from Wikipedia.

npm install deanglify

var british_test = "My favourite colour is whisky brown, which I enjoy on a wintry evening in my pyjamas while watching my favorite programmes."

var to_american = deanglify(british_test, { wholewords: false, output: "American" });
// My favorite color is whiskey brown, which I enjoy on a wintry evening in my pajamas while watching my favorite programs.

var american_test = "I apologize for my love of archeology, and please don't inquire as to my side-gig as a flutist.";

var to_british = deanglify(american_test, { wholewords: false, output: "British" });
// I apologise for my love of archaeology, and please don't enquire as to my side-gig as a flautist.

Try it out with npm test

Options

  • output: "American" or "British"
  • wholewords: Ignore plurals, etc.

Ways to improve

  • Capitalization
  • Plurals
  • Stems (civilise, civilize, etc.);

Keywords

FAQs

Last updated on 30 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc