Skip to content

Commit 5453fd3

Browse files
committed
improve functions
1 parent edf72f8 commit 5453fd3

File tree

4 files changed

+11
-17
lines changed

4 files changed

+11
-17
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
# myanmar-notation
22
...`get()` Myanmar digital and notation
33

4-
[![Build Status][travis]][travis-url]
5-
[![code style: prettier][prettier]][prettier-url]
6-
[![npm][npm-download]][npm-dl-url]
7-
[![contributions welcome][contri]][contri-url]
8-
[![License: MIT][license]][license-url]
4+
> ...
5+
96

107
Install `npm i myanmar-notation` then require...
118

notation.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = class Notation {
66
// 1:"ခု",
77
tone:{1:"", 2:"ဆယ်", 3:"ရာ", 4:"ထောင်", 5:"သောင်း", 6:"သိန်း", 7:"သန်း", 8:"ကု​ဋေ​"},
88
creaky:{2:"ဆယ့်",3:"ရာ့",4:"ထောင့်"},
9-
conjunction:{space:" ",comma:"၊ ",and:"နှင့်",plus:"ပေါင်း",over:"ကျော်",times:"ကြိမ်":dot:"ဒဿမ"},
9+
conjunction:{space:" ",comma:"၊ ",and:"နှင့်",plus:"ပေါင်း",over:"ကျော်",times:"ကြိမ်",dot:"ဒဿမ"},
1010
task:[6,7,8]
1111
}
1212
}
@@ -29,18 +29,17 @@ module.exports = class Notation {
2929
return {
3030
Numeric:(t)?n:this.requestDigit(n),
3131
Notation:this.config.task.map(k=>{
32-
return this.requestTask(q,k);
32+
return this.requestSense(q,k);
3333
}).filter(function(e){return e})
3434
};
3535
}
36-
requestTask(q,s) {
36+
requestSense(q,s) {
3737
if (q.length <= s) {
3838
if (this.config.task.length) {
3939
this.config.task=[];
4040
return {
41-
// sense:this.requestCreakyTone(q)
4241
sense:this.requestWrittenTone(q)
43-
}
42+
};
4443
}
4544
return false;
4645
}

test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ let query = process.argv.slice(2)[0];
88

99
let test = new notation();
1010
let raw = test.get(query);
11-
raw.Query=query;
11+
// raw.Query=query;
1212
fs.writeFile("./test.json", JSON.stringify(raw, null, 2), 'utf8', function (err) {
1313
if (err) {
1414
return console.log(err);
1515
}
16-
console.log(" ...done",new notation().config.name);
17-
// let abc = test.requestPrime(1,6,true);
18-
// console.log(abc);
16+
console.log(" ...done");
1917
});
2018
/*
2119
100000

test.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"Numeric": "၁၂၃,ဝဝဝ",
2+
"Numeric": "၁၂,၃ဝဝ",
33
"Notation": [
44
{
5-
"sense": "တစ်သိန်းနှစ်သောင်းနှင့်သုံးထောင်"
5+
"sense": "တစ်သောင်းနှစ်ထောင်နှင့်သုံးရာ"
66
}
77
],
8-
"Query": "123000"
8+
"Query": "12300"
99
}

0 commit comments

Comments
 (0)