🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

i18n-service-tool

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18n-service-tool

> `npm i i18n-service-tool -S`

latest
Source
npmnpm
Version
1.1.3
Version published
Maintainers
1
Created
Source

i18n-service tools

npm i i18n-service-tool -S

download

write the scripts in your js, then run that js

const path = require('path');
const download = require('i18n-service-tool/download');

const dir = path.resolve(__dirname, '../server/i18n/temp/');

download({
  server: 'http://8.8.8.8:50011/',
  locales: ['zh-CN', 'en'],
  site: 'test',
  // 将指定的context设为公共context,下载的时候打平到json,便于调用
  // {"com": {"a": 1, "b": 2}, "c": 3} => {"a": 1, "b": 2, "c": 3}
  flatContext: 'com', 
  extension: '.json',
  transform: function(data) {
    return JSON.stringify(data, null, 2);
  },
  dir: dir
}).then(data => {
  console.log('download i18n success');
}).catch(err => {
  console.log(err)
  console.log('download i18n error');
});

pass

const pass = require('i18n-service-tool/pass');

// 生成密码
let hash = pass.generate('password');

// 对比密码
let isPasswprdRight = pass.compare('password', hash);

FAQs

Package last updated on 17 Oct 2018

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