Commit 536aedb0 authored by wildfirecode's avatar wildfirecode

1

parent 1b9f53fd

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

# @babel/code-frame
> Generate errors that contain a code frame that point to source locations.
## Install
```sh
npm install --save-dev @babel/code-frame
```
## Usage
```js
import { codeFrameColumns } from '@babel/code-frame';
const rawLines = `class Foo {
constructor()
}`;
const location = { start: { line: 2, column: 16 } };
const result = codeFrameColumns(rawLines, location, { /* options */ });
console.log(result);
```
```
1 | class Foo {
> 2 | constructor()
| ^
3 | }
```
If the column number is not known, you may omit it.
You can also pass an `end` hash in `location`.
```js
import { codeFrameColumns } from '@babel/code-frame';
const rawLines = `class Foo {
constructor() {
console.log("hello");
}
}`;
const location = { start: { line: 2, column: 17 }, end: { line: 4, column: 3 } };
const result = codeFrameColumns(rawLines, location, { /* options */ });
console.log(result);
```
```
1 | class Foo {
> 2 | constructor() {
| ^
> 3 | console.log("hello");
| ^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 | }
| ^^^
5 | };
```
## Options
### `highlightCode`
`boolean`, defaults to `false`.
Toggles syntax highlighting the code as JavaScript for terminals.
### `linesAbove`
`number`, defaults to `2`.
Adjust the number of lines to show above the error.
### `linesBelow`
`number`, defaults to `3`.
Adjust the number of lines to show below the error.
### `forceColor`
`boolean`, defaults to `false`.
Enable this to forcibly syntax highlight the code as JavaScript (for non-terminals); overrides `highlightCode`.
### `message`
`string`, otherwise nothing
Pass in a string to be displayed inline (if possible) next to the highlighted
location in the code. If it can't be positioned inline, it will be placed above
the code frame.
```
1 | class Foo {
> 2 | constructor()
| ^ Missing {
3 | };
```
## Upgrading from prior versions
Prior to version 7, the only API exposed by this module was for a single line and optional column pointer. The old API will now log a deprecation warning.
The new API takes a `location` object, similar to what is available in an AST.
This is an example of the deprecated (but still available) API:
```js
import codeFrame from '@babel/code-frame';
const rawLines = `class Foo {
constructor()
}`;
const lineNumber = 2;
const colNumber = 16;
const result = codeFrame(rawLines, lineNumber, colNumber, { /* options */ });
console.log(result);
```
To get the same highlighting using the new API:
```js
import { codeFrameColumns } from '@babel/code-frame';
const rawLines = `class Foo {
constructor() {
console.log("hello");
}
}`;
const location = { start: { line: 2, column: 16 } };
const result = codeFrameColumns(rawLines, location, { /* options */ });
console.log(result);
```
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.codeFrameColumns = codeFrameColumns;
exports.default = _default;
function _highlight() {
const data = _interopRequireWildcard(require("@babel/highlight"));
_highlight = function () {
return data;
};
return data;
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
let deprecationWarningShown = false;
function getDefs(chalk) {
return {
gutter: chalk.grey,
marker: chalk.red.bold,
message: chalk.red.bold
};
}
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
function getMarkerLines(loc, source, opts) {
const startLoc = Object.assign({
column: 0,
line: -1
}, loc.start);
const endLoc = Object.assign({}, startLoc, loc.end);
const {
linesAbove = 2,
linesBelow = 3
} = opts || {};
const startLine = startLoc.line;
const startColumn = startLoc.column;
const endLine = endLoc.line;
const endColumn = endLoc.column;
let start = Math.max(startLine - (linesAbove + 1), 0);
let end = Math.min(source.length, endLine + linesBelow);
if (startLine === -1) {
start = 0;
}
if (endLine === -1) {
end = source.length;
}
const lineDiff = endLine - startLine;
const markerLines = {};
if (lineDiff) {
for (let i = 0; i <= lineDiff; i++) {
const lineNumber = i + startLine;
if (!startColumn) {
markerLines[lineNumber] = true;
} else if (i === 0) {
const sourceLength = source[lineNumber - 1].length;
markerLines[lineNumber] = [startColumn, sourceLength - startColumn];
} else if (i === lineDiff) {
markerLines[lineNumber] = [0, endColumn];
} else {
const sourceLength = source[lineNumber - i].length;
markerLines[lineNumber] = [0, sourceLength];
}
}
} else {
if (startColumn === endColumn) {
if (startColumn) {
markerLines[startLine] = [startColumn, 0];
} else {
markerLines[startLine] = true;
}
} else {
markerLines[startLine] = [startColumn, endColumn - startColumn];
}
}
return {
start,
end,
markerLines
};
}
function codeFrameColumns(rawLines, loc, opts = {}) {
const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts);
const chalk = (0, _highlight().getChalk)(opts);
const defs = getDefs(chalk);
const maybeHighlight = (chalkFn, string) => {
return highlighted ? chalkFn(string) : string;
};
if (highlighted) rawLines = (0, _highlight().default)(rawLines, opts);
const lines = rawLines.split(NEWLINE);
const {
start,
end,
markerLines
} = getMarkerLines(loc, lines, opts);
const hasColumns = loc.start && typeof loc.start.column === "number";
const numberMaxWidth = String(end).length;
let frame = lines.slice(start, end).map((line, index) => {
const number = start + 1 + index;
const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
const gutter = ` ${paddedNumber} | `;
const hasMarker = markerLines[number];
const lastMarkerLine = !markerLines[number + 1];
if (hasMarker) {
let markerLine = "";
if (Array.isArray(hasMarker)) {
const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
const numberOfMarkers = hasMarker[1] || 1;
markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
if (lastMarkerLine && opts.message) {
markerLine += " " + maybeHighlight(defs.message, opts.message);
}
}
return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
} else {
return ` ${maybeHighlight(defs.gutter, gutter)}${line}`;
}
}).join("\n");
if (opts.message && !hasColumns) {
frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
}
if (highlighted) {
return chalk.reset(frame);
} else {
return frame;
}
}
function _default(rawLines, lineNumber, colNumber, opts = {}) {
if (!deprecationWarningShown) {
deprecationWarningShown = true;
const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
if (process.emitWarning) {
process.emitWarning(message, "DeprecationWarning");
} else {
const deprecationError = new Error(message);
deprecationError.name = "DeprecationWarning";
console.warn(new Error(message));
}
}
colNumber = Math.max(colNumber, 0);
const location = {
start: {
column: colNumber,
line: lineNumber
}
};
return codeFrameColumns(rawLines, location, opts);
}
\ No newline at end of file
{
"_args": [
[
"@babel/code-frame@7.0.0-beta.49",
"/Users/wanghongyuan/generator-dbgame"
]
],
"_development": true,
"_from": "@babel/code-frame@7.0.0-beta.49",
"_id": "@babel/code-frame@7.0.0-beta.49",
"_inBundle": false,
"_integrity": "sha1-vs2AVIJzREDJ0TfkbXc0DmTX9Rs=",
"_location": "/@babel/code-frame",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@babel/code-frame@7.0.0-beta.49",
"name": "@babel/code-frame",
"escapedName": "@babel%2fcode-frame",
"scope": "@babel",
"rawSpec": "7.0.0-beta.49",
"saveSpec": null,
"fetchSpec": "7.0.0-beta.49"
},
"_requiredBy": [
"/jest-message-util"
],
"_resolved": "http://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.0.0-beta.49.tgz",
"_spec": "7.0.0-beta.49",
"_where": "/Users/wanghongyuan/generator-dbgame",
"author": {
"name": "Sebastian McKenzie",
"email": "sebmck@gmail.com"
},
"dependencies": {
"@babel/highlight": "7.0.0-beta.49"
},
"description": "Generate errors that contain a code frame that point to source locations.",
"devDependencies": {
"chalk": "^2.0.0",
"strip-ansi": "^4.0.0"
},
"homepage": "https://babeljs.io/",
"license": "MIT",
"main": "lib/index.js",
"name": "@babel/code-frame",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame"
},
"version": "7.0.0-beta.49"
}
# @babel/highlight
> Syntax highlight JavaScript strings for output in terminals.
## Install
```sh
npm install --save @babel/highlight
```
## Usage
```js
import highlight from "@babel/highlight";
const code = `class Foo {
constructor()
}`;
const result = highlight(code);
console.log(result);
```
```js
class Foo {
constructor()
}
```
By default, `highlight` will not highlight your code if your terminal does not support color. To force colors, pass `{ forceColor: true }` as the second argument to `highlight`.
```js
import highlight from "@babel/highlight";
const code = `class Foo {
constructor()
}`;
const result = highlight(code, { forceColor: true });
```
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.shouldHighlight = shouldHighlight;
exports.getChalk = getChalk;
exports.default = highlight;
function _jsTokens() {
const data = _interopRequireWildcard(require("js-tokens"));
_jsTokens = function () {
return data;
};
return data;
}
function _esutils() {
const data = _interopRequireDefault(require("esutils"));
_esutils = function () {
return data;
};
return data;
}
function _chalk() {
const data = _interopRequireDefault(require("chalk"));
_chalk = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function getDefs(chalk) {
return {
keyword: chalk.cyan,
capitalized: chalk.yellow,
jsx_tag: chalk.yellow,
punctuator: chalk.yellow,
number: chalk.magenta,
string: chalk.green,
regex: chalk.magenta,
comment: chalk.grey,
invalid: chalk.white.bgRed.bold
};
}
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
const JSX_TAG = /^[a-z][\w-]*$/i;
const BRACKET = /^[()[\]{}]$/;
function getTokenType(match) {
const [offset, text] = match.slice(-2);
const token = (0, _jsTokens().matchToToken)(match);
if (token.type === "name") {
if (_esutils().default.keyword.isReservedWordES6(token.value)) {
return "keyword";
}
if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
return "jsx_tag";
}
if (token.value[0] !== token.value[0].toLowerCase()) {
return "capitalized";
}
}
if (token.type === "punctuator" && BRACKET.test(token.value)) {
return "bracket";
}
if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
return "punctuator";
}
return token.type;
}
function highlightTokens(defs, text) {
return text.replace(_jsTokens().default, function (...args) {
const type = getTokenType(args);
const colorize = defs[type];
if (colorize) {
return args[0].split(NEWLINE).map(str => colorize(str)).join("\n");
} else {
return args[0];
}
});
}
function shouldHighlight(options) {
return _chalk().default.supportsColor || options.forceColor;
}
function getChalk(options) {
let chalk = _chalk().default;
if (options.forceColor) {
chalk = new (_chalk().default.constructor)({
enabled: true,
level: 1
});
}
return chalk;
}
function highlight(code, options = {}) {
if (shouldHighlight(options)) {
const chalk = getChalk(options);
const defs = getDefs(chalk);
return highlightTokens(defs, code);
} else {
return code;
}
}
\ No newline at end of file
{
"_args": [
[
"@babel/highlight@7.0.0-beta.49",
"/Users/wanghongyuan/generator-dbgame"
]
],
"_development": true,
"_from": "@babel/highlight@7.0.0-beta.49",
"_id": "@babel/highlight@7.0.0-beta.49",
"_inBundle": false,
"_integrity": "sha1-lr3GtD4TSCASumaRsQGEktOWIsw=",
"_location": "/@babel/highlight",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@babel/highlight@7.0.0-beta.49",
"name": "@babel/highlight",
"escapedName": "@babel%2fhighlight",
"scope": "@babel",
"rawSpec": "7.0.0-beta.49",
"saveSpec": null,
"fetchSpec": "7.0.0-beta.49"
},
"_requiredBy": [
"/@babel/code-frame"
],
"_resolved": "http://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.0.0-beta.49.tgz",
"_spec": "7.0.0-beta.49",
"_where": "/Users/wanghongyuan/generator-dbgame",
"author": {
"name": "suchipi",
"email": "me@suchipi.com"
},
"dependencies": {
"chalk": "^2.0.0",
"esutils": "^2.0.2",
"js-tokens": "^3.0.0"
},
"description": "Syntax highlight JavaScript strings for output in terminals.",
"devDependencies": {
"strip-ansi": "^4.0.0"
},
"homepage": "https://babeljs.io/",
"license": "MIT",
"main": "lib/index.js",
"name": "@babel/highlight",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-highlight"
},
"version": "7.0.0-beta.49"
}
# Change Log
All notable changes will be documented in this file.
`readdir-enhanced` adheres to [Semantic Versioning](http://semver.org/).
## [v2.2.0](https://github.com/BigstickCarpet/readdir-enhanced/tree/v2.2.0) (2018-01-09)
- Refactored the codebase to use ES6 syntax (Node v4.x compatible)
- You can now provide [your own implementation](https://github.com/BigstickCarpet/readdir-enhanced#custom-fs-methods) for the [filesystem module](https://nodejs.org/api/fs.html) that's used by `readdir-enhanced`. Just set the `fs` option to your implementation. Thanks to [@mrmlnc](https://github.com/mrmlnc) for the idea and [the PR](https://github.com/BigstickCarpet/readdir-enhanced/pull/10)!
- [Better error handling](https://github.com/BigstickCarpet/readdir-enhanced/commit/0d330b68524bafbdeae11566a3e8af1bc3f184bf), especially around user-specified logic, such as `options.deep`, `options.filter`, and `options.fs`
[Full Changelog](https://github.com/BigstickCarpet/readdir-enhanced/compare/v2.1.0...v2.2.0)
## [v2.1.0](https://github.com/BigstickCarpet/readdir-enhanced/tree/v2.1.0) (2017-12-01)
- The `fs.Stats` objects now include a `depth` property, which indicates the number of subdirectories beneath the base path. Thanks to [@mrmlnc](https://github.com/mrmlnc) for [the PR](https://github.com/BigstickCarpet/readdir-enhanced/pull/8)!
[Full Changelog](https://github.com/BigstickCarpet/readdir-enhanced/compare/v2.0.0...v2.1.0)
## [v2.0.0](https://github.com/BigstickCarpet/readdir-enhanced/tree/v2.0.0) (2017-11-15)
- Dropped support for Node v0.x, which is no longer actively maintained. Please upgrade to Node 4 or newer.
[Full Changelog](https://github.com/BigstickCarpet/readdir-enhanced/compare/v1.5.0...v2.0.0)
## [v1.5.0](https://github.com/BigstickCarpet/readdir-enhanced/tree/v1.5.0) (2017-04-10)
The [`deep` option](README.md#deep) can now be set to a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp), a [glob pattern](https://github.com/isaacs/node-glob#glob-primer), or a function, which allows you to customize which subdirectories get crawled. Of course, you can also still still set the `deep` option to `true` to crawl _all_ subdirectories, or a number if you just want to limit the recursion depth.
[Full Changelog](https://github.com/BigstickCarpet/readdir-enhanced/compare/v1.4.0...v1.5.0)
## [v1.4.0](https://github.com/BigstickCarpet/readdir-enhanced/tree/v1.4.0) (2016-08-26)
The [`filter` option](README.md#filter) can now be set to a regular expression or a glob pattern string, which simplifies filtering based on file names. Of course, you can still set the `filter` option to a function if you need to perform more advanced filtering based on the [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) of each file.
[Full Changelog](https://github.com/BigstickCarpet/readdir-enhanced/compare/v1.3.4...v1.4.0)
## [v1.3.4](https://github.com/BigstickCarpet/readdir-enhanced/tree/v1.3.4) (2016-08-26)
As of this release, `readdir-enhanced` is fully tested on all major Node versions (0.x, 4.x, 5.x, 6.x) on [linux](https://travis-ci.org/BigstickCarpet/readdir-enhanced) and [Windows](https://ci.appveyor.com/project/BigstickCarpet/readdir-enhanced/branch/master), with [nearly 100% code coverage](https://coveralls.io/github/BigstickCarpet/readdir-enhanced?branch=master). I do all of my local development and testing on MacOS, so that's covered too.
[Full Changelog](https://github.com/BigstickCarpet/readdir-enhanced/compare/v1.0.1...v1.3.4)
The MIT License (MIT)
Copyright (c) 2016 James Messinger
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
.
\ No newline at end of file
This diff is collapsed.
'use strict';
module.exports = asyncForEach;
/**
* Simultaneously processes all items in the given array.
*
* @param {array} array - The array to iterate over
* @param {function} iterator - The function to call for each item in the array
* @param {function} done - The function to call when all iterators have completed
*/
function asyncForEach (array, iterator, done) {
if (array.length === 0) {
// NOTE: Normally a bad idea to mix sync and async, but it's safe here because
// of the way that this method is currently used by DirectoryReader.
done();
return;
}
// Simultaneously process all items in the array.
let pending = array.length;
array.forEach(item => {
iterator(item, () => {
if (--pending === 0) {
done();
}
});
});
}
'use strict';
module.exports = readdirAsync;
const maybe = require('call-me-maybe');
const DirectoryReader = require('../directory-reader');
let asyncFacade = {
fs: require('fs'),
forEach: require('./for-each'),
async: true
};
/**
* Returns the buffered output from an asynchronous {@link DirectoryReader},
* via an error-first callback or a {@link Promise}.
*
* @param {string} dir
* @param {object} [options]
* @param {function} [callback]
* @param {object} internalOptions
*/
function readdirAsync (dir, options, callback, internalOptions) {
if (typeof options === 'function') {
callback = options;
options = undefined;
}
return maybe(callback, new Promise(((resolve, reject) => {
let results = [];
internalOptions.facade = asyncFacade;
let reader = new DirectoryReader(dir, options, internalOptions);
let stream = reader.stream;
stream.on('error', err => {
reject(err);
stream.pause();
});
stream.on('data', result => {
results.push(result);
});
stream.on('end', () => {
resolve(results);
});
})));
}
'use strict';
let call = module.exports = {
safe: safeCall,
once: callOnce,
};
/**
* Calls a function with the given arguments, and ensures that the error-first callback is _always_
* invoked exactly once, even if the function throws an error.
*
* @param {function} fn - The function to invoke
* @param {...*} args - The arguments to pass to the function. The final argument must be a callback function.
*/
function safeCall (fn, args) {
// Get the function arguments as an array
args = Array.prototype.slice.call(arguments, 1);
// Replace the callback function with a wrapper that ensures it will only be called once
let callback = call.once(args.pop());
args.push(callback);
try {
fn.apply(null, args);
}
catch (err) {
callback(err);
}
}
/**
* Returns a wrapper function that ensures the given callback function is only called once.
* Subsequent calls are ignored, unless the first argument is an Error, in which case the
* error is thrown.
*
* @param {function} fn - The function that should only be called once
* @returns {function}
*/
function callOnce (fn) {
let fulfilled = false;
return function onceWrapper (err) {
if (!fulfilled) {
fulfilled = true;
return fn.apply(this, arguments);
}
else if (err) {
// The callback has already been called, but now an error has occurred
// (most likely inside the callback function). So re-throw the error,
// so it gets handled further up the call stack
throw err;
}
};
}
'use strict';
const readdirSync = require('./sync');
const readdirAsync = require('./async');
const readdirStream = require('./stream');
module.exports = exports = readdirAsyncPath;
exports.readdir = exports.readdirAsync = exports.async = readdirAsyncPath;
exports.readdirAsyncStat = exports.async.stat = readdirAsyncStat;
exports.readdirStream = exports.stream = readdirStreamPath;
exports.readdirStreamStat = exports.stream.stat = readdirStreamStat;
exports.readdirSync = exports.sync = readdirSyncPath;
exports.readdirSyncStat = exports.sync.stat = readdirSyncStat;
/**
* Synchronous readdir that returns an array of string paths.
*
* @param {string} dir
* @param {object} [options]
* @returns {string[]}
*/
function readdirSyncPath (dir, options) {
return readdirSync(dir, options, {});
}
/**
* Synchronous readdir that returns results as an array of {@link fs.Stats} objects
*
* @param {string} dir
* @param {object} [options]
* @returns {fs.Stats[]}
*/
function readdirSyncStat (dir, options) {
return readdirSync(dir, options, { stats: true });
}
/**
* Aynchronous readdir (accepts an error-first callback or returns a {@link Promise}).
* Results are an array of path strings.
*
* @param {string} dir
* @param {object} [options]
* @param {function} [callback]
* @returns {Promise<string[]>}
*/
function readdirAsyncPath (dir, options, callback) {
return readdirAsync(dir, options, callback, {});
}
/**
* Aynchronous readdir (accepts an error-first callback or returns a {@link Promise}).
* Results are an array of {@link fs.Stats} objects.
*
* @param {string} dir
* @param {object} [options]
* @param {function} [callback]
* @returns {Promise<fs.Stats[]>}
*/
function readdirAsyncStat (dir, options, callback) {
return readdirAsync(dir, options, callback, { stats: true });
}
/**
* Aynchronous readdir that returns a {@link stream.Readable} (which is also an {@link EventEmitter}).
* All stream data events ("data", "file", "directory", "symlink") are passed a path string.
*
* @param {string} dir
* @param {object} [options]
* @returns {stream.Readable}
*/
function readdirStreamPath (dir, options) {
return readdirStream(dir, options, {});
}
/**
* Aynchronous readdir that returns a {@link stream.Readable} (which is also an {@link EventEmitter})
* All stream data events ("data", "file", "directory", "symlink") are passed an {@link fs.Stats} object.
*
* @param {string} dir
* @param {object} [options]
* @returns {stream.Readable}
*/
function readdirStreamStat (dir, options) {
return readdirStream(dir, options, { stats: true });
}
'use strict';
const path = require('path');
const globToRegExp = require('glob-to-regexp');
module.exports = normalizeOptions;
let isWindows = /^win/.test(process.platform);
/**
* @typedef {Object} FSFacade
* @property {fs.readdir} readdir
* @property {fs.stat} stat
* @property {fs.lstat} lstat
*/
/**
* Validates and normalizes the options argument
*
* @param {object} [options] - User-specified options, if any
* @param {object} internalOptions - Internal options that aren't part of the public API
*
* @param {number|boolean|function} [options.deep]
* The number of directories to recursively traverse. Any falsy value or negative number will
* default to zero, so only the top-level contents will be returned. Set to `true` or `Infinity`
* to traverse all subdirectories. Or provide a function that accepts a {@link fs.Stats} object
* and returns a truthy value if the directory's contents should be crawled.
*
* @param {function|string|RegExp} [options.filter]
* A function that accepts a {@link fs.Stats} object and returns a truthy value if the data should
* be returned. Or a RegExp or glob string pattern, to filter by file name.
*
* @param {string} [options.sep]
* The path separator to use. By default, the OS-specific separator will be used, but this can be
* set to a specific value to ensure consistency across platforms.
*
* @param {string} [options.basePath]
* The base path to prepend to each result. If empty, then all results will be relative to `dir`.
*
* @param {FSFacade} [options.fs]
* Synchronous or asynchronous facades for Node.js File System module
*
* @param {object} [internalOptions.facade]
* Synchronous or asynchronous facades for various methods, including for the Node.js File System module
*
* @param {boolean} [internalOptions.emit]
* Indicates whether the reader should emit "file", "directory", and "symlink" events
*
* @param {boolean} [internalOptions.stats]
* Indicates whether the reader should emit {@link fs.Stats} objects instead of path strings
*
* @returns {object}
*/
function normalizeOptions (options, internalOptions) {
if (options === null || options === undefined) {
options = {};
}
else if (typeof options !== 'object') {
throw new TypeError('options must be an object');
}
let recurseDepth, recurseFn, recurseRegExp, recurseGlob, deep = options.deep;
if (deep === null || deep === undefined) {
recurseDepth = 0;
}
else if (typeof deep === 'boolean') {
recurseDepth = deep ? Infinity : 0;
}
else if (typeof deep === 'number') {
if (deep < 0 || isNaN(deep)) {
throw new Error('options.deep must be a positive number');
}
else if (Math.floor(deep) !== deep) {
throw new Error('options.deep must be an integer');
}
else {
recurseDepth = deep;
}
}
else if (typeof deep === 'function') {
recurseDepth = Infinity;
recurseFn = deep;
}
else if (deep instanceof RegExp) {
recurseDepth = Infinity;
recurseRegExp = deep;
}
else if (typeof deep === 'string' && deep.length > 0) {
recurseDepth = Infinity;
recurseGlob = globToRegExp(deep, { extended: true, globstar: true });
}
else {
throw new TypeError('options.deep must be a boolean, number, function, regular expression, or glob pattern');
}
let filterFn, filterRegExp, filterGlob, filter = options.filter;
if (filter !== null && filter !== undefined) {
if (typeof filter === 'function') {
filterFn = filter;
}
else if (filter instanceof RegExp) {
filterRegExp = filter;
}
else if (typeof filter === 'string' && filter.length > 0) {
filterGlob = globToRegExp(filter, { extended: true, globstar: true });
}
else {
throw new TypeError('options.filter must be a function, regular expression, or glob pattern');
}
}
let sep = options.sep;
if (sep === null || sep === undefined) {
sep = path.sep;
}
else if (typeof sep !== 'string') {
throw new TypeError('options.sep must be a string');
}
let basePath = options.basePath;
if (basePath === null || basePath === undefined) {
basePath = '';
}
else if (typeof basePath === 'string') {
// Append a path separator to the basePath, if necessary
if (basePath && basePath.substr(-1) !== sep) {
basePath += sep;
}
}
else {
throw new TypeError('options.basePath must be a string');
}
// Convert the basePath to POSIX (forward slashes)
// so that glob pattern matching works consistently, even on Windows
let posixBasePath = basePath;
if (posixBasePath && sep !== '/') {
posixBasePath = posixBasePath.replace(new RegExp('\\' + sep, 'g'), '/');
/* istanbul ignore if */
if (isWindows) {
// Convert Windows root paths (C:\) and UNCs (\\) to POSIX root paths
posixBasePath = posixBasePath.replace(/^([a-zA-Z]\:\/|\/\/)/, '/');
}
}
// Determine which facade methods to use
let facade;
if (options.fs === null || options.fs === undefined) {
// The user didn't provide their own facades, so use our internal ones
facade = internalOptions.facade;
}
else if (typeof options.fs === 'object') {
// Merge the internal facade methods with the user-provided `fs` facades
facade = Object.assign({}, internalOptions.facade);
facade.fs = Object.assign({}, internalOptions.facade.fs, options.fs);
}
else {
throw new TypeError('options.fs must be an object');
}
return {
recurseDepth,
recurseFn,
recurseRegExp,
recurseGlob,
filterFn,
filterRegExp,
filterGlob,
sep,
basePath,
posixBasePath,
facade,
emit: !!internalOptions.emit,
stats: !!internalOptions.stats,
};
}
'use strict';
const call = require('./call');
module.exports = stat;
/**
* Retrieves the {@link fs.Stats} for the given path. If the path is a symbolic link,
* then the Stats of the symlink's target are returned instead. If the symlink is broken,
* then the Stats of the symlink itself are returned.
*
* @param {object} fs - Synchronous or Asynchronouse facade for the "fs" module
* @param {string} path - The path to return stats for
* @param {function} callback
*/
function stat (fs, path, callback) {
let isSymLink = false;
call.safe(fs.lstat, path, (err, lstats) => {
if (err) {
// fs.lstat threw an eror
return callback(err);
}
try {
isSymLink = lstats.isSymbolicLink();
}
catch (err2) {
// lstats.isSymbolicLink() threw an error
// (probably because fs.lstat returned an invalid result)
return callback(err2);
}
if (isSymLink) {
// Try to resolve the symlink
symlinkStat(fs, path, lstats, callback);
}
else {
// It's not a symlink, so return the stats as-is
callback(null, lstats);
}
});
}
/**
* Retrieves the {@link fs.Stats} for the target of the given symlink.
* If the symlink is broken, then the Stats of the symlink itself are returned.
*
* @param {object} fs - Synchronous or Asynchronouse facade for the "fs" module
* @param {string} path - The path of the symlink to return stats for
* @param {object} lstats - The stats of the symlink
* @param {function} callback
*/
function symlinkStat (fs, path, lstats, callback) {
call.safe(fs.stat, path, (err, stats) => {
if (err) {
// The symlink is broken, so return the stats for the link itself
return callback(null, lstats);
}
try {
// Return the stats for the resolved symlink target,
// and override the `isSymbolicLink` method to indicate that it's a symlink
stats.isSymbolicLink = () => true;
}
catch (err2) {
// Setting stats.isSymbolicLink threw an error
// (probably because fs.stat returned an invalid result)
return callback(err2);
}
callback(null, stats);
});
}
'use strict';
module.exports = readdirStream;
const DirectoryReader = require('../directory-reader');
let streamFacade = {
fs: require('fs'),
forEach: require('../async/for-each'),
async: true
};
/**
* Returns the {@link stream.Readable} of an asynchronous {@link DirectoryReader}.
*
* @param {string} dir
* @param {object} [options]
* @param {object} internalOptions
*/
function readdirStream (dir, options, internalOptions) {
internalOptions.facade = streamFacade;
let reader = new DirectoryReader(dir, options, internalOptions);
return reader.stream;
}
'use strict';
module.exports = syncForEach;
/**
* A facade that allows {@link Array.forEach} to be called as though it were asynchronous.
*
* @param {array} array - The array to iterate over
* @param {function} iterator - The function to call for each item in the array
* @param {function} done - The function to call when all iterators have completed
*/
function syncForEach (array, iterator, done) {
array.forEach(item => {
iterator(item, () => {
// Note: No error-handling here because this is currently only ever called
// by DirectoryReader, which never passes an `error` parameter to the callback.
// Instead, DirectoryReader emits an "error" event if an error occurs.
});
});
done();
}
'use strict';
const fs = require('fs');
const call = require('../call');
/**
* A facade around {@link fs.readdirSync} that allows it to be called
* the same way as {@link fs.readdir}.
*
* @param {string} dir
* @param {function} callback
*/
exports.readdir = function (dir, callback) {
// Make sure the callback is only called once
callback = call.once(callback);
try {
let items = fs.readdirSync(dir);
callback(null, items);
}
catch (err) {
callback(err);
}
};
/**
* A facade around {@link fs.statSync} that allows it to be called
* the same way as {@link fs.stat}.
*
* @param {string} path
* @param {function} callback
*/
exports.stat = function (path, callback) {
// Make sure the callback is only called once
callback = call.once(callback);
try {
let stats = fs.statSync(path);
callback(null, stats);
}
catch (err) {
callback(err);
}
};
/**
* A facade around {@link fs.lstatSync} that allows it to be called
* the same way as {@link fs.lstat}.
*
* @param {string} path
* @param {function} callback
*/
exports.lstat = function (path, callback) {
// Make sure the callback is only called once
callback = call.once(callback);
try {
let stats = fs.lstatSync(path);
callback(null, stats);
}
catch (err) {
callback(err);
}
};
'use strict';
module.exports = readdirSync;
const DirectoryReader = require('../directory-reader');
let syncFacade = {
fs: require('./fs'),
forEach: require('./for-each'),
sync: true
};
/**
* Returns the buffered output from a synchronous {@link DirectoryReader}.
*
* @param {string} dir
* @param {object} [options]
* @param {object} internalOptions
*/
function readdirSync (dir, options, internalOptions) {
internalOptions.facade = syncFacade;
let reader = new DirectoryReader(dir, options, internalOptions);
let stream = reader.stream;
let results = [];
let data = stream.read();
while (data !== null) {
results.push(data);
data = stream.read();
}
return results;
}
{
"_args": [
[
"@mrmlnc/readdir-enhanced@2.2.1",
"/Users/wanghongyuan/generator-dbgame"
]
],
"_from": "@mrmlnc/readdir-enhanced@2.2.1",
"_id": "@mrmlnc/readdir-enhanced@2.2.1",
"_inBundle": false,
"_integrity": "sha1-UkryQNGjYFJ7cwR17PoTRKpUDd4=",
"_location": "/@mrmlnc/readdir-enhanced",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@mrmlnc/readdir-enhanced@2.2.1",
"name": "@mrmlnc/readdir-enhanced",
"escapedName": "@mrmlnc%2freaddir-enhanced",
"scope": "@mrmlnc",
"rawSpec": "2.2.1",
"saveSpec": null,
"fetchSpec": "2.2.1"
},
"_requiredBy": [
"/fast-glob"
],
"_resolved": "http://registry.npm.taobao.org/@mrmlnc/readdir-enhanced/download/@mrmlnc/readdir-enhanced-2.2.1.tgz",
"_spec": "2.2.1",
"_where": "/Users/wanghongyuan/generator-dbgame",
"author": {
"name": "James Messinger",
"url": "http://bigstickcarpet.com"
},
"bugs": {
"url": "https://github.com/bigstickcarpet/readdir-enhanced/issues"
},
"dependencies": {
"call-me-maybe": "^1.0.1",
"glob-to-regexp": "^0.3.0"
},
"description": "fs.readdir with sync, async, and streaming APIs + filtering, recursion, absolute paths, etc.",
"devDependencies": {
"chai": "^4.1.2",
"codacy-coverage": "^2.0.3",
"coveralls": "^3.0.0",
"del": "^3.0.0",
"eslint": "^4.15.0",
"eslint-config-modular": "^4.1.1",
"istanbul": "^0.4.5",
"mkdirp": "^0.5.1",
"mocha": "^4.1.0",
"npm-check": "^5.5.2",
"through2": "^2.0.3",
"version-bump-prompt": "^4.0.0"
},
"engines": {
"node": ">=4"
},
"files": [
"lib",
"types.d.ts"
],
"homepage": "https://github.com/bigstickcarpet/readdir-enhanced",
"keywords": [
"fs",
"readdir",
"stream",
"event",
"recursive",
"deep",
"filter",
"absolute"
],
"license": "MIT",
"main": "lib/index.js",
"name": "@mrmlnc/readdir-enhanced",
"repository": {
"type": "git",
"url": "git+https://github.com/bigstickcarpet/readdir-enhanced.git"
},
"scripts": {
"bump": "bump --prompt --tag --push --all",
"cover": "istanbul cover _mocha",
"lint": "eslint lib test --fix",
"release": "npm run upgrade && npm test && npm run bump && npm publish",
"test": "mocha && npm run lint",
"upgrade": "npm-check -u"
},
"typings": "types.d.ts",
"version": "2.2.1"
}
/// <reference types="node" />
import fs = require('fs');
declare namespace re {
interface Entry extends fs.Stats {
path: string;
depth: number;
}
type FilterFunction = (stat: Entry) => boolean;
type Callback<T> = (err: NodeJS.ErrnoException, result: T) => void;
type CallbackString = Callback<string[]>;
type CallbackEntry = Callback<Entry[]>;
interface FileSystem {
readdir?: (path: string, callback: Callback<string[]>) => void;
lstat?: (path: string, callback: Callback<fs.Stats>) => void;
stat?: (path: string, callback: Callback<fs.Stats>) => void;
}
interface Options {
filter?: string | RegExp | FilterFunction;
deep?: boolean | number | RegExp | FilterFunction;
sep?: string;
basePath?: string;
fs?: FileSystem;
}
function stat(root: string, options?: Options): Promise<Entry[]>;
function stat(root: string, callback: CallbackEntry): void;
function stat(root: string, options: Options, callback: CallbackEntry): void;
function async(root: string, options?: Options): Promise<string[]>;
function async(root: string, callback: CallbackString): void;
function async(root: string, options: Options, callback: CallbackString): void;
function readdirAsyncStat(root: string, options?: Options): Promise<Entry[]>;
function readdirAsyncStat(root: string, callback: CallbackEntry): void;
function readdirAsyncStat(root: string, options: Options, callback: CallbackEntry): void;
namespace async {
function stat(root: string, options?: Options): Promise<Entry[]>;
function stat(root: string, callback: CallbackEntry): void;
function stat(root: string, options: Options, callback: CallbackEntry): void;
}
function stream(root: string, options?: Options): NodeJS.ReadableStream;
function readdirStreamStat(root: string, options?: Options): NodeJS.ReadableStream;
namespace stream {
function stat(root: string, options?: Options): NodeJS.ReadableStream;
}
function sync(root: string, options?: Options): string[];
function readdirSyncStat(root: string, options?: Options): Entry[];
namespace sync {
function stat(root: string, options?: Options): Entry[];
}
}
declare function re(root: string, options?: re.Options): Promise<string[]>;
declare function re(root: string, callback: re.CallbackString): void;
declare function re(root: string, options: re.Options, callback: re.CallbackString): void;
export = re;
(The BSD License)
Copyright (c) 2010-2012, Christian Johansen (christian@cjohansen.no) and
August Lilleaas (august.lilleaas@gmail.com). All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Christian Johansen nor the names of his contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# formatio
[![Build status](https://secure.travis-ci.org/sinonjs/formatio.svg?branch=master)](http://travis-ci.org/sinonjs/formatio)
[![Coverage Status](https://coveralls.io/repos/github/sinonjs/formatio/badge.svg?branch=master)](https://coveralls.io/github/sinonjs/formatio?branch=master)
> The cheesy object formatter
Pretty formatting of arbitrary JavaScript values. Currently only supports ascii
formatting, suitable for command-line utilities. Like `JSON.stringify`, it
formats objects recursively, but unlike `JSON.stringify`, it can handle
regular expressions, functions, circular objects and more.
`formatio` is a general-purpose library. It works in browsers (including old
and rowdy ones, like IE6) and Node. It will define itself as an AMD module if
you want it to (i.e. if there's a `define` function available).
Documentation: https://sinonjs.github.io/formatio/
## Backers
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/sinon#backer)]
<a href="https://opencollective.com/sinon/backer/0/website" target="_blank"><img src="https://opencollective.com/sinon/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/1/website" target="_blank"><img src="https://opencollective.com/sinon/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/2/website" target="_blank"><img src="https://opencollective.com/sinon/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/3/website" target="_blank"><img src="https://opencollective.com/sinon/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/4/website" target="_blank"><img src="https://opencollective.com/sinon/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/5/website" target="_blank"><img src="https://opencollective.com/sinon/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/6/website" target="_blank"><img src="https://opencollective.com/sinon/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/7/website" target="_blank"><img src="https://opencollective.com/sinon/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/8/website" target="_blank"><img src="https://opencollective.com/sinon/backer/8/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/9/website" target="_blank"><img src="https://opencollective.com/sinon/backer/9/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/10/website" target="_blank"><img src="https://opencollective.com/sinon/backer/10/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/11/website" target="_blank"><img src="https://opencollective.com/sinon/backer/11/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/12/website" target="_blank"><img src="https://opencollective.com/sinon/backer/12/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/13/website" target="_blank"><img src="https://opencollective.com/sinon/backer/13/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/14/website" target="_blank"><img src="https://opencollective.com/sinon/backer/14/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/15/website" target="_blank"><img src="https://opencollective.com/sinon/backer/15/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/16/website" target="_blank"><img src="https://opencollective.com/sinon/backer/16/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/17/website" target="_blank"><img src="https://opencollective.com/sinon/backer/17/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/18/website" target="_blank"><img src="https://opencollective.com/sinon/backer/18/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/19/website" target="_blank"><img src="https://opencollective.com/sinon/backer/19/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/20/website" target="_blank"><img src="https://opencollective.com/sinon/backer/20/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/21/website" target="_blank"><img src="https://opencollective.com/sinon/backer/21/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/22/website" target="_blank"><img src="https://opencollective.com/sinon/backer/22/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/23/website" target="_blank"><img src="https://opencollective.com/sinon/backer/23/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/24/website" target="_blank"><img src="https://opencollective.com/sinon/backer/24/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/25/website" target="_blank"><img src="https://opencollective.com/sinon/backer/25/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/26/website" target="_blank"><img src="https://opencollective.com/sinon/backer/26/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/27/website" target="_blank"><img src="https://opencollective.com/sinon/backer/27/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/28/website" target="_blank"><img src="https://opencollective.com/sinon/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/29/website" target="_blank"><img src="https://opencollective.com/sinon/backer/29/avatar.svg"></a>
## Sponsors
Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/sinon#sponsor)]
<a href="https://opencollective.com/sinon/sponsor/0/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/1/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/2/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/3/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/4/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/5/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/6/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/7/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/8/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/9/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/10/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/10/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/11/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/11/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/12/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/12/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/13/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/13/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/14/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/14/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/15/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/15/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/16/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/16/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/17/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/17/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/18/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/18/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/19/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/19/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/20/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/20/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/21/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/21/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/22/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/22/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/23/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/24/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/24/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/25/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/25/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/26/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/26/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/27/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/27/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/28/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/sinon/sponsor/29/website" target="_blank"><img src="https://opencollective.com/sinon/sponsor/29/avatar.svg"></a>
## Licence
samsam was released under [BSD-3](LICENSE)
(function (root, factory) {
"use strict";
if (typeof define === "function" && define.amd) {
// AMD. Register as an anonymous module.
define(["samsam"], factory);
} else if (typeof module === "object" && module.exports) {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory(require("samsam"));
} else {
// Browser globals (root is window)
root.formatio = factory(root.samsam);
}
}(typeof self !== "undefined" ? self : this, function (samsam) {
"use strict";
var formatio = {
excludeConstructors: ["Object", /^.$/],
quoteStrings: true,
limitChildrenCount: 0
};
var specialObjects = [];
if (typeof global !== "undefined") {
specialObjects.push({ object: global, value: "[object global]" });
}
if (typeof document !== "undefined") {
specialObjects.push({
object: document,
value: "[object HTMLDocument]"
});
}
if (typeof window !== "undefined") {
specialObjects.push({ object: window, value: "[object Window]" });
}
function functionName(func) {
if (!func) { return ""; }
if (func.displayName) { return func.displayName; }
if (func.name) { return func.name; }
var matches = func.toString().match(/function\s+([^\(]+)/m);
return (matches && matches[1]) || "";
}
function constructorName(f, object) {
var name = functionName(object && object.constructor);
var excludes = f.excludeConstructors ||
formatio.excludeConstructors || [];
var i, l;
for (i = 0, l = excludes.length; i < l; ++i) {
if (typeof excludes[i] === "string" && excludes[i] === name) {
return "";
} else if (excludes[i].test && excludes[i].test(name)) {
return "";
}
}
return name;
}
function isCircular(object, objects) {
if (typeof object !== "object") { return false; }
var i, l;
for (i = 0, l = objects.length; i < l; ++i) {
if (objects[i] === object) { return true; }
}
return false;
}
function ascii(f, object, processed, indent) {
if (typeof object === "string") {
if (object.length === 0) { return "(empty string)"; }
var qs = f.quoteStrings;
var quote = typeof qs !== "boolean" || qs;
return processed || quote ? "\"" + object + "\"" : object;
}
if (typeof object === "function" && !(object instanceof RegExp)) {
return ascii.func(object);
}
processed = processed || [];
if (isCircular(object, processed)) { return "[Circular]"; }
if (Object.prototype.toString.call(object) === "[object Array]") {
return ascii.array.call(f, object, processed);
}
if (!object) { return String((1 / object) === -Infinity ? "-0" : object); }
if (samsam.isElement(object)) { return ascii.element(object); }
if (typeof object.toString === "function" &&
object.toString !== Object.prototype.toString) {
return object.toString();
}
var i, l;
for (i = 0, l = specialObjects.length; i < l; i++) {
if (object === specialObjects[i].object) {
return specialObjects[i].value;
}
}
if (typeof Set !== "undefined" && object instanceof Set) {
return ascii.set.call(f, object, processed);
}
return ascii.object.call(f, object, processed, indent);
}
ascii.func = function (func) {
return "function " + functionName(func) + "() {}";
};
function delimit(str, delimiters) {
delimiters = delimiters || ["[", "]"];
return delimiters[0] + str + delimiters[1];
}
ascii.array = function (array, processed, delimiters) {
processed = processed || [];
processed.push(array);
var pieces = [];
var i, l;
l = (this.limitChildrenCount > 0) ?
Math.min(this.limitChildrenCount, array.length) : array.length;
for (i = 0; i < l; ++i) {
pieces.push(ascii(this, array[i], processed));
}
if (l < array.length) {
pieces.push("[... " + (array.length - l) + " more elements]");
}
return delimit(pieces.join(", "), delimiters);
};
ascii.set = function (set, processed) {
return ascii.array.call(this, Array.from(set), processed, ["Set {", "}"]);
};
ascii.object = function (object, processed, indent) {
processed = processed || [];
processed.push(object);
indent = indent || 0;
var pieces = [];
var properties = samsam.keys(object).sort();
var length = 3;
var prop, str, obj, i, k, l;
l = (this.limitChildrenCount > 0) ?
Math.min(this.limitChildrenCount, properties.length) : properties.length;
for (i = 0; i < l; ++i) {
prop = properties[i];
obj = object[prop];
if (isCircular(obj, processed)) {
str = "[Circular]";
} else {
str = ascii(this, obj, processed, indent + 2);
}
str = (/\s/.test(prop) ? "\"" + prop + "\"" : prop) + ": " + str;
length += str.length;
pieces.push(str);
}
var cons = constructorName(this, object);
var prefix = cons ? "[" + cons + "] " : "";
var is = "";
for (i = 0, k = indent; i < k; ++i) { is += " "; }
if (l < properties.length)
{pieces.push("[... " + (properties.length - l) + " more elements]");}
if (length + indent > 80) {
return prefix + "{\n " + is + pieces.join(",\n " + is) + "\n" +
is + "}";
}
return prefix + "{ " + pieces.join(", ") + " }";
};
ascii.element = function (element) {
var tagName = element.tagName.toLowerCase();
var attrs = element.attributes;
var pairs = [];
var attr, attrName, i, l, val;
for (i = 0, l = attrs.length; i < l; ++i) {
attr = attrs.item(i);
attrName = attr.nodeName.toLowerCase().replace("html:", "");
val = attr.nodeValue;
if (attrName !== "contenteditable" || val !== "inherit") {
if (val) { pairs.push(attrName + "=\"" + val + "\""); }
}
}
var formatted = "<" + tagName + (pairs.length > 0 ? " " : "");
// SVG elements have undefined innerHTML
var content = element.innerHTML || "";
if (content.length > 20) {
content = content.substr(0, 20) + "[...]";
}
var res = formatted + pairs.join(" ") + ">" + content +
"</" + tagName + ">";
return res.replace(/ contentEditable="inherit"/, "");
};
function Formatio(options) {
// eslint-disable-next-line guard-for-in
for (var opt in options) {
this[opt] = options[opt];
}
}
Formatio.prototype = {
functionName: functionName,
configure: function (options) {
return new Formatio(options);
},
constructorName: function (object) {
return constructorName(this, object);
},
ascii: function (object, processed, indent) {
return ascii(this, object, processed, indent);
}
};
return Formatio.prototype;
}));
{
"_args": [
[
"@sinonjs/formatio@2.0.0",
"/Users/wanghongyuan/generator-dbgame"
]
],
"_development": true,
"_from": "@sinonjs/formatio@2.0.0",
"_id": "@sinonjs/formatio@2.0.0",
"_inBundle": false,
"_integrity": "sha1-hNt+nrVTHfGKjF4L+25EnlXmVLI=",
"_location": "/@sinonjs/formatio",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@sinonjs/formatio@2.0.0",
"name": "@sinonjs/formatio",
"escapedName": "@sinonjs%2fformatio",
"scope": "@sinonjs",
"rawSpec": "2.0.0",
"saveSpec": null,
"fetchSpec": "2.0.0"
},
"_requiredBy": [
"/nise",
"/sinon"
],
"_resolved": "http://registry.npm.taobao.org/@sinonjs/formatio/download/@sinonjs/formatio-2.0.0.tgz",
"_spec": "2.0.0",
"_where": "/Users/wanghongyuan/generator-dbgame",
"author": {
"name": "Christian Johansen"
},
"bugs": {
"url": "https://github.com/sinonjs/formatio/issues"
},
"dependencies": {
"samsam": "1.3.0"
},
"description": "Human-readable object formatting",
"devDependencies": {
"eslint": "4.16.0",
"eslint-config-sinon": "1.0.3",
"eslint-plugin-ie11": "1.0.0",
"eslint-plugin-mocha": "4.11.0",
"mocha": "5.0.0",
"nyc": "11.4.1",
"referee": "1.2.0"
},
"files": [
"lib/**/*[^test].js"
],
"homepage": "http://busterjs.org/docs/formatio/",
"license": "BSD-3-Clause",
"main": "./lib/formatio",
"name": "@sinonjs/formatio",
"repository": {
"type": "git",
"url": "git+https://github.com/sinonjs/formatio.git"
},
"scripts": {
"lint": "eslint .",
"test": "mocha 'lib/**/*.test.js'",
"test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test"
},
"version": "2.0.0"
}
Copyright (C) 2012-2014 by Ingvar Stepanyan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# Acorn-JSX
[![Build Status](https://travis-ci.org/RReverser/acorn-jsx.svg?branch=master)](https://travis-ci.org/RReverser/acorn-jsx)
[![NPM version](https://img.shields.io/npm/v/acorn-jsx.svg)](https://www.npmjs.org/package/acorn-jsx)
This is plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.
It was created as an experimental alternative, faster [React.js JSX](http://facebook.github.io/react/docs/jsx-in-depth.html) parser.
According to [benchmarks](https://github.com/RReverser/acorn-jsx/blob/master/test/bench.html), Acorn-JSX is 2x faster than official [Esprima-based parser](https://github.com/facebook/esprima) when location tracking is turned on in both (call it "source maps enabled mode"). At the same time, it consumes all the ES6+JSX syntax that can be consumed by Esprima-FB (this is proved by [official tests](https://github.com/RReverser/acorn-jsx/blob/master/test/tests-jsx.js)).
**UPDATE [14-Apr-2015]**: Facebook implementation started [deprecation process](https://github.com/facebook/esprima/issues/111) in favor of Acorn + Acorn-JSX + Babel for parsing and transpiling JSX syntax.
## Transpiler
Please note that this tool only parses source code to JSX AST, which is useful for various language tools and services. If you want to transpile your code to regular ES5-compliant JavaScript with source map, check out the [babel transpiler](https://babeljs.io/) which uses `acorn-jsx` under the hood.
## Usage
You can use module directly in order to get Acorn instance with plugin installed:
```javascript
var acorn = require('acorn-jsx');
```
Or you can use `inject.js` for injecting plugin into your own version of Acorn like following:
```javascript
var acorn = require('acorn-jsx/inject')(require('./custom-acorn'));
```
Then, use `plugins` option whenever you need to support JSX while parsing:
```javascript
var ast = acorn.parse(code, {
plugins: { jsx: true }
});
```
Note that official spec doesn't support mix of XML namespaces and object-style access in tag names (#27) like in `<namespace:Object.Property />`, so it was deprecated in `acorn-jsx@3.0`. If you still want to opt-in to support of such constructions, you can pass the following option:
```javascript
var ast = acorn.parse(code, {
plugins: {
jsx: { allowNamespacedObjects: true }
}
});
```
Also, since most apps use pure React transformer, a new option was introduced that allows to prohibit namespaces completely:
```javascript
var ast = acorn.parse(code, {
plugins: {
jsx: { allowNamespaces: false }
}
});
```
Note that by default `allowNamespaces` is enabled for spec compliancy.
## License
This plugin is issued under the [MIT license](./LICENSE).
'use strict';
module.exports = require('./inject')(require('acorn'));
This diff is collapsed.
../acorn/bin/acorn
\ No newline at end of file
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
{
"plugins": {
"node": true,
"es_modules": true
}
}
\ No newline at end of file
language: node_js
sudo: false
node_js:
- '0.12'
- '4'
- '5'
- '6'
List of Acorn contributors. Updated before every release.
Adrian Rakovsky
Alistair Braidwood
Amila Welihinda
Andres Suarez
Angelo
Aparajita Fishman
Arian Stolwijk
Artem Govorov
Brandon Mills
Charles Hughes
Conrad Irwin
Daniel Tschinder
David Bonnet
Domenico Matteo
ForbesLindesay
Forbes Lindesay
Gilad Peleg
impinball
Ingvar Stepanyan
Jackson Ray Hamilton
Jesse McCarthy
Jiaxing Wang
Joel Kemp
Johannes Herr
Jordan Klassen
Jürg Lehni
keeyipchan
Keheliya Gallaba
Kevin Irish
Kevin Kwok
krator
Marijn Haverbeke
Martin Carlberg
Mathias Bynens
Mathieu 'p01' Henri
Matthew Bastien
Max Schaefer
Max Zerzouri
Mihai Bazon
Mike Rennie
Nicholas C. Zakas
Nick Fitzgerald
Olivier Thomann
Oskar Schöldström
Paul Harper
Peter Rust
PlNG
Prayag Verma
ReadmeCritic
r-e-d
Richard Gibson
Rich Harris
Rich-Harris
Sebastian McKenzie
Timothy Gu
Toru Nagashima
zsjforcn
## 3.3.0 (2016-07-25)
### Bug fixes
Fix bug in tokenizing of regexp operator after a function declaration.
Fix parser crash when parsing an array pattern with a hole.
### New features
Implement check against complex argument lists in functions that
enable strict mode in ES7.
## 3.2.0 (2016-06-07)
### Bug fixes
Improve handling of lack of unicode regexp support in host
environment.
Properly reject shorthand properties whose name is a keyword.
Don't crash when the loose parser is called without options object.
### New features
Visitors created with `visit.make` now have their base as _prototype_,
rather than copying properties into a fresh object.
Make it possible to use `visit.ancestor` with a walk state.
## 3.1.0 (2016-04-18)
### Bug fixes
Fix issue where the loose parser created invalid TemplateElement nodes
for unclosed template literals.
Properly tokenize the division operator directly after a function
expression.
Allow trailing comma in destructuring arrays.
### New features
The walker now allows defining handlers for `CatchClause` nodes.
## 3.0.4 (2016-02-25)
### Fixes
Allow update expressions as left-hand-side of the ES7 exponential
operator.
## 3.0.2 (2016-02-10)
### Fixes
Fix bug that accidentally made `undefined` a reserved word when
parsing ES7.
## 3.0.0 (2016-02-10)
### Breaking changes
The default value of the `ecmaVersion` option is now 6 (used to be 5).
Support for comprehension syntax (which was dropped from the draft
spec) has been removed.
### Fixes
`let` and `yield` are now “contextual keywords”, meaning you can
mostly use them as identifiers in ES5 non-strict code.
A parenthesized class or function expression after `export default` is
now parsed correctly.
### New features
When `ecmaVersion` is set to 7, Acorn will parse the exponentiation
operator (`**`).
The identifier character ranges are now based on Unicode 8.0.0.
Plugins can now override the `raiseRecoverable` method to override the
way non-critical errors are handled.
## 2.7.0 (2016-01-04)
### Fixes
Stop allowing rest parameters in setters.
Make sure the loose parser always attaches a `local` property to
`ImportNamespaceSpecifier` nodes.
Disallow `y` rexexp flag in ES5.
Disallow `\00` and `\000` escapes in strict mode.
Raise an error when an import name is a reserved word.
## 2.6.4 (2015-11-12)
### Fixes
Fix crash in loose parser when parsing invalid object pattern.
### New features
Support plugins in the loose parser.
## 2.6.2 (2015-11-10)
### Fixes
Don't crash when no options object is passed.
## 2.6.0 (2015-11-09)
### Fixes
Add `await` as a reserved word in module sources.
Disallow `yield` in a parameter default value for a generator.
Forbid using a comma after a rest pattern in an array destructuring.
### New features
Support parsing stdin in command-line tool.
## 2.5.2 (2015-10-27)
### Fixes
Fix bug where the walker walked an exported `let` statement as an
expression.
## 2.5.0 (2015-10-27)
### Fixes
Fix tokenizer support in the command-line tool.
In the loose parser, don't allow non-string-literals as import
sources.
Stop allowing `new.target` outside of functions.
Remove legacy `guard` and `guardedHandler` properties from try nodes.
Stop allowing multiple `__proto__` properties on an object literal in
strict mode.
Don't allow rest parameters to be non-identifier patterns.
Check for duplicate paramter names in arrow functions.
Copyright (C) 2012-2016 by various contributors (see AUTHORS)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This diff is collapsed.
#!/usr/bin/env node
'use strict';
var path = require('path');
var fs = require('fs');
var acorn = require('../dist/acorn.js');
var infile;
var forceFile;
var silent = false;
var compact = false;
var tokenize = false;
var options = {}
function help(status) {
var print = (status == 0) ? console.log : console.error
print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]")
print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]")
process.exit(status)
}
for (var i = 2; i < process.argv.length; ++i) {
var arg = process.argv[i]
if ((arg == "-" || arg[0] != "-") && !infile) infile = arg
else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i]
else if (arg == "--ecma3") options.ecmaVersion = 3
else if (arg == "--ecma5") options.ecmaVersion = 5
else if (arg == "--ecma6") options.ecmaVersion = 6
else if (arg == "--ecma7") options.ecmaVersion = 7
else if (arg == "--locations") options.locations = true
else if (arg == "--allow-hash-bang") options.allowHashBang = true
else if (arg == "--silent") silent = true
else if (arg == "--compact") compact = true
else if (arg == "--help") help(0)
else if (arg == "--tokenize") tokenize = true
else if (arg == "--module") options.sourceType = 'module'
else help(1)
}
function run(code) {
var result
if (!tokenize) {
try { result = acorn.parse(code, options) }
catch(e) { console.error(e.message); process.exit(1) }
} else {
result = []
var tokenizer = acorn.tokenizer(code, options), token
while (true) {
try { token = tokenizer.getToken() }
catch(e) { console.error(e.message); process.exit(1) }
result.push(token)
if (token.type == acorn.tokTypes.eof) break
}
}
if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2))
}
if (forceFile || infile && infile != "-") {
run(fs.readFileSync(infile, "utf8"))
} else {
var code = ""
process.stdin.resume()
process.stdin.on("data", function (chunk) { return code += chunk; })
process.stdin.on("end", function () { return run(code); })
}
\ No newline at end of file
'use strict';
// Which Unicode version should be used?
var version = '9.0.0';
var start = require('unicode-' + version + '/Binary_Property/ID_Start/code-points.js')
.filter(function(ch) { return ch > 0x7f; });
var last = -1;
var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/Binary_Property/ID_Continue/code-points.js')
.filter(function(ch) { return ch > 0x7f && search(start, ch, last + 1) == -1; }));
function search(arr, ch, starting) {
for (var i = starting; arr[i] <= ch && i < arr.length; last = i++)
if (arr[i] === ch)
return i;
return -1;
}
function pad(str, width) {
while (str.length < width) str = "0" + str;
return str;
}
function esc(code) {
var hex = code.toString(16);
if (hex.length <= 2) return "\\x" + pad(hex, 2);
else return "\\u" + pad(hex, 4);
}
function generate(chars) {
var astral = [], re = "";
for (var i = 0, at = 0x10000; i < chars.length; i++) {
var from = chars[i], to = from;
while (i < chars.length - 1 && chars[i + 1] == to + 1) {
i++;
to++;
}
if (to <= 0xffff) {
if (from == to) re += esc(from);
else if (from + 1 == to) re += esc(from) + esc(to);
else re += esc(from) + "-" + esc(to);
} else {
astral.push(from - at, to - from);
at = to;
}
}
return {nonASCII: re, astral: astral};
}
var startData = generate(start), contData = generate(cont);
console.log("let nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\"");
console.log("let nonASCIIidentifierChars = \"" + contData.nonASCII + "\"");
console.log("const astralIdentifierStartCodes = " + JSON.stringify(startData.astral));
console.log("const astralIdentifierCodes = " + JSON.stringify(contData.astral));
# Combine existing list of authors with everyone known in git, sort, add header.
tail --lines=+3 AUTHORS > AUTHORS.tmp
git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp
echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS
sort -u AUTHORS.tmp >> AUTHORS
rm -f AUTHORS.tmp
This diff is collapsed.
{
"_args": [
[
"acorn@3.3.0",
"/Users/wanghongyuan/generator-dbgame"
]
],
"_development": true,
"_from": "acorn@3.3.0",
"_id": "acorn@3.3.0",
"_inBundle": false,
"_integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=",
"_location": "/acorn-jsx/acorn",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "acorn@3.3.0",
"name": "acorn",
"escapedName": "acorn",
"rawSpec": "3.3.0",
"saveSpec": null,
"fetchSpec": "3.3.0"
},
"_requiredBy": [
"/acorn-jsx"
],
"_resolved": "http://registry.npm.taobao.org/acorn/download/acorn-3.3.0.tgz",
"_spec": "3.3.0",
"_where": "/Users/wanghongyuan/generator-dbgame",
"bin": {
"acorn": "./bin/acorn"
},
"bugs": {
"url": "https://github.com/ternjs/acorn/issues"
},
"contributors": [
{
"name": "List of Acorn contributors. Updated before every release."
},
{
"name": "Adrian Rakovsky"
},
{
"name": "Alistair Braidwood"
},
{
"name": "Amila Welihinda"
},
{
"name": "Andres Suarez"
},
{
"name": "Angelo"
},
{
"name": "Aparajita Fishman"
},
{
"name": "Arian Stolwijk"
},
{
"name": "Artem Govorov"
},
{
"name": "Brandon Mills"
},
{
"name": "Charles Hughes"
},
{
"name": "Conrad Irwin"
},
{
"name": "Daniel Tschinder"
},
{
"name": "David Bonnet"
},
{
"name": "Domenico Matteo"
},
{
"name": "ForbesLindesay"
},
{
"name": "Forbes Lindesay"
},
{
"name": "Gilad Peleg"
},
{
"name": "impinball"
},
{
"name": "Ingvar Stepanyan"
},
{
"name": "Jackson Ray Hamilton"
},
{
"name": "Jesse McCarthy"
},
{
"name": "Jiaxing Wang"
},
{
"name": "Joel Kemp"
},
{
"name": "Johannes Herr"
},
{
"name": "Jordan Klassen"
},
{
"name": "Jürg Lehni"
},
{
"name": "keeyipchan"
},
{
"name": "Keheliya Gallaba"
},
{
"name": "Kevin Irish"
},
{
"name": "Kevin Kwok"
},
{
"name": "krator"
},
{
"name": "Marijn Haverbeke"
},
{
"name": "Martin Carlberg"
},
{
"name": "Mathias Bynens"
},
{
"name": "Mathieu 'p01' Henri"
},
{
"name": "Matthew Bastien"
},
{
"name": "Max Schaefer"
},
{
"name": "Max Zerzouri"
},
{
"name": "Mihai Bazon"
},
{
"name": "Mike Rennie"
},
{
"name": "Nicholas C. Zakas"
},
{
"name": "Nick Fitzgerald"
},
{
"name": "Olivier Thomann"
},
{
"name": "Oskar Schöldström"
},
{
"name": "Paul Harper"
},
{
"name": "Peter Rust"
},
{
"name": "PlNG"
},
{
"name": "Prayag Verma"
},
{
"name": "ReadmeCritic"
},
{
"name": "r-e-d"
},
{
"name": "Richard Gibson"
},
{
"name": "Rich Harris"
},
{
"name": "Rich-Harris"
},
{
"name": "Sebastian McKenzie"
},
{
"name": "Timothy Gu"
},
{
"name": "Toru Nagashima"
},
{
"name": "zsjforcn"
}
],
"description": "ECMAScript parser",
"devDependencies": {
"rollup": "^0.34.1",
"rollup-plugin-buble": "^0.11.0",
"unicode-9.0.0": "^0.7.0"
},
"engines": {
"node": ">=0.4.0"
},
"homepage": "https://github.com/ternjs/acorn",
"jsnext:main": "dist/acorn.es.js",
"license": "MIT",
"main": "dist/acorn.js",
"maintainers": [
{
"name": "Marijn Haverbeke",
"email": "marijnh@gmail.com",
"url": "http://marijnhaverbeke.nl"
},
{
"name": "Ingvar Stepanyan",
"email": "me@rreverser.com",
"url": "http://rreverser.com/"
}
],
"name": "acorn",
"repository": {
"type": "git",
"url": "git+https://github.com/ternjs/acorn.git"
},
"scripts": {
"build": "npm run build:main && npm run build:walk && npm run build:loose && npm run build:bin",
"build:bin": "rollup -c rollup/config.bin.js",
"build:loose": "rollup -c rollup/config.loose.js",
"build:main": "rollup -c rollup/config.main.js",
"build:walk": "rollup -c rollup/config.walk.js",
"prepublish": "npm test",
"pretest": "npm run build",
"test": "node test/run.js"
},
"version": "3.3.0"
}
import buble from 'rollup-plugin-buble'
export default {
entry: 'src/bin/acorn.js',
dest: 'bin/acorn',
format: 'cjs',
banner: '#!/usr/bin/env node',
external: [ 'fs', 'path', 'acorn' ],
paths: {
acorn: '../dist/acorn.js'
},
plugins: [
buble()
]
}
import buble from 'rollup-plugin-buble'
export default {
entry: 'src/loose/index.js',
moduleName: 'acorn.loose',
external: [ 'acorn' ],
paths: {
acorn: './acorn.js'
},
globals: {
acorn: 'acorn'
},
targets: [
{ dest: 'dist/acorn_loose.js', format: 'umd' },
{ dest: 'dist/acorn_loose.es.js', format: 'es' }
],
plugins: [
buble()
]
}
import buble from 'rollup-plugin-buble';
export default {
entry: 'src/index.js',
moduleName: 'acorn',
plugins: [ buble() ],
targets: [
{ dest: 'dist/acorn.js', format: 'umd' },
{ dest: 'dist/acorn.es.js', format: 'es' }
]
};
import buble from 'rollup-plugin-buble';
export default {
entry: 'src/walk/index.js',
moduleName: 'acorn.walk',
plugins: [ buble() ],
targets: [
{ dest: 'dist/walk.js', format: 'umd' },
{ dest: 'dist/walk.es.js', format: 'es' }
]
};
import {basename} from "path"
import {readFileSync as readFile} from "fs"
import * as acorn from "acorn"
let infile, forceFile, silent = false, compact = false, tokenize = false
const options = {}
function help(status) {
const print = (status == 0) ? console.log : console.error
print("usage: " + basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]")
print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]")
process.exit(status)
}
for (let i = 2; i < process.argv.length; ++i) {
const arg = process.argv[i]
if ((arg == "-" || arg[0] != "-") && !infile) infile = arg
else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i]
else if (arg == "--ecma3") options.ecmaVersion = 3
else if (arg == "--ecma5") options.ecmaVersion = 5
else if (arg == "--ecma6") options.ecmaVersion = 6
else if (arg == "--ecma7") options.ecmaVersion = 7
else if (arg == "--locations") options.locations = true
else if (arg == "--allow-hash-bang") options.allowHashBang = true
else if (arg == "--silent") silent = true
else if (arg == "--compact") compact = true
else if (arg == "--help") help(0)
else if (arg == "--tokenize") tokenize = true
else if (arg == "--module") options.sourceType = 'module'
else help(1)
}
function run(code) {
let result
if (!tokenize) {
try { result = acorn.parse(code, options) }
catch(e) { console.error(e.message); process.exit(1) }
} else {
result = []
let tokenizer = acorn.tokenizer(code, options), token
while (true) {
try { token = tokenizer.getToken() }
catch(e) { console.error(e.message); process.exit(1) }
result.push(token)
if (token.type == acorn.tokTypes.eof) break
}
}
if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2))
}
if (forceFile || infile && infile != "-") {
run(readFile(infile, "utf8"))
} else {
let code = ""
process.stdin.resume()
process.stdin.on("data", chunk => code += chunk)
process.stdin.on("end", () => run(code))
}
This diff is collapsed.
export function isDummy(node) { return node.name == "✖" }
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
These files are compiled dot templates from dot folder.
Do NOT edit them directly, edit the templates and run `npm run build` from main ajv-keywords folder.
This diff is collapsed.
This diff is collapsed.
'use strict';
module.exports = require('./_formatLimit')('Maximum');
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment