Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

franc-cjs

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

franc-cjs

Natural language detection, for CommonJS.

  • 6.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
132
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Franc CJS

License NPM stable version
GitHub releases GitHub issues

Natural language detection library for CommonJS.

Languages

简体中文 | 繁體中文 | 日本語

Installation

NPM

You can install it directly through the npm command.

$ npm i franc-cjs --save

CDN

If you're using it in a browser, you can utilize the CDN mode.

<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.1/dist/loader.min.js?path=index&npm={'franc-cjs':'6.1.0-patch.3'}"></script>

Usage

Demo code is written using TypeScript.

import * as franc from './index';

franc.francAll('Сегодня погода такая хорошая, ты что думаешь? Я думаю, что просто так.', {
    'only': ['cmn', 'rus', 'jpn']
});  // [['rus', 1]]
franc.franc('O tempo está realmente bom hoje, o que você acha? Eu acho que é isso.');  // por
franc.franc('The weather is really nice today, don\'t you think? I think it\'s just perfect.');  // eng
franc.franc('今日の天気はとてもいいですね、どう思いますか?私はこれがちょうどいいと思います。');  // jpn
franc.franc('今天的天气真好,你觉得呢?我觉得就是这样。');  // cmn

Test

Node

Once it's compiled correctly, you can run the sample code in the terminal by using node ./dist/test-node.

Browser

To view the examples, simply access the test/ directory in your browser.

Click here to view the examples online

Original

This library is the CommonJS version of franc library. If you need the ESM-only version, please use the original version directly. This library will be updated in sync with franc library.

License

This library is published under MIT license.

Keywords

FAQs

Package last updated on 29 Feb 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc