faker 1.0.0 → 6.6.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of faker might be problematic. Click here for more details.

Files changed (60) hide show
  1. package/.eslintrc +54 -0
  2. package/.gitattributes +1 -0
  3. package/.github/FUNDING.yml +12 -0
  4. package/.travis.yml +7 -3
  5. package/.versions +23 -0
  6. package/Readme.md +1 -46
  7. package/package.json +70 -23
  8. package/.jshintrc +0 -87
  9. package/.npmignore +0 -16
  10. package/BUILD/BUILD.js +0 -139
  11. package/BUILD/Mustache.js +0 -296
  12. package/BUILD/docs.js +0 -62
  13. package/BUILD/main.js +0 -60
  14. package/MIT-LICENSE.txt +0 -20
  15. package/Makefile +0 -26
  16. package/examples/bigDataSet.json +0 -1
  17. package/examples/browser_test.html +0 -40
  18. package/examples/dataSet.json +0 -1
  19. package/examples/index.html +0 -77
  20. package/examples/js/faker.js +0 -730
  21. package/examples/js/jquery.js +0 -154
  22. package/examples/js/prettyPrint.js +0 -712
  23. package/examples/library_test.js +0 -9
  24. package/examples/node_generateSet.js +0 -20
  25. package/examples/node_min_test.js +0 -9
  26. package/faker.js +0 -730
  27. package/index.js +0 -31
  28. package/lib/address.js +0 -100
  29. package/lib/company.js +0 -36
  30. package/lib/date.js +0 -42
  31. package/lib/definitions.js +0 -1398
  32. package/lib/helpers.js +0 -124
  33. package/lib/image.js +0 -58
  34. package/lib/internet.js +0 -53
  35. package/lib/lorem.js +0 -45
  36. package/lib/name.js +0 -34
  37. package/lib/phone_number.js +0 -16
  38. package/lib/random.js +0 -106
  39. package/lib/tree.js +0 -69
  40. package/lib/version.js +0 -0
  41. package/logo.png +0 -0
  42. package/minfaker.js +0 -35
  43. package/test/address.unit.js +0 -293
  44. package/test/all.functional.js +0 -47
  45. package/test/browser.unit.html +0 -28
  46. package/test/company.unit.js +0 -110
  47. package/test/date.unit.js +0 -65
  48. package/test/helpers.unit.js +0 -62
  49. package/test/image.unit.js +0 -108
  50. package/test/internet.unit.js +0 -92
  51. package/test/lorem.unit.js +0 -178
  52. package/test/mocha.opts +0 -5
  53. package/test/name.unit.js +0 -87
  54. package/test/phone_number.unit.js +0 -29
  55. package/test/run.js +0 -68
  56. package/test/support/chai.js +0 -3403
  57. package/test/support/sinon-1.5.2.js +0 -4153
  58. package/test/support/walk_dir.js +0 -43
  59. package/test/tree.unit.js +0 -108
  60. /package/{.jshintignore → .eslintignore} +0 -0
