Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internationalization #4

Merged
merged 2 commits into from
Apr 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# [is](https://github.com/yanhaijing/is) [![](https://img.shields.io/badge/Powered%20by-jslib%20base-brightgreen.svg)](https://github.com/yanhaijing/jslib-base) [![npm](https://img.shields.io/badge/npm-0.8.2-orange.svg)](https://www.npmjs.com/package/@jsmini/is) [![Build Status](https://travis-ci.org/jsmini/is.svg?branch=master)](https://travis-ci.org/jsmini/is) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jsmini/is/blob/master/LICENSE)
js判断函数,解决80%类型判断问题,原生兼容IE6

[English](./README.md) | 简体中文

## 兼容性
单元测试保证支持如下环境:

| IE | CH | FF | SF | OP | IOS | 安卓 | Node |
| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ----- |
| 6+ | 23+ | 4+ | 6+ | 10+ | 5+ | 2.3+ | 0.10+ |

## 目录介绍

```
.
├── demo 使用demo
├── dist 编译产出代码
├── doc 项目文档
├── src 源代码目录
├── test 单元测试
├── CHANGELOG.md 变更日志
└── TODO.md 计划功能
```

## 如何使用
通过npm下载安装代码

```bash
$ npm install --save @jsmini/is
```

如果你是node环境

```js
var isNumber = require('@jsmini/is').isNumber;

isNumber(1) // true
```

如果你是webpack等环境

```js
import { isNumber } from '@jsmini/is';

isNumber(1) // true
```

如果你是requirejs环境

```js
requirejs(['node_modules/@jsmini/is/dist/index.aio.js'], function (jsmini_is) {
var isNumber = jsmini_is.isNumber;

isNumber(1) // true
})
```

如果你是浏览器环境

```html
<script src="node_modules/@jsmini/is/dist/index.aio.js"></script>

<script>
var isNumber = jsmini_is.isNumber;

isNumber(1) // true
</script>
```

## 文档
[API](https://github.com/jsmini/is/blob/master/doc/api.md)

## 贡献指南 ![PRs welcome](<https://img.shields.io/badge/PRs-welcome-brightgreen.svg>)
首次运行需要先安装依赖

```bash
$ npm install
```

一键打包生成生产代码

```bash
$ npm run build
```

运行单元测试,浏览器环境需要手动测试,位于`test/browser`

```bash
$ npm test
```

修改package.json中的版本号,修改README.md中的版本号,修改CHANGELOG.md,然后发布新版

```bash
$ npm run release
```

将新版本发布到npm

```bash
$ npm publish --access=public
```

可能需要你自己修改的地方如下:

- README.md 中的信息
- package.json 中的信息
- config/rollup.js 中的信息
- test/browser/index.html 中的仓库名称

## 贡献者列表

[contributors](<https://github.com/jsmini/is/graphs/contributors>)

## 更新日志

[CHANGELOG.md](https://github.com/jsmini/is/blob/master/CHANGELOG.md)

## 计划列表
[TODO.md](https://github.com/jsmini/is/blob/master/TODO.md)

## 谁在使用
85 changes: 50 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,56 @@
# [is](https://github.com/yanhaijing/is) [![](https://img.shields.io/badge/Powered%20by-jslib%20base-brightgreen.svg)](https://github.com/yanhaijing/jslib-base) [![npm](https://img.shields.io/badge/npm-0.8.2-orange.svg)](https://www.npmjs.com/package/@jsmini/is) [![Build Status](https://travis-ci.org/jsmini/is.svg?branch=master)](https://travis-ci.org/jsmini/is) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jsmini/is/blob/master/LICENSE)

js判断函数,解决80%类型判断问题,原生兼容IE6

## 兼容性
单元测试保证支持如下环境:
Type checking function. fixed 80% of type checking problem

English | [简体中文](./README-zh_CN.md)

## Environment Support

| IE | CH | FF | SF | OP | IOS | 安卓 | Node |
| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ----- |
| 6+ | 23+ | 4+ | 6+ | 10+ | 5+ | 2.3+ | 0.10+ |
unit test ensure it supports the following environments.

## 目录介绍
| IE/Edge | Chrome | Firefox | Safari | Opera | IOS | Android | Node |
| ------- | ------ | ------- | ------ | ----- | ---- | ------- | ----- |
| 6+ | 23+ | 4+ | 6+ | 10+ | 5+ | 2.3+ | 0.10+ |

## Directory

```
.
├── demo 使用demo
├── dist 编译产出代码
├── doc 项目文档
├── src 源代码目录
├── test 单元测试
├── CHANGELOG.md 变更日志
└── TODO.md 计划功能
├── demo
├── dist # production code
├── doc # document
├── src # source code
├── test # unit test
├── CHANGELOG.md
└── TODO.md
```

## 如何使用
通过npm下载安装代码
## Usage
npm installation

```bash
$ npm install --save @jsmini/is
```

如果你是node环境
Node.js

```js
var isNumber = require('@jsmini/is').isNumber;

isNumber(1) // true
```

如果你是webpack等环境
webpack

```js
import { isNumber } from '@jsmini/is';

isNumber(1) // true
```

如果你是requirejs环境
Require.js

```js
requirejs(['node_modules/@jsmini/is/dist/index.aio.js'], function (jsmini_is) {
Expand All @@ -54,7 +60,7 @@ requirejs(['node_modules/@jsmini/is/dist/index.aio.js'], function (jsmini_is) {
})
```

如果你是浏览器环境
Browser

```html
<script src="node_modules/@jsmini/is/dist/index.aio.js"></script>
Expand All @@ -66,51 +72,60 @@ requirejs(['node_modules/@jsmini/is/dist/index.aio.js'], function (jsmini_is) {
</script>
```

## 文档
[API](https://github.com/jsmini/is/blob/master/doc/api.md)
## Document

- [API](https://github.com/jsmini/is/blob/master/doc/api.md)

## 贡献指南
首次运行需要先安装依赖
## Contributing Guide ![PRs welcome](<https://img.shields.io/badge/PRs-welcome-brightgreen.svg>)
when initialize, install dependencies

```bash
$ npm install
```

一键打包生成生产代码
builds your code for production to `build` folder

```bash
$ npm run build
```

运行单元测试,浏览器环境需要手动测试,位于`test/browser`
run unit test. notice: borwser enviroment need to test manually. test file is in `test/browser`

```bash
$ npm test
```

修改package.json中的版本号,修改README.md中的版本号,修改CHANGELOG.md,然后发布新版
change the version in package.json and README.md, add your description in CHANGELOG.md, and then release it happily.

```bash
$ npm run release
```

将新版本发布到npm
publish the new package to npm

```bash
$ npm publish --access=public
```

可能需要你自己修改的地方如下:
Maybe you should change relative information in the follow files

- README.md
- package.json
- config/rollup.js
- test/browser/index.html

```bash
$ npm run rename # rename command
```

## Contributors

- README.md 中的信息
- package.json 中的信息
- config/rollup.js 中的信息
- test/browser/index.html 中的仓库名称
[contributors](<https://github.com/jsmini/is/graphs/contributors>)

## 更新日志
## CHANGELOG
[CHANGELOG.md](https://github.com/jsmini/is/blob/master/CHANGELOG.md)

## 计划列表
## TODO
[TODO.md](https://github.com/jsmini/is/blob/master/TODO.md)

## 谁在使用
## who is using