内容简介:nginScript 是 JavaScript 语言的一个子集,其可在nginScript 可用于以下两个模块:这两个模块都不是默认构建的,它们应该从源文件中编译或者作为一个 Linux 软件包来安装
nginScript 是 JavaScript 语言的一个子集,其可在 http 和 stream 中实现位置(location)和变量处理器。nginScript 符合 ECMAScript 5.1 规范和部分 ECMAScript 6 扩展。合规性仍在不断发展。
目前支持什么
- 布尔值、数字、字符串、对象、数组、函数和正则表达式
- ES5.1 运算符,ES7 幂运算符
-
ES5.1语句:
var、if、else、switch、for、for in、while、do while、break、continue、return、try、catch、throw、finally -
ES6
Number和Math的属性和方法 -
String方法:-
ES5.1:
fromCharCode、concat、slice、substring、substr、charAt、charCodeAt、indexOf、lastIndexOf、toLowerCase、toUpperCase、trim、search、match、split、replace -
ES6:
fromCodePoint、codePointAt、includes、startsWith、endsWith、repeat -
非标准:
fromUTF8、toUTF8、fromBytes、toBytes
-
ES5.1:
-
Object方法:-
ES5.1:
create(不支持属性列表),keys、defineProperty、defineProperties、getOwnPropertyDescriptor、getPrototypeOf、hasOwnProperty、isPrototypeOf、preventExtensions、isExtensible、freeze、isFrozen、seal、isSealed
-
ES5.1:
-
Array方法:-
ES5.1:
isArray、slice、splice、push、pop、unshift、shift、reverse、sort、join、concat、indexOf、lastIndexOf、forEach、some、every、filter、map、reduce、reduceRight -
ES6:
of、fill、find、findIndex -
ES7:
includes
-
ES5.1:
-
ES5.1
Function方法:call、apply、bind -
ES5.1
RegExp方法:test、exec -
ES5.1
Date方法 -
ES5.1 全局函数:
isFinite、isNaN、parseFloat、parseInt、decodeURI、decodeURIComponent、encodeURI、encodeURIComponent
还不支持什么
-
ES6
let和const声明 - 标签
-
arguments数组 -
eval函数 -
JSON对象 -
Error对象 -
setTimeout、setInterval、setImmediate函数 - 非整数分数(.235),二进制(0b0101),八进制(0o77)字面量
下载与安装
nginScript 可用于以下两个模块:
这两个模块都不是默认构建的,它们应该从源文件中编译或者作为一个 Linux 软件包来安装
Linux 包安装方式
在 Linux 环境中,可以使用 nginScript 模块 包 :
-
nginx-module-njs- nginScript 动态模块 -
nginx-module-njs-dbg-nginx-module-njs包的调试符号
源码构建方式
可以使用以下命令克隆 nginScript 的源码 仓库 :(需要 Mercurial 客户端):
hg clone http://hg.nginx.org/njs
然后使用 --add-module
配置参数进行编译模块:
./configure --add-module=path-to-njs/nginx
该模块也可以构建为 动态的 :
./configure --add-dynamic-module=path-to-njs/nginx
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- 觅道文档 v0.6.0 发布,在线文档系统
- 一个适合程序员的 Markdown 文档编辑和文档管理方案
- 【微服务】如何优雅的写文档(文档自动化swagger)
- 利用Python3内置文档资源高效学习及官方中文文档
- 什么是 API 文档工具?附带 6 款好用的 API 文档工具介绍
- VirAPI 接口文档导出功能上线,可分享并离线查看接口文档啦!
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Haskell Programming from first principles
Christopher Allen、Julie Moronuki / 2015 / USD 59.00
I am writing this book because I had a hard time learning Haskell. It doesn't have to be that way. I've spent the last couple years actively teaching Haskell online and in person. Along the way, I ......一起来看看 《Haskell Programming from first principles》 这本书的介绍吧!