package/.eslintrc ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "env": {
3
+ "browser": true,
4
+ "jquery": true,
5
+ "mocha": true,
6
+ "node": true
7
+ },
8
+ "globals": {},
9
+ "rules": {
10
+ "no-multi-str": 2,
11
+ "no-debugger": 0,
12
+ "strict": 0,
13
+ "semi": 0,
14
+ "linebreak-style": 0,
15
+ "no-bitwise": 2,
16
+ "no-cond-assign": 0,
17
+ "curly": 2,
18
+ "eqeqeq": 0,
19
+ "no-eq-null": 0,
20
+ "no-eval": 0,
21
+ "no-unused-expressions": 0,
22
+ "guard-for-in": 0,
23
+ "wrap-iife": [
24
+ 2,
25
+ "any"
26
+ ],
27
+ "no-use-before-define": [
28
+ 2,
29
+ {
30
+ "functions": false
31
+ }
32
+ ],
33
+ "no-loop-func": 2,
34
+ "no-caller": 2,
35
+ "no-script-url": 2,
36
+ "no-shadow": 2,
37
+ "no-new-func": 0,
38
+ "no-new-wrappers": 0,
39
+ "no-undef": 2,
40
+ "new-cap": 0,
41
+ "no-empty": 2,
42
+ "no-new": 0,
43
+ "no-ternary": 2,
44
+ "no-plusplus": 0,
45
+ "dot-notation": 0,
46
+ "indent": [
47
+ 2,
48
+ 2,
49
+ {
50
+ "SwitchCase": 1
51
+ }
52
+ ]
53
+ }
54
+ }
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ * -crlf
@@ -0,0 +1,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: marak
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # fakerjs
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: # Replace with a single custom sponsorship URL
package/.travis.yml CHANGED
@@ -1,5 +1,9 @@
1
+ # Run on new travis container (docker) based infrastructure
2
+ sudo: false
1
3
  language: node_js
4
+ script:
5
+ - npm run lint
6
+ - npm test
2
7
  node_js:
