ukrbublik / name-case-lib-port Goto Github PK
View Code? Open in Web Editor NEWPort of NameCaseLib for PHP. Склонение ФИО русского и украинского языков
Port of NameCaseLib for PHP. Склонение ФИО русского и украинского языков
Here is my code:
const GENDER_M = 1;
const GENDER_W = 2;
const C_NOMINATIVE = 1; // (називний)
const C_GENITIVE = 2; // (родовий)
const C_DATIVE = 3; // (давальний)
const C_ACCUSATIVE = 4; // (знахідний)
const C_INSTRUMENTAL = 5; // (орудний)
const C_LOCATIVE = 6; // (місцевий)
const C_VOCATIVE = 7; // (кличний)
var ncl = new NCLNameCaseUa();
var result = ncl.qFirstName('Тарас', C_GENITIVE, GENDER_M);
console.log(result);
It will raise an error with the message:
Caution
getWordCase is not defined
readyArr.push(getWordCase(words[index], number));
^
Please take a look at this line, here we should use an array instead of an object:
name-case-lib-port/src/NCL/NCLNameCaseCore.js
Line 793 in b5f0dc6
// instead this
var readyArr = {};
// we need this
var readyArr = [];
Also, we should use a keyword this
:
name-case-lib-port/src/NCL/NCLNameCaseCore.js
Line 795 in b5f0dc6
// instead this
readyArr.push(getWordCase(words[index], number));
// we need this
readyArr.push(this.getWordCase(this.words[index], number));
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.