-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from komodojp/feature/heavy
Add Heavy Flavor
- Loading branch information
Showing
27 changed files
with
131,630 additions
and
6,120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#! /usr/bin/env node | ||
const { detectAll } = require('../dist/tinyld.heavy.node.js') | ||
|
||
function main() { | ||
const [, , ...args] = process.argv | ||
|
||
let onlyLangs = [] | ||
let verbose = false | ||
|
||
const texts = [] | ||
for (const arg of [...args]) { | ||
if (arg.startsWith('--only=')) { | ||
onlyLangs = arg.replace('--only=', '').split(',') | ||
continue | ||
} | ||
|
||
if (arg.startsWith('--verbose') || arg.startsWith('-v')) { | ||
verbose = true | ||
continue | ||
} | ||
|
||
texts.push(arg) | ||
} | ||
const message = texts.join(' ') | ||
const options = { only: onlyLangs, verbose } | ||
console.log(detectAll(message, options)) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#! /usr/bin/env node | ||
const { detectAll } = require('../dist/tinyld.light.node.js') | ||
|
||
function main() { | ||
const [, , ...args] = process.argv | ||
|
||
let onlyLangs = [] | ||
let verbose = false | ||
|
||
const texts = [] | ||
for (const arg of [...args]) { | ||
if (arg.startsWith('--only=')) { | ||
onlyLangs = arg.replace('--only=', '').split(',') | ||
continue | ||
} | ||
|
||
if (arg.startsWith('--verbose') || arg.startsWith('-v')) { | ||
verbose = true | ||
continue | ||
} | ||
|
||
texts.push(arg) | ||
} | ||
const message = texts.join(' ') | ||
const options = { only: onlyLangs, verbose } | ||
console.log(detectAll(message, options)) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.