3
- - "0.11"
4
- - "0.10"
5
- - "0.8"
8
+ - "node"
9
+ - "lts/*"
package/.versions ADDED
@@ -0,0 +1,23 @@
1
+ base64@1.0.3
2
+ binary-heap@1.0.3
3
+ callback-hook@1.0.3
4
+ check@1.0.5
5
+ coffeescript@1.0.6
6
+ ddp@1.1.0
7
+ ejson@1.0.6
8
+ geojson-utils@1.0.3
9
+ id-map@1.0.3
10
+ json@1.0.3
11
+ local-test:practicalmeteor:faker@2.1.1_1
12
+ logging@1.0.7
13
+ meteor@1.1.6
14
+ minimongo@1.0.8
15
+ mongo@1.1.0
16
+ ordered-dict@1.0.3
17
+ practicalmeteor:chai@2.1.0_1
18
+ practicalmeteor:faker@2.1.1_1
19
+ random@1.0.3
20
+ retry@1.0.3
21
+ tinytest@1.0.5
22
+ tracker@1.0.7
23
+ underscore@1.0.3
package/Readme.md CHANGED
@@ -1,46 +1 @@
1
- # faker.js - generate massive amounts of fake data in the browser and node.js
2
- <img src = "http://imgur.com/KiinQ.png" border = "0">
3
- ## USAGE
4
- ### browser -
5
- <script src = "faker.js" type = "text/javascript"></script>
6
- <script>
7
- var randomName = faker.Name.findName(); // Caitlyn Kerluke
8
- var randomEmail = faker.Internet.email(); // Rusty@arne.info
9
- var randomCard = faker.Helpers.createCard(); // random contact card containing many properties
10
- </script>
11
- ### node.js -
12
- ### usage
13
- var faker = require('./faker');
14
- var randomName = faker.Name.findName(); // Rowan Nikolaus
15
- var randomEmail = faker.Internet.email(); // Kassandra.Haley@erich.biz
16
- var randomCard = faker.Helpers.createCard(); // random contact card containing many properties
17
- ## API
18
- <ul><li>Name<ul><li>firstName</li><li>firstNameFemale</li><li>firstNameMale</li><li>lastName</li><li>findName</li></ul></li><li>Address<ul><li>zipCode</li><li>zipCodeFormat</li><li>city</li><li>streetName</li><li>streetAddress</li><li>secondaryAddress</li><li>brState</li><li>ukCounty</li><li>ukCountry</li><li>usState</li><li>latitude</li><li>longitude</li></ul></li><li>PhoneNumber<ul><li>phoneNumber</li><li>phoneNumberFormat</li></ul></li><li>Internet<ul><li>email</li><li>userName</li><li>domainName</li><li>domainWord</li><li>ip</li><li>color</li></ul></li><li>Company<ul><li>suffixes</li><li>companyName</li><li>companySuffix</li><li>catchPhrase</li><li>bs</li></ul></li><li>Image<ul><li>avatar</li><li>imageUrl</li><li>abstractImage</li><li>animals</li><li>business</li><li>cats</li><li>city</li><li>food</li><li>nightlife</li><li>fashion</li><li>people</li><li>nature</li><li>sports</li><li>technics</li><li>transport</li></ul></li><li>Lorem<ul><li>words</li><li>sentence</li><li>sentences</li><li>paragraph</li><li>paragraphs</li></ul></li><li>Helpers<ul><li>randomNumber</li><li>randomize</li><li>slugify</li><li>replaceSymbolWithNumber</li><li>shuffle</li><li>createCard</li><li>userCard</li></ul></li><li>Tree<ul><li>clone</li><li>createTree</li></ul></li><li>Date<ul><li>past</li><li>future</li><li>between</li><li>recent</li></ul></li><li>random<ul><li>number</li><li>array_element</li><li>city_prefix</li><li>city_suffix</li><li>street_suffix</li><li>br_state</li><li>br_state_abbr</li><li>us_state</li><li>us_state_abbr</li><li>uk_county</li><li>uk_country</li><li>first_name</li><li>last_name</li><li>name_prefix</li><li>name_suffix</li><li>catch_phrase_adjective</li><li>catch_phrase_descriptor</li><li>catch_phrase_noun</li><li>bs_adjective</li><li>bs_buzz</li><li>bs_noun</li><li>phone_formats</li><li>domain_suffix</li><li>avatar_uri</li></ul></li><li>definitions<ul><li>first_name</li><li>last_name</li><li>name_prefix</li><li>name_suffix</li><li>br_state</li><li>br_state_abbr</li><li>us_state</li><li>us_state_abbr</li><li>city_prefix</li><li>city_suffix</li><li>street_suffix</li><li>uk_county</li><li>uk_country</li><li>catch_phrase_adjective</li><li>catch_phrase_descriptor</li><li>catch_phrase_noun</li><li>bs_adjective</li><li>bs_buzz</li><li>bs_noun</li><li>domain_suffix</li><li>lorem</li><li>phone_formats</li><li>avatar_uri</li></ul></li></ul>
19
- ## Tests
20
- npm install .
21
- make test
22
- You can view a code coverage report generated in coverage/lcov-report/index.html.
23
- ## Authors
24
- ####Matthew Bergman & Marak Squires
25
- Heavily inspired by Benjamin Curtis's Ruby Gem [faker](http://faker.rubyforge.org/) and Perl's [Faker](http://search.cpan.org/~awncorp/Faker-0.09/lib/Faker.pm)
26
- <br/>
27
- Copyright (c) 2014 Matthew Bergman & Marak Squires http://github.com/marak/faker.js/
28
- <br/>
29
- Permission is hereby granted, free of charge, to any person obtaining
30
- a copy of this software and associated documentation files (the
31
- "Software"), to deal in the Software without restriction, including
32
- without limitation the rights to use, copy, modify, merge, publish,
33
- distribute, sublicense, and/or sell copies of the Software, and to
34
- permit persons to whom the Software is furnished to do so, subject to
35
- the following conditions:
36
- <br/>
37
- The above copyright notice and this permission notice shall be
38
- included in all copies or substantial portions of the Software.
39
- <br/>
40
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
42
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
44
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
45
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
46
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ What really happened with Aaron Swartz?
package/package.json CHANGED
@@ -1,25 +1,72 @@
1
1
  {
2
- "name": "faker",
3
- "description": "Generate massive amounts of fake contextual data",
4
- "version": "1.0.0",
5
- "contributors": [
6
- "Marak Squires <marak.squires@gmail.com>",
7
- "Matthew Bergman <matt@novafabrica.com>"
8
- ],
9
- "repository": {
10
- "type": "git",
11
- "url": "http://github.com/FotoVerite/faker.js.git"
12
- },
13
- "scripts": {
14
- "test": "node_modules/.bin/mocha test/*.*.js"
15
- },
16
- "devDependencies": {
17
- "jshint": "0.9.0",
18
- "istanbul": "0.1.25",
19
- "mocha": "1.7.4",
20
- "node-minify": "*",
21
- "optimist" : "0.3.5",
22
- "sinon": "1.4.2"
23
- },
24
- "main": "index.js"
2
+ "name": "faker",
3
+ "description": "Generate massive amounts of fake contextual data",
4
+ "version": "6.6.6",
5
+ "contributors": [
6
+ "Marak Squires <marak.squires@gmail.com>"
7
+ ],
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "http://github.com/Marak/Faker.js.git"
11
+ },
12
+ "scripts": {
13
+ "browser": "./node_modules/.bin/gulp browser",
14
+ "jsdoc": "./node_modules/.bin/gulp jsdoc",
15
+ "readme": "./node_modules/.bin/gulp readme",
16
+ "lint": "node_modules/.bin/eslint ./lib/animal.js",
17
+ "test": "node_modules/.bin/mocha test/*.*.js",
18
+ "coverage": "nyc report --reporter=text-lcov | coveralls"
19
+ },
20
+ "nyc": {
21
+ "all": false,
22
+ "include": [
23
+ "lib/**/*.js",
24
+ "vendor/*.js"
25
+ ],
26
+ "exclude": [
27
+ "coverage",
28
+ "locales",
29
+ "modules",
30
+ "white",
31
+ "docs",
32
+ "docker",
33
+ "public",
34
+ "reports",
35
+ "tests",
36
+ "node_modules"
37
+ ],
38
+ "reporter": [
39
+ "html",
40
+ "lcov",
41
+ "clover"
42
+ ],
43
+ "report-dir": "./reports/coverage"
44
+ },
45
+ "devDependencies": {
46
+ "browserify": "^16.5.2",
47
+ "coveralls": "^3.1.0",
48
+ "gulp": "^4.0.2",
49
+ "gulp-gh-pages": "^0.5.4",
50
+ "gulp-jsdoc3": "^3.0.0",
51
+ "gulp-mustache": "^5.0.0",
52
+ "gulp-rename": "^2.0.0",
53
+ "gulp-uglify": "^3.0.2",
54
+ "eslint": "^6.5.1",
55
+ "ink-docstrap": "1.1.4",
56
+ "jsdoc": "^3.4.0",
57
+ "lint-staged": "^9.4.2",
58
+ "lodash": "^4.6.1",
59
+ "mocha": "^8.1.1",
60
+ "node-minify": "*",
61
+ "nyc": "^15.1.0",
62
+ "optimist": "0.3.5",
63
+ "sinon": "^9.0.3",
64
+ "through2": "2.0.0",
65
+ "vinyl-buffer": "^1.0.1",
66
+ "vinyl-source-stream": "^2.0.0",
67
+ "vinyl-transform": "^1.0.0"
68
+ },
69
+ "license": "MIT",
70
+ "main": "index.js",
71
+ "dependencies": {}
25
72
  }
