Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
turkish-string
Advanced tools
isomorphic turkish string utilities for javascript
$ yarn add turkish-string
initialize via constructor, create or clone methods
const TurkishString = require("turkish-string");
const str1 = new TurkishString("string");
const str2 = TurkishString.create("string");
const str3 = new TurkishString(str1);
const str4 = TurkishString.create(str2);
const str5 = str4.clone();
Lowercase transform
const TurkishString = require("turkish-string");
const instance = new TurkishString("Ç-Ğ-I-İ-Ö-Ş-Ü");
const str1 = instance.toLowerCase(); //ç-ğ-ı-i-ö-ş-ü
const str2 = TurkishString.toLowerCase("Ç-Ğ-I-İ-Ö-Ş-Ü"); //ç-ğ-ı-i-ö-ş-ü
const str3 = TurkishString.toLowerCase(instance); //ç-ğ-ı-i-ö-ş-ü
Uppercase transform
const TurkishString = require("turkish-string");
const instance = new TurkishString("ç-ğ-ı-i-ö-ş-ü");
const str1 = instance.toUpperCase(); //Ç-Ğ-I-İ-Ö-Ş-Ü
const str2 = TurkishString.toUpperCase("Ç-Ğ-I-İ-Ö-Ş-Ü"); //Ç-Ğ-I-İ-Ö-Ş-Ü
const str3 = TurkishString.toUpperCase(instance); //Ç-Ğ-I-İ-Ö-Ş-Ü
Clear turkish characters
const TurkishString = require("turkish-string");
const instance = new TurkishString("Ç-Ğ-I-İ-Ö-Ş-Ü");
const str1 = instance.clear(); //C-G-I-I-O-S-U
const str2 = TurkishString.clear("Ç-Ğ-I-İ-Ö-Ş-Ü"); //C-G-I-I-O-S-U
const str3 = TurkishString.clear(instance); //C-G-I-I-O-S-U
Sorting support
For sorting TurkishString.compare
method can be use as compare function
const letters = ["ğ", "g'", "f", "e", "d", "ç", "c", "b", "a"];
const englishSorted = letters.sort();
//["a", "b", "c", "d", "e", "f", "g", "ç", "ğ"]
const turkishSorted = letters.sort(TurkishString.compare);
//["a", "b", "c", "ç", "d", "e", "f", "g", "ğ"]
Other instance and static methods
FAQs
isomorphic turkish string utilities for javascript
We found that turkish-string demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.