0a1fce450c
- 删除三套旧菜单系统 (MainMenu.cs, MainMenuUI.cs, ModeSelectionUI.cs) - Ground 添加 BoxCollider 并设置 tag 为 Ground - UIManager.OnReturnClicked 改为通过 PageController 返回首页 - PageController 增加 ReturnToHome 方法,管理 BtnFixationBack 可见性 - 清理废弃场景 Experiment.unity / ModeSelection.unity 及历史截图
2.2 KiB
2.2 KiB
range-parser
Range header field parser.
Installation
This is a Node.js module available through the
npm registry. Installation is done using the
npm install command:
$ npm install range-parser
API
var parseRange = require('range-parser')
parseRange(size, header, options)
Parse the given header string where size is the maximum size of the resource.
An array of ranges will be returned or negative numbers indicating an error parsing.
-2signals a malformed header string-1signals an unsatisfiable range
// parse header from request
var range = parseRange(size, req.headers.range)
// the type of the range
if (range.type === 'bytes') {
// the ranges
range.forEach(function (r) {
// do something with r.start and r.end
})
}
Options
These properties are accepted in the options object.
combine
Specifies if overlapping & adjacent ranges should be combined, defaults to false.
When true, ranges will be combined and returned as if they were specified that
way in the header.
parseRange(100, 'bytes=50-55,0-10,5-10,56-60', { combine: true })
// => [
// { start: 0, end: 10 },
// { start: 50, end: 60 }
// ]