package/.jshintrc DELETED
@@ -1,87 +0,0 @@
1
- {
2
- // Settings
3
- "passfail" : false, // Stop on first error.
4
- "maxerr" : 500, // Maximum errors before stopping.
5
- "multistr" : true,
6
-
7
-
8
- // Predefined globals whom JSHint will ignore.
9
- "browser" : true, // Standard browser globals e.g. `window`, `document`.
10
-
11
- "node" : false,
12
- "rhino" : false,
13
- "couch" : false,
14
- "wsh" : true, // Windows Scripting Host.
15
-
16
- "jquery" : true,
17
- "prototypejs" : false,
18
- "mootools" : false,
19
- "dojo" : false,
20
-
21
- "predef" : [ // Extra globals.
22
- "__dirname",
23
- "Buffer",
24
- "event",
25
- "exports",
26
- "global",
27
- "logger",
28
- "module",
29
- "process",
30
- "require",
31
-
32
- "after",
33
- "afterEach",
34
- "before",
35
- "beforeEach",
36
- "context",
37
- "describe",
38
- "it"
39
- ],
40
-
41
- // Development.
42
- "debug" : false, // Allow debugger statements e.g. browser breakpoints.
43
- "devel" : true, // Allow development statements e.g. `console.log();`.
44
-
45
-
46
- // EcmaScript 5.
47
- "es5" : false, // Allow EcmaScript 5 syntax.
48
- "strict" : false, // Require `use strict` pragma in every file.
49
- "globalstrict" : false, // Allow global "use strict" (also enables 'strict').
50
-
51
-
52
- "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
53
- "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
54
- "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
55
- "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
56
- "curly" : true, // Require {} for every new block or scope.
57
- "eqeqeq" : false, // Require triple equals i.e. `===`.
58
- "eqnull" : false, // Tolerate use of `== null`.
59
- "evil" : false, // Tolerate use of `eval`.
60
- "expr" : false, // Tolerate `ExpressionStatement` as Programs.
61
- "forin" : false, // Tolerate `for in` loops without `hasOwnProperty`.
62
- "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
63
- "latedef" : true, // Prohibit variable use before definition.
64
- "loopfunc" : true, // Allow functions to be defined within loops.
65
- //"maxparams" : 4,
66
- //"maxdepth" : 5,
67
- //"maxcomplexity" : 10,
68
- "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
69
- "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions.
70
- "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
71
- "scripturl" : true, // Tolerate script-targeted URLs.
72
- "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
73
- "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
74
- "undef" : true, // Require all non-global variables be declared before they are used.
75
-
76
-
77
- "newcap" : false, // Require capitalization of all constructor functions e.g. `new F()`.
78
- "noempty" : true, // Prohibit use of empty blocks.
79
- "nonew" : false, // Prohibit use of constructors for side-effects.
80
- "nomen" : false, // Prohibit use of initial or trailing underbars in names.
81
- "onevar" : false, // Allow only one `var` statement per function.
82
- "plusplus" : false, // Prohibit use of `++` & `--`.
83
- "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
84
- "trailing" : true, // Prohibit trailing whitespaces. (only works if white is 'true')
85
- "white" : true, // Check against strict whitespace and indentation rules.
86
- "indent" : 4 //
87
- }
package/.npmignore DELETED
@@ -1,16 +0,0 @@
1
- TAGS
2
- REVISION
3
- *.tmproj
4
- *~
5
- .DS_Store
6
- .settings
7
- .project
8
- .tasks-cache
9
- .svn
10
- *DONOTVERSION*
11
- /nbproject
12
- /.idea
13
- lib-cov
14
- node_modules/
15
- /npm-debug.log
16
- /coverage
package/BUILD/BUILD.js DELETED
@@ -1,139 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- var sys = require('sys')
4
- , fs = require('fs')
5
- , M = require('./Mustache')
6
- , compressor = require('node-minify');
7
-
8
- var package = require('../package.json');
9
- var code = '';
10
- var docs = {};
11
-
12
- docs.main = '';
13
- docs.API = '';
14
- docs.copyrightYear = new Date().getFullYear();
15
-
16
- // read in the the main.js file as our main boilerplate code
17
- code += fs.readFileSync('./main.js', encoding = 'utf8');
18
- code = M.Mustache.to_html(code, {'today': new Date().getTime(), 'version': package.version});
19
-
20
- docs.main += fs.readFileSync('./docs.js', encoding = 'utf8');
21
-
22
- // parse entire lib directory and concat it into one file for the browser
23
- var lib = paths('./lib');
24
-
25
- var faker = require('../index');
26
-
27
- // generate bundle for code on the browser
28
- for (var module in faker) {
29
- code += ( '\n' + 'faker.' + module + ' = {};');
30
- for (var method in faker[module]) {
31
- code += ( '\n' + 'faker.' + module);
32
- code += ( '.' + method + ' = ');
33
-
34
- // serialize arrays as JSON, otherwise use simple string conversion
35
- var methodValue = faker[module][method];
36
- if (Array.isArray(methodValue)) {
37
- code += JSON.stringify(methodValue) + ';\n';
38
- } else {
39
- code += (methodValue.toString() + ';\n');
40
- }
41
- }
42
- }
43
-
44
- // generate nice tree of api for docs
45
- docs.API += '<ul>';
46
- for (var module in faker) {
47
- docs.API += '<li>' + module;
48
- docs.API += '<ul>';
49
- for (var method in faker[module]) {
50
- docs.API += '<li>' + method + '</li>';
51
- }
52
- docs.API += '</ul>';
53
- docs.API += '</li>';
54
- }
55
- docs.API += '</ul>';
56
-
57
- // definitions hack
58
- code += 'var definitions = faker.definitions;\n';
59
- code += 'var Helpers = faker.Helpers;\n';
60
-
61
- // if we are running in a CommonJS env, export everything out
62
- code +=["\nif (typeof define == 'function'){",
63
- " define(function(){",
64
- " return faker;",
65
- " });",
66
- "}",
67
- "else if(typeof module !== 'undefined' && module.exports) {",
68
- " module.exports = faker;",
69
- "}",
70
- "else {",
71
- " window.faker = faker;",
72
- "}",
73
- "",
74
- "}()); // end faker closure"].join('\n');
75
-
76
- // generate core library
77
- fs.writeFile('../faker.js', code, function() {
78
- sys.puts("faker.js generated successfully!");
79
- });
80
-
81
- // generate example js file as well
82
- fs.writeFile('../examples/js/faker.js', code, function() {
83
- sys.puts("faker.js generated successfully!");
84
- });
85
-
86
- var docOutput = M.Mustache.to_html(docs.main, {"API": docs.API, "copyrightYear": docs.copyrightYear});
87
-
88
- // generate some samples sets (move this code to another section)
89
- fs.writeFile('../Readme.md', docOutput, function() {
90
- sys.puts("Docs generated successfully!");
91
- });
92
-
93
- // generates minified version Using Google Closure
94
- new compressor.minify({
95
- type: 'gcc',
96
- fileIn: '../faker.js',
97
- fileOut: '../minfaker.js',
98
- callback: function(err){
99
- if(err) {
100
- console.log(err);
101
- }
102
- else sys.puts("Minified version generated successfully!");
103
- }
104
- });
105
-
106
-
107
- /*********************** BUILD HELPER METHODS *********************/
108
-
109
- // Recursively traverse a hierarchy, returning a list of all relevant .js files.
110
- function paths(dir) {
111
- var paths = [];
112
-
113
- try {
114
- fs.statSync(dir);
115
- }
116
- catch (e) {
117
- return e;
118
- }
119
-
120
- (function traverse(dir, stack) {
121
- stack.push(dir);
122
- fs.readdirSync(stack.join('/')).forEach(function(file) {
123
- var path = stack.concat([file]).join('/'),
124
- stat = fs.statSync(path);
125
-
126
- if (file[0] == '.' || file === 'vendor') {
127
- return;
128
- } else if (stat.isFile() && /\.js$/.test(file)) {
129
- paths.push(path);
130
- } else if (stat.isDirectory()) {
131
- paths.push(path);
132
- traverse(file, stack);
133
- }
134
- });
135
- stack.pop();
136
- })(dir || '.', []);
137
-
138
- return paths;
139
- }