diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9daa824 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +node_modules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 6e95593..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "support/font-builder"] - path = support/font-builder - url = git://github.com/fontello/font-builder.git diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..bc8d628 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,70 @@ +#### Version 2.1.0 + +- Icons no longer have zero sidebearings. Each icon is now equal width. +- Minified CSS is no longer generated. +- Updated build process to use `webfonts-generator` to generate all files. +- A JSON dictionary of codepoints is generated for all icons. +- Stylesheets no longer add unnecessary width and height declarations. +- Fix single-quotes @charset declaration in generated CSS file. +- Utility classes have been added for quickly resizing icons, similar to FontAwesome. (-lg, -2x, -3x, etc) +- Added woff2 to generated fonts. + +#### Version 2.0.9 + +- Add source SVG files to `package.json`. + +#### Version 2.0.8 + +- Fix `package.json` files entry for NPM. + +#### Version 2.0.7 + +- Removed SVG ignores from Bower package for developer use. + +#### Version 2.0.6 + +- This release fixes misspelled icons calendar and calendar-outline (Issue #9), renames incorrectly labelled cross to cloud-storage-outline (Issue #5) and adds search terms for many icons to make it easier to find the icon your looking for. It also adds higher decimal rounding for the social-youtube-circular icon to correct some node degradation in the SVG file. + +#### Version 2.0.5 + +- Added non-minified CSS to Bower. + +#### Version 2.0.4 + +- Font files are now licenced using the [SIL Open Font Licence](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). This means that the font can be used, studied, modified and + redistributed freely as long as they are not sold by themselves. + +#### Version 2.0.3 + +- Added new icons including: + - Sort down, sort up and unsorted + - Filter + - Social: Instagram, YouTube and Google Plus + - Vendors: Apple, Microsoft and Google + - Dropbox + - Half and full hearts + - Half and full stars + - Reverse play + - Thumbs OK + - CSS3 and HTML5 + - Folder open + - Mortar board + - Spiral + +#### Version 2.0.2 + +- Fixed support for IE 8 by replacing double colon with single in `::before` + +#### Version 2.0.1 + +- Added bower support +- Removed EPS for smaller repo size (contact me if you want to get them) + +#### Version 2.0.0 + +- Added 220 new icons, including outline variants +- Improved quality of vector artwork +- Mapped in the Private Use Area of Unicode to avoid being read by screen readers +- Rehinted with `ttfautohint` +- Grouped glyphs on demo page, for convenience +- Changed css glyphs names, to be more semantic diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md deleted file mode 100644 index 823c8f2..0000000 --- a/DEVELOPMENT.md +++ /dev/null @@ -1,55 +0,0 @@ -Development docs -================ - -Set of scripts to easily build webfonts from SVG images. -For a detailed description of how Typicons were made, see [here](http://www.typicons.com/more/making-typicons/). - -Installation ------------- - -### Ubuntu - -**(!)** Use Ubuntu **12.04**. Or you will have to manually install fresh freetype library, to build ttfautohint. - -Install dependencies (fontforge & python modules): - - sudo make dev-deps - -Build additional software (ttf2eot, ttfautohint): - - make support - - -### Mac - -See the font-builder README for additional steps to build for OSX. - - -### Windows - -TBD. Anyone, please help. - - -Making font ------------ - -### Steps - -1. Place images into `/src/svg` folder. -2. Add image info to `config.yml` (see comments in it) -3. Edit css/html templates, if needed. -4. Run `make` - -Generated data will be placed in `./font` - -You can rebuild css/html only with `make html` - -### SVG image requirements - -Any image will be proportionnaly scaled, to fit height in ascent-descent -It's convenient to make height = 1000px. Default font baseline will be 20% from -the bottom. - -In most cases it's ok to visually allign icons to middle line, not to baseline. -If you are not sure, how to start - make image with 10% top/bottom padding. -Then generate demo page and tune scale/offset. diff --git a/Makefile b/Makefile deleted file mode 100644 index db6f2f0..0000000 --- a/Makefile +++ /dev/null @@ -1,91 +0,0 @@ -PROJECT := $(notdir ${PWD}) -FONT_NAME := typicons - -################################################################################ -## ! DO NOT EDIT BELOW THIS LINE, UNLESS YOU REALLY KNOW WHAT ARE YOU DOING ! ## -################################################################################ - -TMP_PATH := /tmp/${PROJECT}-$(shell date +%s) -REMOTE_NAME ?= origin -REMOTE_REPO ?= $(shell git config --get remote.${REMOTE_NAME}.url) -FONTBUILDER ?= ./support/font-builder/bin/ - -# Add local versions of ttf2eot and ttfautohint to the PATH -PATH := $(PATH):./support/font-builder/support/ttf2eot/ttf2eot -PATH := $(PATH):./support/font-builder/support/ttfautohint/ttfautohint -PATH := $(PATH):./support/font-builder/bin - -dist: font html - - -dump: - rm -r ./src/svg/ - mkdir ./src/svg/ - font-dump.js --hcrop -c config.yml -f -i ./src/original/Typicons.svg -o ./src/svg/ -d diff.yml - -font: - @if test ! -d support/font-builder/bin ; then \ - echo "font-builder binaries not found. run:" >&2 ; \ - echo " make support" >&2 ; \ - exit 128 ; \ - fi - @if test ! `which ttf2eot` ; then \ - echo "ttf2eot not found. run:" >&2 ; \ - echo " make support" >&2 ; \ - exit 128 ; \ - fi - @if test ! `which ttfautohint` ; then \ - echo "ttfautohint not found. run:" >&2 ; \ - echo " make support" >&2 ; \ - exit 128 ; \ - fi - $(FONTBUILDER)fontbuild.py -c ./config.yml -t ./src/font_template.sfd -i ./src/svg -o ./src/font/$(FONT_NAME).ttf - ttfautohint --latin-fallback --hinting-limit=200 --hinting-range-max=50 --symbol ./src/font/$(FONT_NAME).ttf ./src/font/$(FONT_NAME)-hinted.ttf - mv ./src/font/$(FONT_NAME)-hinted.ttf ./src/font/$(FONT_NAME).ttf - $(FONTBUILDER)fontconvert.py -i ./src/font/$(FONT_NAME).ttf -o ./src/font - ttf2eot < ./src/font/$(FONT_NAME).ttf >./src/font/$(FONT_NAME).eot - - -npm-deps: - @if test ! `which npm` ; then \ - echo "Node.JS and NPM are required for html demo generation." >&2 ; \ - echo "This is non-fatal error and you'll still be able to build font," >&2 ; \ - echo "however, to build demo with >> make html << you need:" >&2 ; \ - echo " - Install Node.JS and NPM" >&2 ; \ - echo " - Run this task once again" >&2 ; \ - else \ - npm install -g jade js-yaml.bin ; \ - fi - - -support: - git submodule init support/font-builder - git submodule update support/font-builder - which ttf2eot ttfautohint > /dev/null || (cd support/font-builder && $(MAKE)) - which js-yaml jade > /dev/null || $(MAKE) npm-deps - - -html: - $(FONTBUILDER)tpl-render.js --locals config.yml --input ./src/demo/demo.jade --output ./src/font/demo.html - $(FONTBUILDER)tpl-render.js --locals config.yml --input ./src/demo/font.css.jade --output ./src/font/typicons.css - $(FONTBUILDER)tpl-minify.js --locals config.yml --input ./src/demo/font.css.jade --output ./src/font/typicons.min.css - - -gh-pages: - @if test -z ${REMOTE_REPO} ; then \ - echo 'Remote repo URL not found' >&2 ; \ - exit 128 ; \ - fi - cp -r ./src/font ${TMP_PATH} && \ - touch ${TMP_PATH}/.nojekyll - cd ${TMP_PATH} && \ - git init && \ - git add . && \ - git commit -q -m 'refreshed gh-pages' - cd ${TMP_PATH} && \ - git remote add remote ${REMOTE_REPO} && \ - git push --force remote +master:gh-pages - rm -rf ${TMP_PATH} - - -.PHONY: font npm-deps support diff --git a/README.md b/README.md index e8cf1e3..eb546da 100644 --- a/README.md +++ b/README.md @@ -1,88 +1,30 @@ -Typicons ----- +## Typicons -Visit the [website](http://typicons.com/) for information on how to use Typicons on your website, a decription of how the font was made and more resources. If you wish to contact me regarding Typicons you can hit me up on [Twitter](http://twitter.com/typicons/). +Visit the [website](http://s-ings.com/typicons) for information on how to use Typicons on your website -Using Typicons ----- +## Using Typicons -Typicons can be easily installed with [bower](http://www.bower.io/)... +Typicons can be easily installed via [npm](http://www.npmjs.com)... ```bash -$ bower install typicons +$ npm install typicons.font ``` -...or NPM. +...or [bower](http://www.bower.io/). ```bash -$ npm install typicons.font +$ bower install typicons ``` -Otherwise, the font and minified CSS can be found in [src/font/](https://github.com/stephenhutchings/typicons.font/tree/master/src/font). +Otherwise, the fonts and CSS can be found in [src/font/](https://github.com/stephenhutchings/typicons.font/tree/master/src/font). SVG source files can be found in [src/svg/](https://github.com/stephenhutchings/typicons.font/tree/master/src/svg). -If you're looking to use Typicons on iOS, you can find support [here](https://github.com/javaboyjunior/typicon-ios) thanks to [@javaboyjunior](https://github.com/javaboyjunior). - -Info ----- - -What's new in Typicons - -#### Version 2.0.9 -- Add source SVG files to `package.json`. - -#### Version 2.0.8 -- Fix `package.json` files entry for NPM. - -#### Version 2.0.7 -- Removed SVG ignores from Bower package for developer use. - -#### Version 2.0.6 -- This release fixes misspelled icons calendar and calendar-outline (Issue #9), renames incorrectly labelled cross to cloud-storage-outline (Issue #5) and adds search terms for many icons to make it easier to find the icon your looking for. It also adds higher decimal rounding for the social-youtube-circular icon to correct some node degradation in the SVG file. +## Info -#### Version 2.0.5 -- Added non-minified CSS to Bower. +What's new in Typicons? See the [changelog](https://github.com/stephenhutchings/typicons.font/blob/master/CHANGELOG.md). -#### Version 2.0.4 -- Font files are now licenced using the [SIL Open Font Licence](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). This means that the font can be used, studied, modified and -redistributed freely as long as they are not sold by themselves. - -#### Version 2.0.3 -- Added new icons including: - - Sort down, sort up and unsorted - - Filter - - Social: Instagram, YouTube and Google Plus - - Vendors: Apple, Microsoft and Google - - Dropbox - - Half and full hearts - - Half and full stars - - Reverse play - - Thumbs OK - - CSS3 and HTML5 - - Folder open - - Mortar board - - Spiral - -#### Version 2.0.2 -- Fixed support for IE 8 by replacing double colon with single in `::before` - -#### Version 2.0.1 - -- Added bower support -- Removed EPS for smaller repo size (contact me if you want to get them) - -#### Version 2.0.0 - -- Added 220 new icons, including outline variants -- Improved quality of vector artwork -- Mapped in the Private Use Area of Unicode to avoid being read by screen readers -- Rehinted with `ttfautohint` -- Grouped glyphs on demo page, for convenience -- Changed css glyphs names, to be more semantic - -License -------- +## License #### Icons/Artwork @@ -93,10 +35,3 @@ Distributed under Distributed under [SIL Open Font Licence](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web) licence. - -Other -------- - -#### Scripting - -This project uses [font-builder](https://github.com/fontello/font-builder) scripts to generate data. See DEVELOPMENT.MD for more information on how to build the font. diff --git a/bower.json b/bower.json index 7eaa717..03863c4 100644 --- a/bower.json +++ b/bower.json @@ -11,27 +11,17 @@ "src/font/typicons.min.css", "src/font/LICENCE.md" ], - "authors": [ - "Stephen Hutchings " - ], + "authors": ["Stephen Hutchings "], "description": "Typicons are free-to-use vector icons embedded in a webfont for easy use in your user interfaces, whether it be on the web or in a native application.", - "keywords": [ - "icon", - "fonts", - "icons", - "font-face", - "webfont" - ], + "keywords": ["icon", "fonts", "icons", "font-face", "webfont"], "ignore": [ "**/.*", "src/demo", "src/png-24px", "src/png-48px", - "support", - "Makefile", - "config.yml", - "*.md" + "*.md", + "*.json" ], - "homepage": "http://typicons.com/", - "license": "CC BY-SA 4.0 / SIL" + "homepage": "https://www.s-ings.com/typicons", + "license": "CC BY-SA / SIL" } diff --git a/config.yml b/config.yml deleted file mode 100644 index 24de8c6..0000000 --- a/config.yml +++ /dev/null @@ -1,1702 +0,0 @@ -meta: - author: 'Stephen Hutchings' - homepage: 'http://typicons.com/' - twitter: 'https://twitter.com/Typicons/' - license: 'CC BY-SA 3.0' - license_url: 'http://creativecommons.org/licenses/by-sa/3.0/' - css_prefix: typcn - columns: 12 -transform: - baseline: 0.2 - rescale: 1 - offset: 0 -font: - version: 2.0.3 - fontname: typicons - fullname: Typicons - familyname: Typicons - copyright: '(c) Stephen Hutchings 2012' - ascent: 800 - descent: 200 - weight: Book -glyphs: - - - css: adjust-brightness - code: '0xe000' - search: ['sun'] - uid: b9bd77c24c29b0de436189f0b4464d24 - - - css: adjust-contrast - code: '0xe001' - search: ['half'] - uid: ac0020eab87db07bb53a9c0dbc052ee3 - - - css: anchor-outline - code: '0xe002' - search: [] - uid: c9c17013de52b9b995f290a32fa8bd23 - - - css: anchor - code: '0xe003' - search: [] - uid: fe66a6791091b289e22764cca0aa6cfe - - - css: archive - code: '0xe004' - search: [] - uid: f897709c302182e802693f20015513f8 - - - css: arrow-back-outline - code: '0xe005' - search: [] - uid: 00205117c8e9754def0fc52d9631dd51 - - - css: arrow-back - code: '0xe006' - search: [] - uid: 98e2ca976e3e7310e7ccda3adb8dbc9c - - - css: arrow-down-outline - code: '0xe007' - search: [] - uid: a2311f8c071fb3f275768d47eb82b7d3 - - - css: arrow-down-thick - code: '0xe008' - search: [] - uid: a63dfac4991840a79748062b7f526492 - - - css: arrow-down - code: '0xe009' - search: [] - uid: 2398c0a3472a86f4624bbb84eb34703d - - - css: arrow-forward-outline - code: '0xe00a' - search: [] - uid: 79dd68e39b2bfc51ee34819ca59fa83f - - - css: arrow-forward - code: '0xe00b' - search: [] - uid: c35eb16685afd61961e9a84f4a3c36c2 - - - css: arrow-left-outline - code: '0xe00c' - search: [] - uid: 019b60a12e54d741ae04033f55a5fd9c - - - css: arrow-left-thick - code: '0xe00d' - search: [] - uid: ba285605cb1c1198d5b153fa948de9fe - - - css: arrow-left - code: '0xe00e' - search: [] - uid: 84a9c09709ae3aa621e81d9298171ee7 - - - css: arrow-loop-outline - code: '0xe00f' - search: [] - uid: f71e66d89d5ef6135f54759fc08ae8a4 - - - css: arrow-loop - code: '0xe010' - search: [] - uid: 773a916785fa9e94800fefd60f0a0939 - - - css: arrow-maximise-outline - code: '0xe011' - search: [] - uid: 8d816a8b0ed67630dc539a088e2c763d - - - css: arrow-maximise - code: '0xe012' - search: [] - uid: 7c1153085b199830ab9a65c9d4f39b52 - - - css: arrow-minimise-outline - code: '0xe013' - search: [] - uid: d6892578bc7577a02b43c1863b16dd28 - - - css: arrow-minimise - code: '0xe014' - search: [] - uid: 22cbd199475e649e48dbc8f9e90fa859 - - - css: arrow-move-outline - code: '0xe015' - search: [] - uid: 51b9115a1123bb308c71365785e5dfc5 - - - css: arrow-move - code: '0xe016' - search: [] - uid: 5511979e2a27c4b0b44bc89a0d1b4118 - - - css: arrow-repeat-outline - code: '0xe017' - search: [] - uid: e038527444c829407a9ce401fbb8a0eb - - - css: arrow-repeat - code: '0xe018' - search: [] - uid: 4ba1d0cf4dc65095db016350634e3018 - - - css: arrow-right-outline - code: '0xe019' - search: [] - uid: 91b672e77152c9d3ab1a2288036a7369 - - - css: arrow-right-thick - code: '0xe01a' - search: [] - uid: 9ac0656a88c6477625175ef4179274f4 - - - css: arrow-right - code: '0xe01b' - search: [] - uid: 7ba87d223d72e5652d8fd2ec8871122d - - - css: arrow-shuffle - code: '0xe01c' - search: [] - uid: 95f1d32ab9820776c170327514d3fa1b - - - css: arrow-sorted-down - code: '0xe01d' - search: [] - uid: 518131b5908d38c0b387665f0336d11a - - - css: arrow-sorted-up - code: '0xe01e' - search: [] - uid: ff4d26687711c9056057d5bc5d954722 - - - css: arrow-sync-outline - code: '0xe01f' - search: [] - uid: 3bfaee094eb237fd4248eb11f73e32ad - - - css: arrow-sync - code: '0xe020' - search: [] - uid: 086cb6234c74e135042f0778c469bb09 - - - css: arrow-unsorted - code: '0xe021' - search: [] - uid: e4d1b34888914eb56ec0b379e758943d - - - css: arrow-up-outline - code: '0xe022' - search: [] - uid: eea5e6661931c2366c6c4ca311553fc0 - - - css: arrow-up-thick - code: '0xe023' - search: [] - uid: 135c926b0c569d9038dbafa12241d963 - - - css: arrow-up - code: '0xe024' - search: [] - uid: 116559f85c70ef861003053c6eabe7b7 - - - css: at - code: '0xe025' - search: [] - uid: fe0b64b52ce384595592524f97923be7 - - - css: attachment-outline - code: '0xe026' - search: [] - uid: e2203e3b486b12944df7778fe3f04f46 - - - css: attachment - code: '0xe027' - search: [] - uid: f62d4207eea18e49df87fc134cb23e34 - - - css: backspace-outline - code: '0xe028' - search: ['delete'] - uid: 3cf5a043a9db0160fb84ac7e4f93dbcb - - - css: backspace - code: '0xe029' - search: ['delete'] - uid: c76e609d24457f2ec2bac81db3b0a3a7 - - - css: battery-charge - code: '0xe02a' - search: ['power'] - uid: 173870048fb581887ac70bc34110f25c - - - css: battery-full - code: '0xe02b' - search: ['power'] - uid: 992754f91a36833d501fdf845bf9b122 - - - css: battery-high - code: '0xe02c' - search: ['power'] - uid: 2587a5028c636c8d17e69d3065dbb20e - - - css: battery-low - code: '0xe02d' - search: ['power'] - uid: 8aa2152f00f1504047e95b72421f7491 - - - css: battery-mid - code: '0xe02e' - search: ['power'] - uid: 58119cb802463cb1bd7c204dbb2ce465 - - - css: beaker - code: '0xe02f' - search: ['lab', 'beta', 'experiment'] - uid: 3d2ab95f035cd9dc89ebe469b8075fac - - - css: beer - code: '0xe030' - search: ['ale', 'lager'] - uid: 58b8a41785dd93f9a1fd5efeaaf75454 - - - css: bell - code: '0xe031' - search: ['tone', 'alarm'] - uid: 23d61d9ecd7df97f1de60a7f89021e5f - - - css: book - code: '0xe032' - search: [] - uid: dd8444bd56dcaeb0c2c7aad10d487d76 - - - css: bookmark - code: '0xe033' - search: ['banner', 'flag'] - uid: 076b10c6ca2f6c94642be9701b145d39 - - - css: briefcase - code: '0xe034' - search: [] - uid: 6c3f4b34cf11996fcfa958382ad5d78c - - - css: brush - code: '0xe035' - search: [] - uid: 9676b486abfa383edb4de68d412357df - - - css: business-card - code: '0xe036' - search: ['id'] - uid: f6a730a2a657f13cfd323f5da8c8f1ca - - - css: calculator - code: '0xe037' - search: [] - uid: 06ee44fe347e36895e523871ec2436a0 - - - css: calendar-outline - code: '0xe038' - search: [] - uid: 7e57e738e6da5190eff23bc1860dd2e6 - - - css: calendar - code: '0xe039' - search: [] - uid: ad759fc4ada94ceb5a7c0586a890af82 - - - css: camera-outline - code: '0xe03a' - search: [] - uid: 554974ee875ddfb5df6ceaf2a82ba283 - - - css: camera - code: '0xe03b' - search: ['photo'] - uid: 08c7b7e624752f3ae177c26f88ddd14a - - - css: cancel-outline - code: '0xe03c' - search: ['photo'] - uid: 6310885abed137c223b8edd480d9c9b6 - - - css: cancel - code: '0xe03d' - search: [] - uid: cefc9a5fde42ba87acc41b36a37f9006 - - - css: chart-area-outline - code: '0xe03e' - search: ['graph'] - uid: 376b45f10317a66636eafb14c85d3093 - - - css: chart-area - code: '0xe03f' - search: ['graph'] - uid: 1d31138468906c051c36f2748d8957d7 - - - css: chart-bar-outline - code: '0xe040' - search: ['graph'] - uid: 898c66dcfbbc66024120eca82ac11424 - - - css: chart-bar - code: '0xe041' - search: ['graph'] - uid: f71dceec6682d34a1b7c8bfe2ec63b4d - - - css: chart-line-outline - code: '0xe042' - search: ['graph'] - uid: 75279a4120786742ba2679a739809548 - - - css: chart-line - code: '0xe043' - search: ['graph'] - uid: 2a2a053f6fca82693ff82956e2fc7e90 - - - css: chart-pie-outline - code: '0xe044' - search: ['graph'] - uid: 78cbe98ab9e8a20bbbf1e45d5b94e8a0 - - - css: chart-pie - code: '0xe045' - search: ['graph'] - uid: f62ffb8b31f42d24ef0b28771bd61b3c - - - css: chevron-left-outline - code: '0xe046' - search: ['less than'] - uid: b6209397a9de9e71c7cf90cc0b7f1be5 - - - css: chevron-left - code: '0xe047' - search: ['less than'] - uid: 9b10834ed8434a67fa0b49c9ae350249 - - - css: chevron-right-outline - code: '0xe048' - search: ['greater than'] - uid: 4191765b8e8aa1eb6a80270ac0535307 - - - css: chevron-right - code: '0xe049' - search: ['greater than'] - uid: f1368116ccc420ba94f99f697cdf15f3 - - - css: clipboard - code: '0xe04a' - search: ['copy'] - uid: 26732379b15a12648c20b8f8c0be1bba - - - css: cloud-storage - code: '0xe04b' - search: ['data', 'upload'] - uid: 88f024886e5807b4d24a8e34f67e5456 - - - css: cloud-storage-outline - code: '0xe054' - search: ['data', 'upload'] - uid: 45cc6c807623fd499899d2112b3cd53e - - - css: code-outline - code: '0xe04c' - search: ['tag'] - uid: b5cffbf924e9e7b6a2189e2a411d3806 - - - css: code - code: '0xe04d' - search: ['tag'] - uid: af0f49033a6b434f641691baec782669 - - - css: coffee - code: '0xe04e' - search: ['beverage'] - uid: a75801d69a25f60124104cd129cda36a - - - css: cog-outline - code: '0xe04f' - search: ['settings'] - uid: f4d87ad03169b2a8132438eab189c1f1 - - - css: cog - code: '0xe050' - search: ['settings'] - uid: 2439fa620fdb760beafd3c900692b2fd - - - css: compass - code: '0xe051' - search: ['safari'] - uid: de18e7c7046c0b68612cb7036f03496a - - - css: contacts - code: '0xe052' - search: ['address', 'book'] - uid: 63acf36cfcf7d2ca23b27e9f72202521 - - - css: credit-card - code: '0xe053' - search: ['payment'] - uid: 705bc3b19c667eeb2fa6179b5b6abde6 - - - css: css3 - code: '0xe055' - search: [] - uid: cda21e500f832c40e7fb2ed647ec5dcd - - - css: database - code: '0xe056' - search: ['db'] - uid: 874bc298ba90a4601f7bdf39e8170bab - - - css: delete-outline - code: '0xe057' - search: ['cross', 'close'] - uid: 43604a077739fa1b2591beda1b8bb4f9 - - - css: delete - code: '0xe058' - search: ['cross', 'close'] - uid: cfcef84dde75250d425a795f760fde8e - - - css: device-desktop - code: '0xe059' - search: ['pc', 'mac'] - uid: f93721391c54b7dfb32b71ba93c39fbf - - - css: device-laptop - code: '0xe05a' - search: ['notebook', 'macbook'] - uid: 2993472cf743993efbc7e49d459ffd13 - - - css: device-phone - code: '0xe05b' - search: ['iphone'] - uid: 7c9e4c267104ff7632c61509d31fb9ec - - - css: device-tablet - code: '0xe05c' - search: ['ipad'] - uid: 363a1186cb0e76996f9d041c18841109 - - - css: directions - code: '0xe05d' - search: [] - uid: 241d2ffa8dce944ea4f7b220ee9a6c54 - - - css: divide-outline - code: '0xe05e' - search: ['division'] - uid: cb99e055c49c124d15ecd960c69449c8 - - - css: divide - code: '0xe05f' - search: ['division'] - uid: 8e0326e0e4f4dafaaae06666beebb588 - - - css: document-add - code: '0xe060' - search: ['file'] - uid: 952b60a1fe3c1e254379dc9504bcc1ac - - - css: document-delete - code: '0xe061' - search: ['file'] - uid: 21f5d14dab4433c16aea2b6d5033e95f - - - css: document-text - code: '0xe062' - search: ['file'] - uid: 69ec68235559898c6c5708a5ce8200e9 - - - css: document - code: '0xe063' - search: ['file'] - uid: e97d0a65db26b29b4328704a8b8a7d38 - - - css: download-outline - code: '0xe064' - search: [] - uid: ab977649b921826a71f36ac69e32ddf6 - - - css: download - code: '0xe065' - search: [] - uid: 436a07119aeddeef8c2774684bbc043e - - - css: dropbox - code: '0xe066' - search: [] - uid: d0c3701227a81d4f803c7b87db8addeb - - - css: edit - code: '0xe067' - search: ['pencil'] - uid: 90e5bc92ab90944fbf1aeefb227ccfa6 - - - css: eject-outline - code: '0xe068' - search: ['export', 'log', 'off', 'out'] - uid: 07b08886a2a06f2bca467f5c9a927d4e - - - css: eject - code: '0xe069' - search: ['export', 'log', 'off', 'out'] - uid: 553597a4535f27d7fa94cc47d97d6ece - - - css: equals-outline - code: '0xe06a' - search: [] - uid: c178d1ad8a481dea7410208f0db5dee7 - - - css: equals - code: '0xe06b' - search: [] - uid: ca589180b9523391f49c652fb190e59f - - - css: export-outline - code: '0xe06c' - search: ['share'] - uid: 20b32b57f57c13764c50bc0f4d83963a - - - css: export - code: '0xe06d' - search: ['share'] - uid: 6210cf807ad9f0ca5d6a5165258ec558 - - - css: eye-outline - code: '0xe06e' - search: ['view'] - uid: 5521f4767cecd3c437cf170acc108b94 - - - css: eye - code: '0xe06f' - search: ['view'] - uid: e3b0edd962a6618d5e2e8856f92b8cf4 - - - css: feather - code: '0xe070' - search: [] - uid: 15a5004fa1e57e8b491fe9a9f82388f6 - - - css: film - code: '0xe071' - search: ['strip'] - uid: aedfeb8f611f9149d4e54ee986d4b409 - - - css: filter - code: '0xe072' - search: ['funnel', 'refine'] - uid: 38517122f7e8aca23488d5d9aebe861a - - - css: flag-outline - code: '0xe073' - search: [] - uid: 5d5abd95694624e083c997d974ffec4a - - - css: flag - code: '0xe074' - search: [] - uid: 1572e293fcb4436627a8c34cf3c970ec - - - css: flash-outline - code: '0xe075' - search: ['power', 'lightning'] - uid: 0bdca1d8d001c039369f07079e3638e3 - - - css: flash - code: '0xe076' - search: ['power', 'lightning'] - uid: 3238fe7b7e63bee01c4c1a0a2ec5e5ff - - - css: flow-children - code: '0xe077' - search: [] - uid: aebfb9fa60f1d3bc9bbf81e0728eb431 - - - css: flow-merge - code: '0xe078' - search: [] - uid: 361f5ed8bef48f0d3ccc12be4e316e09 - - - css: flow-parallel - code: '0xe079' - search: [] - uid: bed7cadaa42239eec9b991576e4f7ff1 - - - css: flow-switch - code: '0xe07a' - search: [] - uid: 0c63a99617ec9631e28ea9dc90c5d3c9 - - - css: folder-add - code: '0xe07b' - search: ['directory'] - uid: e99f3153fcc3f31ba3ccd95571e771d6 - - - css: folder-delete - code: '0xe07c' - search: ['directory'] - uid: cd19f98a28c9fbd63b5436eb249a91d4 - - - css: folder-open - code: '0xe07d' - search: ['directory'] - uid: af8d363f7389f4706e0ec3520cec7261 - - - css: folder - code: '0xe07e' - search: ['directory'] - uid: 195f040a54df33de0967f9f5b5edab35 - - - css: gift - code: '0xe07f' - search: ['present'] - uid: b60cda9726fcec9e00738e416dc4bd6b - - - css: globe-outline - code: '0xe080' - search: [] - uid: a616d52ceb11eaaa982157680ab3d15e - - - css: globe - code: '0xe081' - search: [] - uid: 97c2684941e9e69a7a93cbef73d4f5c0 - - - css: group-outline - code: '0xe082' - search: ['users'] - uid: f9c24297162f3bfe454644baaf826ef9 - - - css: group - code: '0xe083' - search: ['users'] - uid: b3126b19c2f6a0f0c461bca36bb2a423 - - - css: headphones - code: '0xe084' - search: [] - uid: 9c4f89530696f7bff6846568cc3cd440 - - - css: heart-full-outline - code: '0xe085' - search: ['like', 'favourite', 'love'] - uid: 6fabe1d7396154f670be2fda9986ad94 - - - css: heart-half-outline - code: '0xe086' - search: ['like', 'favourite', 'love'] - uid: 465c3549befdaca90676157b8ff82885 - - - css: heart-outline - code: '0xe087' - search: ['like', 'favourite', 'love'] - uid: 6bb6cde37fea92c72ab0f017bda3797d - - - css: heart - code: '0xe088' - search: ['like', 'favourite', 'love'] - uid: ae69d6a828c0dac2d93065be77431300 - - - css: home-outline - code: '0xe089' - search: [] - uid: d75ada95a7adc39595d4242cdcead2e8 - - - css: home - code: '0xe08a' - search: [] - uid: 66474905b4e460ec0e0309a22d3ad097 - - - css: html5 - code: '0xe08b' - search: [] - uid: 5a84771d8953b4d62c26414bb621627c - - - css: image-outline - code: '0xe08c' - search: ['picture', 'photo'] - uid: 6065b24a0e5386a727d4566f7e084260 - - - css: image - code: '0xe08d' - search: ['picture', 'photo'] - uid: 2c9d8b2d22e6fa992fc9ea826074e334 - - - css: infinity-outline - code: '0xe08e' - search: [] - uid: 845ef8f829a9292a0327c6e2bbc41b36 - - - css: infinity - code: '0xe08f' - search: [] - uid: 95d72ac2f5c297d6bea22145abeeb6a4 - - - css: info-large-outline - code: '0xe090' - search: [] - uid: 664229cb1bbee76fd9d25f1dee098e05 - - - css: info-large - code: '0xe091' - search: [] - uid: 8a33ad05b073f3e69380f1fbe01af0e0 - - - css: info-outline - code: '0xe092' - search: [] - uid: 66742afca9745e30194fa05e4ad5b9d3 - - - css: info - code: '0xe093' - search: [] - uid: 05e8164894cbecc216dc844d1468aca2 - - - css: input-checked-outline - code: '0xe094' - search: ['tick', 'correct'] - uid: 3c770862ef1876c49aa42680c4b6ad19 - - - css: input-checked - code: '0xe095' - search: ['tick', 'correct'] - uid: 9bba4dea0fb5d13e65a82f07e52afd90 - - - css: key-outline - code: '0xe096' - search: ['password', 'login'] - uid: e2dd15002895b951ab420f8d3559ea11 - - - css: key - code: '0xe097' - search: ['password', 'login'] - uid: e030ed514099801428ad649364aadf17 - - - css: keyboard - code: '0xe098' - search: [] - uid: 391d821f412512046114d2388a4929be - - - css: leaf - code: '0xe099' - search: [] - uid: 622b0ea29aef28698825e7637bce6af6 - - - css: lightbulb - code: '0xe09a' - search: ['idea'] - uid: c76c88895501c1d97d02be1fc8b32c03 - - - css: link-outline - code: '0xe09b' - search: ['chain'] - uid: 2b584006d061d461927db83ada6042ff - - - css: link - code: '0xe09c' - search: ['chain'] - uid: d74e53b2eccce057804f39d2bb961a46 - - - css: location-arrow-outline - code: '0xe09d' - search: ['direction'] - uid: e0643316ddc4584b5747e9139450948b - - - css: location-arrow - code: '0xe09e' - search: ['direction'] - uid: 25ccda2ea62235be8add77b94b716324 - - - css: location-outline - code: '0xe09f' - search: ['map', 'pin'] - uid: 79b30eb7b1fd6d85e8f6079f31883747 - - - css: location - code: '0xe0a0' - search: ['map', 'pin'] - uid: 69554ba0563e37ac31c57c55951b45ac - - - css: lock-closed-outline - code: '0xe0a1' - search: ['locked'] - uid: bc5ee15bbbc8e0b53d2e0b662fcb7df4 - - - css: lock-closed - code: '0xe0a2' - search: ['locked'] - uid: 271c8332b3ca17ac96ee0658ff9989c0 - - - css: lock-open-outline - code: '0xe0a3' - search: [] - uid: 1b81000f48340ad060093a5c50917c5e - - - css: lock-open - code: '0xe0a4' - search: [] - uid: f63e536988ebcf2d558e6d588a8215e9 - - - css: mail - code: '0xe0a5' - search: ['email'] - uid: 3cc58c13ef5468100aaa6575d12b4336 - - - css: map - code: '0xe0a6' - search: ['brochure', 'pamphlet'] - uid: 601d015b16fdbd8f50287231dbcaa1b6 - - - css: media-eject-outline - code: '0xe0a7' - search: [] - uid: cacb5b7ad72caa1c9b6252811f116fc2 - - - css: media-eject - code: '0xe0a8' - search: [] - uid: 95f47c06749220d64afd16a6ddaec2f3 - - - css: media-fast-forward-outline - code: '0xe0a9' - search: [] - uid: 8b5ceab6e7d5369d35c29b25b30918b2 - - - css: media-fast-forward - code: '0xe0aa' - search: [] - uid: dfb40e1cba61e6012ee887e7c36442d0 - - - css: media-pause-outline - code: '0xe0ab' - search: [] - uid: eba06b8078e8be811aaf27fb832ae412 - - - css: media-pause - code: '0xe0ac' - search: [] - uid: f74212878592c95b5ef609aab45f39e0 - - - css: media-play-outline - code: '0xe0ad' - search: [] - uid: 465650b871562530d459ce800a5b693a - - - css: media-play-reverse-outline - code: '0xe0ae' - search: [] - uid: c9b5c863b7104f6852b11e87313cc57e - - - css: media-play-reverse - code: '0xe0af' - search: [] - uid: 85b893a747f5ea781a52daee2bad2400 - - - css: media-play - code: '0xe0b0' - search: [] - uid: fdbb273322640a8a899809405bf35e0e - - - css: media-record-outline - code: '0xe0b1' - search: [] - uid: be5692d188fc450f0458c7626c976f0e - - - css: media-record - code: '0xe0b2' - search: [] - uid: 33fe26b0990941e9060a1054eec342af - - - css: media-rewind-outline - code: '0xe0b3' - search: [] - uid: 411f067e79e7cdcf4982bdf5046b2371 - - - css: media-rewind - code: '0xe0b4' - search: [] - uid: 7eab35af2d80082d6b349776afee31b9 - - - css: media-stop-outline - code: '0xe0b5' - search: [] - uid: c8671b73d1028a7f37e054fa34a06e7e - - - css: media-stop - code: '0xe0b6' - search: [] - uid: 8c9406ead5ba6859f31c092b3f05822b - - - css: message-typing - code: '0xe0b7' - search: ['msg', 'chat'] - uid: 0c933015b53e12afe7de356a66e9960b - - - css: message - code: '0xe0b8' - search: ['msg', 'chat'] - uid: 3c7dfbe909ec6ad30f47e63c5a876520 - - - css: messages - code: '0xe0b9' - search: ['msg', 'chat'] - uid: e6aface70d7a3976068eb84cedb8c9d1 - - - css: microphone-outline - code: '0xe0ba' - search: ['record'] - uid: 50df0ab293d904c2a10b4c20cee7d1ef - - - css: microphone - code: '0xe0bb' - search: ['record'] - uid: 66462b3da557e7f4927b5e4940e74d49 - - - css: minus-outline - code: '0xe0bc' - search: ['subtract'] - uid: eeb1846461110a212a6b574e1753f9fa - - - css: minus - code: '0xe0bd' - search: ['subtract'] - uid: 6c3e295b0cd630c50f63b683a7b3d0e0 - - - css: mortar-board - code: '0xe0be' - search: [] - uid: ef5a395c1787359dac845371d9420f4b - - - css: news - code: '0xe0bf' - search: ['article'] - uid: 463ff32a34867e6f6ddc2e642727ef6c - - - css: notes-outline - code: '0xe0c0' - search: ['music'] - uid: c14ee668c52dc951833ac2d2e569884a - - - css: notes - code: '0xe0c1' - search: ['music'] - uid: de55efd6be426397038212f510fae207 - - - css: pen - code: '0xe0c2' - search: ['write', 'compose'] - uid: 0fee1adbf498f967540808e6f9369e47 - - - css: pencil - code: '0xe0c3' - search: ['write', 'compose'] - uid: ab18e0da65de53ae32bde5cf950e10b9 - - - css: phone-outline - code: '0xe0c4' - search: ['call', 'ring'] - uid: b1267b9fe7d0a0e84c3f49bfc5ce57c6 - - - css: phone - code: '0xe0c5' - search: ['call', 'ring'] - uid: 946d702d56ac8e2516980918b555184b - - - css: pi-outline - code: '0xe0c6' - search: [] - uid: 1049716f889bd09bf0eac0db59549db2 - - - css: pi - code: '0xe0c7' - search: [] - uid: e139cd4657187da3b9e52abc2fd8df3a - - - css: pin-outline - code: '0xe0c8' - search: [] - uid: c2c88e7f174cb64e06871151af481ca5 - - - css: pin - code: '0xe0c9' - search: [] - uid: 752d2c1f8344ba03faebddc7c58c2036 - - - css: pipette - code: '0xe0ca' - search: ['picker'] - uid: 1e2bc3ad0ebeddf39e8199f05a9b54ad - - - css: plane-outline - code: '0xe0cb' - search: ['flight'] - uid: 6ce6c1122af76fac2f8fe5570cd9be6a - - - css: plane - code: '0xe0cc' - search: ['flight'] - uid: b688aea525828cf9ce477ceb2257945a - - - css: plug - code: '0xe0cd' - search: ['connect'] - uid: 5c76c41a19568695143cf75754278965 - - - css: plus-outline - code: '0xe0ce' - search: ['add'] - uid: afe84bfdb16158ba4fcd855a72c2588d - - - css: plus - code: '0xe0cf' - search: ['add'] - uid: 64bdceb652ebcd62574192fce66f4c84 - - - css: point-of-interest-outline - code: '0xe0d0' - search: ['command'] - uid: b2493e4d160a430482621c26edb198ca - - - css: point-of-interest - code: '0xe0d1' - search: ['command'] - uid: 8f4cb12ec8199147b068c9295645cb3c - - - css: power-outline - code: '0xe0d2' - search: ['on', 'off'] - uid: a492033c6b067b44f1b3e9c0b4890466 - - - css: power - code: '0xe0d3' - search: ['on', 'off'] - uid: aa12259666a71299a972ec5005e0c5a4 - - - css: printer - code: '0xe0d4' - search: ['fax'] - uid: b8cef72e72e33a8f589feed285850776 - - - css: puzzle-outline - code: '0xe0d5' - search: ['jigsaw'] - uid: 956f37b3efabfd8f3f045b3ce39eff3f - - - css: puzzle - code: '0xe0d6' - search: ['jigsaw'] - uid: c75ae2942823534ea485bec7e0e70b49 - - - css: radar-outline - code: '0xe0d7' - search: ['position'] - uid: a6dd1fe6fcd5abb36ea89f679c0d5688 - - - css: radar - code: '0xe0d8' - search: ['position'] - uid: a8c1b707f9b7d88c1f4c8b940cbffa77 - - - css: refresh-outline - code: '0xe0d9' - search: ['arrow'] - uid: e44650d8304518a0217bc1a1f51d4f25 - - - css: refresh - code: '0xe0da' - search: ['arrow'] - uid: 032b72108ca3b382d17f47e34472f62c - - - css: rss-outline - code: '0xe0db' - search: ['feed'] - uid: 748a9ccafd326388c2ae2c270f9e4c45 - - - css: rss - code: '0xe0dc' - search: ['feed'] - uid: 5097c29122ba54226620b7245c850e55 - - - css: scissors-outline - code: '0xe0dd' - search: ['cut'] - uid: 2130ff330ebb5fccf1f5d7da69d893f5 - - - css: scissors - code: '0xe0de' - search: ['cut'] - uid: b23159c433723b6480c5a4fbb229a064 - - - css: shopping-bag - code: '0xe0df' - search: [] - uid: 4b95f5067d220613cd1d75efd43e1666 - - - css: shopping-cart - code: '0xe0e0' - search: [] - uid: 2bb25216eeaf6836790432fb39b530a4 - - - css: social-at-circular - code: '0xe0e1' - search: ['@', 'mail'] - uid: c4b344da4decf77d4a2f2ffc390558d5 - - - css: social-dribbble-circular - code: '0xe0e2' - search: [] - uid: 208a47ff2919f4f4f1c5c2f4de84688c - - - css: social-dribbble - code: '0xe0e3' - search: [] - uid: f22d53d4ce92448e1fe170da1354d024 - - - css: social-facebook-circular - code: '0xe0e4' - search: [] - uid: fb5ab34f6a7d2038fe9b1e1f61c235d8 - - - css: social-facebook - code: '0xe0e5' - search: [] - uid: b7a86473473060e978b20c7df943cdf6 - - - css: social-flickr-circular - code: '0xe0e6' - search: [] - uid: 056dac97b5e4ef88b7b77f884b510e1f - - - css: social-flickr - code: '0xe0e7' - search: [] - uid: 43745b3462736b69d71a97e4d2ee4cdd - - - css: social-github-circular - code: '0xe0e8' - search: [] - uid: c4f5ef71e723d234cddef0361ea3a8ac - - - css: social-github - code: '0xe0e9' - search: [] - uid: f030fceeba8bde820cfa6ced595c8bc8 - - - css: social-google-plus-circular - code: '0xe0ea' - search: [] - uid: f5dbbd352ed1dd497cbbc454eeead192 - - - css: social-google-plus - code: '0xe0eb' - search: [] - uid: 6f1fa282f8df872455705b4df4dbef47 - - - css: social-instagram-circular - code: '0xe0ec' - search: [] - uid: bb7cfb2a4533698a524b6dc8471f6a5b - - - css: social-instagram - code: '0xe0ed' - search: [] - uid: 27c83d5e4be0c904b3af565a8e5fd769 - - - css: social-last-fm-circular - code: '0xe0ee' - search: [] - uid: 730a82b98f3335a544a1a0d2c0b42786 - - - css: social-last-fm - code: '0xe0ef' - search: [] - uid: 2a2722589ac9cb0f8b0639c336adfe5f - - - css: social-linkedin-circular - code: '0xe0f0' - search: [] - uid: 45f270151e792e6dfe7cfa3f1f62db01 - - - css: social-linkedin - code: '0xe0f1' - search: [] - uid: b4ff7bef490b673119df22ab4fa1554b - - - css: social-pinterest-circular - code: '0xe0f2' - search: [] - uid: ad3e38c0f73c12ceb0dcebff8418b29b - - - css: social-pinterest - code: '0xe0f3' - search: [] - uid: 072f888b844a4c1f5bd2c047aff9bf84 - - - css: social-skype-outline - code: '0xe0f4' - search: [] - uid: 612a5a783509fe2fdd221e2a57c1cb41 - - - css: social-skype - code: '0xe0f5' - search: [] - uid: 9ece9ba90969f337e72dd29480675224 - - - css: social-tumbler-circular - code: '0xe0f6' - search: [] - uid: 946127e5dbfe77c661638a7672a38b5f - - - css: social-tumbler - code: '0xe0f7' - search: [] - uid: 5ce6436706c66a210d8f01cefeb21ff3 - - - css: social-twitter-circular - code: '0xe0f8' - search: [] - uid: 3854e2471d0471a212097a44e2f46bf0 - - - css: social-twitter - code: '0xe0f9' - search: [] - uid: 753977176165dd53d18bcfc7fac415ea - - - css: social-vimeo-circular - code: '0xe0fa' - search: [] - uid: a3730076bb109bab114a56770c002732 - - - css: social-vimeo - code: '0xe0fb' - search: [] - uid: 979b8e986ecd2faf06c01193a521556c - - - css: social-youtube-circular - code: '0xe0fc' - search: [] - uid: 2e21ada786741bf02deae863643f0a9c - - - css: social-youtube - code: '0xe0fd' - search: [] - uid: 59663a291665364618c92072de450397 - - - css: sort-alphabetically-outline - code: '0xe0fe' - search: ['a-z'] - uid: 21f73ce90a50be3a892be8e451e00320 - - - css: sort-alphabetically - code: '0xe0ff' - search: ['a-z'] - uid: a90a7759b32c2a338ffd33ca2d180840 - - - css: sort-numerically-outline - code: '0xe100' - search: ['123'] - uid: 288ae04e269295916db590c6f88ac8d1 - - - css: sort-numerically - code: '0xe101' - search: ['123'] - uid: cf33d7f2827e6d82f3bb3c2a6e808eac - - - css: spanner-outline - code: '0xe102' - search: ['settings'] - uid: 5025b2ad4b12086c75901a3b7452b067 - - - css: spanner - code: '0xe103' - search: ['settings'] - uid: af3d738cda76998f896cb0bc9ddf85a3 - - - css: spiral - code: '0xe104' - search: ['curve'] - uid: 6017679a67141e3d7cdd9ee307889b24 - - - css: star-full-outline - code: '0xe105' - search: ['like', 'favourite', 'love', 'rate'] - uid: 46c123de608a03b03ec296899a6c0364 - - - css: star-half-outline - code: '0xe106' - search: ['like', 'favourite', 'love', 'rate'] - uid: 3620d450aa068a1951462de03f523a1c - - - css: star-half - code: '0xe107' - search: ['like', 'favourite', 'love', 'rate'] - uid: 4b843317fba35f193959f57a3b119898 - - - css: star-outline - code: '0xe108' - search: ['like', 'favourite', 'love', 'rate'] - uid: 8a12233db92c115e041c33c38f572317 - - - css: star - code: '0xe109' - search: ['like', 'favourite', 'love', 'rate'] - uid: 69a05945d39b77f5af610e0c6c63bbab - - - css: starburst-outline - code: '0xe10a' - search: ['banner', 'ribbon'] - uid: 27049bee9037381adbc82671cbe13f8a - - - css: starburst - code: '0xe10b' - search: ['banner', 'ribbon'] - uid: 50ee485e8fe431e31c2654294619d906 - - - css: stopwatch - code: '0xe10c' - search: ['time'] - uid: 15200bcba7214b59bf43cc42f2cdfa69 - - - css: support - code: '0xe10d' - search: ['life', 'ring'] - uid: d20a64b338a4263e3087976fb799d411 - - - css: tabs-outline - code: '0xe10e' - search: ['expand', 'merge'] - uid: d230e092e092617f1d128e3eb17304f2 - - - css: tag - code: '0xe10f' - search: [] - uid: d5f281eded299fc5f4f524b406a90436 - - - css: tags - code: '0xe110' - search: [] - uid: e1df8bfbfb066a03ace90e6795a23640 - - - css: th-large-outline - code: '0xe111' - search: ['square', 'grid'] - uid: b3b0d4377b565b39fa9b5d05adf26b1a - - - css: th-large - code: '0xe112' - search: ['square', 'grid'] - uid: 08ea8e65fcd8a0a538a918c3f7eef2b6 - - - css: th-list-outline - code: '0xe113' - search: ['thumbnail'] - uid: 1ff7b1e9dec1ad495e6616ff7e469ddd - - - css: th-list - code: '0xe114' - search: ['thumbnail'] - uid: 9b4474ced26e8c693754c96207459f62 - - - css: th-menu-outline - code: '0xe115' - search: [] - uid: ccc834dabbe0a915d40c09daa8701dce - - - css: th-menu - code: '0xe116' - search: [] - uid: 54a532c644cf619eba14d2a8a80150e4 - - - css: th-small-outline - code: '0xe117' - search: ['square', 'grid'] - uid: ad8ce53ae473e2a7b826da10f4a61604 - - - css: th-small - code: '0xe118' - search: ['square', 'grid'] - uid: f37193952c35b441630a0985f9689b0e - - - css: thermometer - code: '0xe119' - search: ['temperature'] - uid: 67d81a3c7c2bc6ca08b6a52c99a813a4 - - - css: thumbs-down - code: '0xe11a' - search: ['dislike'] - uid: d09e29876d8004ca782b3ccde27fbb7a - - - css: thumbs-ok - code: '0xe11b' - search: ['average'] - uid: fdc6629c191e5145df05646a3ad1cd6f - - - css: thumbs-up - code: '0xe11c' - search: ['like'] - uid: baefcb2b150a44fd269540689f1a5e5f - - - css: tick-outline - code: '0xe11d' - search: ['ok', 'done', 'correct'] - uid: 1f61682aecd6507233401e0084518174 - - - css: tick - code: '0xe11e' - search: ['ok', 'done', 'correct'] - uid: 849fc7cf2a324e6048031ddaa428d9aa - - - css: ticket - code: '0xe11f' - search: ['pass'] - uid: 135c87c9ed188abbfa6f84fba2401b0b - - - css: time - code: '0xe120' - search: ['watch', 'clock'] - uid: d8cd5a0f0f9d7118822a8bc660a19c39 - - - css: times-outline - code: '0xe121' - search: ['cross', 'x'] - uid: 307bbf2ed1cdc350529870393d7a8e13 - - - css: times - code: '0xe122' - search: ['cross', 'x'] - uid: 521efdc415e1fe316962175587969231 - - - css: trash - code: '0xe123' - search: ['garbage', 'rubbish', 'delete'] - uid: 24785a3f86e22d46bd51e92c02773748 - - - css: tree - code: '0xe124' - search: [] - uid: b571e1f368fee003371cfc1811662e1d - - - css: upload-outline - code: '0xe125' - search: [] - uid: 5351c9e406f3d44d9133aefc9299f953 - - - css: upload - code: '0xe126' - search: [] - uid: 10314ca3cdbec6d430a2ce88ffb7902e - - - css: user-add-outline - code: '0xe127' - search: ['person'] - uid: fb5e9520dfd53a7484b3ee6039ddc7c3 - - - css: user-add - code: '0xe128' - search: ['person'] - uid: 51bb4fa4388f691b6d8f570c8d80dfa4 - - - css: user-delete-outline - code: '0xe129' - search: ['person'] - uid: dc50f951724aa405e161cc5624d38e3d - - - css: user-delete - code: '0xe12a' - search: ['person'] - uid: dd7b649bea22871d1649b2a7b25b3bea - - - css: user-outline - code: '0xe12b' - search: ['person'] - uid: 60565527efa323fa881bd4f8aa621f4a - - - css: user - code: '0xe12c' - search: ['person'] - uid: 6cdec4b7d2916b1f9bb3e87881822ea2 - - - css: vendor-android - code: '0xe12d' - search: [] - uid: 40963f3f99e564693f90b68050403328 - - - css: vendor-apple - code: '0xe12e' - search: [] - uid: 139f2b72ae9bff661545a33ad44e27da - - - css: vendor-microsoft - code: '0xe12f' - search: [] - uid: bf22d63cfea69792ef09ececc23e1805 - - - css: video-outline - code: '0xe130' - search: [] - uid: 244dc9a6aa2d550ea0b00309c68bf6ad - - - css: video - code: '0xe131' - search: [] - uid: 01ef96e5b36670d0c03a5d4793710a8a - - - css: volume-down - code: '0xe132' - search: ['sound'] - uid: baf4be0340e414ee7384f153115f7ed8 - - - css: volume-mute - code: '0xe133' - search: ['sound'] - uid: f8654f1ac90b5ab101102c10b74c61a5 - - - css: volume-up - code: '0xe134' - search: ['sound'] - uid: bbcd5786cb3b162a6e73e426495a31f8 - - - css: volume - code: '0xe135' - search: ['sound'] - uid: e3738b5d58a9bd4ce99c8a714593af15 - - - css: warning-outline - code: '0xe136' - search: ['error', 'alert'] - uid: 40718ef4924a1efb710d040aa908cb54 - - - css: warning - code: '0xe137' - search: ['error', 'alert'] - uid: a244c91417fc6e44dbb1b3d21227e3eb - - - css: watch - code: '0xe138' - search: ['time'] - uid: 630de147a43aa3b988f9912941706ab3 - - - css: waves-outline - code: '0xe139' - search: [] - uid: d968e3b59dfd8629d4e99ed89dad1e76 - - - css: waves - code: '0xe13a' - search: [] - uid: 4cfdd7fd813311426d4772a5ee4eacee - - - css: weather-cloudy - code: '0xe13b' - search: [] - uid: 2d1db29cb964be898b63365c145e5bdc - - - css: weather-downpour - code: '0xe13c' - search: [] - uid: 6283bdf6649cfedc2d1f8dbe76ab8707 - - - css: weather-night - code: '0xe13d' - search: [] - uid: 1b24db880a6be2f00b8d3dcb2b6267fe - - - css: weather-partly-sunny - code: '0xe13e' - search: [] - uid: cf3604541def5a63357b326e770ede38 - - - css: weather-shower - code: '0xe13f' - search: [] - uid: 5820d704b78e3fb0ef55822050443038 - - - css: weather-snow - code: '0xe140' - search: [] - uid: e399c3e43092fe6d969e519602c337a3 - - - css: weather-stormy - code: '0xe141' - search: [] - uid: 1502cefd1a70427acd996121b84c3c7f - - - css: weather-sunny - code: '0xe142' - search: [] - uid: 6a5a012158efbbe0a14c694699e73a97 - - - css: weather-windy-cloudy - code: '0xe143' - search: [] - uid: d4108ba5d8e6781c7ecdf209d379c843 - - - css: weather-windy - code: '0xe144' - search: [] - uid: bbd091a6dc6eac02903fd703df372d19 - - - css: wi-fi-outline - code: '0xe145' - search: ['internet', 'connection'] - uid: 0e30e6a0069483035a5f22503dd8f55a - - - css: wi-fi - code: '0xe146' - search: ['internet', 'connection'] - uid: 448672bc3ad0665cc409c9ba34c5aa8a - - - css: wine - code: '0xe147' - search: ['drink', 'beverage'] - uid: c08d5c49e4fad1dc7974437cb42adc22 - - - css: world-outline - code: '0xe148' - search: [] - uid: ba5b732b4ebba9fde272ceed01562a38 - - - css: world - code: '0xe149' - search: [] - uid: 0aad242c6ebdf52db445f44ee189c8ac - - - css: zoom-in-outline - code: '0xe14a' - search: [] - uid: 899ba328ba649e5298e988fee75e705d - - - css: zoom-in - code: '0xe14b' - search: [] - uid: 1760fa1a406133fcc0751f126aba75ed - - - css: zoom-out-outline - code: '0xe14c' - search: [] - uid: 5f95dc96c534a86235357c452bacf7c2 - - - css: zoom-out - code: '0xe14d' - search: [] - uid: a1755393aa493e74412522d6fea7893e - - - css: zoom-outline - code: '0xe14e' - search: [] - uid: dbfa0425dcd22abdbcab63dcbd1fa80f - - - css: zoom - code: '0xe14f' - search: [] - uid: 205cd8377d0970a2b9f59d2cd4ea1055 diff --git a/package.json b/package.json index 54003c1..b63a6f3 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,8 @@ "version": "2.0.9", "style": "src/font/typicons.css", "main": "src/font/typicons.css", + "copyright": "(c) Stephen Hutchings 2012-2021", + "className": "typcn", "keywords": [ "icon", "fonts", @@ -11,27 +13,31 @@ "font-face", "webfont" ], - "homepage": "http://typicons.com/", + "homepage": "https://www.s-ings.com/typicons", "bugs": { "url": "https://github.com/stephenhutchings/typicons.font/issues" }, "author": { "name": "Stephen Hutchings", - "web": "http://www.s-ings.com" + "web": "https://www.s-ings.com" }, "repository": { "type": "git", "url": "https://github.com/stephenhutchings/typicons.font" }, - "license": "(CC BY-SA 4.0 and SIL)", - "dependencies": { - }, + "license": "(CC-BY-SA and SIL)", "files": [ "src/font/typicons.css", "src/font/typicons.svg", "src/font/typicons.eot", "src/font/typicons.ttf", - "src/font/typicons.woff", + "src/font/typicons.json", "src/svg/" - ] + ], + "devDependencies": { + "webfonts-generator": "^0.4.0" + }, + "scripts": { + "generate": "node ./scripts/generate.js" + } } diff --git a/scripts/codepoints.js b/scripts/codepoints.js new file mode 100644 index 0000000..2e7ca14 --- /dev/null +++ b/scripts/codepoints.js @@ -0,0 +1,338 @@ +module.exports = { + "adjust-brightness": 57344, + "adjust-contrast": 57345, + "anchor-outline": 57346, + anchor: 57347, + archive: 57348, + "arrow-back-outline": 57349, + "arrow-back": 57350, + "arrow-down-outline": 57351, + "arrow-down-thick": 57352, + "arrow-down": 57353, + "arrow-forward-outline": 57354, + "arrow-forward": 57355, + "arrow-left-outline": 57356, + "arrow-left-thick": 57357, + "arrow-left": 57358, + "arrow-loop-outline": 57359, + "arrow-loop": 57360, + "arrow-maximise-outline": 57361, + "arrow-maximise": 57362, + "arrow-minimise-outline": 57363, + "arrow-minimise": 57364, + "arrow-move-outline": 57365, + "arrow-move": 57366, + "arrow-repeat-outline": 57367, + "arrow-repeat": 57368, + "arrow-right-outline": 57369, + "arrow-right-thick": 57370, + "arrow-right": 57371, + "arrow-shuffle": 57372, + "arrow-sorted-down": 57373, + "arrow-sorted-up": 57374, + "arrow-sync-outline": 57375, + "arrow-sync": 57376, + "arrow-unsorted": 57377, + "arrow-up-outline": 57378, + "arrow-up-thick": 57379, + "arrow-up": 57380, + at: 57381, + "attachment-outline": 57382, + attachment: 57383, + "backspace-outline": 57384, + backspace: 57385, + "battery-charge": 57386, + "battery-full": 57387, + "battery-high": 57388, + "battery-low": 57389, + "battery-mid": 57390, + beaker: 57391, + beer: 57392, + bell: 57393, + book: 57394, + bookmark: 57395, + briefcase: 57396, + brush: 57397, + "business-card": 57398, + calculator: 57399, + "calendar-outline": 57400, + calendar: 57401, + "camera-outline": 57402, + camera: 57403, + "cancel-outline": 57404, + cancel: 57405, + "chart-area-outline": 57406, + "chart-area": 57407, + "chart-bar-outline": 57408, + "chart-bar": 57409, + "chart-line-outline": 57410, + "chart-line": 57411, + "chart-pie-outline": 57412, + "chart-pie": 57413, + "chevron-left-outline": 57414, + "chevron-left": 57415, + "chevron-right-outline": 57416, + "chevron-right": 57417, + clipboard: 57418, + "cloud-storage": 57419, + "cloud-storage-outline": 57428, + "code-outline": 57420, + code: 57421, + coffee: 57422, + "cog-outline": 57423, + cog: 57424, + compass: 57425, + contacts: 57426, + "credit-card": 57427, + css3: 57429, + database: 57430, + "delete-outline": 57431, + delete: 57432, + "device-desktop": 57433, + "device-laptop": 57434, + "device-phone": 57435, + "device-tablet": 57436, + directions: 57437, + "divide-outline": 57438, + divide: 57439, + "document-add": 57440, + "document-delete": 57441, + "document-text": 57442, + document: 57443, + "download-outline": 57444, + download: 57445, + dropbox: 57446, + edit: 57447, + "eject-outline": 57448, + eject: 57449, + "equals-outline": 57450, + equals: 57451, + "export-outline": 57452, + export: 57453, + "eye-outline": 57454, + eye: 57455, + feather: 57456, + film: 57457, + filter: 57458, + "flag-outline": 57459, + flag: 57460, + "flash-outline": 57461, + flash: 57462, + "flow-children": 57463, + "flow-merge": 57464, + "flow-parallel": 57465, + "flow-switch": 57466, + "folder-add": 57467, + "folder-delete": 57468, + "folder-open": 57469, + folder: 57470, + gift: 57471, + "globe-outline": 57472, + globe: 57473, + "group-outline": 57474, + group: 57475, + headphones: 57476, + "heart-full-outline": 57477, + "heart-half-outline": 57478, + "heart-outline": 57479, + heart: 57480, + "home-outline": 57481, + home: 57482, + html5: 57483, + "image-outline": 57484, + image: 57485, + "infinity-outline": 57486, + infinity: 57487, + "info-large-outline": 57488, + "info-large": 57489, + "info-outline": 57490, + info: 57491, + "input-checked-outline": 57492, + "input-checked": 57493, + "key-outline": 57494, + key: 57495, + keyboard: 57496, + leaf: 57497, + lightbulb: 57498, + "link-outline": 57499, + link: 57500, + "location-arrow-outline": 57501, + "location-arrow": 57502, + "location-outline": 57503, + location: 57504, + "lock-closed-outline": 57505, + "lock-closed": 57506, + "lock-open-outline": 57507, + "lock-open": 57508, + mail: 57509, + map: 57510, + "media-eject-outline": 57511, + "media-eject": 57512, + "media-fast-forward-outline": 57513, + "media-fast-forward": 57514, + "media-pause-outline": 57515, + "media-pause": 57516, + "media-play-outline": 57517, + "media-play-reverse-outline": 57518, + "media-play-reverse": 57519, + "media-play": 57520, + "media-record-outline": 57521, + "media-record": 57522, + "media-rewind-outline": 57523, + "media-rewind": 57524, + "media-stop-outline": 57525, + "media-stop": 57526, + "message-typing": 57527, + message: 57528, + messages: 57529, + "microphone-outline": 57530, + microphone: 57531, + "minus-outline": 57532, + minus: 57533, + "mortar-board": 57534, + news: 57535, + "notes-outline": 57536, + notes: 57537, + pen: 57538, + pencil: 57539, + "phone-outline": 57540, + phone: 57541, + "pi-outline": 57542, + pi: 57543, + "pin-outline": 57544, + pin: 57545, + pipette: 57546, + "plane-outline": 57547, + plane: 57548, + plug: 57549, + "plus-outline": 57550, + plus: 57551, + "point-of-interest-outline": 57552, + "point-of-interest": 57553, + "power-outline": 57554, + power: 57555, + printer: 57556, + "puzzle-outline": 57557, + puzzle: 57558, + "radar-outline": 57559, + radar: 57560, + "refresh-outline": 57561, + refresh: 57562, + "rss-outline": 57563, + rss: 57564, + "scissors-outline": 57565, + scissors: 57566, + "shopping-bag": 57567, + "shopping-cart": 57568, + "social-at-circular": 57569, + "social-dribbble-circular": 57570, + "social-dribbble": 57571, + "social-facebook-circular": 57572, + "social-facebook": 57573, + "social-flickr-circular": 57574, + "social-flickr": 57575, + "social-github-circular": 57576, + "social-github": 57577, + "social-google-plus-circular": 57578, + "social-google-plus": 57579, + "social-instagram-circular": 57580, + "social-instagram": 57581, + "social-last-fm-circular": 57582, + "social-last-fm": 57583, + "social-linkedin-circular": 57584, + "social-linkedin": 57585, + "social-pinterest-circular": 57586, + "social-pinterest": 57587, + "social-skype-outline": 57588, + "social-skype": 57589, + "social-tumbler-circular": 57590, + "social-tumbler": 57591, + "social-twitter-circular": 57592, + "social-twitter": 57593, + "social-vimeo-circular": 57594, + "social-vimeo": 57595, + "social-youtube-circular": 57596, + "social-youtube": 57597, + "sort-alphabetically-outline": 57598, + "sort-alphabetically": 57599, + "sort-numerically-outline": 57600, + "sort-numerically": 57601, + "spanner-outline": 57602, + spanner: 57603, + spiral: 57604, + "star-full-outline": 57605, + "star-half-outline": 57606, + "star-half": 57607, + "star-outline": 57608, + star: 57609, + "starburst-outline": 57610, + starburst: 57611, + stopwatch: 57612, + support: 57613, + "tabs-outline": 57614, + tag: 57615, + tags: 57616, + "th-large-outline": 57617, + "th-large": 57618, + "th-list-outline": 57619, + "th-list": 57620, + "th-menu-outline": 57621, + "th-menu": 57622, + "th-small-outline": 57623, + "th-small": 57624, + thermometer: 57625, + "thumbs-down": 57626, + "thumbs-ok": 57627, + "thumbs-up": 57628, + "tick-outline": 57629, + tick: 57630, + ticket: 57631, + time: 57632, + "times-outline": 57633, + times: 57634, + trash: 57635, + tree: 57636, + "upload-outline": 57637, + upload: 57638, + "user-add-outline": 57639, + "user-add": 57640, + "user-delete-outline": 57641, + "user-delete": 57642, + "user-outline": 57643, + user: 57644, + "vendor-android": 57645, + "vendor-apple": 57646, + "vendor-microsoft": 57647, + "video-outline": 57648, + video: 57649, + "volume-down": 57650, + "volume-mute": 57651, + "volume-up": 57652, + volume: 57653, + "warning-outline": 57654, + warning: 57655, + watch: 57656, + "waves-outline": 57657, + waves: 57658, + "weather-cloudy": 57659, + "weather-downpour": 57660, + "weather-night": 57661, + "weather-partly-sunny": 57662, + "weather-shower": 57663, + "weather-snow": 57664, + "weather-stormy": 57665, + "weather-sunny": 57666, + "weather-windy-cloudy": 57667, + "weather-windy": 57668, + "wi-fi-outline": 57669, + "wi-fi": 57670, + wine: 57671, + "world-outline": 57672, + world: 57673, + "zoom-in-outline": 57674, + "zoom-in": 57675, + "zoom-out-outline": 57676, + "zoom-out": 57677, + "zoom-outline": 57678, + zoom: 57679, +} diff --git a/scripts/generate.js b/scripts/generate.js new file mode 100644 index 0000000..6c9df87 --- /dev/null +++ b/scripts/generate.js @@ -0,0 +1,58 @@ +const fs = require("fs") +const path = require("path") +const webfontsGenerator = require("webfonts-generator") + +const package = require("../package.json") +const codepoints = require("./codepoints") + +const dest = "./src/font/" +const tmpl = "./scripts/templates" + +const files = Object.keys(codepoints).map((key) => `./src/svg/${key}.svg`) + +console.log("Generating font...") +console.log(`Found ${files.length} icon declarations`) + +webfontsGenerator( + { + files, + dest, + codepoints, + classPrefix: package.className + "-", + baseSelector: "." + package.className, + types: ["woff2", "woff", "ttf", "svg", "eot"], + fontName: "typicons", + round: 10, + ascent: 800, + descent: 200, + fontHeight: 1000, + cssTemplate: path.join(tmpl, "/css.hbs"), + html: true, + htmlTemplate: path.join(tmpl, "/html.hbs"), + htmlDest: path.join(dest, "demo.html"), + templateOptions: package, + formatOptions: { + svg: { + metadata: package.copyright, + fontId: "Typicons", + }, + ttf: { + copyright: package.copyright, + url: package.author.web, + description: package.description, + }, + }, + }, + function (error) { + if (error) { + console.log("An error occurred generated the files.", error) + } else { + console.log("Files generated successfully.") + + fs.writeFileSync( + path.join(dest, "typicons.json"), + JSON.stringify(codepoints, null, 2) + ) + } + } +) diff --git a/scripts/templates/css.hbs b/scripts/templates/css.hbs new file mode 100644 index 0000000..0c9aea7 --- /dev/null +++ b/scripts/templates/css.hbs @@ -0,0 +1,41 @@ +@charset "UTF-8"; + +@font-face { + font-family: "{{ fontName }}"; + src: {{{ src }}}; +} + +.{{className}}:before { + font-family: {{ fontName }} !important; + font-style: normal; + font-weight: normal !important; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.{{className}}-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} +.{{className}}-2x { + font-size: 2em; +} +.{{className}}-3x { + font-size: 3em; +} +.{{className}}-4x { + font-size: 4em; +} +.{{className}}-5x { + font-size: 5em; +} + +{{# each codepoints }} +.{{ ../className }}-{{ @key }}:before { + content: "\\{{ this }}"; +} +{{/ each }} \ No newline at end of file diff --git a/scripts/templates/html.hbs b/scripts/templates/html.hbs new file mode 100644 index 0000000..dc2b4ef --- /dev/null +++ b/scripts/templates/html.hbs @@ -0,0 +1,115 @@ + + + + + Typicons + + + + + +
+
+

Typicons · v{{ version }}

+

{{ description }}

+
+
+ +
+
+ {{# each names }} +
+ + {{ this }} +
+ {{/ each }} +
+
+ + + + \ No newline at end of file diff --git a/src/demo/README.md b/src/demo/README.md deleted file mode 100644 index f62cc2c..0000000 --- a/src/demo/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Font demo page templates. Generated code is a bit dirty, but it's done -intentionally, for easy maintenance & single file buldling \ No newline at end of file diff --git a/src/demo/demo.jade b/src/demo/demo.jade deleted file mode 100644 index 3fd71f9..0000000 --- a/src/demo/demo.jade +++ /dev/null @@ -1,70 +0,0 @@ -!!! 5 -html - head - //if lt IE 9 - script(src='http://html5shim.googlecode.com/svn/trunk/html5.js') - - meta(charset='UTF-8') - - :stylus - body { - margin: 0; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 13px; - line-height: 18px; - color: #333333; - background-color: #ffffff; - } - - .page-header - width 100% - position fixed - background white - z-index 10 - top 0 - - small - font-size 0.6em - color #666 - font-weight normal - - .container - border-bottom 1px solid #ddd - padding 12px 0 - - .container, - #preview - width 940px - margin auto - position relative - - #icons - margin-top 112px - font-size 24px - - .icon - float left - padding 6px - - include font.jade - - body - .page-header - .container - h1 #{font.fullname} - small font demo - - #icons - #preview.clearfix - - var col_class = "span" + Math.ceil(12 / meta.columns) - - var chunk_size = Math.ceil(glyphs.length / meta.columns) - - for (var i = 0; i < meta.columns; i++) - - - var offset = i * chunk_size - - for (var c = 0; c < chunk_size && glyphs[offset + c]; c++) - - var g = glyphs[offset + c] - - var css_class = meta.css_prefix + '-' + (g.css || g.file) - - var code = g.code.toString(16) - - var match = g.search + ' ' + g.css.split('-').join(' ') - .icon(data-name='#{g.css}', data-code='#{code}', data-match='#{match} ') - span(class=meta.css_prefix + ' ' + css_class) \ No newline at end of file diff --git a/src/demo/font.css.jade b/src/demo/font.css.jade deleted file mode 100644 index 005d055..0000000 --- a/src/demo/font.css.jade +++ /dev/null @@ -1,41 +0,0 @@ -| @charset 'UTF-8'; -| -/* @FONT-FACE loads font into browser */ -| @font-face { -| font-family: '#{font.fontname}'; -| font-weight: normal; -| font-style: normal; -| src: url('#{font.fontname}.eot'); -| src: url('#{font.fontname}.eot?#iefix') format('embedded-opentype'), -| url('#{font.fontname}.woff') format('woff'), -| url('#{font.fontname}.ttf') format('truetype'), -| url('#{font.fontname}.svg##{font.fontname}') format('svg'); -| } -| -/* :before psuedo-selector inserts and styles icon */ -| .#{meta.css_prefix}:before { -| font-family: '#{font.fontname}'; -| font-style: normal; -| font-weight: normal; -| speak: none; -| display: inline-block; -| text-decoration: inherit; -| width: 1em; -| height: 1em; -| font-size: 1em; -| text-align: center; -| -webkit-font-smoothing: antialiased; -| font-smoothing: antialiased; -| text-rendering: optimizeLegibility; -| } -| -/* Code for individual icons */ -for g, i in glyphs - - var css = meta.css_prefix + '-' + g.css; - - var hex = g.code.replace('0x','\\'); - - var chr = unichr(g.code); - | - | .#{css}:before { - | content: '#{hex}'; /* '#{chr}' */ - | } - diff --git a/src/demo/font.jade b/src/demo/font.jade deleted file mode 100644 index 9674b7f..0000000 --- a/src/demo/font.jade +++ /dev/null @@ -1,48 +0,0 @@ -| -| - diff --git a/src/font/demo.html b/src/font/demo.html index 0ca94b1..7067371 100644 --- a/src/font/demo.html +++ b/src/font/demo.html @@ -1,406 +1,2501 @@ - -
\ No newline at end of file + -moz-osx-font-smoothing: grayscale; +} + +.typcn-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} +.typcn-2x { + font-size: 2em; +} +.typcn-3x { + font-size: 3em; +} +.typcn-4x { + font-size: 4em; +} +.typcn-5x { + font-size: 5em; +} + +.typcn-adjust-brightness:before { + content: "\e000"; +} +.typcn-adjust-contrast:before { + content: "\e001"; +} +.typcn-anchor-outline:before { + content: "\e002"; +} +.typcn-anchor:before { + content: "\e003"; +} +.typcn-archive:before { + content: "\e004"; +} +.typcn-arrow-back-outline:before { + content: "\e005"; +} +.typcn-arrow-back:before { + content: "\e006"; +} +.typcn-arrow-down-outline:before { + content: "\e007"; +} +.typcn-arrow-down-thick:before { + content: "\e008"; +} +.typcn-arrow-down:before { + content: "\e009"; +} +.typcn-arrow-forward-outline:before { + content: "\e00a"; +} +.typcn-arrow-forward:before { + content: "\e00b"; +} +.typcn-arrow-left-outline:before { + content: "\e00c"; +} +.typcn-arrow-left-thick:before { + content: "\e00d"; +} +.typcn-arrow-left:before { + content: "\e00e"; +} +.typcn-arrow-loop-outline:before { + content: "\e00f"; +} +.typcn-arrow-loop:before { + content: "\e010"; +} +.typcn-arrow-maximise-outline:before { + content: "\e011"; +} +.typcn-arrow-maximise:before { + content: "\e012"; +} +.typcn-arrow-minimise-outline:before { + content: "\e013"; +} +.typcn-arrow-minimise:before { + content: "\e014"; +} +.typcn-arrow-move-outline:before { + content: "\e015"; +} +.typcn-arrow-move:before { + content: "\e016"; +} +.typcn-arrow-repeat-outline:before { + content: "\e017"; +} +.typcn-arrow-repeat:before { + content: "\e018"; +} +.typcn-arrow-right-outline:before { + content: "\e019"; +} +.typcn-arrow-right-thick:before { + content: "\e01a"; +} +.typcn-arrow-right:before { + content: "\e01b"; +} +.typcn-arrow-shuffle:before { + content: "\e01c"; +} +.typcn-arrow-sorted-down:before { + content: "\e01d"; +} +.typcn-arrow-sorted-up:before { + content: "\e01e"; +} +.typcn-arrow-sync-outline:before { + content: "\e01f"; +} +.typcn-arrow-sync:before { + content: "\e020"; +} +.typcn-arrow-unsorted:before { + content: "\e021"; +} +.typcn-arrow-up-outline:before { + content: "\e022"; +} +.typcn-arrow-up-thick:before { + content: "\e023"; +} +.typcn-arrow-up:before { + content: "\e024"; +} +.typcn-at:before { + content: "\e025"; +} +.typcn-attachment-outline:before { + content: "\e026"; +} +.typcn-attachment:before { + content: "\e027"; +} +.typcn-backspace-outline:before { + content: "\e028"; +} +.typcn-backspace:before { + content: "\e029"; +} +.typcn-battery-charge:before { + content: "\e02a"; +} +.typcn-battery-full:before { + content: "\e02b"; +} +.typcn-battery-high:before { + content: "\e02c"; +} +.typcn-battery-low:before { + content: "\e02d"; +} +.typcn-battery-mid:before { + content: "\e02e"; +} +.typcn-beaker:before { + content: "\e02f"; +} +.typcn-beer:before { + content: "\e030"; +} +.typcn-bell:before { + content: "\e031"; +} +.typcn-book:before { + content: "\e032"; +} +.typcn-bookmark:before { + content: "\e033"; +} +.typcn-briefcase:before { + content: "\e034"; +} +.typcn-brush:before { + content: "\e035"; +} +.typcn-business-card:before { + content: "\e036"; +} +.typcn-calculator:before { + content: "\e037"; +} +.typcn-calendar-outline:before { + content: "\e038"; +} +.typcn-calendar:before { + content: "\e039"; +} +.typcn-camera-outline:before { + content: "\e03a"; +} +.typcn-camera:before { + content: "\e03b"; +} +.typcn-cancel-outline:before { + content: "\e03c"; +} +.typcn-cancel:before { + content: "\e03d"; +} +.typcn-chart-area-outline:before { + content: "\e03e"; +} +.typcn-chart-area:before { + content: "\e03f"; +} +.typcn-chart-bar-outline:before { + content: "\e040"; +} +.typcn-chart-bar:before { + content: "\e041"; +} +.typcn-chart-line-outline:before { + content: "\e042"; +} +.typcn-chart-line:before { + content: "\e043"; +} +.typcn-chart-pie-outline:before { + content: "\e044"; +} +.typcn-chart-pie:before { + content: "\e045"; +} +.typcn-chevron-left-outline:before { + content: "\e046"; +} +.typcn-chevron-left:before { + content: "\e047"; +} +.typcn-chevron-right-outline:before { + content: "\e048"; +} +.typcn-chevron-right:before { + content: "\e049"; +} +.typcn-clipboard:before { + content: "\e04a"; +} +.typcn-cloud-storage:before { + content: "\e04b"; +} +.typcn-cloud-storage-outline:before { + content: "\e054"; +} +.typcn-code-outline:before { + content: "\e04c"; +} +.typcn-code:before { + content: "\e04d"; +} +.typcn-coffee:before { + content: "\e04e"; +} +.typcn-cog-outline:before { + content: "\e04f"; +} +.typcn-cog:before { + content: "\e050"; +} +.typcn-compass:before { + content: "\e051"; +} +.typcn-contacts:before { + content: "\e052"; +} +.typcn-credit-card:before { + content: "\e053"; +} +.typcn-css3:before { + content: "\e055"; +} +.typcn-database:before { + content: "\e056"; +} +.typcn-delete-outline:before { + content: "\e057"; +} +.typcn-delete:before { + content: "\e058"; +} +.typcn-device-desktop:before { + content: "\e059"; +} +.typcn-device-laptop:before { + content: "\e05a"; +} +.typcn-device-phone:before { + content: "\e05b"; +} +.typcn-device-tablet:before { + content: "\e05c"; +} +.typcn-directions:before { + content: "\e05d"; +} +.typcn-divide-outline:before { + content: "\e05e"; +} +.typcn-divide:before { + content: "\e05f"; +} +.typcn-document-add:before { + content: "\e060"; +} +.typcn-document-delete:before { + content: "\e061"; +} +.typcn-document-text:before { + content: "\e062"; +} +.typcn-document:before { + content: "\e063"; +} +.typcn-download-outline:before { + content: "\e064"; +} +.typcn-download:before { + content: "\e065"; +} +.typcn-dropbox:before { + content: "\e066"; +} +.typcn-edit:before { + content: "\e067"; +} +.typcn-eject-outline:before { + content: "\e068"; +} +.typcn-eject:before { + content: "\e069"; +} +.typcn-equals-outline:before { + content: "\e06a"; +} +.typcn-equals:before { + content: "\e06b"; +} +.typcn-export-outline:before { + content: "\e06c"; +} +.typcn-export:before { + content: "\e06d"; +} +.typcn-eye-outline:before { + content: "\e06e"; +} +.typcn-eye:before { + content: "\e06f"; +} +.typcn-feather:before { + content: "\e070"; +} +.typcn-film:before { + content: "\e071"; +} +.typcn-filter:before { + content: "\e072"; +} +.typcn-flag-outline:before { + content: "\e073"; +} +.typcn-flag:before { + content: "\e074"; +} +.typcn-flash-outline:before { + content: "\e075"; +} +.typcn-flash:before { + content: "\e076"; +} +.typcn-flow-children:before { + content: "\e077"; +} +.typcn-flow-merge:before { + content: "\e078"; +} +.typcn-flow-parallel:before { + content: "\e079"; +} +.typcn-flow-switch:before { + content: "\e07a"; +} +.typcn-folder-add:before { + content: "\e07b"; +} +.typcn-folder-delete:before { + content: "\e07c"; +} +.typcn-folder-open:before { + content: "\e07d"; +} +.typcn-folder:before { + content: "\e07e"; +} +.typcn-gift:before { + content: "\e07f"; +} +.typcn-globe-outline:before { + content: "\e080"; +} +.typcn-globe:before { + content: "\e081"; +} +.typcn-group-outline:before { + content: "\e082"; +} +.typcn-group:before { + content: "\e083"; +} +.typcn-headphones:before { + content: "\e084"; +} +.typcn-heart-full-outline:before { + content: "\e085"; +} +.typcn-heart-half-outline:before { + content: "\e086"; +} +.typcn-heart-outline:before { + content: "\e087"; +} +.typcn-heart:before { + content: "\e088"; +} +.typcn-home-outline:before { + content: "\e089"; +} +.typcn-home:before { + content: "\e08a"; +} +.typcn-html5:before { + content: "\e08b"; +} +.typcn-image-outline:before { + content: "\e08c"; +} +.typcn-image:before { + content: "\e08d"; +} +.typcn-infinity-outline:before { + content: "\e08e"; +} +.typcn-infinity:before { + content: "\e08f"; +} +.typcn-info-large-outline:before { + content: "\e090"; +} +.typcn-info-large:before { + content: "\e091"; +} +.typcn-info-outline:before { + content: "\e092"; +} +.typcn-info:before { + content: "\e093"; +} +.typcn-input-checked-outline:before { + content: "\e094"; +} +.typcn-input-checked:before { + content: "\e095"; +} +.typcn-key-outline:before { + content: "\e096"; +} +.typcn-key:before { + content: "\e097"; +} +.typcn-keyboard:before { + content: "\e098"; +} +.typcn-leaf:before { + content: "\e099"; +} +.typcn-lightbulb:before { + content: "\e09a"; +} +.typcn-link-outline:before { + content: "\e09b"; +} +.typcn-link:before { + content: "\e09c"; +} +.typcn-location-arrow-outline:before { + content: "\e09d"; +} +.typcn-location-arrow:before { + content: "\e09e"; +} +.typcn-location-outline:before { + content: "\e09f"; +} +.typcn-location:before { + content: "\e0a0"; +} +.typcn-lock-closed-outline:before { + content: "\e0a1"; +} +.typcn-lock-closed:before { + content: "\e0a2"; +} +.typcn-lock-open-outline:before { + content: "\e0a3"; +} +.typcn-lock-open:before { + content: "\e0a4"; +} +.typcn-mail:before { + content: "\e0a5"; +} +.typcn-map:before { + content: "\e0a6"; +} +.typcn-media-eject-outline:before { + content: "\e0a7"; +} +.typcn-media-eject:before { + content: "\e0a8"; +} +.typcn-media-fast-forward-outline:before { + content: "\e0a9"; +} +.typcn-media-fast-forward:before { + content: "\e0aa"; +} +.typcn-media-pause-outline:before { + content: "\e0ab"; +} +.typcn-media-pause:before { + content: "\e0ac"; +} +.typcn-media-play-outline:before { + content: "\e0ad"; +} +.typcn-media-play-reverse-outline:before { + content: "\e0ae"; +} +.typcn-media-play-reverse:before { + content: "\e0af"; +} +.typcn-media-play:before { + content: "\e0b0"; +} +.typcn-media-record-outline:before { + content: "\e0b1"; +} +.typcn-media-record:before { + content: "\e0b2"; +} +.typcn-media-rewind-outline:before { + content: "\e0b3"; +} +.typcn-media-rewind:before { + content: "\e0b4"; +} +.typcn-media-stop-outline:before { + content: "\e0b5"; +} +.typcn-media-stop:before { + content: "\e0b6"; +} +.typcn-message-typing:before { + content: "\e0b7"; +} +.typcn-message:before { + content: "\e0b8"; +} +.typcn-messages:before { + content: "\e0b9"; +} +.typcn-microphone-outline:before { + content: "\e0ba"; +} +.typcn-microphone:before { + content: "\e0bb"; +} +.typcn-minus-outline:before { + content: "\e0bc"; +} +.typcn-minus:before { + content: "\e0bd"; +} +.typcn-mortar-board:before { + content: "\e0be"; +} +.typcn-news:before { + content: "\e0bf"; +} +.typcn-notes-outline:before { + content: "\e0c0"; +} +.typcn-notes:before { + content: "\e0c1"; +} +.typcn-pen:before { + content: "\e0c2"; +} +.typcn-pencil:before { + content: "\e0c3"; +} +.typcn-phone-outline:before { + content: "\e0c4"; +} +.typcn-phone:before { + content: "\e0c5"; +} +.typcn-pi-outline:before { + content: "\e0c6"; +} +.typcn-pi:before { + content: "\e0c7"; +} +.typcn-pin-outline:before { + content: "\e0c8"; +} +.typcn-pin:before { + content: "\e0c9"; +} +.typcn-pipette:before { + content: "\e0ca"; +} +.typcn-plane-outline:before { + content: "\e0cb"; +} +.typcn-plane:before { + content: "\e0cc"; +} +.typcn-plug:before { + content: "\e0cd"; +} +.typcn-plus-outline:before { + content: "\e0ce"; +} +.typcn-plus:before { + content: "\e0cf"; +} +.typcn-point-of-interest-outline:before { + content: "\e0d0"; +} +.typcn-point-of-interest:before { + content: "\e0d1"; +} +.typcn-power-outline:before { + content: "\e0d2"; +} +.typcn-power:before { + content: "\e0d3"; +} +.typcn-printer:before { + content: "\e0d4"; +} +.typcn-puzzle-outline:before { + content: "\e0d5"; +} +.typcn-puzzle:before { + content: "\e0d6"; +} +.typcn-radar-outline:before { + content: "\e0d7"; +} +.typcn-radar:before { + content: "\e0d8"; +} +.typcn-refresh-outline:before { + content: "\e0d9"; +} +.typcn-refresh:before { + content: "\e0da"; +} +.typcn-rss-outline:before { + content: "\e0db"; +} +.typcn-rss:before { + content: "\e0dc"; +} +.typcn-scissors-outline:before { + content: "\e0dd"; +} +.typcn-scissors:before { + content: "\e0de"; +} +.typcn-shopping-bag:before { + content: "\e0df"; +} +.typcn-shopping-cart:before { + content: "\e0e0"; +} +.typcn-social-at-circular:before { + content: "\e0e1"; +} +.typcn-social-dribbble-circular:before { + content: "\e0e2"; +} +.typcn-social-dribbble:before { + content: "\e0e3"; +} +.typcn-social-facebook-circular:before { + content: "\e0e4"; +} +.typcn-social-facebook:before { + content: "\e0e5"; +} +.typcn-social-flickr-circular:before { + content: "\e0e6"; +} +.typcn-social-flickr:before { + content: "\e0e7"; +} +.typcn-social-github-circular:before { + content: "\e0e8"; +} +.typcn-social-github:before { + content: "\e0e9"; +} +.typcn-social-google-plus-circular:before { + content: "\e0ea"; +} +.typcn-social-google-plus:before { + content: "\e0eb"; +} +.typcn-social-instagram-circular:before { + content: "\e0ec"; +} +.typcn-social-instagram:before { + content: "\e0ed"; +} +.typcn-social-last-fm-circular:before { + content: "\e0ee"; +} +.typcn-social-last-fm:before { + content: "\e0ef"; +} +.typcn-social-linkedin-circular:before { + content: "\e0f0"; +} +.typcn-social-linkedin:before { + content: "\e0f1"; +} +.typcn-social-pinterest-circular:before { + content: "\e0f2"; +} +.typcn-social-pinterest:before { + content: "\e0f3"; +} +.typcn-social-skype-outline:before { + content: "\e0f4"; +} +.typcn-social-skype:before { + content: "\e0f5"; +} +.typcn-social-tumbler-circular:before { + content: "\e0f6"; +} +.typcn-social-tumbler:before { + content: "\e0f7"; +} +.typcn-social-twitter-circular:before { + content: "\e0f8"; +} +.typcn-social-twitter:before { + content: "\e0f9"; +} +.typcn-social-vimeo-circular:before { + content: "\e0fa"; +} +.typcn-social-vimeo:before { + content: "\e0fb"; +} +.typcn-social-youtube-circular:before { + content: "\e0fc"; +} +.typcn-social-youtube:before { + content: "\e0fd"; +} +.typcn-sort-alphabetically-outline:before { + content: "\e0fe"; +} +.typcn-sort-alphabetically:before { + content: "\e0ff"; +} +.typcn-sort-numerically-outline:before { + content: "\e100"; +} +.typcn-sort-numerically:before { + content: "\e101"; +} +.typcn-spanner-outline:before { + content: "\e102"; +} +.typcn-spanner:before { + content: "\e103"; +} +.typcn-spiral:before { + content: "\e104"; +} +.typcn-star-full-outline:before { + content: "\e105"; +} +.typcn-star-half-outline:before { + content: "\e106"; +} +.typcn-star-half:before { + content: "\e107"; +} +.typcn-star-outline:before { + content: "\e108"; +} +.typcn-star:before { + content: "\e109"; +} +.typcn-starburst-outline:before { + content: "\e10a"; +} +.typcn-starburst:before { + content: "\e10b"; +} +.typcn-stopwatch:before { + content: "\e10c"; +} +.typcn-support:before { + content: "\e10d"; +} +.typcn-tabs-outline:before { + content: "\e10e"; +} +.typcn-tag:before { + content: "\e10f"; +} +.typcn-tags:before { + content: "\e110"; +} +.typcn-th-large-outline:before { + content: "\e111"; +} +.typcn-th-large:before { + content: "\e112"; +} +.typcn-th-list-outline:before { + content: "\e113"; +} +.typcn-th-list:before { + content: "\e114"; +} +.typcn-th-menu-outline:before { + content: "\e115"; +} +.typcn-th-menu:before { + content: "\e116"; +} +.typcn-th-small-outline:before { + content: "\e117"; +} +.typcn-th-small:before { + content: "\e118"; +} +.typcn-thermometer:before { + content: "\e119"; +} +.typcn-thumbs-down:before { + content: "\e11a"; +} +.typcn-thumbs-ok:before { + content: "\e11b"; +} +.typcn-thumbs-up:before { + content: "\e11c"; +} +.typcn-tick-outline:before { + content: "\e11d"; +} +.typcn-tick:before { + content: "\e11e"; +} +.typcn-ticket:before { + content: "\e11f"; +} +.typcn-time:before { + content: "\e120"; +} +.typcn-times-outline:before { + content: "\e121"; +} +.typcn-times:before { + content: "\e122"; +} +.typcn-trash:before { + content: "\e123"; +} +.typcn-tree:before { + content: "\e124"; +} +.typcn-upload-outline:before { + content: "\e125"; +} +.typcn-upload:before { + content: "\e126"; +} +.typcn-user-add-outline:before { + content: "\e127"; +} +.typcn-user-add:before { + content: "\e128"; +} +.typcn-user-delete-outline:before { + content: "\e129"; +} +.typcn-user-delete:before { + content: "\e12a"; +} +.typcn-user-outline:before { + content: "\e12b"; +} +.typcn-user:before { + content: "\e12c"; +} +.typcn-vendor-android:before { + content: "\e12d"; +} +.typcn-vendor-apple:before { + content: "\e12e"; +} +.typcn-vendor-microsoft:before { + content: "\e12f"; +} +.typcn-video-outline:before { + content: "\e130"; +} +.typcn-video:before { + content: "\e131"; +} +.typcn-volume-down:before { + content: "\e132"; +} +.typcn-volume-mute:before { + content: "\e133"; +} +.typcn-volume-up:before { + content: "\e134"; +} +.typcn-volume:before { + content: "\e135"; +} +.typcn-warning-outline:before { + content: "\e136"; +} +.typcn-warning:before { + content: "\e137"; +} +.typcn-watch:before { + content: "\e138"; +} +.typcn-waves-outline:before { + content: "\e139"; +} +.typcn-waves:before { + content: "\e13a"; +} +.typcn-weather-cloudy:before { + content: "\e13b"; +} +.typcn-weather-downpour:before { + content: "\e13c"; +} +.typcn-weather-night:before { + content: "\e13d"; +} +.typcn-weather-partly-sunny:before { + content: "\e13e"; +} +.typcn-weather-shower:before { + content: "\e13f"; +} +.typcn-weather-snow:before { + content: "\e140"; +} +.typcn-weather-stormy:before { + content: "\e141"; +} +.typcn-weather-sunny:before { + content: "\e142"; +} +.typcn-weather-windy-cloudy:before { + content: "\e143"; +} +.typcn-weather-windy:before { + content: "\e144"; +} +.typcn-wi-fi-outline:before { + content: "\e145"; +} +.typcn-wi-fi:before { + content: "\e146"; +} +.typcn-wine:before { + content: "\e147"; +} +.typcn-world-outline:before { + content: "\e148"; +} +.typcn-world:before { + content: "\e149"; +} +.typcn-zoom-in-outline:before { + content: "\e14a"; +} +.typcn-zoom-in:before { + content: "\e14b"; +} +.typcn-zoom-out-outline:before { + content: "\e14c"; +} +.typcn-zoom-out:before { + content: "\e14d"; +} +.typcn-zoom-outline:before { + content: "\e14e"; +} +.typcn-zoom:before { + content: "\e14f"; +} + + + + + +
+
+

Typicons · v2.1.0

+

Typicons are free-to-use vector icons embedded in a webfont for easy use in your user interfaces, whether it be on the web or in a native application.

+
+
+ +
+
+
+ + adjust-brightness +
+
+ + adjust-contrast +
+
+ + anchor-outline +
+
+ + anchor +
+
+ + archive +
+
+ + arrow-back-outline +
+
+ + arrow-back +
+
+ + arrow-down-outline +
+
+ + arrow-down-thick +
+
+ + arrow-down +
+
+ + arrow-forward-outline +
+
+ + arrow-forward +
+
+ + arrow-left-outline +
+
+ + arrow-left-thick +
+
+ + arrow-left +
+
+ + arrow-loop-outline +
+
+ + arrow-loop +
+
+ + arrow-maximise-outline +
+
+ + arrow-maximise +
+
+ + arrow-minimise-outline +
+
+ + arrow-minimise +
+
+ + arrow-move-outline +
+
+ + arrow-move +
+
+ + arrow-repeat-outline +
+
+ + arrow-repeat +
+
+ + arrow-right-outline +
+
+ + arrow-right-thick +
+
+ + arrow-right +
+
+ + arrow-shuffle +
+
+ + arrow-sorted-down +
+
+ + arrow-sorted-up +
+
+ + arrow-sync-outline +
+
+ + arrow-sync +
+
+ + arrow-unsorted +
+
+ + arrow-up-outline +
+
+ + arrow-up-thick +
+
+ + arrow-up +
+
+ + at +
+
+ + attachment-outline +
+
+ + attachment +
+
+ + backspace-outline +
+
+ + backspace +
+
+ + battery-charge +
+
+ + battery-full +
+
+ + battery-high +
+
+ + battery-low +
+
+ + battery-mid +
+
+ + beaker +
+
+ + beer +
+
+ + bell +
+
+ + book +
+
+ + bookmark +
+
+ + briefcase +
+
+ + brush +
+
+ + business-card +
+
+ + calculator +
+
+ + calendar-outline +
+
+ + calendar +
+
+ + camera-outline +
+
+ + camera +
+
+ + cancel-outline +
+
+ + cancel +
+
+ + chart-area-outline +
+
+ + chart-area +
+
+ + chart-bar-outline +
+
+ + chart-bar +
+
+ + chart-line-outline +
+
+ + chart-line +
+
+ + chart-pie-outline +
+
+ + chart-pie +
+
+ + chevron-left-outline +
+
+ + chevron-left +
+
+ + chevron-right-outline +
+
+ + chevron-right +
+
+ + clipboard +
+
+ + cloud-storage +
+
+ + cloud-storage-outline +
+
+ + code-outline +
+
+ + code +
+
+ + coffee +
+
+ + cog-outline +
+
+ + cog +
+
+ + compass +
+
+ + contacts +
+
+ + credit-card +
+
+ + css3 +
+
+ + database +
+
+ + delete-outline +
+
+ + delete +
+
+ + device-desktop +
+
+ + device-laptop +
+
+ + device-phone +
+
+ + device-tablet +
+
+ + directions +
+
+ + divide-outline +
+
+ + divide +
+
+ + document-add +
+
+ + document-delete +
+
+ + document-text +
+
+ + document +
+
+ + download-outline +
+
+ + download +
+
+ + dropbox +
+
+ + edit +
+
+ + eject-outline +
+
+ + eject +
+
+ + equals-outline +
+
+ + equals +
+
+ + export-outline +
+
+ + export +
+
+ + eye-outline +
+
+ + eye +
+
+ + feather +
+
+ + film +
+
+ + filter +
+
+ + flag-outline +
+
+ + flag +
+
+ + flash-outline +
+
+ + flash +
+
+ + flow-children +
+
+ + flow-merge +
+
+ + flow-parallel +
+
+ + flow-switch +
+
+ + folder-add +
+
+ + folder-delete +
+
+ + folder-open +
+
+ + folder +
+
+ + gift +
+
+ + globe-outline +
+
+ + globe +
+
+ + group-outline +
+
+ + group +
+
+ + headphones +
+
+ + heart-full-outline +
+
+ + heart-half-outline +
+
+ + heart-outline +
+
+ + heart +
+
+ + home-outline +
+
+ + home +
+
+ + html5 +
+
+ + image-outline +
+
+ + image +
+
+ + infinity-outline +
+
+ + infinity +
+
+ + info-large-outline +
+
+ + info-large +
+
+ + info-outline +
+
+ + info +
+
+ + input-checked-outline +
+
+ + input-checked +
+
+ + key-outline +
+
+ + key +
+
+ + keyboard +
+
+ + leaf +
+
+ + lightbulb +
+
+ + link-outline +
+
+ + link +
+
+ + location-arrow-outline +
+
+ + location-arrow +
+
+ + location-outline +
+
+ + location +
+
+ + lock-closed-outline +
+
+ + lock-closed +
+
+ + lock-open-outline +
+
+ + lock-open +
+
+ + mail +
+
+ + map +
+
+ + media-eject-outline +
+
+ + media-eject +
+
+ + media-fast-forward-outline +
+
+ + media-fast-forward +
+
+ + media-pause-outline +
+
+ + media-pause +
+
+ + media-play-outline +
+
+ + media-play-reverse-outline +
+
+ + media-play-reverse +
+
+ + media-play +
+
+ + media-record-outline +
+
+ + media-record +
+
+ + media-rewind-outline +
+
+ + media-rewind +
+
+ + media-stop-outline +
+
+ + media-stop +
+
+ + message-typing +
+
+ + message +
+
+ + messages +
+
+ + microphone-outline +
+
+ + microphone +
+
+ + minus-outline +
+
+ + minus +
+
+ + mortar-board +
+
+ + news +
+
+ + notes-outline +
+
+ + notes +
+
+ + pen +
+
+ + pencil +
+
+ + phone-outline +
+
+ + phone +
+
+ + pi-outline +
+
+ + pi +
+
+ + pin-outline +
+
+ + pin +
+
+ + pipette +
+
+ + plane-outline +
+
+ + plane +
+
+ + plug +
+
+ + plus-outline +
+
+ + plus +
+
+ + point-of-interest-outline +
+
+ + point-of-interest +
+
+ + power-outline +
+
+ + power +
+
+ + printer +
+
+ + puzzle-outline +
+
+ + puzzle +
+
+ + radar-outline +
+
+ + radar +
+
+ + refresh-outline +
+
+ + refresh +
+
+ + rss-outline +
+
+ + rss +
+
+ + scissors-outline +
+
+ + scissors +
+
+ + shopping-bag +
+
+ + shopping-cart +
+
+ + social-at-circular +
+
+ + social-dribbble-circular +
+
+ + social-dribbble +
+
+ + social-facebook-circular +
+
+ + social-facebook +
+
+ + social-flickr-circular +
+
+ + social-flickr +
+
+ + social-github-circular +
+
+ + social-github +
+
+ + social-google-plus-circular +
+
+ + social-google-plus +
+
+ + social-instagram-circular +
+
+ + social-instagram +
+
+ + social-last-fm-circular +
+
+ + social-last-fm +
+
+ + social-linkedin-circular +
+
+ + social-linkedin +
+
+ + social-pinterest-circular +
+
+ + social-pinterest +
+
+ + social-skype-outline +
+
+ + social-skype +
+
+ + social-tumbler-circular +
+
+ + social-tumbler +
+
+ + social-twitter-circular +
+
+ + social-twitter +
+
+ + social-vimeo-circular +
+
+ + social-vimeo +
+
+ + social-youtube-circular +
+
+ + social-youtube +
+
+ + sort-alphabetically-outline +
+
+ + sort-alphabetically +
+
+ + sort-numerically-outline +
+
+ + sort-numerically +
+
+ + spanner-outline +
+
+ + spanner +
+
+ + spiral +
+
+ + star-full-outline +
+
+ + star-half-outline +
+
+ + star-half +
+
+ + star-outline +
+
+ + star +
+
+ + starburst-outline +
+
+ + starburst +
+
+ + stopwatch +
+
+ + support +
+
+ + tabs-outline +
+
+ + tag +
+
+ + tags +
+
+ + th-large-outline +
+
+ + th-large +
+
+ + th-list-outline +
+
+ + th-list +
+
+ + th-menu-outline +
+
+ + th-menu +
+
+ + th-small-outline +
+
+ + th-small +
+
+ + thermometer +
+
+ + thumbs-down +
+
+ + thumbs-ok +
+
+ + thumbs-up +
+
+ + tick-outline +
+
+ + tick +
+
+ + ticket +
+
+ + time +
+
+ + times-outline +
+
+ + times +
+
+ + trash +
+
+ + tree +
+
+ + upload-outline +
+
+ + upload +
+
+ + user-add-outline +
+
+ + user-add +
+
+ + user-delete-outline +
+
+ + user-delete +
+
+ + user-outline +
+
+ + user +
+
+ + vendor-android +
+
+ + vendor-apple +
+
+ + vendor-microsoft +
+
+ + video-outline +
+
+ + video +
+
+ + volume-down +
+
+ + volume-mute +
+
+ + volume-up +
+
+ + volume +
+
+ + warning-outline +
+
+ + warning +
+
+ + watch +
+
+ + waves-outline +
+
+ + waves +
+
+ + weather-cloudy +
+
+ + weather-downpour +
+
+ + weather-night +
+
+ + weather-partly-sunny +
+
+ + weather-shower +
+
+ + weather-snow +
+
+ + weather-stormy +
+
+ + weather-sunny +
+
+ + weather-windy-cloudy +
+
+ + weather-windy +
+
+ + wi-fi-outline +
+
+ + wi-fi +
+
+ + wine +
+
+ + world-outline +
+
+ + world +
+
+ + zoom-in-outline +
+
+ + zoom-in +
+
+ + zoom-out-outline +
+
+ + zoom-out +
+
+ + zoom-outline +
+
+ + zoom +
+
+
+ + + + \ No newline at end of file diff --git a/src/font/typicons.css b/src/font/typicons.css index 93c491e..ed38688 100644 --- a/src/font/typicons.css +++ b/src/font/typicons.css @@ -1,1040 +1,1048 @@ -@charset 'UTF-8'; - -/* @FONT-FACE loads font into browser */ +@charset "UTF-8"; + @font-face { - font-family: 'typicons'; - font-weight: normal; - font-style: normal; - src: url('typicons.eot'); - src: url('typicons.eot?#iefix') format('embedded-opentype'), - url('typicons.woff') format('woff'), - url('typicons.ttf') format('truetype'), - url('typicons.svg#typicons') format('svg'); -} - -/* :before psuedo-selector inserts and styles icon */ + font-family: "typicons"; + src: url("typicons.eot?b99ba6e7256a27d29176cef7fc322738?#iefix") format("embedded-opentype"), +url("typicons.woff2?b99ba6e7256a27d29176cef7fc322738") format("woff2"), +url("typicons.woff?b99ba6e7256a27d29176cef7fc322738") format("woff"), +url("typicons.ttf?b99ba6e7256a27d29176cef7fc322738") format("truetype"), +url("typicons.svg?b99ba6e7256a27d29176cef7fc322738#typicons") format("svg"); +} + .typcn:before { - font-family: 'typicons'; + font-family: typicons !important; font-style: normal; - font-weight: normal; - speak: none; - display: inline-block; - text-decoration: inherit; - width: 1em; - height: 1em; - font-size: 1em; - text-align: center; + font-weight: normal !important; + font-variant: normal; + text-transform: none; + line-height: 1; -webkit-font-smoothing: antialiased; - font-smoothing: antialiased; - text-rendering: optimizeLegibility; -} - -/* Code for individual icons */ -.typcn-adjust-brightness:before { - content: '\e000'; /* '' */ -} -.typcn-adjust-contrast:before { - content: '\e001'; /* '' */ -} -.typcn-anchor-outline:before { - content: '\e002'; /* '' */ -} -.typcn-anchor:before { - content: '\e003'; /* '' */ -} -.typcn-archive:before { - content: '\e004'; /* '' */ -} -.typcn-arrow-back-outline:before { - content: '\e005'; /* '' */ -} -.typcn-arrow-back:before { - content: '\e006'; /* '' */ -} -.typcn-arrow-down-outline:before { - content: '\e007'; /* '' */ -} -.typcn-arrow-down-thick:before { - content: '\e008'; /* '' */ -} -.typcn-arrow-down:before { - content: '\e009'; /* '' */ -} -.typcn-arrow-forward-outline:before { - content: '\e00a'; /* '' */ -} -.typcn-arrow-forward:before { - content: '\e00b'; /* '' */ -} -.typcn-arrow-left-outline:before { - content: '\e00c'; /* '' */ -} -.typcn-arrow-left-thick:before { - content: '\e00d'; /* '' */ -} -.typcn-arrow-left:before { - content: '\e00e'; /* '' */ -} -.typcn-arrow-loop-outline:before { - content: '\e00f'; /* '' */ -} -.typcn-arrow-loop:before { - content: '\e010'; /* '' */ -} -.typcn-arrow-maximise-outline:before { - content: '\e011'; /* '' */ -} -.typcn-arrow-maximise:before { - content: '\e012'; /* '' */ -} -.typcn-arrow-minimise-outline:before { - content: '\e013'; /* '' */ -} -.typcn-arrow-minimise:before { - content: '\e014'; /* '' */ -} -.typcn-arrow-move-outline:before { - content: '\e015'; /* '' */ -} -.typcn-arrow-move:before { - content: '\e016'; /* '' */ -} -.typcn-arrow-repeat-outline:before { - content: '\e017'; /* '' */ -} -.typcn-arrow-repeat:before { - content: '\e018'; /* '' */ -} -.typcn-arrow-right-outline:before { - content: '\e019'; /* '' */ -} -.typcn-arrow-right-thick:before { - content: '\e01a'; /* '' */ -} -.typcn-arrow-right:before { - content: '\e01b'; /* '' */ -} -.typcn-arrow-shuffle:before { - content: '\e01c'; /* '' */ -} -.typcn-arrow-sorted-down:before { - content: '\e01d'; /* '' */ -} -.typcn-arrow-sorted-up:before { - content: '\e01e'; /* '' */ -} -.typcn-arrow-sync-outline:before { - content: '\e01f'; /* '' */ -} -.typcn-arrow-sync:before { - content: '\e020'; /* '' */ -} -.typcn-arrow-unsorted:before { - content: '\e021'; /* '' */ -} -.typcn-arrow-up-outline:before { - content: '\e022'; /* '' */ -} -.typcn-arrow-up-thick:before { - content: '\e023'; /* '' */ -} -.typcn-arrow-up:before { - content: '\e024'; /* '' */ -} -.typcn-at:before { - content: '\e025'; /* '' */ -} -.typcn-attachment-outline:before { - content: '\e026'; /* '' */ -} -.typcn-attachment:before { - content: '\e027'; /* '' */ -} -.typcn-backspace-outline:before { - content: '\e028'; /* '' */ -} -.typcn-backspace:before { - content: '\e029'; /* '' */ -} -.typcn-battery-charge:before { - content: '\e02a'; /* '' */ -} -.typcn-battery-full:before { - content: '\e02b'; /* '' */ -} -.typcn-battery-high:before { - content: '\e02c'; /* '' */ -} -.typcn-battery-low:before { - content: '\e02d'; /* '' */ -} -.typcn-battery-mid:before { - content: '\e02e'; /* '' */ -} -.typcn-beaker:before { - content: '\e02f'; /* '' */ -} -.typcn-beer:before { - content: '\e030'; /* '' */ -} -.typcn-bell:before { - content: '\e031'; /* '' */ -} -.typcn-book:before { - content: '\e032'; /* '' */ -} -.typcn-bookmark:before { - content: '\e033'; /* '' */ -} -.typcn-briefcase:before { - content: '\e034'; /* '' */ -} -.typcn-brush:before { - content: '\e035'; /* '' */ -} -.typcn-business-card:before { - content: '\e036'; /* '' */ -} -.typcn-calculator:before { - content: '\e037'; /* '' */ -} -.typcn-calendar-outline:before { - content: '\e038'; /* '' */ -} -.typcn-calendar:before { - content: '\e039'; /* '' */ -} -.typcn-camera-outline:before { - content: '\e03a'; /* '' */ -} -.typcn-camera:before { - content: '\e03b'; /* '' */ -} -.typcn-cancel-outline:before { - content: '\e03c'; /* '' */ -} -.typcn-cancel:before { - content: '\e03d'; /* '' */ -} -.typcn-chart-area-outline:before { - content: '\e03e'; /* '' */ -} -.typcn-chart-area:before { - content: '\e03f'; /* '' */ -} -.typcn-chart-bar-outline:before { - content: '\e040'; /* '' */ -} -.typcn-chart-bar:before { - content: '\e041'; /* '' */ -} -.typcn-chart-line-outline:before { - content: '\e042'; /* '' */ -} -.typcn-chart-line:before { - content: '\e043'; /* '' */ -} -.typcn-chart-pie-outline:before { - content: '\e044'; /* '' */ -} -.typcn-chart-pie:before { - content: '\e045'; /* '' */ -} -.typcn-chevron-left-outline:before { - content: '\e046'; /* '' */ -} -.typcn-chevron-left:before { - content: '\e047'; /* '' */ -} -.typcn-chevron-right-outline:before { - content: '\e048'; /* '' */ -} -.typcn-chevron-right:before { - content: '\e049'; /* '' */ -} -.typcn-clipboard:before { - content: '\e04a'; /* '' */ -} -.typcn-cloud-storage:before { - content: '\e04b'; /* '' */ -} -.typcn-cloud-storage-outline:before { - content: '\e054'; /* '' */ -} -.typcn-code-outline:before { - content: '\e04c'; /* '' */ -} -.typcn-code:before { - content: '\e04d'; /* '' */ -} -.typcn-coffee:before { - content: '\e04e'; /* '' */ -} -.typcn-cog-outline:before { - content: '\e04f'; /* '' */ -} -.typcn-cog:before { - content: '\e050'; /* '' */ -} -.typcn-compass:before { - content: '\e051'; /* '' */ -} -.typcn-contacts:before { - content: '\e052'; /* '' */ -} -.typcn-credit-card:before { - content: '\e053'; /* '' */ -} -.typcn-css3:before { - content: '\e055'; /* '' */ -} -.typcn-database:before { - content: '\e056'; /* '' */ -} -.typcn-delete-outline:before { - content: '\e057'; /* '' */ -} -.typcn-delete:before { - content: '\e058'; /* '' */ -} -.typcn-device-desktop:before { - content: '\e059'; /* '' */ -} -.typcn-device-laptop:before { - content: '\e05a'; /* '' */ -} -.typcn-device-phone:before { - content: '\e05b'; /* '' */ -} -.typcn-device-tablet:before { - content: '\e05c'; /* '' */ -} -.typcn-directions:before { - content: '\e05d'; /* '' */ -} -.typcn-divide-outline:before { - content: '\e05e'; /* '' */ -} -.typcn-divide:before { - content: '\e05f'; /* '' */ -} -.typcn-document-add:before { - content: '\e060'; /* '' */ -} -.typcn-document-delete:before { - content: '\e061'; /* '' */ -} -.typcn-document-text:before { - content: '\e062'; /* '' */ -} -.typcn-document:before { - content: '\e063'; /* '' */ -} -.typcn-download-outline:before { - content: '\e064'; /* '' */ -} -.typcn-download:before { - content: '\e065'; /* '' */ -} -.typcn-dropbox:before { - content: '\e066'; /* '' */ -} -.typcn-edit:before { - content: '\e067'; /* '' */ -} -.typcn-eject-outline:before { - content: '\e068'; /* '' */ -} -.typcn-eject:before { - content: '\e069'; /* '' */ -} -.typcn-equals-outline:before { - content: '\e06a'; /* '' */ -} -.typcn-equals:before { - content: '\e06b'; /* '' */ -} -.typcn-export-outline:before { - content: '\e06c'; /* '' */ -} -.typcn-export:before { - content: '\e06d'; /* '' */ -} -.typcn-eye-outline:before { - content: '\e06e'; /* '' */ -} -.typcn-eye:before { - content: '\e06f'; /* '' */ -} -.typcn-feather:before { - content: '\e070'; /* '' */ -} -.typcn-film:before { - content: '\e071'; /* '' */ -} -.typcn-filter:before { - content: '\e072'; /* '' */ -} -.typcn-flag-outline:before { - content: '\e073'; /* '' */ -} -.typcn-flag:before { - content: '\e074'; /* '' */ -} -.typcn-flash-outline:before { - content: '\e075'; /* '' */ -} -.typcn-flash:before { - content: '\e076'; /* '' */ -} -.typcn-flow-children:before { - content: '\e077'; /* '' */ -} -.typcn-flow-merge:before { - content: '\e078'; /* '' */ -} -.typcn-flow-parallel:before { - content: '\e079'; /* '' */ -} -.typcn-flow-switch:before { - content: '\e07a'; /* '' */ -} -.typcn-folder-add:before { - content: '\e07b'; /* '' */ -} -.typcn-folder-delete:before { - content: '\e07c'; /* '' */ -} -.typcn-folder-open:before { - content: '\e07d'; /* '' */ -} -.typcn-folder:before { - content: '\e07e'; /* '' */ -} -.typcn-gift:before { - content: '\e07f'; /* '' */ -} -.typcn-globe-outline:before { - content: '\e080'; /* '' */ -} -.typcn-globe:before { - content: '\e081'; /* '' */ -} -.typcn-group-outline:before { - content: '\e082'; /* '' */ -} -.typcn-group:before { - content: '\e083'; /* '' */ -} -.typcn-headphones:before { - content: '\e084'; /* '' */ -} -.typcn-heart-full-outline:before { - content: '\e085'; /* '' */ -} -.typcn-heart-half-outline:before { - content: '\e086'; /* '' */ -} -.typcn-heart-outline:before { - content: '\e087'; /* '' */ -} -.typcn-heart:before { - content: '\e088'; /* '' */ -} -.typcn-home-outline:before { - content: '\e089'; /* '' */ -} -.typcn-home:before { - content: '\e08a'; /* '' */ -} -.typcn-html5:before { - content: '\e08b'; /* '' */ -} -.typcn-image-outline:before { - content: '\e08c'; /* '' */ -} -.typcn-image:before { - content: '\e08d'; /* '' */ -} -.typcn-infinity-outline:before { - content: '\e08e'; /* '' */ -} -.typcn-infinity:before { - content: '\e08f'; /* '' */ -} -.typcn-info-large-outline:before { - content: '\e090'; /* '' */ -} -.typcn-info-large:before { - content: '\e091'; /* '' */ -} -.typcn-info-outline:before { - content: '\e092'; /* '' */ -} -.typcn-info:before { - content: '\e093'; /* '' */ -} -.typcn-input-checked-outline:before { - content: '\e094'; /* '' */ -} -.typcn-input-checked:before { - content: '\e095'; /* '' */ -} -.typcn-key-outline:before { - content: '\e096'; /* '' */ -} -.typcn-key:before { - content: '\e097'; /* '' */ -} -.typcn-keyboard:before { - content: '\e098'; /* '' */ -} -.typcn-leaf:before { - content: '\e099'; /* '' */ -} -.typcn-lightbulb:before { - content: '\e09a'; /* '' */ -} -.typcn-link-outline:before { - content: '\e09b'; /* '' */ -} -.typcn-link:before { - content: '\e09c'; /* '' */ -} -.typcn-location-arrow-outline:before { - content: '\e09d'; /* '' */ -} -.typcn-location-arrow:before { - content: '\e09e'; /* '' */ -} -.typcn-location-outline:before { - content: '\e09f'; /* '' */ -} -.typcn-location:before { - content: '\e0a0'; /* '' */ -} -.typcn-lock-closed-outline:before { - content: '\e0a1'; /* '' */ -} -.typcn-lock-closed:before { - content: '\e0a2'; /* '' */ -} -.typcn-lock-open-outline:before { - content: '\e0a3'; /* '' */ -} -.typcn-lock-open:before { - content: '\e0a4'; /* '' */ -} -.typcn-mail:before { - content: '\e0a5'; /* '' */ -} -.typcn-map:before { - content: '\e0a6'; /* '' */ -} -.typcn-media-eject-outline:before { - content: '\e0a7'; /* '' */ -} -.typcn-media-eject:before { - content: '\e0a8'; /* '' */ -} -.typcn-media-fast-forward-outline:before { - content: '\e0a9'; /* '' */ -} -.typcn-media-fast-forward:before { - content: '\e0aa'; /* '' */ -} -.typcn-media-pause-outline:before { - content: '\e0ab'; /* '' */ -} -.typcn-media-pause:before { - content: '\e0ac'; /* '' */ -} -.typcn-media-play-outline:before { - content: '\e0ad'; /* '' */ -} -.typcn-media-play-reverse-outline:before { - content: '\e0ae'; /* '' */ -} -.typcn-media-play-reverse:before { - content: '\e0af'; /* '' */ -} -.typcn-media-play:before { - content: '\e0b0'; /* '' */ -} -.typcn-media-record-outline:before { - content: '\e0b1'; /* '' */ -} -.typcn-media-record:before { - content: '\e0b2'; /* '' */ -} -.typcn-media-rewind-outline:before { - content: '\e0b3'; /* '' */ -} -.typcn-media-rewind:before { - content: '\e0b4'; /* '' */ -} -.typcn-media-stop-outline:before { - content: '\e0b5'; /* '' */ -} -.typcn-media-stop:before { - content: '\e0b6'; /* '' */ -} -.typcn-message-typing:before { - content: '\e0b7'; /* '' */ -} -.typcn-message:before { - content: '\e0b8'; /* '' */ -} -.typcn-messages:before { - content: '\e0b9'; /* '' */ -} -.typcn-microphone-outline:before { - content: '\e0ba'; /* '' */ -} -.typcn-microphone:before { - content: '\e0bb'; /* '' */ -} -.typcn-minus-outline:before { - content: '\e0bc'; /* '' */ -} -.typcn-minus:before { - content: '\e0bd'; /* '' */ -} -.typcn-mortar-board:before { - content: '\e0be'; /* '' */ -} -.typcn-news:before { - content: '\e0bf'; /* '' */ -} -.typcn-notes-outline:before { - content: '\e0c0'; /* '' */ -} -.typcn-notes:before { - content: '\e0c1'; /* '' */ -} -.typcn-pen:before { - content: '\e0c2'; /* '' */ -} -.typcn-pencil:before { - content: '\e0c3'; /* '' */ -} -.typcn-phone-outline:before { - content: '\e0c4'; /* '' */ -} -.typcn-phone:before { - content: '\e0c5'; /* '' */ -} -.typcn-pi-outline:before { - content: '\e0c6'; /* '' */ -} -.typcn-pi:before { - content: '\e0c7'; /* '' */ -} -.typcn-pin-outline:before { - content: '\e0c8'; /* '' */ -} -.typcn-pin:before { - content: '\e0c9'; /* '' */ -} -.typcn-pipette:before { - content: '\e0ca'; /* '' */ -} -.typcn-plane-outline:before { - content: '\e0cb'; /* '' */ -} -.typcn-plane:before { - content: '\e0cc'; /* '' */ -} -.typcn-plug:before { - content: '\e0cd'; /* '' */ -} -.typcn-plus-outline:before { - content: '\e0ce'; /* '' */ -} -.typcn-plus:before { - content: '\e0cf'; /* '' */ -} -.typcn-point-of-interest-outline:before { - content: '\e0d0'; /* '' */ -} -.typcn-point-of-interest:before { - content: '\e0d1'; /* '' */ -} -.typcn-power-outline:before { - content: '\e0d2'; /* '' */ -} -.typcn-power:before { - content: '\e0d3'; /* '' */ -} -.typcn-printer:before { - content: '\e0d4'; /* '' */ -} -.typcn-puzzle-outline:before { - content: '\e0d5'; /* '' */ -} -.typcn-puzzle:before { - content: '\e0d6'; /* '' */ -} -.typcn-radar-outline:before { - content: '\e0d7'; /* '' */ -} -.typcn-radar:before { - content: '\e0d8'; /* '' */ -} -.typcn-refresh-outline:before { - content: '\e0d9'; /* '' */ -} -.typcn-refresh:before { - content: '\e0da'; /* '' */ -} -.typcn-rss-outline:before { - content: '\e0db'; /* '' */ -} -.typcn-rss:before { - content: '\e0dc'; /* '' */ -} -.typcn-scissors-outline:before { - content: '\e0dd'; /* '' */ -} -.typcn-scissors:before { - content: '\e0de'; /* '' */ -} -.typcn-shopping-bag:before { - content: '\e0df'; /* '' */ -} -.typcn-shopping-cart:before { - content: '\e0e0'; /* '' */ -} -.typcn-social-at-circular:before { - content: '\e0e1'; /* '' */ -} -.typcn-social-dribbble-circular:before { - content: '\e0e2'; /* '' */ -} -.typcn-social-dribbble:before { - content: '\e0e3'; /* '' */ -} -.typcn-social-facebook-circular:before { - content: '\e0e4'; /* '' */ -} -.typcn-social-facebook:before { - content: '\e0e5'; /* '' */ -} -.typcn-social-flickr-circular:before { - content: '\e0e6'; /* '' */ -} -.typcn-social-flickr:before { - content: '\e0e7'; /* '' */ -} -.typcn-social-github-circular:before { - content: '\e0e8'; /* '' */ -} -.typcn-social-github:before { - content: '\e0e9'; /* '' */ -} -.typcn-social-google-plus-circular:before { - content: '\e0ea'; /* '' */ -} -.typcn-social-google-plus:before { - content: '\e0eb'; /* '' */ -} -.typcn-social-instagram-circular:before { - content: '\e0ec'; /* '' */ -} -.typcn-social-instagram:before { - content: '\e0ed'; /* '' */ -} -.typcn-social-last-fm-circular:before { - content: '\e0ee'; /* '' */ -} -.typcn-social-last-fm:before { - content: '\e0ef'; /* '' */ -} -.typcn-social-linkedin-circular:before { - content: '\e0f0'; /* '' */ -} -.typcn-social-linkedin:before { - content: '\e0f1'; /* '' */ -} -.typcn-social-pinterest-circular:before { - content: '\e0f2'; /* '' */ -} -.typcn-social-pinterest:before { - content: '\e0f3'; /* '' */ -} -.typcn-social-skype-outline:before { - content: '\e0f4'; /* '' */ -} -.typcn-social-skype:before { - content: '\e0f5'; /* '' */ -} -.typcn-social-tumbler-circular:before { - content: '\e0f6'; /* '' */ -} -.typcn-social-tumbler:before { - content: '\e0f7'; /* '' */ -} -.typcn-social-twitter-circular:before { - content: '\e0f8'; /* '' */ -} -.typcn-social-twitter:before { - content: '\e0f9'; /* '' */ -} -.typcn-social-vimeo-circular:before { - content: '\e0fa'; /* '' */ -} -.typcn-social-vimeo:before { - content: '\e0fb'; /* '' */ -} -.typcn-social-youtube-circular:before { - content: '\e0fc'; /* '' */ -} -.typcn-social-youtube:before { - content: '\e0fd'; /* '' */ -} -.typcn-sort-alphabetically-outline:before { - content: '\e0fe'; /* '' */ -} -.typcn-sort-alphabetically:before { - content: '\e0ff'; /* '' */ -} -.typcn-sort-numerically-outline:before { - content: '\e100'; /* '' */ -} -.typcn-sort-numerically:before { - content: '\e101'; /* '' */ -} -.typcn-spanner-outline:before { - content: '\e102'; /* '' */ -} -.typcn-spanner:before { - content: '\e103'; /* '' */ -} -.typcn-spiral:before { - content: '\e104'; /* '' */ -} -.typcn-star-full-outline:before { - content: '\e105'; /* '' */ -} -.typcn-star-half-outline:before { - content: '\e106'; /* '' */ -} -.typcn-star-half:before { - content: '\e107'; /* '' */ -} -.typcn-star-outline:before { - content: '\e108'; /* '' */ -} -.typcn-star:before { - content: '\e109'; /* '' */ -} -.typcn-starburst-outline:before { - content: '\e10a'; /* '' */ -} -.typcn-starburst:before { - content: '\e10b'; /* '' */ -} -.typcn-stopwatch:before { - content: '\e10c'; /* '' */ -} -.typcn-support:before { - content: '\e10d'; /* '' */ -} -.typcn-tabs-outline:before { - content: '\e10e'; /* '' */ -} -.typcn-tag:before { - content: '\e10f'; /* '' */ -} -.typcn-tags:before { - content: '\e110'; /* '' */ -} -.typcn-th-large-outline:before { - content: '\e111'; /* '' */ -} -.typcn-th-large:before { - content: '\e112'; /* '' */ -} -.typcn-th-list-outline:before { - content: '\e113'; /* '' */ -} -.typcn-th-list:before { - content: '\e114'; /* '' */ -} -.typcn-th-menu-outline:before { - content: '\e115'; /* '' */ -} -.typcn-th-menu:before { - content: '\e116'; /* '' */ -} -.typcn-th-small-outline:before { - content: '\e117'; /* '' */ -} -.typcn-th-small:before { - content: '\e118'; /* '' */ -} -.typcn-thermometer:before { - content: '\e119'; /* '' */ -} -.typcn-thumbs-down:before { - content: '\e11a'; /* '' */ -} -.typcn-thumbs-ok:before { - content: '\e11b'; /* '' */ -} -.typcn-thumbs-up:before { - content: '\e11c'; /* '' */ -} -.typcn-tick-outline:before { - content: '\e11d'; /* '' */ -} -.typcn-tick:before { - content: '\e11e'; /* '' */ -} -.typcn-ticket:before { - content: '\e11f'; /* '' */ -} -.typcn-time:before { - content: '\e120'; /* '' */ -} -.typcn-times-outline:before { - content: '\e121'; /* '' */ -} -.typcn-times:before { - content: '\e122'; /* '' */ -} -.typcn-trash:before { - content: '\e123'; /* '' */ -} -.typcn-tree:before { - content: '\e124'; /* '' */ -} -.typcn-upload-outline:before { - content: '\e125'; /* '' */ -} -.typcn-upload:before { - content: '\e126'; /* '' */ -} -.typcn-user-add-outline:before { - content: '\e127'; /* '' */ -} -.typcn-user-add:before { - content: '\e128'; /* '' */ -} -.typcn-user-delete-outline:before { - content: '\e129'; /* '' */ -} -.typcn-user-delete:before { - content: '\e12a'; /* '' */ -} -.typcn-user-outline:before { - content: '\e12b'; /* '' */ -} -.typcn-user:before { - content: '\e12c'; /* '' */ -} -.typcn-vendor-android:before { - content: '\e12d'; /* '' */ -} -.typcn-vendor-apple:before { - content: '\e12e'; /* '' */ -} -.typcn-vendor-microsoft:before { - content: '\e12f'; /* '' */ -} -.typcn-video-outline:before { - content: '\e130'; /* '' */ -} -.typcn-video:before { - content: '\e131'; /* '' */ -} -.typcn-volume-down:before { - content: '\e132'; /* '' */ -} -.typcn-volume-mute:before { - content: '\e133'; /* '' */ -} -.typcn-volume-up:before { - content: '\e134'; /* '' */ -} -.typcn-volume:before { - content: '\e135'; /* '' */ -} -.typcn-warning-outline:before { - content: '\e136'; /* '' */ -} -.typcn-warning:before { - content: '\e137'; /* '' */ -} -.typcn-watch:before { - content: '\e138'; /* '' */ -} -.typcn-waves-outline:before { - content: '\e139'; /* '' */ -} -.typcn-waves:before { - content: '\e13a'; /* '' */ -} -.typcn-weather-cloudy:before { - content: '\e13b'; /* '' */ -} -.typcn-weather-downpour:before { - content: '\e13c'; /* '' */ -} -.typcn-weather-night:before { - content: '\e13d'; /* '' */ -} -.typcn-weather-partly-sunny:before { - content: '\e13e'; /* '' */ -} -.typcn-weather-shower:before { - content: '\e13f'; /* '' */ -} -.typcn-weather-snow:before { - content: '\e140'; /* '' */ -} -.typcn-weather-stormy:before { - content: '\e141'; /* '' */ -} -.typcn-weather-sunny:before { - content: '\e142'; /* '' */ -} -.typcn-weather-windy-cloudy:before { - content: '\e143'; /* '' */ -} -.typcn-weather-windy:before { - content: '\e144'; /* '' */ -} -.typcn-wi-fi-outline:before { - content: '\e145'; /* '' */ -} -.typcn-wi-fi:before { - content: '\e146'; /* '' */ -} -.typcn-wine:before { - content: '\e147'; /* '' */ -} -.typcn-world-outline:before { - content: '\e148'; /* '' */ -} -.typcn-world:before { - content: '\e149'; /* '' */ -} -.typcn-zoom-in-outline:before { - content: '\e14a'; /* '' */ -} -.typcn-zoom-in:before { - content: '\e14b'; /* '' */ -} -.typcn-zoom-out-outline:before { - content: '\e14c'; /* '' */ -} -.typcn-zoom-out:before { - content: '\e14d'; /* '' */ -} -.typcn-zoom-outline:before { - content: '\e14e'; /* '' */ -} -.typcn-zoom:before { - content: '\e14f'; /* '' */ -} \ No newline at end of file + -moz-osx-font-smoothing: grayscale; +} + +.typcn-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} +.typcn-2x { + font-size: 2em; +} +.typcn-3x { + font-size: 3em; +} +.typcn-4x { + font-size: 4em; +} +.typcn-5x { + font-size: 5em; +} + +.typcn-adjust-brightness:before { + content: "\e000"; +} +.typcn-adjust-contrast:before { + content: "\e001"; +} +.typcn-anchor-outline:before { + content: "\e002"; +} +.typcn-anchor:before { + content: "\e003"; +} +.typcn-archive:before { + content: "\e004"; +} +.typcn-arrow-back-outline:before { + content: "\e005"; +} +.typcn-arrow-back:before { + content: "\e006"; +} +.typcn-arrow-down-outline:before { + content: "\e007"; +} +.typcn-arrow-down-thick:before { + content: "\e008"; +} +.typcn-arrow-down:before { + content: "\e009"; +} +.typcn-arrow-forward-outline:before { + content: "\e00a"; +} +.typcn-arrow-forward:before { + content: "\e00b"; +} +.typcn-arrow-left-outline:before { + content: "\e00c"; +} +.typcn-arrow-left-thick:before { + content: "\e00d"; +} +.typcn-arrow-left:before { + content: "\e00e"; +} +.typcn-arrow-loop-outline:before { + content: "\e00f"; +} +.typcn-arrow-loop:before { + content: "\e010"; +} +.typcn-arrow-maximise-outline:before { + content: "\e011"; +} +.typcn-arrow-maximise:before { + content: "\e012"; +} +.typcn-arrow-minimise-outline:before { + content: "\e013"; +} +.typcn-arrow-minimise:before { + content: "\e014"; +} +.typcn-arrow-move-outline:before { + content: "\e015"; +} +.typcn-arrow-move:before { + content: "\e016"; +} +.typcn-arrow-repeat-outline:before { + content: "\e017"; +} +.typcn-arrow-repeat:before { + content: "\e018"; +} +.typcn-arrow-right-outline:before { + content: "\e019"; +} +.typcn-arrow-right-thick:before { + content: "\e01a"; +} +.typcn-arrow-right:before { + content: "\e01b"; +} +.typcn-arrow-shuffle:before { + content: "\e01c"; +} +.typcn-arrow-sorted-down:before { + content: "\e01d"; +} +.typcn-arrow-sorted-up:before { + content: "\e01e"; +} +.typcn-arrow-sync-outline:before { + content: "\e01f"; +} +.typcn-arrow-sync:before { + content: "\e020"; +} +.typcn-arrow-unsorted:before { + content: "\e021"; +} +.typcn-arrow-up-outline:before { + content: "\e022"; +} +.typcn-arrow-up-thick:before { + content: "\e023"; +} +.typcn-arrow-up:before { + content: "\e024"; +} +.typcn-at:before { + content: "\e025"; +} +.typcn-attachment-outline:before { + content: "\e026"; +} +.typcn-attachment:before { + content: "\e027"; +} +.typcn-backspace-outline:before { + content: "\e028"; +} +.typcn-backspace:before { + content: "\e029"; +} +.typcn-battery-charge:before { + content: "\e02a"; +} +.typcn-battery-full:before { + content: "\e02b"; +} +.typcn-battery-high:before { + content: "\e02c"; +} +.typcn-battery-low:before { + content: "\e02d"; +} +.typcn-battery-mid:before { + content: "\e02e"; +} +.typcn-beaker:before { + content: "\e02f"; +} +.typcn-beer:before { + content: "\e030"; +} +.typcn-bell:before { + content: "\e031"; +} +.typcn-book:before { + content: "\e032"; +} +.typcn-bookmark:before { + content: "\e033"; +} +.typcn-briefcase:before { + content: "\e034"; +} +.typcn-brush:before { + content: "\e035"; +} +.typcn-business-card:before { + content: "\e036"; +} +.typcn-calculator:before { + content: "\e037"; +} +.typcn-calendar-outline:before { + content: "\e038"; +} +.typcn-calendar:before { + content: "\e039"; +} +.typcn-camera-outline:before { + content: "\e03a"; +} +.typcn-camera:before { + content: "\e03b"; +} +.typcn-cancel-outline:before { + content: "\e03c"; +} +.typcn-cancel:before { + content: "\e03d"; +} +.typcn-chart-area-outline:before { + content: "\e03e"; +} +.typcn-chart-area:before { + content: "\e03f"; +} +.typcn-chart-bar-outline:before { + content: "\e040"; +} +.typcn-chart-bar:before { + content: "\e041"; +} +.typcn-chart-line-outline:before { + content: "\e042"; +} +.typcn-chart-line:before { + content: "\e043"; +} +.typcn-chart-pie-outline:before { + content: "\e044"; +} +.typcn-chart-pie:before { + content: "\e045"; +} +.typcn-chevron-left-outline:before { + content: "\e046"; +} +.typcn-chevron-left:before { + content: "\e047"; +} +.typcn-chevron-right-outline:before { + content: "\e048"; +} +.typcn-chevron-right:before { + content: "\e049"; +} +.typcn-clipboard:before { + content: "\e04a"; +} +.typcn-cloud-storage:before { + content: "\e04b"; +} +.typcn-cloud-storage-outline:before { + content: "\e054"; +} +.typcn-code-outline:before { + content: "\e04c"; +} +.typcn-code:before { + content: "\e04d"; +} +.typcn-coffee:before { + content: "\e04e"; +} +.typcn-cog-outline:before { + content: "\e04f"; +} +.typcn-cog:before { + content: "\e050"; +} +.typcn-compass:before { + content: "\e051"; +} +.typcn-contacts:before { + content: "\e052"; +} +.typcn-credit-card:before { + content: "\e053"; +} +.typcn-css3:before { + content: "\e055"; +} +.typcn-database:before { + content: "\e056"; +} +.typcn-delete-outline:before { + content: "\e057"; +} +.typcn-delete:before { + content: "\e058"; +} +.typcn-device-desktop:before { + content: "\e059"; +} +.typcn-device-laptop:before { + content: "\e05a"; +} +.typcn-device-phone:before { + content: "\e05b"; +} +.typcn-device-tablet:before { + content: "\e05c"; +} +.typcn-directions:before { + content: "\e05d"; +} +.typcn-divide-outline:before { + content: "\e05e"; +} +.typcn-divide:before { + content: "\e05f"; +} +.typcn-document-add:before { + content: "\e060"; +} +.typcn-document-delete:before { + content: "\e061"; +} +.typcn-document-text:before { + content: "\e062"; +} +.typcn-document:before { + content: "\e063"; +} +.typcn-download-outline:before { + content: "\e064"; +} +.typcn-download:before { + content: "\e065"; +} +.typcn-dropbox:before { + content: "\e066"; +} +.typcn-edit:before { + content: "\e067"; +} +.typcn-eject-outline:before { + content: "\e068"; +} +.typcn-eject:before { + content: "\e069"; +} +.typcn-equals-outline:before { + content: "\e06a"; +} +.typcn-equals:before { + content: "\e06b"; +} +.typcn-export-outline:before { + content: "\e06c"; +} +.typcn-export:before { + content: "\e06d"; +} +.typcn-eye-outline:before { + content: "\e06e"; +} +.typcn-eye:before { + content: "\e06f"; +} +.typcn-feather:before { + content: "\e070"; +} +.typcn-film:before { + content: "\e071"; +} +.typcn-filter:before { + content: "\e072"; +} +.typcn-flag-outline:before { + content: "\e073"; +} +.typcn-flag:before { + content: "\e074"; +} +.typcn-flash-outline:before { + content: "\e075"; +} +.typcn-flash:before { + content: "\e076"; +} +.typcn-flow-children:before { + content: "\e077"; +} +.typcn-flow-merge:before { + content: "\e078"; +} +.typcn-flow-parallel:before { + content: "\e079"; +} +.typcn-flow-switch:before { + content: "\e07a"; +} +.typcn-folder-add:before { + content: "\e07b"; +} +.typcn-folder-delete:before { + content: "\e07c"; +} +.typcn-folder-open:before { + content: "\e07d"; +} +.typcn-folder:before { + content: "\e07e"; +} +.typcn-gift:before { + content: "\e07f"; +} +.typcn-globe-outline:before { + content: "\e080"; +} +.typcn-globe:before { + content: "\e081"; +} +.typcn-group-outline:before { + content: "\e082"; +} +.typcn-group:before { + content: "\e083"; +} +.typcn-headphones:before { + content: "\e084"; +} +.typcn-heart-full-outline:before { + content: "\e085"; +} +.typcn-heart-half-outline:before { + content: "\e086"; +} +.typcn-heart-outline:before { + content: "\e087"; +} +.typcn-heart:before { + content: "\e088"; +} +.typcn-home-outline:before { + content: "\e089"; +} +.typcn-home:before { + content: "\e08a"; +} +.typcn-html5:before { + content: "\e08b"; +} +.typcn-image-outline:before { + content: "\e08c"; +} +.typcn-image:before { + content: "\e08d"; +} +.typcn-infinity-outline:before { + content: "\e08e"; +} +.typcn-infinity:before { + content: "\e08f"; +} +.typcn-info-large-outline:before { + content: "\e090"; +} +.typcn-info-large:before { + content: "\e091"; +} +.typcn-info-outline:before { + content: "\e092"; +} +.typcn-info:before { + content: "\e093"; +} +.typcn-input-checked-outline:before { + content: "\e094"; +} +.typcn-input-checked:before { + content: "\e095"; +} +.typcn-key-outline:before { + content: "\e096"; +} +.typcn-key:before { + content: "\e097"; +} +.typcn-keyboard:before { + content: "\e098"; +} +.typcn-leaf:before { + content: "\e099"; +} +.typcn-lightbulb:before { + content: "\e09a"; +} +.typcn-link-outline:before { + content: "\e09b"; +} +.typcn-link:before { + content: "\e09c"; +} +.typcn-location-arrow-outline:before { + content: "\e09d"; +} +.typcn-location-arrow:before { + content: "\e09e"; +} +.typcn-location-outline:before { + content: "\e09f"; +} +.typcn-location:before { + content: "\e0a0"; +} +.typcn-lock-closed-outline:before { + content: "\e0a1"; +} +.typcn-lock-closed:before { + content: "\e0a2"; +} +.typcn-lock-open-outline:before { + content: "\e0a3"; +} +.typcn-lock-open:before { + content: "\e0a4"; +} +.typcn-mail:before { + content: "\e0a5"; +} +.typcn-map:before { + content: "\e0a6"; +} +.typcn-media-eject-outline:before { + content: "\e0a7"; +} +.typcn-media-eject:before { + content: "\e0a8"; +} +.typcn-media-fast-forward-outline:before { + content: "\e0a9"; +} +.typcn-media-fast-forward:before { + content: "\e0aa"; +} +.typcn-media-pause-outline:before { + content: "\e0ab"; +} +.typcn-media-pause:before { + content: "\e0ac"; +} +.typcn-media-play-outline:before { + content: "\e0ad"; +} +.typcn-media-play-reverse-outline:before { + content: "\e0ae"; +} +.typcn-media-play-reverse:before { + content: "\e0af"; +} +.typcn-media-play:before { + content: "\e0b0"; +} +.typcn-media-record-outline:before { + content: "\e0b1"; +} +.typcn-media-record:before { + content: "\e0b2"; +} +.typcn-media-rewind-outline:before { + content: "\e0b3"; +} +.typcn-media-rewind:before { + content: "\e0b4"; +} +.typcn-media-stop-outline:before { + content: "\e0b5"; +} +.typcn-media-stop:before { + content: "\e0b6"; +} +.typcn-message-typing:before { + content: "\e0b7"; +} +.typcn-message:before { + content: "\e0b8"; +} +.typcn-messages:before { + content: "\e0b9"; +} +.typcn-microphone-outline:before { + content: "\e0ba"; +} +.typcn-microphone:before { + content: "\e0bb"; +} +.typcn-minus-outline:before { + content: "\e0bc"; +} +.typcn-minus:before { + content: "\e0bd"; +} +.typcn-mortar-board:before { + content: "\e0be"; +} +.typcn-news:before { + content: "\e0bf"; +} +.typcn-notes-outline:before { + content: "\e0c0"; +} +.typcn-notes:before { + content: "\e0c1"; +} +.typcn-pen:before { + content: "\e0c2"; +} +.typcn-pencil:before { + content: "\e0c3"; +} +.typcn-phone-outline:before { + content: "\e0c4"; +} +.typcn-phone:before { + content: "\e0c5"; +} +.typcn-pi-outline:before { + content: "\e0c6"; +} +.typcn-pi:before { + content: "\e0c7"; +} +.typcn-pin-outline:before { + content: "\e0c8"; +} +.typcn-pin:before { + content: "\e0c9"; +} +.typcn-pipette:before { + content: "\e0ca"; +} +.typcn-plane-outline:before { + content: "\e0cb"; +} +.typcn-plane:before { + content: "\e0cc"; +} +.typcn-plug:before { + content: "\e0cd"; +} +.typcn-plus-outline:before { + content: "\e0ce"; +} +.typcn-plus:before { + content: "\e0cf"; +} +.typcn-point-of-interest-outline:before { + content: "\e0d0"; +} +.typcn-point-of-interest:before { + content: "\e0d1"; +} +.typcn-power-outline:before { + content: "\e0d2"; +} +.typcn-power:before { + content: "\e0d3"; +} +.typcn-printer:before { + content: "\e0d4"; +} +.typcn-puzzle-outline:before { + content: "\e0d5"; +} +.typcn-puzzle:before { + content: "\e0d6"; +} +.typcn-radar-outline:before { + content: "\e0d7"; +} +.typcn-radar:before { + content: "\e0d8"; +} +.typcn-refresh-outline:before { + content: "\e0d9"; +} +.typcn-refresh:before { + content: "\e0da"; +} +.typcn-rss-outline:before { + content: "\e0db"; +} +.typcn-rss:before { + content: "\e0dc"; +} +.typcn-scissors-outline:before { + content: "\e0dd"; +} +.typcn-scissors:before { + content: "\e0de"; +} +.typcn-shopping-bag:before { + content: "\e0df"; +} +.typcn-shopping-cart:before { + content: "\e0e0"; +} +.typcn-social-at-circular:before { + content: "\e0e1"; +} +.typcn-social-dribbble-circular:before { + content: "\e0e2"; +} +.typcn-social-dribbble:before { + content: "\e0e3"; +} +.typcn-social-facebook-circular:before { + content: "\e0e4"; +} +.typcn-social-facebook:before { + content: "\e0e5"; +} +.typcn-social-flickr-circular:before { + content: "\e0e6"; +} +.typcn-social-flickr:before { + content: "\e0e7"; +} +.typcn-social-github-circular:before { + content: "\e0e8"; +} +.typcn-social-github:before { + content: "\e0e9"; +} +.typcn-social-google-plus-circular:before { + content: "\e0ea"; +} +.typcn-social-google-plus:before { + content: "\e0eb"; +} +.typcn-social-instagram-circular:before { + content: "\e0ec"; +} +.typcn-social-instagram:before { + content: "\e0ed"; +} +.typcn-social-last-fm-circular:before { + content: "\e0ee"; +} +.typcn-social-last-fm:before { + content: "\e0ef"; +} +.typcn-social-linkedin-circular:before { + content: "\e0f0"; +} +.typcn-social-linkedin:before { + content: "\e0f1"; +} +.typcn-social-pinterest-circular:before { + content: "\e0f2"; +} +.typcn-social-pinterest:before { + content: "\e0f3"; +} +.typcn-social-skype-outline:before { + content: "\e0f4"; +} +.typcn-social-skype:before { + content: "\e0f5"; +} +.typcn-social-tumbler-circular:before { + content: "\e0f6"; +} +.typcn-social-tumbler:before { + content: "\e0f7"; +} +.typcn-social-twitter-circular:before { + content: "\e0f8"; +} +.typcn-social-twitter:before { + content: "\e0f9"; +} +.typcn-social-vimeo-circular:before { + content: "\e0fa"; +} +.typcn-social-vimeo:before { + content: "\e0fb"; +} +.typcn-social-youtube-circular:before { + content: "\e0fc"; +} +.typcn-social-youtube:before { + content: "\e0fd"; +} +.typcn-sort-alphabetically-outline:before { + content: "\e0fe"; +} +.typcn-sort-alphabetically:before { + content: "\e0ff"; +} +.typcn-sort-numerically-outline:before { + content: "\e100"; +} +.typcn-sort-numerically:before { + content: "\e101"; +} +.typcn-spanner-outline:before { + content: "\e102"; +} +.typcn-spanner:before { + content: "\e103"; +} +.typcn-spiral:before { + content: "\e104"; +} +.typcn-star-full-outline:before { + content: "\e105"; +} +.typcn-star-half-outline:before { + content: "\e106"; +} +.typcn-star-half:before { + content: "\e107"; +} +.typcn-star-outline:before { + content: "\e108"; +} +.typcn-star:before { + content: "\e109"; +} +.typcn-starburst-outline:before { + content: "\e10a"; +} +.typcn-starburst:before { + content: "\e10b"; +} +.typcn-stopwatch:before { + content: "\e10c"; +} +.typcn-support:before { + content: "\e10d"; +} +.typcn-tabs-outline:before { + content: "\e10e"; +} +.typcn-tag:before { + content: "\e10f"; +} +.typcn-tags:before { + content: "\e110"; +} +.typcn-th-large-outline:before { + content: "\e111"; +} +.typcn-th-large:before { + content: "\e112"; +} +.typcn-th-list-outline:before { + content: "\e113"; +} +.typcn-th-list:before { + content: "\e114"; +} +.typcn-th-menu-outline:before { + content: "\e115"; +} +.typcn-th-menu:before { + content: "\e116"; +} +.typcn-th-small-outline:before { + content: "\e117"; +} +.typcn-th-small:before { + content: "\e118"; +} +.typcn-thermometer:before { + content: "\e119"; +} +.typcn-thumbs-down:before { + content: "\e11a"; +} +.typcn-thumbs-ok:before { + content: "\e11b"; +} +.typcn-thumbs-up:before { + content: "\e11c"; +} +.typcn-tick-outline:before { + content: "\e11d"; +} +.typcn-tick:before { + content: "\e11e"; +} +.typcn-ticket:before { + content: "\e11f"; +} +.typcn-time:before { + content: "\e120"; +} +.typcn-times-outline:before { + content: "\e121"; +} +.typcn-times:before { + content: "\e122"; +} +.typcn-trash:before { + content: "\e123"; +} +.typcn-tree:before { + content: "\e124"; +} +.typcn-upload-outline:before { + content: "\e125"; +} +.typcn-upload:before { + content: "\e126"; +} +.typcn-user-add-outline:before { + content: "\e127"; +} +.typcn-user-add:before { + content: "\e128"; +} +.typcn-user-delete-outline:before { + content: "\e129"; +} +.typcn-user-delete:before { + content: "\e12a"; +} +.typcn-user-outline:before { + content: "\e12b"; +} +.typcn-user:before { + content: "\e12c"; +} +.typcn-vendor-android:before { + content: "\e12d"; +} +.typcn-vendor-apple:before { + content: "\e12e"; +} +.typcn-vendor-microsoft:before { + content: "\e12f"; +} +.typcn-video-outline:before { + content: "\e130"; +} +.typcn-video:before { + content: "\e131"; +} +.typcn-volume-down:before { + content: "\e132"; +} +.typcn-volume-mute:before { + content: "\e133"; +} +.typcn-volume-up:before { + content: "\e134"; +} +.typcn-volume:before { + content: "\e135"; +} +.typcn-warning-outline:before { + content: "\e136"; +} +.typcn-warning:before { + content: "\e137"; +} +.typcn-watch:before { + content: "\e138"; +} +.typcn-waves-outline:before { + content: "\e139"; +} +.typcn-waves:before { + content: "\e13a"; +} +.typcn-weather-cloudy:before { + content: "\e13b"; +} +.typcn-weather-downpour:before { + content: "\e13c"; +} +.typcn-weather-night:before { + content: "\e13d"; +} +.typcn-weather-partly-sunny:before { + content: "\e13e"; +} +.typcn-weather-shower:before { + content: "\e13f"; +} +.typcn-weather-snow:before { + content: "\e140"; +} +.typcn-weather-stormy:before { + content: "\e141"; +} +.typcn-weather-sunny:before { + content: "\e142"; +} +.typcn-weather-windy-cloudy:before { + content: "\e143"; +} +.typcn-weather-windy:before { + content: "\e144"; +} +.typcn-wi-fi-outline:before { + content: "\e145"; +} +.typcn-wi-fi:before { + content: "\e146"; +} +.typcn-wine:before { + content: "\e147"; +} +.typcn-world-outline:before { + content: "\e148"; +} +.typcn-world:before { + content: "\e149"; +} +.typcn-zoom-in-outline:before { + content: "\e14a"; +} +.typcn-zoom-in:before { + content: "\e14b"; +} +.typcn-zoom-out-outline:before { + content: "\e14c"; +} +.typcn-zoom-out:before { + content: "\e14d"; +} +.typcn-zoom-outline:before { + content: "\e14e"; +} +.typcn-zoom:before { + content: "\e14f"; +} diff --git a/src/font/typicons.eot b/src/font/typicons.eot index 0873b12..eb5aa4e 100644 Binary files a/src/font/typicons.eot and b/src/font/typicons.eot differ diff --git a/src/font/typicons.json b/src/font/typicons.json new file mode 100644 index 0000000..0561c78 --- /dev/null +++ b/src/font/typicons.json @@ -0,0 +1,338 @@ +{ + "adjust-brightness": 57344, + "adjust-contrast": 57345, + "anchor-outline": 57346, + "anchor": 57347, + "archive": 57348, + "arrow-back-outline": 57349, + "arrow-back": 57350, + "arrow-down-outline": 57351, + "arrow-down-thick": 57352, + "arrow-down": 57353, + "arrow-forward-outline": 57354, + "arrow-forward": 57355, + "arrow-left-outline": 57356, + "arrow-left-thick": 57357, + "arrow-left": 57358, + "arrow-loop-outline": 57359, + "arrow-loop": 57360, + "arrow-maximise-outline": 57361, + "arrow-maximise": 57362, + "arrow-minimise-outline": 57363, + "arrow-minimise": 57364, + "arrow-move-outline": 57365, + "arrow-move": 57366, + "arrow-repeat-outline": 57367, + "arrow-repeat": 57368, + "arrow-right-outline": 57369, + "arrow-right-thick": 57370, + "arrow-right": 57371, + "arrow-shuffle": 57372, + "arrow-sorted-down": 57373, + "arrow-sorted-up": 57374, + "arrow-sync-outline": 57375, + "arrow-sync": 57376, + "arrow-unsorted": 57377, + "arrow-up-outline": 57378, + "arrow-up-thick": 57379, + "arrow-up": 57380, + "at": 57381, + "attachment-outline": 57382, + "attachment": 57383, + "backspace-outline": 57384, + "backspace": 57385, + "battery-charge": 57386, + "battery-full": 57387, + "battery-high": 57388, + "battery-low": 57389, + "battery-mid": 57390, + "beaker": 57391, + "beer": 57392, + "bell": 57393, + "book": 57394, + "bookmark": 57395, + "briefcase": 57396, + "brush": 57397, + "business-card": 57398, + "calculator": 57399, + "calendar-outline": 57400, + "calendar": 57401, + "camera-outline": 57402, + "camera": 57403, + "cancel-outline": 57404, + "cancel": 57405, + "chart-area-outline": 57406, + "chart-area": 57407, + "chart-bar-outline": 57408, + "chart-bar": 57409, + "chart-line-outline": 57410, + "chart-line": 57411, + "chart-pie-outline": 57412, + "chart-pie": 57413, + "chevron-left-outline": 57414, + "chevron-left": 57415, + "chevron-right-outline": 57416, + "chevron-right": 57417, + "clipboard": 57418, + "cloud-storage": 57419, + "cloud-storage-outline": 57428, + "code-outline": 57420, + "code": 57421, + "coffee": 57422, + "cog-outline": 57423, + "cog": 57424, + "compass": 57425, + "contacts": 57426, + "credit-card": 57427, + "css3": 57429, + "database": 57430, + "delete-outline": 57431, + "delete": 57432, + "device-desktop": 57433, + "device-laptop": 57434, + "device-phone": 57435, + "device-tablet": 57436, + "directions": 57437, + "divide-outline": 57438, + "divide": 57439, + "document-add": 57440, + "document-delete": 57441, + "document-text": 57442, + "document": 57443, + "download-outline": 57444, + "download": 57445, + "dropbox": 57446, + "edit": 57447, + "eject-outline": 57448, + "eject": 57449, + "equals-outline": 57450, + "equals": 57451, + "export-outline": 57452, + "export": 57453, + "eye-outline": 57454, + "eye": 57455, + "feather": 57456, + "film": 57457, + "filter": 57458, + "flag-outline": 57459, + "flag": 57460, + "flash-outline": 57461, + "flash": 57462, + "flow-children": 57463, + "flow-merge": 57464, + "flow-parallel": 57465, + "flow-switch": 57466, + "folder-add": 57467, + "folder-delete": 57468, + "folder-open": 57469, + "folder": 57470, + "gift": 57471, + "globe-outline": 57472, + "globe": 57473, + "group-outline": 57474, + "group": 57475, + "headphones": 57476, + "heart-full-outline": 57477, + "heart-half-outline": 57478, + "heart-outline": 57479, + "heart": 57480, + "home-outline": 57481, + "home": 57482, + "html5": 57483, + "image-outline": 57484, + "image": 57485, + "infinity-outline": 57486, + "infinity": 57487, + "info-large-outline": 57488, + "info-large": 57489, + "info-outline": 57490, + "info": 57491, + "input-checked-outline": 57492, + "input-checked": 57493, + "key-outline": 57494, + "key": 57495, + "keyboard": 57496, + "leaf": 57497, + "lightbulb": 57498, + "link-outline": 57499, + "link": 57500, + "location-arrow-outline": 57501, + "location-arrow": 57502, + "location-outline": 57503, + "location": 57504, + "lock-closed-outline": 57505, + "lock-closed": 57506, + "lock-open-outline": 57507, + "lock-open": 57508, + "mail": 57509, + "map": 57510, + "media-eject-outline": 57511, + "media-eject": 57512, + "media-fast-forward-outline": 57513, + "media-fast-forward": 57514, + "media-pause-outline": 57515, + "media-pause": 57516, + "media-play-outline": 57517, + "media-play-reverse-outline": 57518, + "media-play-reverse": 57519, + "media-play": 57520, + "media-record-outline": 57521, + "media-record": 57522, + "media-rewind-outline": 57523, + "media-rewind": 57524, + "media-stop-outline": 57525, + "media-stop": 57526, + "message-typing": 57527, + "message": 57528, + "messages": 57529, + "microphone-outline": 57530, + "microphone": 57531, + "minus-outline": 57532, + "minus": 57533, + "mortar-board": 57534, + "news": 57535, + "notes-outline": 57536, + "notes": 57537, + "pen": 57538, + "pencil": 57539, + "phone-outline": 57540, + "phone": 57541, + "pi-outline": 57542, + "pi": 57543, + "pin-outline": 57544, + "pin": 57545, + "pipette": 57546, + "plane-outline": 57547, + "plane": 57548, + "plug": 57549, + "plus-outline": 57550, + "plus": 57551, + "point-of-interest-outline": 57552, + "point-of-interest": 57553, + "power-outline": 57554, + "power": 57555, + "printer": 57556, + "puzzle-outline": 57557, + "puzzle": 57558, + "radar-outline": 57559, + "radar": 57560, + "refresh-outline": 57561, + "refresh": 57562, + "rss-outline": 57563, + "rss": 57564, + "scissors-outline": 57565, + "scissors": 57566, + "shopping-bag": 57567, + "shopping-cart": 57568, + "social-at-circular": 57569, + "social-dribbble-circular": 57570, + "social-dribbble": 57571, + "social-facebook-circular": 57572, + "social-facebook": 57573, + "social-flickr-circular": 57574, + "social-flickr": 57575, + "social-github-circular": 57576, + "social-github": 57577, + "social-google-plus-circular": 57578, + "social-google-plus": 57579, + "social-instagram-circular": 57580, + "social-instagram": 57581, + "social-last-fm-circular": 57582, + "social-last-fm": 57583, + "social-linkedin-circular": 57584, + "social-linkedin": 57585, + "social-pinterest-circular": 57586, + "social-pinterest": 57587, + "social-skype-outline": 57588, + "social-skype": 57589, + "social-tumbler-circular": 57590, + "social-tumbler": 57591, + "social-twitter-circular": 57592, + "social-twitter": 57593, + "social-vimeo-circular": 57594, + "social-vimeo": 57595, + "social-youtube-circular": 57596, + "social-youtube": 57597, + "sort-alphabetically-outline": 57598, + "sort-alphabetically": 57599, + "sort-numerically-outline": 57600, + "sort-numerically": 57601, + "spanner-outline": 57602, + "spanner": 57603, + "spiral": 57604, + "star-full-outline": 57605, + "star-half-outline": 57606, + "star-half": 57607, + "star-outline": 57608, + "star": 57609, + "starburst-outline": 57610, + "starburst": 57611, + "stopwatch": 57612, + "support": 57613, + "tabs-outline": 57614, + "tag": 57615, + "tags": 57616, + "th-large-outline": 57617, + "th-large": 57618, + "th-list-outline": 57619, + "th-list": 57620, + "th-menu-outline": 57621, + "th-menu": 57622, + "th-small-outline": 57623, + "th-small": 57624, + "thermometer": 57625, + "thumbs-down": 57626, + "thumbs-ok": 57627, + "thumbs-up": 57628, + "tick-outline": 57629, + "tick": 57630, + "ticket": 57631, + "time": 57632, + "times-outline": 57633, + "times": 57634, + "trash": 57635, + "tree": 57636, + "upload-outline": 57637, + "upload": 57638, + "user-add-outline": 57639, + "user-add": 57640, + "user-delete-outline": 57641, + "user-delete": 57642, + "user-outline": 57643, + "user": 57644, + "vendor-android": 57645, + "vendor-apple": 57646, + "vendor-microsoft": 57647, + "video-outline": 57648, + "video": 57649, + "volume-down": 57650, + "volume-mute": 57651, + "volume-up": 57652, + "volume": 57653, + "warning-outline": 57654, + "warning": 57655, + "watch": 57656, + "waves-outline": 57657, + "waves": 57658, + "weather-cloudy": 57659, + "weather-downpour": 57660, + "weather-night": 57661, + "weather-partly-sunny": 57662, + "weather-shower": 57663, + "weather-snow": 57664, + "weather-stormy": 57665, + "weather-sunny": 57666, + "weather-windy-cloudy": 57667, + "weather-windy": 57668, + "wi-fi-outline": 57669, + "wi-fi": 57670, + "wine": 57671, + "world-outline": 57672, + "world": 57673, + "zoom-in-outline": 57674, + "zoom-in": 57675, + "zoom-out-outline": 57676, + "zoom-out": 57677, + "zoom-outline": 57678, + "zoom": 57679 +} \ No newline at end of file diff --git a/src/font/typicons.min.css b/src/font/typicons.min.css deleted file mode 100644 index 6204e50..0000000 --- a/src/font/typicons.min.css +++ /dev/null @@ -1 +0,0 @@ -@charset 'UTF-8';@font-face{font-family:'typicons';font-weight:normal;font-style:normal;src:url('typicons.eot');src:url('typicons.eot?#iefix') format('embedded-opentype'),url('typicons.woff') format('woff'),url('typicons.ttf') format('truetype'),url('typicons.svg#typicons') format('svg')}.typcn:before{font-family:'typicons';font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;height:1em;font-size:1em;text-align:center;-webkit-font-smoothing:antialiased;font-smoothing:antialiased;text-rendering:optimizeLegibility}.typcn-adjust-brightness:before{content:'\e000'}.typcn-adjust-contrast:before{content:'\e001'}.typcn-anchor-outline:before{content:'\e002'}.typcn-anchor:before{content:'\e003'}.typcn-archive:before{content:'\e004'}.typcn-arrow-back-outline:before{content:'\e005'}.typcn-arrow-back:before{content:'\e006'}.typcn-arrow-down-outline:before{content:'\e007'}.typcn-arrow-down-thick:before{content:'\e008'}.typcn-arrow-down:before{content:'\e009'}.typcn-arrow-forward-outline:before{content:'\e00a'}.typcn-arrow-forward:before{content:'\e00b'}.typcn-arrow-left-outline:before{content:'\e00c'}.typcn-arrow-left-thick:before{content:'\e00d'}.typcn-arrow-left:before{content:'\e00e'}.typcn-arrow-loop-outline:before{content:'\e00f'}.typcn-arrow-loop:before{content:'\e010'}.typcn-arrow-maximise-outline:before{content:'\e011'}.typcn-arrow-maximise:before{content:'\e012'}.typcn-arrow-minimise-outline:before{content:'\e013'}.typcn-arrow-minimise:before{content:'\e014'}.typcn-arrow-move-outline:before{content:'\e015'}.typcn-arrow-move:before{content:'\e016'}.typcn-arrow-repeat-outline:before{content:'\e017'}.typcn-arrow-repeat:before{content:'\e018'}.typcn-arrow-right-outline:before{content:'\e019'}.typcn-arrow-right-thick:before{content:'\e01a'}.typcn-arrow-right:before{content:'\e01b'}.typcn-arrow-shuffle:before{content:'\e01c'}.typcn-arrow-sorted-down:before{content:'\e01d'}.typcn-arrow-sorted-up:before{content:'\e01e'}.typcn-arrow-sync-outline:before{content:'\e01f'}.typcn-arrow-sync:before{content:'\e020'}.typcn-arrow-unsorted:before{content:'\e021'}.typcn-arrow-up-outline:before{content:'\e022'}.typcn-arrow-up-thick:before{content:'\e023'}.typcn-arrow-up:before{content:'\e024'}.typcn-at:before{content:'\e025'}.typcn-attachment-outline:before{content:'\e026'}.typcn-attachment:before{content:'\e027'}.typcn-backspace-outline:before{content:'\e028'}.typcn-backspace:before{content:'\e029'}.typcn-battery-charge:before{content:'\e02a'}.typcn-battery-full:before{content:'\e02b'}.typcn-battery-high:before{content:'\e02c'}.typcn-battery-low:before{content:'\e02d'}.typcn-battery-mid:before{content:'\e02e'}.typcn-beaker:before{content:'\e02f'}.typcn-beer:before{content:'\e030'}.typcn-bell:before{content:'\e031'}.typcn-book:before{content:'\e032'}.typcn-bookmark:before{content:'\e033'}.typcn-briefcase:before{content:'\e034'}.typcn-brush:before{content:'\e035'}.typcn-business-card:before{content:'\e036'}.typcn-calculator:before{content:'\e037'}.typcn-calendar-outline:before{content:'\e038'}.typcn-calendar:before{content:'\e039'}.typcn-camera-outline:before{content:'\e03a'}.typcn-camera:before{content:'\e03b'}.typcn-cancel-outline:before{content:'\e03c'}.typcn-cancel:before{content:'\e03d'}.typcn-chart-area-outline:before{content:'\e03e'}.typcn-chart-area:before{content:'\e03f'}.typcn-chart-bar-outline:before{content:'\e040'}.typcn-chart-bar:before{content:'\e041'}.typcn-chart-line-outline:before{content:'\e042'}.typcn-chart-line:before{content:'\e043'}.typcn-chart-pie-outline:before{content:'\e044'}.typcn-chart-pie:before{content:'\e045'}.typcn-chevron-left-outline:before{content:'\e046'}.typcn-chevron-left:before{content:'\e047'}.typcn-chevron-right-outline:before{content:'\e048'}.typcn-chevron-right:before{content:'\e049'}.typcn-clipboard:before{content:'\e04a'}.typcn-cloud-storage:before{content:'\e04b'}.typcn-cloud-storage-outline:before{content:'\e054'}.typcn-code-outline:before{content:'\e04c'}.typcn-code:before{content:'\e04d'}.typcn-coffee:before{content:'\e04e'}.typcn-cog-outline:before{content:'\e04f'}.typcn-cog:before{content:'\e050'}.typcn-compass:before{content:'\e051'}.typcn-contacts:before{content:'\e052'}.typcn-credit-card:before{content:'\e053'}.typcn-css3:before{content:'\e055'}.typcn-database:before{content:'\e056'}.typcn-delete-outline:before{content:'\e057'}.typcn-delete:before{content:'\e058'}.typcn-device-desktop:before{content:'\e059'}.typcn-device-laptop:before{content:'\e05a'}.typcn-device-phone:before{content:'\e05b'}.typcn-device-tablet:before{content:'\e05c'}.typcn-directions:before{content:'\e05d'}.typcn-divide-outline:before{content:'\e05e'}.typcn-divide:before{content:'\e05f'}.typcn-document-add:before{content:'\e060'}.typcn-document-delete:before{content:'\e061'}.typcn-document-text:before{content:'\e062'}.typcn-document:before{content:'\e063'}.typcn-download-outline:before{content:'\e064'}.typcn-download:before{content:'\e065'}.typcn-dropbox:before{content:'\e066'}.typcn-edit:before{content:'\e067'}.typcn-eject-outline:before{content:'\e068'}.typcn-eject:before{content:'\e069'}.typcn-equals-outline:before{content:'\e06a'}.typcn-equals:before{content:'\e06b'}.typcn-export-outline:before{content:'\e06c'}.typcn-export:before{content:'\e06d'}.typcn-eye-outline:before{content:'\e06e'}.typcn-eye:before{content:'\e06f'}.typcn-feather:before{content:'\e070'}.typcn-film:before{content:'\e071'}.typcn-filter:before{content:'\e072'}.typcn-flag-outline:before{content:'\e073'}.typcn-flag:before{content:'\e074'}.typcn-flash-outline:before{content:'\e075'}.typcn-flash:before{content:'\e076'}.typcn-flow-children:before{content:'\e077'}.typcn-flow-merge:before{content:'\e078'}.typcn-flow-parallel:before{content:'\e079'}.typcn-flow-switch:before{content:'\e07a'}.typcn-folder-add:before{content:'\e07b'}.typcn-folder-delete:before{content:'\e07c'}.typcn-folder-open:before{content:'\e07d'}.typcn-folder:before{content:'\e07e'}.typcn-gift:before{content:'\e07f'}.typcn-globe-outline:before{content:'\e080'}.typcn-globe:before{content:'\e081'}.typcn-group-outline:before{content:'\e082'}.typcn-group:before{content:'\e083'}.typcn-headphones:before{content:'\e084'}.typcn-heart-full-outline:before{content:'\e085'}.typcn-heart-half-outline:before{content:'\e086'}.typcn-heart-outline:before{content:'\e087'}.typcn-heart:before{content:'\e088'}.typcn-home-outline:before{content:'\e089'}.typcn-home:before{content:'\e08a'}.typcn-html5:before{content:'\e08b'}.typcn-image-outline:before{content:'\e08c'}.typcn-image:before{content:'\e08d'}.typcn-infinity-outline:before{content:'\e08e'}.typcn-infinity:before{content:'\e08f'}.typcn-info-large-outline:before{content:'\e090'}.typcn-info-large:before{content:'\e091'}.typcn-info-outline:before{content:'\e092'}.typcn-info:before{content:'\e093'}.typcn-input-checked-outline:before{content:'\e094'}.typcn-input-checked:before{content:'\e095'}.typcn-key-outline:before{content:'\e096'}.typcn-key:before{content:'\e097'}.typcn-keyboard:before{content:'\e098'}.typcn-leaf:before{content:'\e099'}.typcn-lightbulb:before{content:'\e09a'}.typcn-link-outline:before{content:'\e09b'}.typcn-link:before{content:'\e09c'}.typcn-location-arrow-outline:before{content:'\e09d'}.typcn-location-arrow:before{content:'\e09e'}.typcn-location-outline:before{content:'\e09f'}.typcn-location:before{content:'\e0a0'}.typcn-lock-closed-outline:before{content:'\e0a1'}.typcn-lock-closed:before{content:'\e0a2'}.typcn-lock-open-outline:before{content:'\e0a3'}.typcn-lock-open:before{content:'\e0a4'}.typcn-mail:before{content:'\e0a5'}.typcn-map:before{content:'\e0a6'}.typcn-media-eject-outline:before{content:'\e0a7'}.typcn-media-eject:before{content:'\e0a8'}.typcn-media-fast-forward-outline:before{content:'\e0a9'}.typcn-media-fast-forward:before{content:'\e0aa'}.typcn-media-pause-outline:before{content:'\e0ab'}.typcn-media-pause:before{content:'\e0ac'}.typcn-media-play-outline:before{content:'\e0ad'}.typcn-media-play-reverse-outline:before{content:'\e0ae'}.typcn-media-play-reverse:before{content:'\e0af'}.typcn-media-play:before{content:'\e0b0'}.typcn-media-record-outline:before{content:'\e0b1'}.typcn-media-record:before{content:'\e0b2'}.typcn-media-rewind-outline:before{content:'\e0b3'}.typcn-media-rewind:before{content:'\e0b4'}.typcn-media-stop-outline:before{content:'\e0b5'}.typcn-media-stop:before{content:'\e0b6'}.typcn-message-typing:before{content:'\e0b7'}.typcn-message:before{content:'\e0b8'}.typcn-messages:before{content:'\e0b9'}.typcn-microphone-outline:before{content:'\e0ba'}.typcn-microphone:before{content:'\e0bb'}.typcn-minus-outline:before{content:'\e0bc'}.typcn-minus:before{content:'\e0bd'}.typcn-mortar-board:before{content:'\e0be'}.typcn-news:before{content:'\e0bf'}.typcn-notes-outline:before{content:'\e0c0'}.typcn-notes:before{content:'\e0c1'}.typcn-pen:before{content:'\e0c2'}.typcn-pencil:before{content:'\e0c3'}.typcn-phone-outline:before{content:'\e0c4'}.typcn-phone:before{content:'\e0c5'}.typcn-pi-outline:before{content:'\e0c6'}.typcn-pi:before{content:'\e0c7'}.typcn-pin-outline:before{content:'\e0c8'}.typcn-pin:before{content:'\e0c9'}.typcn-pipette:before{content:'\e0ca'}.typcn-plane-outline:before{content:'\e0cb'}.typcn-plane:before{content:'\e0cc'}.typcn-plug:before{content:'\e0cd'}.typcn-plus-outline:before{content:'\e0ce'}.typcn-plus:before{content:'\e0cf'}.typcn-point-of-interest-outline:before{content:'\e0d0'}.typcn-point-of-interest:before{content:'\e0d1'}.typcn-power-outline:before{content:'\e0d2'}.typcn-power:before{content:'\e0d3'}.typcn-printer:before{content:'\e0d4'}.typcn-puzzle-outline:before{content:'\e0d5'}.typcn-puzzle:before{content:'\e0d6'}.typcn-radar-outline:before{content:'\e0d7'}.typcn-radar:before{content:'\e0d8'}.typcn-refresh-outline:before{content:'\e0d9'}.typcn-refresh:before{content:'\e0da'}.typcn-rss-outline:before{content:'\e0db'}.typcn-rss:before{content:'\e0dc'}.typcn-scissors-outline:before{content:'\e0dd'}.typcn-scissors:before{content:'\e0de'}.typcn-shopping-bag:before{content:'\e0df'}.typcn-shopping-cart:before{content:'\e0e0'}.typcn-social-at-circular:before{content:'\e0e1'}.typcn-social-dribbble-circular:before{content:'\e0e2'}.typcn-social-dribbble:before{content:'\e0e3'}.typcn-social-facebook-circular:before{content:'\e0e4'}.typcn-social-facebook:before{content:'\e0e5'}.typcn-social-flickr-circular:before{content:'\e0e6'}.typcn-social-flickr:before{content:'\e0e7'}.typcn-social-github-circular:before{content:'\e0e8'}.typcn-social-github:before{content:'\e0e9'}.typcn-social-google-plus-circular:before{content:'\e0ea'}.typcn-social-google-plus:before{content:'\e0eb'}.typcn-social-instagram-circular:before{content:'\e0ec'}.typcn-social-instagram:before{content:'\e0ed'}.typcn-social-last-fm-circular:before{content:'\e0ee'}.typcn-social-last-fm:before{content:'\e0ef'}.typcn-social-linkedin-circular:before{content:'\e0f0'}.typcn-social-linkedin:before{content:'\e0f1'}.typcn-social-pinterest-circular:before{content:'\e0f2'}.typcn-social-pinterest:before{content:'\e0f3'}.typcn-social-skype-outline:before{content:'\e0f4'}.typcn-social-skype:before{content:'\e0f5'}.typcn-social-tumbler-circular:before{content:'\e0f6'}.typcn-social-tumbler:before{content:'\e0f7'}.typcn-social-twitter-circular:before{content:'\e0f8'}.typcn-social-twitter:before{content:'\e0f9'}.typcn-social-vimeo-circular:before{content:'\e0fa'}.typcn-social-vimeo:before{content:'\e0fb'}.typcn-social-youtube-circular:before{content:'\e0fc'}.typcn-social-youtube:before{content:'\e0fd'}.typcn-sort-alphabetically-outline:before{content:'\e0fe'}.typcn-sort-alphabetically:before{content:'\e0ff'}.typcn-sort-numerically-outline:before{content:'\e100'}.typcn-sort-numerically:before{content:'\e101'}.typcn-spanner-outline:before{content:'\e102'}.typcn-spanner:before{content:'\e103'}.typcn-spiral:before{content:'\e104'}.typcn-star-full-outline:before{content:'\e105'}.typcn-star-half-outline:before{content:'\e106'}.typcn-star-half:before{content:'\e107'}.typcn-star-outline:before{content:'\e108'}.typcn-star:before{content:'\e109'}.typcn-starburst-outline:before{content:'\e10a'}.typcn-starburst:before{content:'\e10b'}.typcn-stopwatch:before{content:'\e10c'}.typcn-support:before{content:'\e10d'}.typcn-tabs-outline:before{content:'\e10e'}.typcn-tag:before{content:'\e10f'}.typcn-tags:before{content:'\e110'}.typcn-th-large-outline:before{content:'\e111'}.typcn-th-large:before{content:'\e112'}.typcn-th-list-outline:before{content:'\e113'}.typcn-th-list:before{content:'\e114'}.typcn-th-menu-outline:before{content:'\e115'}.typcn-th-menu:before{content:'\e116'}.typcn-th-small-outline:before{content:'\e117'}.typcn-th-small:before{content:'\e118'}.typcn-thermometer:before{content:'\e119'}.typcn-thumbs-down:before{content:'\e11a'}.typcn-thumbs-ok:before{content:'\e11b'}.typcn-thumbs-up:before{content:'\e11c'}.typcn-tick-outline:before{content:'\e11d'}.typcn-tick:before{content:'\e11e'}.typcn-ticket:before{content:'\e11f'}.typcn-time:before{content:'\e120'}.typcn-times-outline:before{content:'\e121'}.typcn-times:before{content:'\e122'}.typcn-trash:before{content:'\e123'}.typcn-tree:before{content:'\e124'}.typcn-upload-outline:before{content:'\e125'}.typcn-upload:before{content:'\e126'}.typcn-user-add-outline:before{content:'\e127'}.typcn-user-add:before{content:'\e128'}.typcn-user-delete-outline:before{content:'\e129'}.typcn-user-delete:before{content:'\e12a'}.typcn-user-outline:before{content:'\e12b'}.typcn-user:before{content:'\e12c'}.typcn-vendor-android:before{content:'\e12d'}.typcn-vendor-apple:before{content:'\e12e'}.typcn-vendor-microsoft:before{content:'\e12f'}.typcn-video-outline:before{content:'\e130'}.typcn-video:before{content:'\e131'}.typcn-volume-down:before{content:'\e132'}.typcn-volume-mute:before{content:'\e133'}.typcn-volume-up:before{content:'\e134'}.typcn-volume:before{content:'\e135'}.typcn-warning-outline:before{content:'\e136'}.typcn-warning:before{content:'\e137'}.typcn-watch:before{content:'\e138'}.typcn-waves-outline:before{content:'\e139'}.typcn-waves:before{content:'\e13a'}.typcn-weather-cloudy:before{content:'\e13b'}.typcn-weather-downpour:before{content:'\e13c'}.typcn-weather-night:before{content:'\e13d'}.typcn-weather-partly-sunny:before{content:'\e13e'}.typcn-weather-shower:before{content:'\e13f'}.typcn-weather-snow:before{content:'\e140'}.typcn-weather-stormy:before{content:'\e141'}.typcn-weather-sunny:before{content:'\e142'}.typcn-weather-windy-cloudy:before{content:'\e143'}.typcn-weather-windy:before{content:'\e144'}.typcn-wi-fi-outline:before{content:'\e145'}.typcn-wi-fi:before{content:'\e146'}.typcn-wine:before{content:'\e147'}.typcn-world-outline:before{content:'\e148'}.typcn-world:before{content:'\e149'}.typcn-zoom-in-outline:before{content:'\e14a'}.typcn-zoom-in:before{content:'\e14b'}.typcn-zoom-out-outline:before{content:'\e14c'}.typcn-zoom-out:before{content:'\e14d'}.typcn-zoom-outline:before{content:'\e14e'}.typcn-zoom:before{content:'\e14f'} \ No newline at end of file diff --git a/src/font/typicons.svg b/src/font/typicons.svg index 63929fe..c6428be 100644 --- a/src/font/typicons.svg +++ b/src/font/typicons.svg @@ -1,1180 +1,1021 @@ - + - -Created by FontForge 20120731 at Sun Jul 27 14:53:18 2014 - By Stephen Hutchings -(c) Stephen Hutchings 2012 - +(c) Stephen Hutchings 2012-2021 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + diff --git a/src/font/typicons.ttf b/src/font/typicons.ttf index f7df94b..c608e1c 100644 Binary files a/src/font/typicons.ttf and b/src/font/typicons.ttf differ diff --git a/src/font/typicons.woff b/src/font/typicons.woff index 14dc020..c264687 100644 Binary files a/src/font/typicons.woff and b/src/font/typicons.woff differ diff --git a/src/font/typicons.woff2 b/src/font/typicons.woff2 new file mode 100644 index 0000000..71e4db6 Binary files /dev/null and b/src/font/typicons.woff2 differ diff --git a/src/svg/image.svg b/src/svg/image.svg index 84b54fa..7e25a18 100644 --- a/src/svg/image.svg +++ b/src/svg/image.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/support/font-builder b/support/font-builder deleted file mode 160000 index 3974d0d..0000000 --- a/support/font-builder +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3974d0d370bd35f5fde203769d9351689b22b517 diff --git a/support/process/meta.yml b/support/process/meta.yml deleted file mode 100644 index a5130e1..0000000 --- a/support/process/meta.yml +++ /dev/null @@ -1,29 +0,0 @@ -meta: - author: Stephen Hutchings - homepage: http://typicons.com/ - twitter: https://twitter.com/Typicons/ - license: CC BY-SA 3.0 - license_url: http://creativecommons.org/licenses/by-sa/3.0/ - - css_prefix: "typcn" - columns: 12 - -transform: - baseline: 0.2 - rescale: 1 - offset: 0 - -font: - version: "2.0.2" - - # lowercase only - fontname: typicons - - fullname: Typicons - familyname: Typicons - - copyright: (c) Stephen Hutchings 2012 - - ascent: 800 - descent: 200 - weight: Book diff --git a/support/process/node_modules/.bin/json2yaml b/support/process/node_modules/.bin/json2yaml deleted file mode 120000 index 62480dd..0000000 --- a/support/process/node_modules/.bin/json2yaml +++ /dev/null @@ -1 +0,0 @@ -../yamljs/bin/json2yaml \ No newline at end of file diff --git a/support/process/node_modules/.bin/yaml2json b/support/process/node_modules/.bin/yaml2json deleted file mode 120000 index b4423c4..0000000 --- a/support/process/node_modules/.bin/yaml2json +++ /dev/null @@ -1 +0,0 @@ -../yamljs/bin/yaml2json \ No newline at end of file diff --git a/support/process/node_modules/yamljs/.npmignore b/support/process/node_modules/yamljs/.npmignore deleted file mode 100644 index 91dfed8..0000000 --- a/support/process/node_modules/yamljs/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.DS_Store -node_modules \ No newline at end of file diff --git a/support/process/node_modules/yamljs/LICENSE b/support/process/node_modules/yamljs/LICENSE deleted file mode 100644 index 8adaf06..0000000 --- a/support/process/node_modules/yamljs/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Jeremy Faivre - -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 diff --git a/support/process/node_modules/yamljs/README.md b/support/process/node_modules/yamljs/README.md deleted file mode 100644 index ca46cc1..0000000 --- a/support/process/node_modules/yamljs/README.md +++ /dev/null @@ -1,163 +0,0 @@ -yaml.js -======= - -Standalone JavaScript YAML 1.2 Parser & Encoder. Works under node.js and all major browsers. Also brings command line YAML/JSON conversion tools. - -Mainly inspired from [Symfony Yaml Component](https://github.com/symfony/Yaml). - -How to use ----------- - -Import yaml.js in your html page: - -``` html - -``` - -Parse yaml string: - -``` js -nativeObject = YAML.parse(yamlString); -``` - -Dump native object into yaml string: - -``` js -yamlString = YAML.stringify(nativeObject[, inline /* @integer depth to start using inline notation at */[, spaces /* @integer number of spaces to use for indentation */] ]); -``` - -Load yaml file: - -``` js -nativeObject = YAML.load('file.yml'); -``` - -Load yaml file: - -``` js -YAML.load('file.yml', function(result) -{ - nativeObject = result; -}); -``` - -Use with node.js ----------------- - -Install module: - -``` bash -npm install yamljs -``` - -Use it: - -``` js -YAML = require('yamljs'); - -// parse YAML string -nativeObject = YAML.parse(yamlString); - -// Generate YAML -yamlString = YAML.stringify(nativeObject, 4); - -// Load yaml file using require -nativeObject = require('./myfile.yml'); - -// Load yaml file using YAML.load -nativeObject = YAML.load('myfile.yml'); -``` - -Command line tools ------------------- - -You can enable the command line tools by installing yamljs as a global module: - -``` bash -npm install -g yamljs -``` - -Then, two cli commands should become available: **yaml2json** and **json2yaml**. They let you convert YAML to JSON and JSON to YAML very easily. - -**yaml2json** - -``` -usage: yaml2json [-h] [-v] [-p] [-i INDENTATION] [-s] [-r] [-w] input - -Positional arguments: - input YAML file or directory containing YAML files. - -Optional arguments: - -h, --help Show this help message and exit. - -v, --version Show program's version number and exit. - -p, --pretty Output pretty (indented) JSON. - -i INDENTATION, --indentation INDENTATION - Number of space characters used to indent code (use - with --pretty, default: 2). - -s, --save Save output inside JSON file(s) with the same name. - -r, --recursive If the input is a directory, also find YAML files in - sub-directories recursively. - -w, --watch Watch for changes. -``` - -**json2yaml** - -``` -usage: json2yaml [-h] [-v] [-d DEPTH] [-i INDENTATION] [-s] [-r] [-w] input - -Positional arguments: - input JSON file or directory containing JSON files. - -Optional arguments: - -h, --help Show this help message and exit. - -v, --version Show program's version number and exit. - -d DEPTH, --depth DEPTH - Set minimum level of depth before generating inline - YAML (default: 2). - -i INDENTATION, --indentation INDENTATION - Number of space characters used to indent code - (default: 2). - -s, --save Save output inside YML file(s) with the same name. - -r, --recursive If the input is a directory, also find JSON files in - sub-directories recursively. - -w, --watch Watch for changes. -``` - -**examples** - -``` bash -# Convert YAML to JSON and output resulting JSON on the console -yaml2json myfile.yml - -# Store output inside a JSON file -yaml2json myfile.yml > ouput.json - -# Output "pretty" (indented) JSON -yaml2json myfile.yml --pretty - -# Save the output inside a file called myfile.json -yaml2json myfile.yml --pretty --save - -# Watch a full directory and convert any YAML file into its JSON equivalent -yaml2json mydirectory --pretty --save --recursive - -# Convert JSON to YAML and store output inside a JSON file -json2yaml myfile.json > ouput.yml - -# Output YAML that will be inlined only after 8 levels of indentation -json2yaml myfile.json --depth 8 - -# Save the output inside a file called myfile.json with 4 spaces for each indentation -json2yaml myfile.json --indentation 4 - -# Watch a full directory and convert any JSON file into its YAML equivalent -json2yaml mydirectory --pretty --save --recursive -``` - -Important ---------- - -Symfony dropped support for YAML 1.1 spec. This means that `yes`, `no` and similar no longer convert to their *boolean* equivalents. - -The internal `Yaml().load()` and `Yaml().loadFile()` methods renamed to `Yaml().parse()` and `Yaml().parseFile()` respectively. Exceptions replaced with `YamlParseException` object. - diff --git a/support/process/node_modules/yamljs/bin/json2yaml b/support/process/node_modules/yamljs/bin/json2yaml deleted file mode 100755 index 4e92bf8..0000000 --- a/support/process/node_modules/yamljs/bin/json2yaml +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env node - -/** - * yaml2json cli program - */ - -var YAML = require('./yaml.js'); - -var ArgumentParser = require('argparse').ArgumentParser; -var cli = new ArgumentParser({ - prog: "json2yaml", - version: require('../package.json').version, - addHelp: true -}); - -cli.addArgument( - ['-d', '--depth'], - { - action: 'store', - type: 'int', - help: 'Set minimum level of depth before generating inline YAML (default: 2).' - } -); - -cli.addArgument( - ['-i', '--indentation'], - { - action: 'store', - type: 'int', - help: 'Number of space characters used to indent code (default: 2).', - } -); - -cli.addArgument( - ['-s', '--save'], - { - help: 'Save output inside YML file(s) with the same name.', - action: 'storeTrue' - } -); - -cli.addArgument( - ['-r', '--recursive'], - { - help: 'If the input is a directory, also find JSON files in sub-directories recursively.', - action: 'storeTrue' - } -); - -cli.addArgument( - ['-w', '--watch'], - { - help: 'Watch for changes.', - action: 'storeTrue' - } -); - -cli.addArgument(['input'], { - help: 'JSON file or directory containing JSON files.' -}); - -try { - var options = cli.parseArgs(); - var path = require('path'); - var fs = require('fs'); - var glob = require('glob'); - - var rootPath = process.cwd(); - var parsePath = function(input) { - var output; - if (!(input != null)) { - return rootPath; - } - output = path.normalize(input); - if (output.length === 0) { - return rootPath; - } - if (output.charAt(0) !== '/') { - output = path.normalize(rootPath + '/./' + output); - } - if (output.length > 1 && output.charAt(output.length - 1) === '/') { - return output.substr(0, output.length - 1); - } - return output; - }; - - // Find files - var findFiles = function(input) { - var isDirectory = fs.statSync(input).isDirectory(); - var files = []; - - if (!isDirectory) { - files.push(input); - } - else { - if (options.recursive) { - files = files.concat(glob.sync(input+'/**/*.json')); - } - else { - files = files.concat(glob.sync(input+'/*.json')); - } - } - - return files; - }; - - // Convert to JSON - var convertToYAML = function(input, inline, save, spaces) { - var yaml; - if (inline == null) inline = 2; - if (spaces == null) spaces = 2; - - yaml = YAML.stringify(JSON.parse(fs.readFileSync(input)), inline, spaces); - - if (!save) { - // Ouput result - process.stdout.write(yaml); - } - else { - var output; - if (input.substring(input.length-5) == '.json') { - output = input.substr(0, input.length-5) + '.yaml'; - } - else { - output = input + '.yaml'; - } - - // Write file - var file = fs.openSync(output, 'w+'); - fs.writeSync(file, yaml); - fs.closeSync(file); - process.stdout.write("saved "+output+"\n"); - } - }; - - var input = parsePath(options.input); - var mtimes = []; - - var runCommand = function() { - try { - var files = findFiles(input); - var len = files.length; - - for (var i = 0; i < len; i++) { - var file = files[i]; - var stat = fs.statSync(file); - var time = stat.mtime.getTime(); - if (!stat.isDirectory()) { - if (!mtimes[file] || mtimes[file] < time) { - mtimes[file] = time; - convertToYAML(file, options.depth, options.save, options.indentation); - } - } - } - } catch (e) { - process.stderr.write((e.message ? e.message : e)+"\n"); - } - }; - - if (!options.watch) { - runCommand(); - } else { - runCommand(); - setInterval(runCommand, 1000); - } -} catch (e) { - process.stderr.write((e.message ? e.message : e)+"\n"); -} diff --git a/support/process/node_modules/yamljs/bin/yaml.js b/support/process/node_modules/yamljs/bin/yaml.js deleted file mode 100644 index c3f6d9c..0000000 --- a/support/process/node_modules/yamljs/bin/yaml.js +++ /dev/null @@ -1,2087 +0,0 @@ -/* -Copyright (c) 2010 Jeremy Faivre - -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. -*/ -(function(){ -/** - * Exception class thrown when an error occurs during parsing. - * - * @author Fabien Potencier - * - * @api - */ - -/** - * Constructor. - * - * @param string message The error message - * @param integer parsedLine The line where the error occurred - * @param integer snippet The snippet of code near the problem - * @param string parsedFile The file name where the error occurred - */ - -var YamlParseException = function(message, parsedLine, snippet, parsedFile){ - - this.rawMessage = message; - this.parsedLine = (parsedLine !== undefined) ? parsedLine : -1; - this.snippet = (snippet !== undefined) ? snippet : null; - this.parsedFile = (parsedFile !== undefined) ? parsedFile : null; - - this.updateRepr(); - - this.message = message; - -}; -YamlParseException.prototype = -{ - - name: 'YamlParseException', - message: null, - - parsedFile: null, - parsedLine: -1, - snippet: null, - rawMessage: null, - - isDefined: function(input) - { - return input != undefined && input != null; - }, - - /** - * Gets the snippet of code near the error. - * - * @return string The snippet of code - */ - getSnippet: function() - { - return this.snippet; - }, - - /** - * Sets the snippet of code near the error. - * - * @param string snippet The code snippet - */ - setSnippet: function(snippet) - { - this.snippet = snippet; - - this.updateRepr(); - }, - - /** - * Gets the filename where the error occurred. - * - * This method returns null if a string is parsed. - * - * @return string The filename - */ - getParsedFile: function() - { - return this.parsedFile; - }, - - /** - * Sets the filename where the error occurred. - * - * @param string parsedFile The filename - */ - setParsedFile: function(parsedFile) - { - this.parsedFile = parsedFile; - - this.updateRepr(); - }, - - /** - * Gets the line where the error occurred. - * - * @return integer The file line - */ - getParsedLine: function() - { - return this.parsedLine; - }, - - /** - * Sets the line where the error occurred. - * - * @param integer parsedLine The file line - */ - setParsedLine: function(parsedLine) - { - this.parsedLine = parsedLine; - - this.updateRepr(); - }, - - updateRepr: function() - { - this.message = this.rawMessage; - - var dot = false; - if ('.' === this.message.charAt(this.message.length - 1)) { - this.message = this.message.substring(0, this.message.length - 1); - dot = true; - } - - if (null !== this.parsedFile) { - this.message += ' in ' + JSON.stringify(this.parsedFile); - } - - if (this.parsedLine >= 0) { - this.message += ' at line ' + this.parsedLine; - } - - if (this.snippet) { - this.message += ' (near "' + this.snippet + '")'; - } - - if (dot) { - this.message += '.'; - } - } -} -/** - * Yaml offers convenience methods to parse and dump YAML. - * - * @author Fabien Potencier - * - * @api - */ - -var YamlRunningUnderNode = false; -var Yaml = function(){}; -Yaml.prototype = -{ - - /** - * Parses YAML into a JS representation. - * - * The parse method, when supplied with a YAML stream (file), - * will do its best to convert YAML in a file into a JS representation. - * - * Usage: - * - * obj = yaml.parseFile('config.yml'); - * - * - * @param string input Path of YAML file - * - * @return array The YAML converted to a JS representation - * - * @throws YamlParseException If the YAML is not valid - */ - parseFile: function(file /* String */, callback /* Function */) - { - if ( callback == null ) - { - var input = this.getFileContents(file); - var ret = null; - try - { - ret = this.parse(input); - } - catch ( e ) - { - if ( e instanceof YamlParseException ) { - e.setParsedFile(file); - } - throw e; - } - return ret; - } - - this.getFileContents(file, function(data) - { - callback(new Yaml().parse(data)); - }); - }, - - /** - * Parses YAML into a JS representation. - * - * The parse method, when supplied with a YAML stream (string), - * will do its best to convert YAML into a JS representation. - * - * Usage: - * - * obj = yaml.parse(...); - * - * - * @param string input string containing YAML - * - * @return array The YAML converted to a JS representation - * - * @throws YamlParseException If the YAML is not valid - */ - parse: function(input /* String */) - { - var yaml = new YamlParser(); - - return yaml.parse(input); - }, - - /** - * Dumps a JS representation to a YAML string. - * - * The dump method, when supplied with an array, will do its best - * to convert the array into friendly YAML. - * - * @param array array JS representation - * @param integer inline The level where you switch to inline YAML - * - * @return string A YAML string representing the original JS representation - * - * @api - */ - dump: function(array, inline, spaces) - { - if ( inline == null ) inline = 2; - - var yaml = new YamlDumper(); - if (spaces) { - yaml.numSpacesForIndentation = spaces; - } - - return yaml.dump(array, inline); - }, - - getXHR: function() - { - if ( window.XMLHttpRequest ) - return new XMLHttpRequest(); - - if ( window.ActiveXObject ) - { - var names = [ - "Msxml2.XMLHTTP.6.0", - "Msxml2.XMLHTTP.3.0", - "Msxml2.XMLHTTP", - "Microsoft.XMLHTTP" - ]; - - for ( var i = 0; i < 4; i++ ) - { - try{ return new ActiveXObject(names[i]); } - catch(e){} - } - } - return null; - }, - - getFileContents: function(file, callback) - { - if ( YamlRunningUnderNode ) - { - var fs = require('fs'); - if ( callback == null ) - { - var data = fs.readFileSync(file); - if (data == null) return null; - return ''+data; - } - else - { - fs.readFile(file, function(err, data) - { - if (err) - callback(null); - else - callback(data); - }); - } - } - else - { - var request = this.getXHR(); - - // Sync - if ( callback == null ) - { - request.open('GET', file, false); - request.send(null); - - if ( request.status == 200 || request.status == 0 ) - return request.responseText; - - return null; - } - - // Async - request.onreadystatechange = function() - { - if ( request.readyState == 4 ) - if ( request.status == 200 || request.status == 0 ) - callback(request.responseText); - else - callback(null); - }; - request.open('GET', file, true); - request.send(null); - } - } -}; - -var YAML = -{ - /* - * @param integer inline The level where you switch to inline YAML - */ - - stringify: function(input, inline, spaces) - { - return new Yaml().dump(input, inline, spaces); - }, - - parse: function(input) - { - return new Yaml().parse(input); - }, - - load: function(file, callback) - { - return new Yaml().parseFile(file, callback); - } -}; - -// Handle node.js case -if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - exports = module.exports = YAML; - YamlRunningUnderNode = true; - - // Add require handler - (function () { - var require_handler = function (module, filename) { - // fill in result - module.exports = YAML.load(filename); - }; - - // register require extensions only if we're on node.js - // hack for browserify - if ( undefined !== require.extensions ) { - require.extensions['.yml'] = require_handler; - require.extensions['.yaml'] = require_handler; - } - }()); - } -} - -// Handle browser case -if ( typeof(window) != "undefined" ) -{ - window.YAML = YAML; -} - -/** - * YamlInline implements a YAML parser/dumper for the YAML inline syntax. - */ -var YamlInline = function(){}; -YamlInline.prototype = -{ - i: null, - - /** - * Convert a YAML string to a JS object. - * - * @param string value A YAML string - * - * @return object A JS object representing the YAML string - */ - parse: function(value) - { - var result = null; - value = this.trim(value); - - if ( 0 == value.length ) - { - return ''; - } - - switch ( value.charAt(0) ) - { - case '[': - result = this.parseSequence(value); - break; - case '{': - result = this.parseMapping(value); - break; - default: - result = this.parseScalar(value); - } - - // some comment can end the scalar - if ( value.substr(this.i+1).replace(/^\s*#.*$/, '') != '' ) { - console.log("oups "+value.substr(this.i+1)); - throw new YamlParseException('Unexpected characters near "'+value.substr(this.i)+'".'); - } - - return result; - }, - - /** - * Dumps a given JS variable to a YAML string. - * - * @param mixed value The JS variable to convert - * - * @return string The YAML string representing the JS object - */ - dump: function(value) - { - if ( undefined == value || null == value ) - return 'null'; - if ( value instanceof Date) - return value.toISOString(); - if ( typeof(value) == 'object') - return this.dumpObject(value); - if ( typeof(value) == 'boolean' ) - return value ? 'true' : 'false'; - if ( /^\d+$/.test(value) ) - return typeof(value) == 'string' ? "'"+value+"'" : parseInt(value); - if ( this.isNumeric(value) ) - return typeof(value) == 'string' ? "'"+value+"'" : parseFloat(value); - if ( typeof(value) == 'number' ) - return value == Infinity ? '.Inf' : ( value == -Infinity ? '-.Inf' : ( isNaN(value) ? '.NAN' : value ) ); - var yaml = new YamlEscaper(); - if ( yaml.requiresDoubleQuoting(value) ) - return yaml.escapeWithDoubleQuotes(value); - if ( yaml.requiresSingleQuoting(value) ) - return yaml.escapeWithSingleQuotes(value); - if ( '' == value ) - return ""; - if ( this.getTimestampRegex().test(value) ) - return "'"+value+"'"; - if ( this.inArray(value.toLowerCase(), ['null','~','true','false']) ) - return "'"+value+"'"; - // default - return value; - }, - - /** - * Dumps a JS object to a YAML string. - * - * @param object value The JS array to dump - * - * @return string The YAML string representing the JS object - */ - dumpObject: function(value) - { - var keys = this.getKeys(value); - var output = null; - var i; - var len = keys.length; - - // array - if ( value instanceof Array ) - /*( 1 == len && '0' == keys[0] ) - || - ( len > 1 && this.reduceArray(keys, function(v,w){return Math.floor(v+w);}, 0) == len * (len - 1) / 2) )*/ - { - output = []; - for ( i = 0; i < len; i++ ) - { - output.push(this.dump(value[keys[i]])); - } - - return '['+output.join(', ')+']'; - } - - // mapping - output = []; - for ( i = 0; i < len; i++ ) - { - output.push(this.dump(keys[i])+': '+this.dump(value[keys[i]])); - } - - return '{ '+output.join(', ')+' }'; - }, - - /** - * Parses a scalar to a YAML string. - * - * @param scalar scalar - * @param string delimiters - * @param object stringDelimiters - * @param integer i - * @param boolean evaluate - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseScalar: function(scalar, delimiters, stringDelimiters, i, evaluate) - { - if ( delimiters == undefined ) delimiters = null; - if ( stringDelimiters == undefined ) stringDelimiters = ['"', "'"]; - if ( i == undefined ) i = 0; - if ( evaluate == undefined ) evaluate = true; - - var output = null; - var pos = null; - var matches = null; - - if ( this.inArray(scalar[i], stringDelimiters) ) - { - // quoted scalar - output = this.parseQuotedScalar(scalar, i); - i = this.i; - if (null !== delimiters) { - var tmp = scalar.substr(i).replace(/^\s+/, ''); - if (!this.inArray(tmp.charAt(0), delimiters)) { - throw new YamlParseException('Unexpected characters ('+scalar.substr(i)+').'); - } - } - } - else - { - // "normal" string - if ( !delimiters ) - { - output = (scalar+'').substring(i); - - i += output.length; - - // remove comments - pos = output.indexOf(' #'); - if ( pos != -1 ) - { - output = output.substr(0, pos).replace(/\s+$/g,''); - } - } - else if ( matches = new RegExp('^(.+?)('+delimiters.join('|')+')').exec((scalar+'').substring(i)) ) - { - output = matches[1]; - i += output.length; - } - else - { - throw new YamlParseException('Malformed inline YAML string ('+scalar+').'); - } - output = evaluate ? this.evaluateScalar(output) : output; - } - - this.i = i; - - return output; - }, - - /** - * Parses a quoted scalar to YAML. - * - * @param string scalar - * @param integer i - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseQuotedScalar: function(scalar, i) - { - var matches = null; - //var item = /^(.*?)['"]\s*(?:[,:]|[}\]]\s*,)/.exec((scalar+'').substring(i))[1]; - - if ( !(matches = new RegExp('^'+YamlInline.REGEX_QUOTED_STRING).exec((scalar+'').substring(i))) ) - { - throw new YamlParseException('Malformed inline YAML string ('+(scalar+'').substring(i)+').'); - } - - var output = matches[0].substr(1, matches[0].length - 2); - - var unescaper = new YamlUnescaper(); - - if ( '"' == (scalar+'').charAt(i) ) - { - output = unescaper.unescapeDoubleQuotedString(output); - } - else - { - output = unescaper.unescapeSingleQuotedString(output); - } - - i += matches[0].length; - - this.i = i; - return output; - }, - - /** - * Parses a sequence to a YAML string. - * - * @param string sequence - * @param integer i - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseSequence: function(sequence, i) - { - if ( i == undefined ) i = 0; - - var output = []; - var len = sequence.length; - i += 1; - - // [foo, bar, ...] - while ( i < len ) - { - switch ( sequence.charAt(i) ) - { - case '[': - // nested sequence - output.push(this.parseSequence(sequence, i)); - i = this.i; - break; - case '{': - // nested mapping - output.push(this.parseMapping(sequence, i)); - i = this.i; - break; - case ']': - this.i = i; - return output; - case ',': - case ' ': - break; - default: - var isQuoted = this.inArray(sequence.charAt(i), ['"', "'"]); - var value = this.parseScalar(sequence, [',', ']'], ['"', "'"], i); - i = this.i; - - if ( !isQuoted && (value+'').indexOf(': ') != -1 ) - { - // embedded mapping? - try - { - value = this.parseMapping('{'+value+'}'); - } - catch ( e ) - { - if ( !(e instanceof YamlParseException ) ) throw e; - // no, it's not - } - } - - output.push(value); - - i--; - } - - i++; - } - - throw new YamlParseException('Malformed inline YAML string "'+sequence+'"'); - }, - - /** - * Parses a mapping to a YAML string. - * - * @param string mapping - * @param integer i - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseMapping: function(mapping, i) - { - if ( i == undefined ) i = 0; - var output = {}; - var len = mapping.length; - i += 1; - var done = false; - var doContinue = false; - - // {foo: bar, bar:foo, ...} - while ( i < len ) - { - doContinue = false; - - switch ( mapping.charAt(i) ) - { - case ' ': - case ',': - i++; - doContinue = true; - break; - case '}': - this.i = i; - return output; - } - - if ( doContinue ) continue; - - // key - var key = this.parseScalar(mapping, [':', ' '], ['"', "'"], i, false); - i = this.i; - - // value - done = false; - while ( i < len ) - { - switch ( mapping.charAt(i) ) - { - case '[': - // nested sequence - output[key] = this.parseSequence(mapping, i); - i = this.i; - done = true; - break; - case '{': - // nested mapping - output[key] = this.parseMapping(mapping, i); - i = this.i; - done = true; - break; - case ':': - case ' ': - break; - default: - output[key] = this.parseScalar(mapping, [',', '}'], ['"', "'"], i); - i = this.i; - done = true; - i--; - } - - ++i; - - if ( done ) - { - doContinue = true; - break; - } - } - - if ( doContinue ) continue; - } - - throw new YamlParseException('Malformed inline YAML string "'+mapping+'"'); - }, - - /** - * Evaluates scalars and replaces magic values. - * - * @param string scalar - * - * @return string A YAML string - */ - evaluateScalar: function(scalar) - { - scalar = this.trim(scalar); - - var raw = null; - var cast = null; - - if ( ( 'null' == scalar.toLowerCase() ) || - ( '' == scalar ) || - ( '~' == scalar ) ) - return null; - if ( (scalar+'').indexOf('!str ') == 0 ) - return (''+scalar).substring(5); - if ( (scalar+'').indexOf('! ') == 0 ) - return parseInt(this.parseScalar((scalar+'').substr(2))); - if ( /^\d+$/.test(scalar) ) - { - raw = scalar; - cast = parseInt(scalar); - return '0' == scalar.charAt(0) ? this.octdec(scalar) : (( ''+raw == ''+cast ) ? cast : raw); - } - if ( 'true' == (scalar+'').toLowerCase() ) - return true; - if ( 'false' == (scalar+'').toLowerCase() ) - return false; - if ( this.isNumeric(scalar) ) - return '0x' == (scalar+'').substr(0, 2) ? this.hexdec(scalar) : parseFloat(scalar); - if ( scalar.toLowerCase() == '.inf' ) - return Infinity; - if ( scalar.toLowerCase() == '.nan' ) - return NaN; - if ( scalar.toLowerCase() == '-.inf' ) - return -Infinity; - if ( /^(-|\+)?[0-9,]+(\.[0-9]+)?$/.test(scalar) ) - return parseFloat(scalar.split(',').join('')); - if ( this.getTimestampRegex().test(scalar) ) - return new Date(this.strtotime(scalar)); - //else - return ''+scalar; - }, - - /** - * Gets a regex that matches an unix timestamp - * - * @return string The regular expression - */ - getTimestampRegex: function() - { - return new RegExp('^'+ - '([0-9][0-9][0-9][0-9])'+ - '-([0-9][0-9]?)'+ - '-([0-9][0-9]?)'+ - '(?:(?:[Tt]|[ \t]+)'+ - '([0-9][0-9]?)'+ - ':([0-9][0-9])'+ - ':([0-9][0-9])'+ - '(?:\.([0-9]*))?'+ - '(?:[ \t]*(Z|([-+])([0-9][0-9]?)'+ - '(?::([0-9][0-9]))?))?)?'+ - '$','gi'); - }, - - trim: function(str /* String */) - { - return (str+'').replace(/^\s+/,'').replace(/\s+$/,''); - }, - - isNumeric: function(input) - { - return (input - 0) == input && input.length > 0 && input.replace(/\s+/g,'') != ''; - }, - - inArray: function(key, tab) - { - var i; - var len = tab.length; - for ( i = 0; i < len; i++ ) - { - if ( key == tab[i] ) return true; - } - return false; - }, - - getKeys: function(tab) - { - var ret = []; - - for ( var name in tab ) - { - if ( tab.hasOwnProperty(name) ) - { - ret.push(name); - } - } - - return ret; - }, - - /*reduceArray: function(tab, fun) - { - var len = tab.length; - if (typeof fun != "function") - throw new YamlParseException("fun is not a function"); - - // no value to return if no initial value and an empty array - if (len == 0 && arguments.length == 1) - throw new YamlParseException("empty array"); - - var i = 0; - if (arguments.length >= 2) - { - var rv = arguments[1]; - } - else - { - do - { - if (i in tab) - { - rv = tab[i++]; - break; - } - - // if array contains no values, no initial value to return - if (++i >= len) - throw new YamlParseException("no initial value to return"); - } - while (true); - } - - for (; i < len; i++) - { - if (i in tab) - rv = fun.call(null, rv, tab[i], i, tab); - } - - return rv; - },*/ - - octdec: function(input) - { - return parseInt((input+'').replace(/[^0-7]/gi, ''), 8); - }, - - hexdec: function(input) - { - input = this.trim(input); - if ( (input+'').substr(0, 2) == '0x' ) input = (input+'').substring(2); - return parseInt((input+'').replace(/[^a-f0-9]/gi, ''), 16); - }, - - /** - * @see http://phpjs.org/functions/strtotime - * @note we need timestamp with msecs so /1000 removed - * @note original contained binary | 0 (wtf?!) everywhere, which messes everything up - */ - strtotime: function (h,b){var f,c,g,k,d="";h=(h+"").replace(/\s{2,}|^\s|\s$/g," ").replace(/[\t\r\n]/g,"");if(h==="now"){return b===null||isNaN(b)?new Date().getTime()||0:b||0}else{if(!isNaN(d=Date.parse(h))){return d||0}else{if(b){b=new Date(b)}else{b=new Date()}}}h=h.toLowerCase();var e={day:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},mon:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]};var a=function(i){var o=(i[2]&&i[2]==="ago");var n=(n=i[0]==="last"?-1:1)*(o?-1:1);switch(i[0]){case"last":case"next":switch(i[1].substring(0,3)){case"yea":b.setFullYear(b.getFullYear()+n);break;case"wee":b.setDate(b.getDate()+(n*7));break;case"day":b.setDate(b.getDate()+n);break;case"hou":b.setHours(b.getHours()+n);break;case"min":b.setMinutes(b.getMinutes()+n);break;case"sec":b.setSeconds(b.getSeconds()+n);break;case"mon":if(i[1]==="month"){b.setMonth(b.getMonth()+n);break}default:var l=e.day[i[1].substring(0,3)];if(typeof l!=="undefined"){var p=l-b.getDay();if(p===0){p=7*n}else{if(p>0){if(i[0]==="last"){p-=7}}else{if(i[0]==="next"){p+=7}}}b.setDate(b.getDate()+p);b.setHours(0,0,0,0)}}break;default:if(/\d+/.test(i[0])){n*=parseInt(i[0],10);switch(i[1].substring(0,3)){case"yea":b.setFullYear(b.getFullYear()+n);break;case"mon":b.setMonth(b.getMonth()+n);break;case"wee":b.setDate(b.getDate()+(n*7));break;case"day":b.setDate(b.getDate()+n);break;case"hou":b.setHours(b.getHours()+n);break;case"min":b.setMinutes(b.getMinutes()+n);break;case"sec":b.setSeconds(b.getSeconds()+n);break}}else{return false}break}return true};g=h.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if(g!==null){if(!g[2]){g[2]="00:00:00"}else{if(!g[3]){g[2]+=":00"}}k=g[1].split(/-/g);k[1]=e.mon[k[1]-1]||k[1];k[0]=+k[0];k[0]=(k[0]>=0&&k[0]<=69)?"20"+(k[0]<10?"0"+k[0]:k[0]+""):(k[0]>=70&&k[0]<=99)?"19"+k[0]:k[0]+"";return parseInt(this.strtotime(k[2]+" "+k[1]+" "+k[0]+" "+g[2])+(g[4]?g[4]:""),10)}var j="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?";g=h.match(new RegExp(j,"gi"));if(g===null){return false}for(f=0,c=g.length;f= newIndent ) - { - data.push(this.currentLine.substr(newIndent)); - } - else if ( 0 == indent ) - { - this.moveToPreviousLine(); - - break; - } - else - { - throw new YamlParseException('Indentation problem B', this.getRealCurrentLineNb() + 1, this.currentLine); - } - } - - return data.join("\n"); - }, - - /** - * Moves the parser to the next line. - * - * @return Boolean - */ - moveToNextLine: function() - { - if ( this.currentLineNb >= this.lines.length - 1 ) - { - return false; - } - - this.currentLineNb++; - this.currentLine = this.lines[this.currentLineNb]; - - return true; - }, - - /** - * Moves the parser to the previous line. - */ - moveToPreviousLine: function() - { - this.currentLineNb--; - this.currentLine = this.lines[this.currentLineNb]; - }, - - /** - * Parses a YAML value. - * - * @param string value A YAML value - * - * @return mixed A JS value - * - * @throws YamlParseException When reference does not exist - */ - parseValue: function(value) - { - if ( '*' == (value+'').charAt(0) ) - { - if ( this.trim(value).charAt(0) == '#' ) - { - value = (value+'').substr(1, value.indexOf('#') - 2); - } - else - { - value = (value+'').substr(1); - } - - if ( this.refs[value] == undefined ) - { - throw new YamlParseException('Reference "'+value+'" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine); - } - return this.refs[value]; - } - - var matches = null; - if ( matches = /^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(value) ) - { - matches = {separator: matches[1], modifiers: matches[2], comments: matches[3]}; - var modifiers = this.isDefined(matches.modifiers) ? matches.modifiers : ''; - - return this.parseFoldedScalar(matches.separator, modifiers.replace(/\d+/g, ''), Math.abs(parseInt(modifiers))); - } - try { - return new YamlInline().parse(value); - } catch (e) { - if ( e instanceof YamlParseException ) { - e.setParsedLine(this.getRealCurrentLineNb() + 1); - e.setSnippet(this.currentLine); - } - throw e; - } - }, - - /** - * Parses a folded scalar. - * - * @param string separator The separator that was used to begin this folded scalar (| or >) - * @param string indicator The indicator that was used to begin this folded scalar (+ or -) - * @param integer indentation The indentation that was used to begin this folded scalar - * - * @return string The text value - */ - parseFoldedScalar: function(separator, indicator, indentation) - { - if ( indicator == undefined ) indicator = ''; - if ( indentation == undefined ) indentation = 0; - - separator = '|' == separator ? "\n" : ' '; - var text = ''; - var diff = null; - - var notEOF = this.moveToNextLine(); - - while ( notEOF && this.isCurrentLineBlank() ) - { - text += "\n"; - - notEOF = this.moveToNextLine(); - } - - if ( !notEOF ) - { - return ''; - } - - var matches = null; - if ( !(matches = new RegExp('^('+(indentation ? this.strRepeat(' ', indentation) : ' +')+')(.*)$').exec(this.currentLine)) ) - { - this.moveToPreviousLine(); - - return ''; - } - - matches = {indent: matches[1], text: matches[2]}; - - var textIndent = matches.indent; - var previousIndent = 0; - - text += matches.text + separator; - while ( this.currentLineNb + 1 < this.lines.length ) - { - this.moveToNextLine(); - - if ( matches = new RegExp('^( {'+textIndent.length+',})(.+)$').exec(this.currentLine) ) - { - matches = {indent: matches[1], text: matches[2]}; - - if ( ' ' == separator && previousIndent != matches.indent ) - { - text = text.substr(0, text.length - 1)+"\n"; - } - - previousIndent = matches.indent; - - diff = matches.indent.length - textIndent.length; - text += this.strRepeat(' ', diff) + matches.text + (diff != 0 ? "\n" : separator); - } - else if ( matches = /^( *)$/.exec(this.currentLine) ) - { - text += matches[1].replace(new RegExp('^ {1,'+textIndent.length+'}','g'), '')+"\n"; - } - else - { - this.moveToPreviousLine(); - - break; - } - } - - if ( ' ' == separator ) - { - // replace last separator by a newline - text = text.replace(/ (\n*)$/g, "\n$1"); - } - - switch ( indicator ) - { - case '': - text = text.replace(/\n+$/g, "\n"); - break; - case '+': - break; - case '-': - text = text.replace(/\n+$/g, ''); - break; - } - - return text; - }, - - /** - * Returns true if the next line is indented. - * - * @return Boolean Returns true if the next line is indented, false otherwise - */ - isNextLineIndented: function() - { - var currentIndentation = this.getCurrentLineIndentation(); - var notEOF = this.moveToNextLine(); - - while ( notEOF && this.isCurrentLineEmpty() ) - { - notEOF = this.moveToNextLine(); - } - - if ( false == notEOF ) - { - return false; - } - - var ret = false; - if ( this.getCurrentLineIndentation() <= currentIndentation ) - { - ret = true; - } - - this.moveToPreviousLine(); - - return ret; - }, - - /** - * Returns true if the current line is blank or if it is a comment line. - * - * @return Boolean Returns true if the current line is empty or if it is a comment line, false otherwise - */ - isCurrentLineEmpty: function() - { - return this.isCurrentLineBlank() || this.isCurrentLineComment(); - }, - - /** - * Returns true if the current line is blank. - * - * @return Boolean Returns true if the current line is blank, false otherwise - */ - isCurrentLineBlank: function() - { - return '' == this.trim(this.currentLine); - }, - - /** - * Returns true if the current line is a comment line. - * - * @return Boolean Returns true if the current line is a comment line, false otherwise - */ - isCurrentLineComment: function() - { - //checking explicitly the first char of the trim is faster than loops or strpos - var ltrimmedLine = this.currentLine.replace(/^ +/g, ''); - return ltrimmedLine.charAt(0) == '#'; - }, - - /** - * Cleanups a YAML string to be parsed. - * - * @param string value The input YAML string - * - * @return string A cleaned up YAML string - */ - cleanup: function(value) - { - value = value.split("\r\n").join("\n").split("\r").join("\n"); - - if ( !/\n$/.test(value) ) - { - value += "\n"; - } - - // strip YAML header - var count = 0; - var regex = /^\%YAML[: ][\d\.]+.*\n/; - while ( regex.test(value) ) - { - value = value.replace(regex, ''); - count++; - } - this.offset += count; - - // remove leading comments - regex = /^(#.*?\n)+/; - if ( regex.test(value) ) - { - var trimmedValue = value.replace(regex, ''); - - // items have been removed, update the offset - this.offset += this.subStrCount(value, "\n") - this.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - } - - // remove start of the document marker (---) - regex = /^\-\-\-.*?\n/; - if ( regex.test(value) ) - { - trimmedValue = value.replace(regex, ''); - - // items have been removed, update the offset - this.offset += this.subStrCount(value, "\n") - this.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - - // remove end of the document marker (...) - value = value.replace(/\.\.\.\s*$/g, ''); - } - - return value; - }, - - /** - * Returns true if the next line starts unindented collection - * - * @return Boolean Returns true if the next line starts unindented collection, false otherwise - */ - isNextLineUnIndentedCollection: function() - { - var currentIndentation = this.getCurrentLineIndentation(); - var notEOF = this.moveToNextLine(); - - while (notEOF && this.isCurrentLineEmpty()) { - notEOF = this.moveToNextLine(); - } - - if (false === notEOF) { - return false; - } - - var ret = false; - if ( - this.getCurrentLineIndentation() == currentIndentation - && - this.isStringUnIndentedCollectionItem(this.currentLine) - ) { - ret = true; - } - - this.moveToPreviousLine(); - - return ret; - }, - - /** - * Returns true if the string is unindented collection item - * - * @return Boolean Returns true if the string is unindented collection item, false otherwise - */ - isStringUnIndentedCollectionItem: function(string) - { - return (0 === this.currentLine.indexOf('- ')); - }, - - isObject: function(input) - { - return typeof(input) == 'object' && this.isDefined(input); - }, - - isEmpty: function(input) - { - return input == undefined || input == null || input == '' || input == 0 || input == "0" || input == false; - }, - - isDefined: function(input) - { - return input != undefined && input != null; - }, - - reverseArray: function(input /* Array */) - { - var result = []; - var len = input.length; - for ( var i = len-1; i >= 0; i-- ) - { - result.push(input[i]); - } - - return result; - }, - - merge: function(a /* Object */, b /* Object */) - { - var c = {}; - var i; - - for ( i in a ) - { - if ( a.hasOwnProperty(i) ) - if ( /^\d+$/.test(i) ) c.push(a); - else c[i] = a[i]; - } - for ( i in b ) - { - if ( b.hasOwnProperty(i) ) - if ( /^\d+$/.test(i) ) c.push(b); - else c[i] = b[i]; - } - - return c; - }, - - strRepeat: function(str /* String */, count /* Integer */) - { - var i; - var result = ''; - for ( i = 0; i < count; i++ ) result += str; - return result; - }, - - subStrCount: function(string, subString, start, length) - { - var c = 0; - - string = '' + string; - subString = '' + subString; - - if ( start != undefined ) string = string.substr(start); - if ( length != undefined ) string = string.substr(0, length); - - var len = string.length; - var sublen = subString.length; - for ( var i = 0; i < len; i++ ) - { - if ( subString == string.substr(i, sublen) ) - c++; - i += sublen - 1; - } - - return c; - }, - - trim: function(str /* String */) - { - return (str+'').replace(/^ +/,'').replace(/ +$/,''); - } -}; -/** - * YamlEscaper encapsulates escaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - */ -YamlEscaper = function(){}; -YamlEscaper.prototype = -{ - /** - * Determines if a JS value would require double quoting in YAML. - * - * @param string value A JS value - * - * @return Boolean True if the value would require double quotes. - */ - requiresDoubleQuoting: function(value) - { - return new RegExp(YamlEscaper.REGEX_CHARACTER_TO_ESCAPE).test(value); - }, - - /** - * Escapes and surrounds a JS value with double quotes. - * - * @param string value A JS value - * - * @return string The quoted, escaped string - */ - escapeWithDoubleQuotes: function(value) - { - value = value + ''; - var len = YamlEscaper.escapees.length; - var maxlen = YamlEscaper.escaped.length; - var esc = YamlEscaper.escaped; - for (var i = 0; i < len; ++i) - if ( i >= maxlen ) esc.push(''); - - var ret = ''; - ret = value.replace(new RegExp(YamlEscaper.escapees.join('|'),'g'), function(str){ - for(var i = 0; i < len; ++i){ - if( str == YamlEscaper.escapees[i] ) - return esc[i]; - } - }); - return '"' + ret + '"'; - }, - - /** - * Determines if a JS value would require single quoting in YAML. - * - * @param string value A JS value - * - * @return Boolean True if the value would require single quotes. - */ - requiresSingleQuoting: function(value) - { - return /[\s'":{}[\],&*#?]|^[-?|<>=!%@`]/.test(value); - }, - - /** - * Escapes and surrounds a JS value with single quotes. - * - * @param string value A JS value - * - * @return string The quoted, escaped string - */ - escapeWithSingleQuotes : function(value) - { - return "'" + value.replace(/'/g, "''") + "'"; - } -}; - -// Characters that would cause a dumped string to require double quoting. -YamlEscaper.REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"; - -// Mapping arrays for escaping a double quoted string. The backslash is -// first to ensure proper escaping. -YamlEscaper.escapees = ['\\\\', '\\"', '"', - "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", - "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", - "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", - "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", - "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9"]; -YamlEscaper.escaped = ['\\"', '\\\\', '\\"', - "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", - "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", - "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", - "\\x18", "\\x19", "\\x1a", "\\e", "\\x1c", "\\x1d", "\\x1e", "\\x1f", - "\\N", "\\_", "\\L", "\\P"]; -/** - * YamlUnescaper encapsulates unescaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - */ -var YamlUnescaper = function(){}; -YamlUnescaper.prototype = -{ - /** - * Unescapes a single quoted string. - * - * @param string value A single quoted string. - * - * @return string The unescaped string. - */ - unescapeSingleQuotedString: function(value) - { - return value.replace(/''/g, "'"); - }, - - /** - * Unescapes a double quoted string. - * - * @param string value A double quoted string. - * - * @return string The unescaped string. - */ - unescapeDoubleQuotedString: function(value) - { - var callback = function(m) { - return new YamlUnescaper().unescapeCharacter(m); - }; - - // evaluate the string - return value.replace(new RegExp(YamlUnescaper.REGEX_ESCAPED_CHARACTER, 'g'), callback); - }, - - /** - * Unescapes a character that was found in a double-quoted string - * - * @param string value An escaped character - * - * @return string The unescaped character - */ - unescapeCharacter: function(value) - { - switch (value.charAt(1)) { - case '0': - return String.fromCharCode(0); - case 'a': - return String.fromCharCode(7); - case 'b': - return String.fromCharCode(8); - case 't': - return "\t"; - case "\t": - return "\t"; - case 'n': - return "\n"; - case 'v': - return String.fromCharCode(11); - case 'f': - return String.fromCharCode(12); - case 'r': - return String.fromCharCode(13); - case 'e': - return "\x1b"; - case ' ': - return ' '; - case '"': - return '"'; - case '/': - return '/'; - case '\\': - return '\\'; - case 'N': - // U+0085 NEXT LINE - return "\x00\x85"; - case '_': - // U+00A0 NO-BREAK SPACE - return "\x00\xA0"; - case 'L': - // U+2028 LINE SEPARATOR - return "\x20\x28"; - case 'P': - // U+2029 PARAGRAPH SEPARATOR - return "\x20\x29"; - case 'x': - return this.pack('n', new YamlInline().hexdec(value.substr(2, 2))); - case 'u': - return this.pack('n', new YamlInline().hexdec(value.substr(2, 4))); - case 'U': - return this.pack('N', new YamlInline().hexdec(value.substr(2, 8))); - } - }, - - /** - * @see http://phpjs.org/functions/pack - * @warning only modes used above copied - */ - pack: function(B){var g=0,o=1,m="",l="",z=0,p=[],E,s,C,I,h,c;var d,b,x,H,u,e,A,q,D,t,w,a,G,F,y,v,f;while(g(arguments.length-o)){throw new Error("Warning: pack() Type "+E+": too few arguments")}for(z=0;z>8&255);m+=String.fromCharCode(arguments[o]&255);o++}break;case"N":if(s==="*"){s=arguments.length-o}if(s>(arguments.length-o)){throw new Error("Warning: pack() Type "+E+": too few arguments")}for(z=0;z>24&255);m+=String.fromCharCode(arguments[o]>>16&255);m+=String.fromCharCode(arguments[o]>>8&255);m+=String.fromCharCode(arguments[o]&255);o++}break;default:throw new Error("Warning: pack() Type "+E+": unknown format code")}}if(o - */ -var YamlDumper = function(){}; -YamlDumper.prototype = -{ - /** - * Dumps a JS value to YAML. - * - * @param mixed input The JS value - * @param integer inline The level where you switch to inline YAML - * @param integer indent The level o indentation indentation (used internally) - * - * @return string The YAML representation of the JS value - */ - dump: function(input, inline, indent) - { - if ( inline == null ) inline = 0; - if ( indent == null ) indent = 0; - var output = ''; - var prefix = indent ? this.strRepeat(' ', indent) : ''; - var yaml; - if (!this.numSpacesForIndentation) this.numSpacesForIndentation = 2; - - if ( inline <= 0 || !this.isObject(input) || this.isEmpty(input) ) - { - yaml = new YamlInline(); - output += prefix + yaml.dump(input); - } - else - { - var isAHash = !this.arrayEquals(this.getKeys(input), this.range(0,input.length - 1)); - var willBeInlined; - - for ( var key in input ) - { - if ( input.hasOwnProperty(key) ) - { - willBeInlined = inline - 1 <= 0 || !this.isObject(input[key]) || this.isEmpty(input[key]); - - if ( isAHash ) yaml = new YamlInline(); - - output += - prefix + '' + - (isAHash ? yaml.dump(key)+':' : '-') + '' + - (willBeInlined ? ' ' : "\n") + '' + - this.dump(input[key], inline - 1, (willBeInlined ? 0 : indent + this.numSpacesForIndentation)) + '' + - (willBeInlined ? "\n" : ''); - } - } - } - - return output; - }, - - strRepeat: function(str /* String */, count /* Integer */) - { - var i; - var result = ''; - for ( i = 0; i < count; i++ ) result += str; - return result; - }, - - isObject: function(input) - { - return this.isDefined(input) && typeof(input) == 'object'; - }, - - isEmpty: function(input) - { - var ret = input == undefined || input == null || input == '' || input == 0 || input == "0" || input == false; - if ( !ret && typeof(input) == "object" && !(input instanceof Array)){ - var propCount = 0; - for ( var key in input ) - if ( input.hasOwnProperty(key) ) propCount++; - ret = !propCount; - } - return ret; - }, - - isDefined: function(input) - { - return input != undefined && input != null; - }, - - getKeys: function(tab) - { - var ret = []; - - for ( var name in tab ) - { - if ( tab.hasOwnProperty(name) ) - { - ret.push(name); - } - } - - return ret; - }, - - range: function(start, end) - { - if ( start > end ) return []; - - var ret = []; - - for ( var i = start; i <= end; i++ ) - { - ret.push(i); - } - - return ret; - }, - - arrayEquals: function(a,b) - { - if ( a.length != b.length ) return false; - - var len = a.length; - - for ( var i = 0; i < len; i++ ) - { - if ( a[i] != b[i] ) return false; - } - - return true; - } -}; -})(); diff --git a/support/process/node_modules/yamljs/bin/yaml.min.js b/support/process/node_modules/yamljs/bin/yaml.min.js deleted file mode 100644 index 24ce445..0000000 --- a/support/process/node_modules/yamljs/bin/yaml.min.js +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright (c) 2010 Jeremy Faivre - -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. -*/ -(function(){var e=function(e,t,n,r){this.rawMessage=e,this.parsedLine=t!==undefined?t:-1,this.snippet=n!==undefined?n:null,this.parsedFile=r!==undefined?r:null,this.updateRepr(),this.message=e};e.prototype={name:"YamlParseException",message:null,parsedFile:null,parsedLine:-1,snippet:null,rawMessage:null,isDefined:function(e){return e!=undefined&&e!=null},getSnippet:function(){return this.snippet},setSnippet:function(e){this.snippet=e,this.updateRepr()},getParsedFile:function(){return this.parsedFile},setParsedFile:function(e){this.parsedFile=e,this.updateRepr()},getParsedLine:function(){return this.parsedLine},setParsedLine:function(e){this.parsedLine=e,this.updateRepr()},updateRepr:function(){this.message=this.rawMessage;var e=!1;"."===this.message.charAt(this.message.length-1)&&(this.message=this.message.substring(0,this.message.length-1),e=!0),null!==this.parsedFile&&(this.message+=" in "+JSON.stringify(this.parsedFile)),this.parsedLine>=0&&(this.message+=" at line "+this.parsedLine),this.snippet&&(this.message+=' (near "'+this.snippet+'")'),e&&(this.message+=".")}};var t=!1,n=function(){};n.prototype={parseFile:function(t,r){if(r==null){var i=this.getFileContents(t),s=null;try{s=this.parse(i)}catch(o){throw o instanceof e&&o.setParsedFile(t),o}return s}this.getFileContents(t,function(e){r((new n).parse(e))})},parse:function(e){var t=new s;return t.parse(e)},dump:function(e,t,n){t==null&&(t=2);var r=new u;return n&&(r.numSpacesForIndentation=n),r.dump(e,t)},getXHR:function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject){var e=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(var t=0;t<4;t++)try{return new ActiveXObject(e[t])}catch(n){}}return null},getFileContents:function(e,n){if(t){var r=require("fs");if(n==null){var i=r.readFileSync(e);return i==null?null:""+i}r.readFile(e,function(e,t){e?n(null):n(t)})}else{var s=this.getXHR();if(n==null)return s.open("GET",e,!1),s.send(null),s.status==200||s.status==0?s.responseText:null;s.onreadystatechange=function(){s.readyState==4&&(s.status==200||s.status==0?n(s.responseText):n(null))},s.open("GET",e,!0),s.send(null)}}};var r={stringify:function(e,t,r){return(new n).dump(e,t,r)},parse:function(e){return(new n).parse(e)},load:function(e,t){return(new n).parseFile(e,t)}};typeof exports!="undefined"&&typeof module!="undefined"&&module.exports&&(exports=module.exports=r,t=!0,function(){var e=function(e,t){e.exports=r.load(t)};undefined!==require.extensions&&(require.extensions[".yml"]=e,require.extensions[".yaml"]=e)}()),typeof window!="undefined"&&(window.YAML=r);var i=function(){};i.prototype={i:null,parse:function(t){var n=null;t=this.trim(t);if(0==t.length)return"";switch(t.charAt(0)){case"[":n=this.parseSequence(t);break;case"{":n=this.parseMapping(t);break;default:n=this.parseScalar(t)}if(t.substr(this.i+1).replace(/^\s*#.*$/,"")!="")throw console.log("oups "+t.substr(this.i+1)),new e('Unexpected characters near "'+t.substr(this.i)+'".');return n},dump:function(e){if(undefined==e||null==e)return"null";if(e instanceof Date)return e.toISOString();if(typeof e=="object")return this.dumpObject(e);if(typeof e=="boolean")return e?"true":"false";if(/^\d+$/.test(e))return typeof e=="string"?"'"+e+"'":parseInt(e);if(this.isNumeric(e))return typeof e=="string"?"'"+e+"'":parseFloat(e);if(typeof e=="number")return e==Infinity?".Inf":e==-Infinity?"-.Inf":isNaN(e)?".NAN":e;var t=new YamlEscaper;return t.requiresDoubleQuoting(e)?t.escapeWithDoubleQuotes(e):t.requiresSingleQuoting(e)?t.escapeWithSingleQuotes(e):""==e?"":this.getTimestampRegex().test(e)?"'"+e+"'":this.inArray(e.toLowerCase(),["null","~","true","false"])?"'"+e+"'":e},dumpObject:function(e){var t=this.getKeys(e),n=null,r,i=t.length;if(e instanceof Array){n=[];for(r=0;r0&&e.replace(/\s+/g,"")!=""},inArray:function(e,t){var n,r=t.length;for(n=0;n0?e[0]==="last"&&(s-=7):e[0]==="next"&&(s+=7),t.setDate(t.getDate()+s),t.setHours(0,0,0,0)}}break;default:if(!/\d+/.test(e[0]))return!1;r*=parseInt(e[0],10);switch(e[1].substring(0,3)){case"yea":t.setFullYear(t.getFullYear()+r);break;case"mon":t.setMonth(t.getMonth()+r);break;case"wee":t.setDate(t.getDate()+r*7);break;case"day":t.setDate(t.getDate()+r);break;case"hou":t.setHours(t.getHours()+r);break;case"min":t.setMinutes(t.getMinutes()+r);break;case"sec":t.setSeconds(t.getSeconds()+r)}}return!0};i=e.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if(i!==null)return i[2]?i[3]||(i[2]+=":00"):i[2]="00:00:00",s=i[1].split(/-/g),s[1]=u.mon[s[1]-1]||s[1],s[0]=+s[0],s[0]=s[0]>=0&&s[0]<=69?"20"+(s[0]<10?"0"+s[0]:s[0]+""):s[0]>=70&&s[0]<=99?"19"+s[0]:s[0]+"",parseInt(this.strtotime(s[2]+" "+s[1]+" "+s[0]+" "+i[2])+(i[4]?i[4]:""),10);var f="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?";i=e.match(new RegExp(f,"gi"));if(i===null)return!1;for(n=0,r=i.length;n=n)){if(0==r){this.moveToPreviousLine();break}throw new e("Indentation problem B",this.getRealCurrentLineNb()+1,this.currentLine)}s.push(this.currentLine.substr(n))}}return s.join("\n")},moveToNextLine:function(){return this.currentLineNb>=this.lines.length-1?!1:(this.currentLineNb++,this.currentLine=this.lines[this.currentLineNb],!0)},moveToPreviousLine:function(){this.currentLineNb--,this.currentLine=this.lines[this.currentLineNb]},parseValue:function(t){if("*"==(t+"").charAt(0)){this.trim(t).charAt(0)=="#"?t=(t+"").substr(1,t.indexOf("#")-2):t=(t+"").substr(1);if(this.refs[t]==undefined)throw new e('Reference "'+t+'" does not exist',this.getRealCurrentLineNb()+1,this.currentLine);return this.refs[t]}var n=null;if(n=/^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(t)){n={separator:n[1],modifiers:n[2],comments:n[3]};var r=this.isDefined(n.modifiers)?n.modifiers:"";return this.parseFoldedScalar(n.separator,r.replace(/\d+/g,""),Math.abs(parseInt(r)))}try{return(new i).parse(t)}catch(s){throw s instanceof e&&(s.setParsedLine(this.getRealCurrentLineNb()+1),s.setSnippet(this.currentLine)),s}},parseFoldedScalar:function(e,t,n){t==undefined&&(t=""),n==undefined&&(n=0),e="|"==e?"\n":" ";var r="",i=null,s=this.moveToNextLine();while(s&&this.isCurrentLineBlank())r+="\n",s=this.moveToNextLine();if(!s)return"";var o=null;if(!(o=(new RegExp("^("+(n?this.strRepeat(" ",n):" +")+")(.*)$")).exec(this.currentLine)))return this.moveToPreviousLine(),"";o={indent:o[1],text:o[2]};var u=o.indent,a=0;r+=o.text+e;while(this.currentLineNb+1=0;r--)t.push(e[r]);return t},merge:function(e,t){var n={},r;for(r in e)e.hasOwnProperty(r)&&(/^\d+$/.test(r)?n.push(e):n[r]=e[r]);for(r in t)t.hasOwnProperty(r)&&(/^\d+$/.test(r)?n.push(t):n[r]=t[r]);return n},strRepeat:function(e,t){var n,r="";for(n=0;n=n&&r.push("");var s="";return s=e.replace(new RegExp(YamlEscaper.escapees.join("|"),"g"),function(e){for(var n=0;n=!%@`]/.test(e)},escapeWithSingleQuotes:function(e){return"'"+e.replace(/'/g,"''")+"'"}},YamlEscaper.REGEX_CHARACTER_TO_ESCAPE="[\\x00-\\x1f]|…| |
|
",YamlEscaper.escapees=["\\\\",'\\"','"',"\0","","","","","","","","\b"," ","\n"," ","\f","\r","","","","","","","","","","","","","","","","","","","…"," ","
","
"],YamlEscaper.escaped=['\\"',"\\\\",'\\"',"\\0","\\x01","\\x02","\\x03","\\x04","\\x05","\\x06","\\a","\\b","\\t","\\n","\\v","\\f","\\r","\\x0e","\\x0f","\\x10","\\x11","\\x12","\\x13","\\x14","\\x15","\\x16","\\x17","\\x18","\\x19","\\x1a","\\e","\\x1c","\\x1d","\\x1e","\\x1f","\\N","\\_","\\L","\\P"];var o=function(){};o.prototype={unescapeSingleQuotedString:function(e){return e.replace(/''/g,"'")},unescapeDoubleQuotedString:function(e){var t=function(e){return(new o).unescapeCharacter(e)};return e.replace(new RegExp(o.REGEX_ESCAPED_CHARACTER,"g"),t)},unescapeCharacter:function(e){switch(e.charAt(1)){case"0":return String.fromCharCode(0);case"a":return String.fromCharCode(7);case"b":return String.fromCharCode(8);case"t":return" ";case" ":return" ";case"n":return"\n";case"v":return String.fromCharCode(11);case"f":return String.fromCharCode(12);case"r":return String.fromCharCode(13);case"e":return"";case" ":return" ";case'"':return'"';case"/":return"/";case"\\":return"\\";case"N":return"\0…";case"_":return"\0 ";case"L":return" (";case"P":return" )";case"x":return this.pack("n",(new i).hexdec(e.substr(2,2)));case"u":return this.pack("n",(new i).hexdec(e.substr(2,4)));case"U":return this.pack("N",(new i).hexdec(e.substr(2,8)))}},pack:function(e){var t=0,n=1,r="",i="",s=0,o=[],u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A;while(targuments.length-n)throw new Error("Warning: pack() Type "+u+": too few arguments");for(s=0;s>8&255),r+=String.fromCharCode(arguments[n]&255),n++;break;case"N":a==="*"&&(a=arguments.length-n);if(a>arguments.length-n)throw new Error("Warning: pack() Type "+u+": too few arguments");for(s=0;s>24&255),r+=String.fromCharCode(arguments[n]>>16&255),r+=String.fromCharCode(arguments[n]>>8&255),r+=String.fromCharCode(arguments[n]&255),n++;break;default:throw new Error("Warning: pack() Type "+u+": unknown format code")}}if(nt)return[];var n=[];for(var r=e;r<=t;r++)n.push(r);return n},arrayEquals:function(e,t){if(e.length!=t.length)return!1;var n=e.length;for(var r=0;r 1 && output.charAt(output.length - 1) === '/') { - return output.substr(0, output.length - 1); - } - return output; - }; - - // Find files - var findFiles = function(input) { - var isDirectory = fs.statSync(input).isDirectory(); - var files = []; - - if (!isDirectory) { - files.push(input); - } - else { - if (options.recursive) { - files = files.concat(glob.sync(input+'/**/*.yml')); - files = files.concat(glob.sync(input+'/**/*.yaml')); - } - else { - files = files.concat(glob.sync(input+'/*.yml')); - files = files.concat(glob.sync(input+'/*.yaml')); - } - } - - return files; - }; - - // Convert to JSON - var convertToJSON = function(input, pretty, save, spaces) { - var json; - if (spaces == null) spaces = 2; - if (pretty) { - json = JSON.stringify(YAML.load(input), null, spaces); - } - else { - json = JSON.stringify(YAML.load(input)); - } - - if (!save) { - // Ouput result - process.stdout.write(json+"\n"); - } - else { - var output; - if (input.substring(input.length-4) == '.yml') { - output = input.substr(0, input.length-4) + '.json'; - } - else if (input.substring(input.length-5) == '.yaml') { - output = input.substr(0, input.length-5) + '.json'; - } - else { - output = input + '.json'; - } - - // Write file - var file = fs.openSync(output, 'w+'); - fs.writeSync(file, json); - fs.closeSync(file); - process.stdout.write("saved "+output+"\n"); - } - }; - - var input = parsePath(options.input); - var mtimes = []; - - var runCommand = function() { - try { - var files = findFiles(input); - var len = files.length; - - for (var i = 0; i < len; i++) { - var file = files[i]; - var stat = fs.statSync(file); - var time = stat.mtime.getTime(); - if (!stat.isDirectory()) { - if (!mtimes[file] || mtimes[file] < time) { - mtimes[file] = time; - convertToJSON(file, options.pretty, options.save, options.indentation); - } - } - } - } catch (e) { - process.stderr.write((e.message ? e.message : e)+"\n"); - } - }; - - if (!options.watch) { - runCommand(); - } else { - runCommand(); - setInterval(runCommand, 1000); - } -} catch (e) { - process.stderr.write((e.message ? e.message : e)+"\n"); -} diff --git a/support/process/node_modules/yamljs/build b/support/process/node_modules/yamljs/build deleted file mode 100755 index f06ecb5..0000000 --- a/support/process/node_modules/yamljs/build +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -cd `dirname $0` - -# Generate yaml.js -file="bin/yaml.js" - -> $file - -echo Compiling $file ... - -echo " - LICENSE" - -echo "/*" >> $file -cat LICENSE >> $file -echo "\n*/" >> $file -echo "(function(){" >> $file - -echo " - YamlParseException.js" -cat src/yaml/YamlParseException.js >> $file -echo " - Yaml.js" -cat src/yaml/Yaml.js >> $file -echo " - YamlInline.js" -cat src/yaml/YamlInline.js >> $file -echo " - YamlParser.js" -cat src/yaml/YamlParser.js >> $file -echo " - YamlEscaper.js" -cat src/yaml/YamlEscaper.js >> $file -echo " - YamlUnescaper.js" -cat src/yaml/YamlUnescaper.js >> $file -echo " - YamlDumper.js" -cat src/yaml/YamlDumper.js >> $file - -echo "})();" >> $file - -# Generate yaml.min.js -file="bin/yaml.min.js" - -echo "compressing..." -echo "/*" > $file -cat LICENSE >> $file -echo "\n*/" >> $file -uglifyjs -nc bin/yaml.js >> $file - -echo "yaml.js compiled." -echo "yaml.min.js compiled." - -# Generate yaml2json -echo "#!/usr/bin/env node" > bin/yaml2json -cat src/cli/yaml2json.js >> bin/yaml2json -chmod +x bin/yaml2json -echo "yaml2json compiled." - -# Generate json2yaml -echo "#!/usr/bin/env node" > bin/json2yaml -cat src/cli/json2yaml.js >> bin/json2yaml -chmod +x bin/json2yaml -echo "json2yaml compiled." - diff --git a/support/process/node_modules/yamljs/demo/demo.html b/support/process/node_modules/yamljs/demo/demo.html deleted file mode 100644 index 87a4f10..0000000 --- a/support/process/node_modules/yamljs/demo/demo.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - yaml.js demo - - - -
- - -
You could also try to run some javascript tests based on YAML cookbook for Ruby. All tests should pass. Those that don't are commented out; they deal with multiple YAML documents in one stream which is not supported by yaml.js (and Symfony)
-
- -
- - \ No newline at end of file diff --git a/support/process/node_modules/yamljs/node_modules/argparse/HISTORY.md b/support/process/node_modules/yamljs/node_modules/argparse/HISTORY.md deleted file mode 100644 index 102f82b..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/HISTORY.md +++ /dev/null @@ -1,109 +0,0 @@ -0.1.15 / 2013-05-13 -------------------- - -* Fixed #55, @trebor89 - - -0.1.14 / 2013-05-12 -------------------- - -* Fixed #62, @maxtaco - - -0.1.13 / 2013-04-08 -------------------- - -* Added `.npmignore` to reduce package size - - -0.1.12 / 2013-02-10 -------------------- - -* Fixed conflictHandler (#46), @hpaulj - - -0.1.11 / 2013-02-07 -------------------- - -* Multiple bugfixes, @hpaulj -* Added 70+ tests (ported from python), @hpaulj -* Added conflictHandler, @applepicke -* Added fromfilePrefixChar, @hpaulj - - -0.1.10 / 2012-12-30 -------------------- - -* Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) - support, thanks to @hpaulj -* Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj - - -0.1.9 / 2012-12-27 ------------------- - -* Fixed option dest interferens with other options (issue #23), thanks to @hpaulj -* Fixed default value behavior with `*` positionals, thanks to @hpaulj -* Improve `getDefault()` behavior, thanks to @hpaulj -* Imrove negative argument parsing, thanks to @hpaulj - - -0.1.8 / 2012-12-01 ------------------- - -* Fixed parser parents (issue #19), thanks to @hpaulj -* Fixed negative argument parse (issue #20), thanks to @hpaulj - - -0.1.7 / 2012-10-14 ------------------- - -* Fixed 'choices' argument parse (issue #16) -* Fixed stderr output (issue #15) - - -0.1.6 / 2012-09-09 ------------------- - -* Fixed check for conflict of options (thanks to @tomxtobin) - - -0.1.5 / 2012-09-03 ------------------- - -* Fix parser #setDefaults method (thanks to @tomxtobin) - - -0.1.4 / 2012-07-30 ------------------- - -* Fixed pseudo-argument support (thanks to @CGamesPlay) -* Fixed addHelp default (should be true), if not set (thanks to @benblank) - - -0.1.3 / 2012-06-27 ------------------- - -* Fixed formatter api name: Formatter -> HelpFormatter - - -0.1.2 / 2012-05-29 ------------------- - -* Added basic tests -* Removed excess whitespace in help -* Fixed error reporting, when parcer with subcommands - called with empty arguments - - -0.1.1 / 2012-05-23 ------------------- - -* Fixed line wrapping in help formatter -* Added better error reporting on invalid arguments - - -0.1.0 / 2012-05-16 ------------------- - -* First release. diff --git a/support/process/node_modules/yamljs/node_modules/argparse/LICENSE b/support/process/node_modules/yamljs/node_modules/argparse/LICENSE deleted file mode 100644 index 1afdae5..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2012 by Vitaly Puzrin - -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. diff --git a/support/process/node_modules/yamljs/node_modules/argparse/README.md b/support/process/node_modules/yamljs/node_modules/argparse/README.md deleted file mode 100644 index f20e0c1..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/README.md +++ /dev/null @@ -1,239 +0,0 @@ -argparse -======== - -[![Build Status](https://secure.travis-ci.org/nodeca/argparse.png?branch=master)](http://travis-ci.org/nodeca/argparse) - -CLI arguments parser for node.js. Javascript port of python's -[argparse](http://docs.python.org/dev/library/argparse.html) module -(original version 3.2). That's a full port, except some very rare options, -recorded in issue tracker. - -**NB.** Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/). - - -Example -======= - -test.js file: - -```javascript -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp:true, - description: 'Argparse example' -}); -parser.addArgument( - [ '-f', '--foo' ], - { - help: 'foo bar' - } -); -parser.addArgument( - [ '-b', '--bar' ], - { - help: 'bar foo' - } -); -var args = parser.parseArgs(); -console.dir(args); -``` - -Display help: - -``` -$ ./test.js -h -usage: example.js [-h] [-v] [-f FOO] [-b BAR] - -Argparse example - -Optional arguments: - -h, --help Show this help message and exit. - -v, --version Show program's version number and exit. - -f FOO, --foo FOO foo bar - -b BAR, --bar BAR bar foo -``` - -Parse arguments: - -``` -$ ./test.js -f=3 --bar=4 -{ foo: '3', bar: '4' } -``` - -More [examples](https://github.com/nodeca/argparse/tree/master/examples). - - -ArgumentParser objects -====================== - -``` -new ArgumentParser({paramters hash}); -``` - -Creates a new ArgumentParser object. - -**Supported params:** - -- ```description``` - Text to display before the argument help. -- ```epilog``` - Text to display after the argument help. -- ```addHelp``` - Add a -h/–help option to the parser. (default: True) -- ```argumentDefault``` - Set the global default value for arguments. (default: None) -- ```parents``` - A list of ArgumentParser objects whose arguments should also be included. -- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘) -- ```formatterClass``` - A class for customizing the help output. -- ```prog``` - The name of the program (default: sys.argv[0]) -- ```usage``` - The string describing the program usage (default: generated) -- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals. - -**Not supportied yet** - -- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read. - - -Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects) - - -addArgument() method -==================== - -``` -ArgumentParser.addArgument([names or flags], {options}) -``` - -Defines how a single command-line argument should be parsed. - -- ```name or flags``` - Either a name or a list of option strings, e.g. foo or -f, --foo. - -Options: - -- ```action``` - The basic type of action to be taken when this argument is encountered at the command line. -- ```nargs```- The number of command-line arguments that should be consumed. -- ```constant``` - A constant value required by some action and nargs selections. -- ```defaultValue``` - The value produced if the argument is absent from the command line. -- ```type``` - The type to which the command-line argument should be converted. -- ```choices``` - A container of the allowable values for the argument. -- ```required``` - Whether or not the command-line option may be omitted (optionals only). -- ```help``` - A brief description of what the argument does. -- ```metavar``` - A name for the argument in usage messages. -- ```dest``` - The name of the attribute to be added to the object returned by parseArgs(). - -Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method) - - -Action (some details) -================ - -ArgumentParser objects associate command-line arguments with actions. -These actions can do just about anything with the command-line arguments associated -with them, though most actions simply add an attribute to the object returned by -parseArgs(). The action keyword argument specifies how the command-line arguments -should be handled. The supported actions are: - -- ```store``` - Just stores the argument’s value. This is the default action. -- ```storeConst``` - Stores value, specified by the const keyword argument. - (Note that the const keyword argument defaults to the rather unhelpful None.) - The 'storeConst' action is most commonly used with optional arguments, that - specify some sort of flag. -- ```storeTrue``` and ```storeFalse``` - Stores values True and False - respectively. These are special cases of 'storeConst'. -- ```append``` - Stores a list, and appends each argument value to the list. - This is useful to allow an option to be specified multiple times. -- ```appendConst``` - Stores a list, and appends value, specified by the - const keyword argument to the list. (Note, that the const keyword argument defaults - is None.) The 'appendConst' action is typically used when multiple arguments need - to store constants to the same list. -- ```count``` - Counts the number of times a keyword argument occurs. For example, - used for increasing verbosity levels. -- ```help``` - Prints a complete help message for all the options in the current - parser and then exits. By default a help action is automatically added to the parser. - See ArgumentParser for details of how the output is created. -- ```version``` - Prints version information and exit. Expects a `version=` - keyword argument in the addArgument() call. - -Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action) - - -Sub-commands -============ - -ArgumentParser.addSubparsers() - -Many programs split their functionality into a number of sub-commands, for -example, the svn program can invoke sub-commands like `svn checkout`, `svn update`, -and `svn commit`. Splitting up functionality this way can be a particularly good -idea when a program performs several different functions which require different -kinds of command-line arguments. `ArgumentParser` supports creation of such -sub-commands with `addSubparsers()` method. The `addSubparsers()` method is -normally called with no arguments and returns an special action object. -This object has a single method `addParser()`, which takes a command name and -any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object -that can be modified as usual. - -Example: - -sub_commands.js -```javascript -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp:true, - description: 'Argparse examples: sub-commands', -}); - -var subparsers = parser.addSubparsers({ - title:'subcommands', - dest:"subcommand_name" -}); - -var bar = subparsers.addParser('c1', {addHelp:true}); -bar.addArgument( - [ '-f', '--foo' ], - { - action: 'store', - help: 'foo3 bar3' - } -); -var bar = subparsers.addParser( - 'c2', - {aliases:['co'], addHelp:true} -); -bar.addArgument( - [ '-b', '--bar' ], - { - action: 'store', - type: 'int', - help: 'foo3 bar3' - } -); - -var args = parser.parseArgs(); -console.dir(args); - -``` - -Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands) - - -Contributors -============ - -- [Eugene Shkuropat](https://github.com/shkuropat) -- [Paul Jacobson](https://github.com/hpaulj) - -[others](https://github.com/nodeca/argparse/graphs/contributors) - -License -======= - -Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin). -Released under the MIT license. See -[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details. - - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/examples/arguments.js b/support/process/node_modules/yamljs/node_modules/argparse/examples/arguments.js deleted file mode 100755 index 5b090fa..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/examples/arguments.js +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: arguments' -}); -parser.addArgument( - [ '-f', '--foo' ], - { - help: 'foo bar' - } -); -parser.addArgument( - [ '-b', '--bar' ], - { - help: 'bar foo' - } -); - - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('-f 1 -b2'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('-f=3 --bar=4'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('--foo 5 --bar 6'.split(' ')); -console.dir(args); -console.log('-----------'); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/examples/choice.js b/support/process/node_modules/yamljs/node_modules/argparse/examples/choice.js deleted file mode 100755 index 2616fa4..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/examples/choice.js +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: choice' -}); - -parser.addArgument(['foo'], {choices: 'abc'}); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs(['c']); -console.dir(args); -console.log('-----------'); -parser.parseArgs(['X']); -console.dir(args); - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/examples/constants.js b/support/process/node_modules/yamljs/node_modules/argparse/examples/constants.js deleted file mode 100755 index 172a4f3..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/examples/constants.js +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: constant' -}); - -parser.addArgument( - [ '-a'], - { - action: 'storeConst', - dest: 'answer', - help: 'store constant', - constant: 42 - } -); -parser.addArgument( - [ '--str' ], - { - action: 'appendConst', - dest: 'types', - help: 'append constant "str" to types', - constant: 'str' - } -); -parser.addArgument( - [ '--int' ], - { - action: 'appendConst', - dest: 'types', - help: 'append constant "int" to types', - constant: 'int' - } -); - -parser.addArgument( - [ '--true' ], - { - action: 'storeTrue', - help: 'store true constant' - } -); -parser.addArgument( - [ '--false' ], - { - action: 'storeFalse', - help: 'store false constant' - } -); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('-a --str --int --true'.split(' ')); -console.dir(args); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/examples/help.js b/support/process/node_modules/yamljs/node_modules/argparse/examples/help.js deleted file mode 100755 index 7eb9555..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/examples/help.js +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: help', - epilog: 'help epilog', - prog: 'help_example_prog', - usage: 'Usage %(prog)s ' -}); -parser.printHelp(); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/examples/nargs.js b/support/process/node_modules/yamljs/node_modules/argparse/examples/nargs.js deleted file mode 100755 index 74f376b..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/examples/nargs.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: nargs' -}); -parser.addArgument( - [ '-f', '--foo' ], - { - help: 'foo bar', - nargs: 1 - } -); -parser.addArgument( - [ '-b', '--bar' ], - { - help: 'bar foo', - nargs: '*' - } -); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('--foo a --bar c d'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('--bar b c f --foo a'.split(' ')); -console.dir(args); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/examples/parents.js b/support/process/node_modules/yamljs/node_modules/argparse/examples/parents.js deleted file mode 100755 index dfe8968..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/examples/parents.js +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; - -var args; -var parent_parser = new ArgumentParser({ addHelp: false }); -// note addHelp:false to prevent duplication of the -h option -parent_parser.addArgument( - ['--parent'], - { type: 'int', description: 'parent' } -); - -var foo_parser = new ArgumentParser({ - parents: [ parent_parser ], - description: 'child1' -}); -foo_parser.addArgument(['foo']); -args = foo_parser.parseArgs(['--parent', '2', 'XXX']); -console.log(args); - -var bar_parser = new ArgumentParser({ - parents: [ parent_parser ], - description: 'child2' -}); -bar_parser.addArgument(['--bar']); -args = bar_parser.parseArgs(['--bar', 'YYY']); -console.log(args); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/examples/prefix_chars.js b/support/process/node_modules/yamljs/node_modules/argparse/examples/prefix_chars.js deleted file mode 100755 index 430d5e1..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/examples/prefix_chars.js +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: prefix_chars', - prefixChars: '-+' -}); -parser.addArgument(['+f', '++foo']); -parser.addArgument(['++bar'], {action: 'storeTrue'}); - -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs(['+f', '1']); -console.dir(args); -args = parser.parseArgs(['++bar']); -console.dir(args); -args = parser.parseArgs(['++foo', '2', '++bar']); -console.dir(args); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/examples/sub_commands.js b/support/process/node_modules/yamljs/node_modules/argparse/examples/sub_commands.js deleted file mode 100755 index df9c494..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/examples/sub_commands.js +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: sub-commands' -}); - -var subparsers = parser.addSubparsers({ - title: 'subcommands', - dest: "subcommand_name" -}); - -var bar = subparsers.addParser('c1', {addHelp: true, help: 'c1 help'}); -bar.addArgument( - [ '-f', '--foo' ], - { - action: 'store', - help: 'foo3 bar3' - } -); -var bar = subparsers.addParser( - 'c2', - {aliases: ['co'], addHelp: true, help: 'c2 help'} -); -bar.addArgument( - [ '-b', '--bar' ], - { - action: 'store', - type: 'int', - help: 'foo3 bar3' - } -); -parser.printHelp(); -console.log('-----------'); - -var args; -args = parser.parseArgs('c1 -f 2'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('c2 -b 1'.split(' ')); -console.dir(args); -console.log('-----------'); -args = parser.parseArgs('co -b 1'.split(' ')); -console.dir(args); -console.log('-----------'); -parser.parseArgs(['c1', '-h']); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/examples/sum.js b/support/process/node_modules/yamljs/node_modules/argparse/examples/sum.js deleted file mode 100755 index 4532800..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/examples/sum.js +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - - -var ArgumentParser = require('../lib/argparse').ArgumentParser; -var parser = new ArgumentParser({ description: 'Process some integers.' }); - - -function sum(arr) { - return arr.reduce(function (a, b) { - return a + b; - }, 0); -} -function max(arr) { - return Math.max.apply(Math, arr); -} - - -parser.addArgument(['integers'], { - metavar: 'N', - type: 'int', - nargs: '+', - help: 'an integer for the accumulator' -}); -parser.addArgument(['--sum'], { - dest: 'accumulate', - action: 'storeConst', - constant: sum, - defaultValue: max, - help: 'sum the integers (default: find the max)' -}); - -var args = parser.parseArgs('--sum 1 2 -1'.split(' ')); -console.log(args.accumulate(args.integers)); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/examples/testformatters.js b/support/process/node_modules/yamljs/node_modules/argparse/examples/testformatters.js deleted file mode 100644 index afb4a2d..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/examples/testformatters.js +++ /dev/null @@ -1,270 +0,0 @@ -'use strict'; - -var a, group, parser, helptext; - -var assert = require('assert'); -var _ = require('underscore'); -_.str = require('underscore.string'); -var print = function () { - return console.log.apply(console, arguments); - }; -// print = function () {}; - -var argparse = require('argparse'); - -print("TEST argparse.ArgumentDefaultsHelpFormatter"); - -parser = new argparse.ArgumentParser({ - debug: true, - formatterClass: argparse.ArgumentDefaultsHelpFormatter, - description: 'description' -}); - -parser.addArgument(['--foo'], { - help: 'foo help - oh and by the way, %(defaultValue)s' -}); - -parser.addArgument(['--bar'], { - action: 'storeTrue', - help: 'bar help' -}); - -parser.addArgument(['spam'], { - help: 'spam help' -}); - -parser.addArgument(['badger'], { - nargs: '?', - defaultValue: 'wooden', - help: 'badger help' -}); - -group = parser.addArgumentGroup({ - title: 'title', - description: 'group description' -}); - -group.addArgument(['--baz'], { - type: 'int', - defaultValue: 42, - help: 'baz help' -}); - -helptext = parser.formatHelp(); -print(helptext); -// test selected clips -assert(helptext.match(/badger help \(default: wooden\)/)); -assert(helptext.match(/foo help - oh and by the way, null/)); -assert(helptext.match(/bar help \(default: false\)/)); -assert(helptext.match(/title:\n {2}group description/)); // test indent -assert(helptext.match(/baz help \(default: 42\)/im)); - -/* -usage: PROG [-h] [--foo FOO] [--bar] [--baz BAZ] spam [badger] - -description - -positional arguments: - spam spam help - badger badger help (default: wooden) - -optional arguments: - -h, --help show this help message and exit - --foo FOO foo help - oh and by the way, null - --bar bar help (default: false) - -title: - group description - - --baz BAZ baz help (default: 42) -*/ - -print("TEST argparse.RawDescriptionHelpFormatter"); - -parser = new argparse.ArgumentParser({ - debug: true, - prog: 'PROG', - formatterClass: argparse.RawDescriptionHelpFormatter, - description: 'Keep the formatting\n' + - ' exactly as it is written\n' + - '\n' + - 'here\n' -}); - -a = parser.addArgument(['--foo'], { - help: ' foo help should not\n' + - ' retain this odd formatting' -}); - -parser.addArgument(['spam'], { - 'help': 'spam help' -}); - -group = parser.addArgumentGroup({ - title: 'title', - description: ' This text\n' + - ' should be indented\n' + - ' exactly like it is here\n' -}); - -group.addArgument(['--bar'], { - help: 'bar help' -}); - -helptext = parser.formatHelp(); -print(helptext); -// test selected clips -assert(helptext.match(parser.description)); -assert.equal(helptext.match(a.help), null); -assert(helptext.match(/foo help should not retain this odd formatting/)); - -/* -class TestHelpRawDescription(HelpTestCase): - """Test the RawTextHelpFormatter""" -.... - -usage: PROG [-h] [--foo FOO] [--bar BAR] spam - -Keep the formatting - exactly as it is written - -here - -positional arguments: - spam spam help - -optional arguments: - -h, --help show this help message and exit - --foo FOO foo help should not retain this odd formatting - -title: - This text - should be indented - exactly like it is here - - --bar BAR bar help -*/ - - -print("TEST argparse.RawTextHelpFormatter"); - -parser = new argparse.ArgumentParser({ - debug: true, - prog: 'PROG', - formatterClass: argparse.RawTextHelpFormatter, - description: 'Keep the formatting\n' + - ' exactly as it is written\n' + - '\n' + - 'here\n' -}); - -parser.addArgument(['--baz'], { - help: ' baz help should also\n' + - 'appear as given here' -}); - -a = parser.addArgument(['--foo'], { - help: ' foo help should also\n' + - 'appear as given here' -}); - -parser.addArgument(['spam'], { - 'help': 'spam help' -}); - -group = parser.addArgumentGroup({ - title: 'title', - description: ' This text\n' + - ' should be indented\n' + - ' exactly like it is here\n' -}); - -group.addArgument(['--bar'], { - help: 'bar help' -}); - -helptext = parser.formatHelp(); -print(helptext); -// test selected clips -assert(helptext.match(parser.description)); -assert(helptext.match(/( {14})appear as given here/gm)); - -/* -class TestHelpRawText(HelpTestCase): - """Test the RawTextHelpFormatter""" - -usage: PROG [-h] [--foo FOO] [--bar BAR] spam - -Keep the formatting - exactly as it is written - -here - -positional arguments: - spam spam help - -optional arguments: - -h, --help show this help message and exit - --foo FOO foo help should also - appear as given here - -title: - This text - should be indented - exactly like it is here - - --bar BAR bar help -*/ - - -print("TEST metavar as a tuple"); - -parser = new argparse.ArgumentParser({ - prog: 'PROG' -}); - -parser.addArgument(['-w'], { - help: 'w', - nargs: '+', - metavar: ['W1', 'W2'] -}); - -parser.addArgument(['-x'], { - help: 'x', - nargs: '*', - metavar: ['X1', 'X2'] -}); - -parser.addArgument(['-y'], { - help: 'y', - nargs: 3, - metavar: ['Y1', 'Y2', 'Y3'] -}); - -parser.addArgument(['-z'], { - help: 'z', - nargs: '?', - metavar: ['Z1'] -}); - -helptext = parser.formatHelp(); -print(helptext); -var ustring = 'PROG [-h] [-w W1 [W2 ...]] [-x [X1 [X2 ...]]] [-y Y1 Y2 Y3] [-z [Z1]]'; -ustring = ustring.replace(/\[/g, '\\[').replace(/\]/g, '\\]'); -// print(ustring) -assert(helptext.match(new RegExp(ustring))); - -/* -class TestHelpTupleMetavar(HelpTestCase): - """Test specifying metavar as a tuple""" - -usage: PROG [-h] [-w W1 [W2 ...]] [-x [X1 [X2 ...]]] [-y Y1 Y2 Y3] [-z [Z1]] - -optional arguments: - -h, --help show this help message and exit - -w W1 [W2 ...] w - -x [X1 [X2 ...]] x - -y Y1 Y2 Y3 y - -z [Z1] z -*/ - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/index.js b/support/process/node_modules/yamljs/node_modules/argparse/index.js deleted file mode 100644 index 3b6eea0..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/argparse'); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action.js deleted file mode 100644 index 6f7e9a5..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action.js +++ /dev/null @@ -1,146 +0,0 @@ -/** - * class Action - * - * Base class for all actions - * Do not call in your code, use this class only for inherits your own action - * - * Information about how to convert command line strings to Javascript objects. - * Action objects are used by an ArgumentParser to represent the information - * needed to parse a single argument from one or more strings from the command - * line. The keyword arguments to the Action constructor are also all attributes - * of Action instances. - * - * #####Alowed keywords: - * - * - `store` - * - `storeConstant` - * - `storeTrue` - * - `storeFalse` - * - `append` - * - `appendConstant` - * - `count` - * - `help` - * - `version` - * - * Information about action options see [[Action.new]] - * - * See also [original guide](http://docs.python.org/dev/library/argparse.html#action) - * - **/ - -'use strict'; - - -// Constants -var $$ = require('./const'); - - -/** - * new Action(options) - * - * Base class for all actions. Used only for inherits - * - * - * ##### Options: - * - * - `optionStrings` A list of command-line option strings for the action. - * - `dest` Attribute to hold the created object(s) - * - `nargs` The number of command-line arguments that should be consumed. - * By default, one argument will be consumed and a single value will be - * produced. - * - `constant` Default value for an action with no value. - * - `defaultValue` The value to be produced if the option is not specified. - * - `type` Cast to 'string'|'int'|'float'|'complex'|function (string). If - * None, 'string'. - * - `choices` The choices available. - * - `required` True if the action must always be specified at the command - * line. - * - `help` The help describing the argument. - * - `metavar` The name to be used for the option's argument with the help - * string. If None, the 'dest' value will be used as the name. - * - * ##### nargs supported values: - * - * - `N` (an integer) consumes N arguments (and produces a list) - * - `?` consumes zero or one arguments - * - `*` consumes zero or more arguments (and produces a list) - * - `+` consumes one or more arguments (and produces a list) - * - * Note: that the difference between the default and nargs=1 is that with the - * default, a single value will be produced, while with nargs=1, a list - * containing a single value will be produced. - **/ -var Action = module.exports = function Action(options) { - options = options || {}; - this.optionStrings = options.optionStrings || []; - this.dest = options.dest; - this.nargs = options.nargs !== undefined ? options.nargs : null; - this.constant = options.constant !== undefined ? options.constant : null; - this.defaultValue = options.defaultValue; - this.type = options.type !== undefined ? options.type : null; - this.choices = options.choices !== undefined ? options.choices : null; - this.required = options.required !== undefined ? options.required: false; - this.help = options.help !== undefined ? options.help : null; - this.metavar = options.metavar !== undefined ? options.metavar : null; - - if (!(this.optionStrings instanceof Array)) { - throw new Error('optionStrings should be an array'); - } - if (this.required !== undefined && typeof(this.required) !== 'boolean') { - throw new Error('required should be a boolean'); - } -}; - -/** - * Action#getName -> String - * - * Tells action name - **/ -Action.prototype.getName = function () { - if (this.optionStrings.length > 0) { - return this.optionStrings.join('/'); - } else if (this.metavar !== null && this.metavar !== $$.SUPPRESS) { - return this.metavar; - } else if (this.dest !== undefined && this.dest !== $$.SUPPRESS) { - return this.dest; - } - return null; -}; - -/** - * Action#isOptional -> Boolean - * - * Return true if optional - **/ -Action.prototype.isOptional = function () { - return !this.isPositional(); -}; - -/** - * Action#isPositional -> Boolean - * - * Return true if positional - **/ -Action.prototype.isPositional = function () { - return (this.optionStrings.length === 0); -}; - -/** - * Action#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Should be implemented in inherited classes - * - * ##### Example - * - * ActionCount.prototype.call = function (parser, namespace, values, optionString) { - * namespace.set(this.dest, (namespace[this.dest] || 0) + 1); - * }; - * - **/ -Action.prototype.call = function () { - throw new Error('.call() not defined');// Not Implemented error -}; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/append.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action/append.js deleted file mode 100644 index 48c6dbe..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/append.js +++ /dev/null @@ -1,55 +0,0 @@ -/*:nodoc:* - * class ActionAppend - * - * This action stores a list, and appends each argument value to the list. - * This is useful to allow an option to be specified multiple times. - * This class inherided from [[Action]] - * - **/ - -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// Constants -var $$ = require('../const'); - -/*:nodoc:* - * new ActionAppend(options) - * - options (object): options hash see [[Action.new]] - * - * Note: options.nargs should be optional for constants - * and more then zero for other - **/ -var ActionAppend = module.exports = function ActionAppend(options) { - options = options || {}; - if (this.nargs <= 0) { - throw new Error('nargs for append actions must be > 0; if arg ' + - 'strings are not supplying the value to append, ' + - 'the append const action may be more appropriate'); - } - if (!!this.constant && this.nargs !== $$.OPTIONAL) { - throw new Error('nargs must be OPTIONAL to supply const'); - } - Action.call(this, options); -}; -util.inherits(ActionAppend, Action); - -/*:nodoc:* - * ActionAppend#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionAppend.prototype.call = function (parser, namespace, values) { - var items = [].concat(namespace[this.dest] || []); // or _.clone - items.push(values); - namespace.set(this.dest, items); -}; - - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/append/constant.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action/append/constant.js deleted file mode 100644 index 90747ab..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/append/constant.js +++ /dev/null @@ -1,47 +0,0 @@ -/*:nodoc:* - * class ActionAppendConstant - * - * This stores a list, and appends the value specified by - * the const keyword argument to the list. - * (Note that the const keyword argument defaults to null.) - * The 'appendConst' action is typically useful when multiple - * arguments need to store constants to the same list. - * - * This class inherited from [[Action]] - **/ - -'use strict'; - -var util = require('util'); - -var Action = require('../../action'); - -/*:nodoc:* - * new ActionAppendConstant(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionAppendConstant = module.exports = function ActionAppendConstant(options) { - options = options || {}; - options.nargs = 0; - if (options.constant === undefined) { - throw new Error('constant option is required for appendAction'); - } - Action.call(this, options); -}; -util.inherits(ActionAppendConstant, Action); - -/*:nodoc:* - * ActionAppendConstant#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionAppendConstant.prototype.call = function (parser, namespace) { - var items = [].concat(namespace[this.dest] || []); - items.push(this.constant); - namespace.set(this.dest, items); -}; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/count.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action/count.js deleted file mode 100644 index d6a5899..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/count.js +++ /dev/null @@ -1,40 +0,0 @@ -/*:nodoc:* - * class ActionCount - * - * This counts the number of times a keyword argument occurs. - * For example, this is useful for increasing verbosity levels - * - * This class inherided from [[Action]] - * - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -/*:nodoc:* - * new ActionCount(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionCount = module.exports = function ActionCount(options) { - options = options || {}; - options.nargs = 0; - - Action.call(this, options); -}; -util.inherits(ActionCount, Action); - -/*:nodoc:* - * ActionCount#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionCount.prototype.call = function (parser, namespace) { - namespace.set(this.dest, (namespace[this.dest] || 0) + 1); -}; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/help.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action/help.js deleted file mode 100644 index 7f7b4e2..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/help.js +++ /dev/null @@ -1,48 +0,0 @@ -/*:nodoc:* - * class ActionHelp - * - * Support action for printing help - * This class inherided from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// Constants -var $$ = require('../const'); - -/*:nodoc:* - * new ActionHelp(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionHelp = module.exports = function ActionHelp(options) { - options = options || {}; - if (options.defaultValue !== null) { - options.defaultValue = options.defaultValue; - } - else { - options.defaultValue = $$.SUPPRESS; - } - options.dest = (options.dest !== null ? options.dest: $$.SUPPRESS); - options.nargs = 0; - Action.call(this, options); - -}; -util.inherits(ActionHelp, Action); - -/*:nodoc:* - * ActionHelp#call(parser, namespace, values, optionString) - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Print help and exit - **/ -ActionHelp.prototype.call = function (parser) { - parser.printHelp(); - parser.exit(); -}; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store.js deleted file mode 100644 index 8ebc974..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store.js +++ /dev/null @@ -1,50 +0,0 @@ -/*:nodoc:* - * class ActionStore - * - * This action just stores the argument’s value. This is the default action. - * - * This class inherited from [[Action]] - * - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// Constants -var $$ = require('../const'); - - -/*:nodoc:* - * new ActionStore(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionStore = module.exports = function ActionStore(options) { - options = options || {}; - if (this.nargs <= 0) { - throw new Error('nargs for store actions must be > 0; if you ' + - 'have nothing to store, actions such as store ' + - 'true or store const may be more appropriate'); - - } - if (this.constant !== undefined && this.nargs !== $$.OPTIONAL) { - throw new Error('nargs must be OPTIONAL to supply const'); - } - Action.call(this, options); -}; -util.inherits(ActionStore, Action); - -/*:nodoc:* - * ActionStore#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionStore.prototype.call = function (parser, namespace, values) { - namespace.set(this.dest, values); -}; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store/constant.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store/constant.js deleted file mode 100644 index 8410fcf..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store/constant.js +++ /dev/null @@ -1,43 +0,0 @@ -/*:nodoc:* - * class ActionStoreConstant - * - * This action stores the value specified by the const keyword argument. - * (Note that the const keyword argument defaults to the rather unhelpful null.) - * The 'store_const' action is most commonly used with optional - * arguments that specify some sort of flag. - * - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../../action'); - -/*:nodoc:* - * new ActionStoreConstant(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionStoreConstant = module.exports = function ActionStoreConstant(options) { - options = options || {}; - options.nargs = 0; - if (options.constant === undefined) { - throw new Error('constant option is required for storeAction'); - } - Action.call(this, options); -}; -util.inherits(ActionStoreConstant, Action); - -/*:nodoc:* - * ActionStoreConstant#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Save result in namespace object - **/ -ActionStoreConstant.prototype.call = function (parser, namespace) { - namespace.set(this.dest, this.constant); -}; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store/false.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store/false.js deleted file mode 100644 index 66417bf..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store/false.js +++ /dev/null @@ -1,27 +0,0 @@ -/*:nodoc:* - * class ActionStoreFalse - * - * This action store the values False respectively. - * This is special cases of 'storeConst' - * - * This class inherited from [[Action]] - **/ - -'use strict'; - -var util = require('util'); - -var ActionStoreConstant = require('./constant'); - -/*:nodoc:* - * new ActionStoreFalse(options) - * - options (object): hash of options see [[Action.new]] - * - **/ -var ActionStoreFalse = module.exports = function ActionStoreFalse(options) { - options = options || {}; - options.constant = false; - options.defaultValue = options.defaultValue !== null ? options.defaultValue: true; - ActionStoreConstant.call(this, options); -}; -util.inherits(ActionStoreFalse, ActionStoreConstant); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store/true.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store/true.js deleted file mode 100644 index 43ec708..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/store/true.js +++ /dev/null @@ -1,26 +0,0 @@ -/*:nodoc:* - * class ActionStoreTrue - * - * This action store the values True respectively. - * This isspecial cases of 'storeConst' - * - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var ActionStoreConstant = require('./constant'); - -/*:nodoc:* - * new ActionStoreTrue(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionStoreTrue = module.exports = function ActionStoreTrue(options) { - options = options || {}; - options.constant = true; - options.defaultValue = options.defaultValue !== null ? options.defaultValue: false; - ActionStoreConstant.call(this, options); -}; -util.inherits(ActionStoreTrue, ActionStoreConstant); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/subparsers.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action/subparsers.js deleted file mode 100644 index adecf65..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/subparsers.js +++ /dev/null @@ -1,148 +0,0 @@ -/** internal - * class ActionSubparsers - * - * Support the creation of such sub-commands with the addSubparsers() - * - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); -var format = require('util').format; -var _ = require('underscore'); - - -var Action = require('../action'); - -// Constants -var $$ = require('../const'); - -// Errors -var argumentErrorHelper = require('../argument/error'); - - -/*:nodoc:* - * new ChoicesPseudoAction(name, help) - * - * Create pseudo action for correct help text - * - **/ -var ChoicesPseudoAction = function (name, help) { - var options = { - optionStrings: [], - dest: name, - help: help - }; - - Action.call(this, options); -}; -util.inherits(ChoicesPseudoAction, Action); - -/** - * new ActionSubparsers(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionSubparsers = module.exports = function ActionSubparsers(options) { - options = options || {}; - options.dest = options.dest || $$.SUPPRESS; - options.nargs = $$.PARSER; - - this.debug = (options.debug === true); - - this._progPrefix = options.prog; - this._parserClass = options.parserClass; - this._nameParserMap = {}; - this._choicesActions = []; - - options.choices = this._nameParserMap; - Action.call(this, options); -}; -util.inherits(ActionSubparsers, Action); - -/*:nodoc:* - * ActionSubparsers#addParser(name, options) -> ArgumentParser - * - name (string): sub-command name - * - options (object): see [[ArgumentParser.new]] - * - * Note: - * addParser supports an additional aliases option, - * which allows multiple strings to refer to the same subparser. - * This example, like svn, aliases co as a shorthand for checkout - * - **/ -ActionSubparsers.prototype.addParser = function (name, options) { - var parser; - - var self = this; - - options = options || {}; - - options.debug = (this.debug === true); - - // set program from the existing prefix - if (!options.prog) { - options.prog = this._progPrefix + ' ' + name; - } - - var aliases = options.aliases || []; - - // create a pseudo-action to hold the choice help - if (!!options.help || _.isString(options.help)) { - var help = options.help; - delete options.help; - - var choiceAction = new ChoicesPseudoAction(name, help); - this._choicesActions.push(choiceAction); - } - - // create the parser and add it to the map - parser = new this._parserClass(options); - this._nameParserMap[name] = parser; - - // make parser available under aliases also - aliases.forEach(function (alias) { - self._nameParserMap[alias] = parser; - }); - - return parser; -}; - -ActionSubparsers.prototype._getSubactions = function () { - return this._choicesActions; -}; - -/*:nodoc:* - * ActionSubparsers#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Call the action. Parse input aguments - **/ -ActionSubparsers.prototype.call = function (parser, namespace, values) { - var parserName = values[0]; - var argStrings = values.slice(1); - - // set the parser name if requested - if (this.dest !== $$.SUPPRESS) { - namespace[this.dest] = parserName; - } - - // select the parser - if (!!this._nameParserMap[parserName]) { - parser = this._nameParserMap[parserName]; - } else { - throw argumentErrorHelper(format( - 'Unknown parser "%s" (choices: [%s]).', - parserName, - _.keys(this._nameParserMap).join(', ') - )); - } - - // parse all the remaining options into the namespace - parser.parseArgs(argStrings, namespace); -}; - - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/version.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action/version.js deleted file mode 100644 index a17877c..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action/version.js +++ /dev/null @@ -1,50 +0,0 @@ -/*:nodoc:* - * class ActionVersion - * - * Support action for printing program version - * This class inherited from [[Action]] - **/ -'use strict'; - -var util = require('util'); - -var Action = require('../action'); - -// -// Constants -// -var $$ = require('../const'); - -/*:nodoc:* - * new ActionVersion(options) - * - options (object): options hash see [[Action.new]] - * - **/ -var ActionVersion = module.exports = function ActionVersion(options) { - options = options || {}; - options.defaultValue = (!!options.defaultValue ? options.defaultValue: $$.SUPPRESS); - options.dest = (options.dest || $$.SUPPRESS); - options.nargs = 0; - this.version = options.version; - Action.call(this, options); -}; -util.inherits(ActionVersion, Action); - -/*:nodoc:* - * ActionVersion#call(parser, namespace, values, optionString) -> Void - * - parser (ArgumentParser): current parser - * - namespace (Namespace): namespace for output data - * - values (Array): parsed values - * - optionString (Array): input option string(not parsed) - * - * Print version and exit - **/ -ActionVersion.prototype.call = function (parser) { - var version = this.version || parser.version; - var formatter = parser._getFormatter(); - formatter.addText(version); - parser.exit(0, formatter.formatHelp()); -}; - - - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/action_container.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/action_container.js deleted file mode 100644 index dbe3e3c..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/action_container.js +++ /dev/null @@ -1,481 +0,0 @@ -/** internal - * class ActionContainer - * - * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] - **/ - -'use strict'; - -var format = require('util').format; -var _ = require('underscore'); - -_.str = require('underscore.string'); - -// Constants -var $$ = require('./const'); - -//Actions -var ActionHelp = require('./action/help'); -var ActionAppend = require('./action/append'); -var ActionAppendConstant = require('./action/append/constant'); -var ActionCount = require('./action/count'); -var ActionStore = require('./action/store'); -var ActionStoreConstant = require('./action/store/constant'); -var ActionStoreTrue = require('./action/store/true'); -var ActionStoreFalse = require('./action/store/false'); -var ActionVersion = require('./action/version'); -var ActionSubparsers = require('./action/subparsers'); - -// Errors -var argumentErrorHelper = require('./argument/error'); - - - -/** - * new ActionContainer(options) - * - * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] - * - * ##### Options: - * - * - `description` -- A description of what the program does - * - `prefixChars` -- Characters that prefix optional arguments - * - `argumentDefault` -- The default value for all arguments - * - `conflictHandler` -- The conflict handler to use for duplicate arguments - **/ -var ActionContainer = module.exports = function ActionContainer(options) { - options = options || {}; - - this.description = options.description; - this.argumentDefault = options.argumentDefault; - this.prefixChars = options.prefixChars || ''; - this.conflictHandler = options.conflictHandler; - - // set up registries - this._registries = {}; - - // register actions - this.register('action', null, ActionStore); - this.register('action', 'store', ActionStore); - this.register('action', 'storeConst', ActionStoreConstant); - this.register('action', 'storeTrue', ActionStoreTrue); - this.register('action', 'storeFalse', ActionStoreFalse); - this.register('action', 'append', ActionAppend); - this.register('action', 'appendConst', ActionAppendConstant); - this.register('action', 'count', ActionCount); - this.register('action', 'help', ActionHelp); - this.register('action', 'version', ActionVersion); - this.register('action', 'parsers', ActionSubparsers); - - // raise an exception if the conflict handler is invalid - this._getHandler(); - - // action storage - this._actions = []; - this._optionStringActions = {}; - - // groups - this._actionGroups = []; - this._mutuallyExclusiveGroups = []; - - // defaults storage - this._defaults = {}; - - // determines whether an "option" looks like a negative number - // -1, -1.5 -5e+4 - this._regexpNegativeNumber = new RegExp('^[-]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$'); - - // whether or not there are any optionals that look like negative - // numbers -- uses a list so it can be shared and edited - this._hasNegativeNumberOptionals = []; -}; - -// Groups must be required, then ActionContainer already defined -var ArgumentGroup = require('./argument/group'); -var MutuallyExclusiveGroup = require('./argument/exclusive'); - -// -// Registration methods -// - -/** - * ActionContainer#register(registryName, value, object) -> Void - * - registryName (String) : object type action|type - * - value (string) : keyword - * - object (Object|Function) : handler - * - * Register handlers - **/ -ActionContainer.prototype.register = function (registryName, value, object) { - this._registries[registryName] = this._registries[registryName] || {}; - this._registries[registryName][value] = object; -}; - -ActionContainer.prototype._registryGet = function (registryName, value, defaultValue) { - if (3 > arguments.length) { - defaultValue = null; - } - return this._registries[registryName][value] || defaultValue; -}; - -// -// Namespace default accessor methods -// - -/** - * ActionContainer#setDefaults(options) -> Void - * - options (object):hash of options see [[Action.new]] - * - * Set defaults - **/ -ActionContainer.prototype.setDefaults = function (options) { - options = options || {}; - for (var property in options) { - this._defaults[property] = options[property]; - } - - // if these defaults match any existing arguments, replace the previous - // default on the object with the new one - this._actions.forEach(function (action) { - if (action.dest in options) { - action.defaultValue = options[action.dest]; - } - }); -}; - -/** - * ActionContainer#getDefault(dest) -> Mixed - * - dest (string): action destination - * - * Return action default value - **/ -ActionContainer.prototype.getDefault = function (dest) { - var result = (_.has(this._defaults, dest)) ? this._defaults[dest] : null; - - this._actions.forEach(function (action) { - if (action.dest === dest && _.has(action, 'defaultValue')) { - result = action.defaultValue; - } - }); - - return result; -}; -// -// Adding argument actions -// - -/** - * ActionContainer#addArgument(args, options) -> Object - * - args (Array): array of argument keys - * - options (Object): action objects see [[Action.new]] - * - * #### Examples - * - addArgument([-f, --foo], {action:'store', defaultValue=1, ...}) - * - addArgument(['bar'], action: 'store', nargs:1, ...}) - **/ -ActionContainer.prototype.addArgument = function (args, options) { - args = args; - options = options || {}; - - if (!_.isArray(args)) { - throw new TypeError('addArgument first argument should be an array'); - } - if (!_.isObject(options) || _.isArray(options)) { - throw new TypeError('addArgument second argument should be a hash'); - } - - // if no positional args are supplied or only one is supplied and - // it doesn't look like an option string, parse a positional argument - if (!args || args.length === 1 && this.prefixChars.indexOf(args[0][0]) < 0) { - if (args && !!options.dest) { - throw new Error('dest supplied twice for positional argument'); - } - options = this._getPositional(args, options); - - // otherwise, we're adding an optional argument - } else { - options = this._getOptional(args, options); - } - - // if no default was supplied, use the parser-level default - if (_.isUndefined(options.defaultValue)) { - var dest = options.dest; - if (_.has(this._defaults, dest)) { - options.defaultValue = this._defaults[dest]; - } else if (!_.isUndefined(this.argumentDefault)) { - options.defaultValue = this.argumentDefault; - } - } - - // create the action object, and add it to the parser - var ActionClass = this._popActionClass(options); - if (! _.isFunction(ActionClass)) { - throw new Error(format('Unknown action "%s".', ActionClass)); - } - var action = new ActionClass(options); - - // throw an error if the action type is not callable - var typeFunction = this._registryGet('type', action.type, action.type); - if (!_.isFunction(typeFunction)) { - throw new Error(format('"%s" is not callable', typeFunction)); - } - - return this._addAction(action); -}; - -/** - * ActionContainer#addArgumentGroup(options) -> ArgumentGroup - * - options (Object): hash of options see [[ArgumentGroup.new]] - * - * Create new arguments groups - **/ -ActionContainer.prototype.addArgumentGroup = function (options) { - var group = new ArgumentGroup(this, options); - this._actionGroups.push(group); - return group; -}; - -/** - * ActionContainer#addMutuallyExclusiveGroup(options) -> ArgumentGroup - * - options (Object): {required: false} - * - * Create new mutual exclusive groups - **/ -ActionContainer.prototype.addMutuallyExclusiveGroup = function (options) { - var group = new MutuallyExclusiveGroup(this, options); - this._mutuallyExclusiveGroups.push(group); - return group; -}; - -ActionContainer.prototype._addAction = function (action) { - var self = this; - - // resolve any conflicts - this._checkConflict(action); - - // add to actions list - this._actions.push(action); - action.container = this; - - // index the action by any option strings it has - action.optionStrings.forEach(function (optionString) { - self._optionStringActions[optionString] = action; - }); - - // set the flag if any option strings look like negative numbers - action.optionStrings.forEach(function (optionString) { - if (optionString.match(self._regexpNegativeNumber)) { - if (!_.any(self._hasNegativeNumberOptionals)) { - self._hasNegativeNumberOptionals.push(true); - } - } - }); - - // return the created action - return action; -}; - -ActionContainer.prototype._removeAction = function (action) { - var actionIndex = this._actions.indexOf(action); - if (actionIndex >= 0) { - this._actions.splice(actionIndex, 1); - } -}; - -ActionContainer.prototype._addContainerActions = function (container) { - // collect groups by titles - var titleGroupMap = {}; - this._actionGroups.forEach(function (group) { - if (titleGroupMap[group.title]) { - throw new Error(format('Cannot merge actions - two groups are named "%s".', group.title)); - } - titleGroupMap[group.title] = group; - }); - - // map each action to its group - var groupMap = {}; - function actionHash(action) { - // unique (hopefully?) string suitable as dictionary key - return action.getName(); - } - container._actionGroups.forEach(function (group) { - // if a group with the title exists, use that, otherwise - // create a new group matching the container's group - if (!titleGroupMap[group.title]) { - titleGroupMap[group.title] = this.addArgumentGroup({ - title: group.title, - description: group.description - }); - } - - // map the actions to their new group - group._groupActions.forEach(function (action) { - groupMap[actionHash(action)] = titleGroupMap[group.title]; - }); - }, this); - - // add container's mutually exclusive groups - // NOTE: if add_mutually_exclusive_group ever gains title= and - // description= then this code will need to be expanded as above - var mutexGroup; - container._mutuallyExclusiveGroups.forEach(function (group) { - mutexGroup = this.addMutuallyExclusiveGroup({ - required: group.required - }); - // map the actions to their new mutex group - group._groupActions.forEach(function (action) { - groupMap[actionHash(action)] = mutexGroup; - }); - }, this); // forEach takes a 'this' argument - - // add all actions to this container or their group - container._actions.forEach(function (action) { - var key = actionHash(action); - if (!!groupMap[key]) { - groupMap[key]._addAction(action); - } - else - { - this._addAction(action); - } - }); -}; - -ActionContainer.prototype._getPositional = function (dest, options) { - if (_.isArray(dest)) { - dest = _.first(dest); - } - // make sure required is not specified - if (options.required) { - throw new Error('"required" is an invalid argument for positionals.'); - } - - // mark positional arguments as required if at least one is - // always required - if (options.nargs !== $$.OPTIONAL && options.nargs !== $$.ZERO_OR_MORE) { - options.required = true; - } - if (options.nargs === $$.ZERO_OR_MORE && options.defaultValue === undefined) { - options.required = true; - } - - // return the keyword arguments with no option strings - options.dest = dest; - options.optionStrings = []; - return options; -}; - -ActionContainer.prototype._getOptional = function (args, options) { - var prefixChars = this.prefixChars; - var optionStrings = []; - var optionStringsLong = []; - - // determine short and long option strings - args.forEach(function (optionString) { - // error on strings that don't start with an appropriate prefix - if (prefixChars.indexOf(optionString[0]) < 0) { - throw new Error(format('Invalid option string "%s": must start with a "%s".', - optionString, - prefixChars - )); - } - - // strings starting with two prefix characters are long options - optionStrings.push(optionString); - if (optionString.length > 1 && prefixChars.indexOf(optionString[1]) >= 0) { - optionStringsLong.push(optionString); - } - }); - - // infer dest, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' - var dest = options.dest || null; - delete options.dest; - - if (!dest) { - var optionStringDest = optionStringsLong.length ? optionStringsLong[0] :optionStrings[0]; - dest = _.str.strip(optionStringDest, this.prefixChars); - - if (dest.length === 0) { - throw new Error( - format('dest= is required for options like "%s"', optionStrings.join(', ')) - ); - } - dest = dest.replace(/-/g, '_'); - } - - // return the updated keyword arguments - options.dest = dest; - options.optionStrings = optionStrings; - - return options; -}; - -ActionContainer.prototype._popActionClass = function (options, defaultValue) { - defaultValue = defaultValue || null; - - var action = (options.action || defaultValue); - delete options.action; - - var actionClass = this._registryGet('action', action, action); - return actionClass; -}; - -ActionContainer.prototype._getHandler = function () { - var handlerString = this.conflictHandler; - var handlerFuncName = "_handleConflict" + _.str.capitalize(handlerString); - var func = this[handlerFuncName]; - if (typeof func === 'undefined') { - var msg = "invalid conflict resolution value: " + handlerString; - throw new Error(msg); - } else { - return func; - } -}; - -ActionContainer.prototype._checkConflict = function (action) { - var optionStringActions = this._optionStringActions; - var conflictOptionals = []; - - // find all options that conflict with this option - // collect pairs, the string, and an existing action that it conflicts with - action.optionStrings.forEach(function (optionString) { - var conflOptional = optionStringActions[optionString]; - if (typeof conflOptional !== 'undefined') { - conflictOptionals.push([optionString, conflOptional]); - } - }); - - if (conflictOptionals.length > 0) { - var conflictHandler = this._getHandler(); - conflictHandler.call(this, action, conflictOptionals); - } -}; - -ActionContainer.prototype._handleConflictError = function (action, conflOptionals) { - var conflicts = _.map(conflOptionals, function (pair) {return pair[0]; }); - conflicts = conflicts.join(', '); - throw argumentErrorHelper( - action, - format('Conflicting option string(s): %s', conflicts) - ); -}; - -ActionContainer.prototype._handleConflictResolve = function (action, conflOptionals) { - // remove all conflicting options - var self = this; - conflOptionals.forEach(function (pair) { - var optionString = pair[0]; - var conflictingAction = pair[1]; - // remove the conflicting option string - var i = conflictingAction.optionStrings.indexOf(optionString); - if (i >= 0) { - conflictingAction.optionStrings.splice(i, 1); - } - delete self._optionStringActions[optionString]; - // if the option now has no option string, remove it from the - // container holding it - if (conflictingAction.optionStrings.length === 0) { - conflictingAction.container._removeAction(conflictingAction); - } - }); -}; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/argparse.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/argparse.js deleted file mode 100644 index f2a2c51..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/argparse.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -module.exports.ArgumentParser = require('./argument_parser.js'); -module.exports.Namespace = require('./namespace'); -module.exports.Action = require('./action'); -module.exports.HelpFormatter = require('./help/formatter.js'); -module.exports.Const = require('./const.js'); - -module.exports.ArgumentDefaultsHelpFormatter = - require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter; -module.exports.RawDescriptionHelpFormatter = - require('./help/added_formatters.js').RawDescriptionHelpFormatter; -module.exports.RawTextHelpFormatter = - require('./help/added_formatters.js').RawTextHelpFormatter; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/argument/error.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/argument/error.js deleted file mode 100644 index c8a02a0..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/argument/error.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - - -var format = require('util').format; - - -var ERR_CODE = 'ARGError'; - -/*:nodoc:* - * argumentError(argument, message) -> TypeError - * - argument (Object): action with broken argument - * - message (String): error message - * - * Error format helper. An error from creating or using an argument - * (optional or positional). The string value of this exception - * is the message, augmented with information - * about the argument that caused it. - * - * #####Example - * - * var argumentErrorHelper = require('./argument/error'); - * if (conflictOptionals.length > 0) { - * throw argumentErrorHelper( - * action, - * format('Conflicting option string(s): %s', conflictOptionals.join(', ')) - * ); - * } - * - **/ -module.exports = function (argument, message) { - var argumentName = null; - var errMessage; - var err; - - if (argument.getName) { - argumentName = argument.getName(); - } else { - argumentName = '' + argument; - } - - if (!argumentName) { - errMessage = message; - } else { - errMessage = format('argument "%s": %s', argumentName, message); - } - - err = new TypeError(errMessage); - err.code = ERR_CODE; - return err; -}; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/argument/exclusive.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/argument/exclusive.js deleted file mode 100644 index 8287e00..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/argument/exclusive.js +++ /dev/null @@ -1,54 +0,0 @@ -/** internal - * class MutuallyExclusiveGroup - * - * Group arguments. - * By default, ArgumentParser groups command-line arguments - * into “positional arguments” and “optional arguments” - * when displaying help messages. When there is a better - * conceptual grouping of arguments than this default one, - * appropriate groups can be created using the addArgumentGroup() method - * - * This class inherited from [[ArgumentContainer]] - **/ -'use strict'; - -var util = require('util'); - -var ArgumentGroup = require('./group'); - -/** - * new MutuallyExclusiveGroup(container, options) - * - container (object): main container - * - options (object): options.required -> true/false - * - * `required` could be an argument itself, but making it a property of - * the options argument is more consistent with the JS adaptation of the Python) - **/ -var MutuallyExclusiveGroup = module.exports = function MutuallyExclusiveGroup(container, options) { - var required; - options = options || {}; - required = options.required || false; - ArgumentGroup.call(this, container); - this.required = required; - -}; -util.inherits(MutuallyExclusiveGroup, ArgumentGroup); - - -MutuallyExclusiveGroup.prototype._addAction = function (action) { - var msg; - if (action.required) { - msg = 'mutually exclusive arguments must be optional'; - throw new Error(msg); - } - action = this._container._addAction(action); - this._groupActions.push(action); - return action; -}; - - -MutuallyExclusiveGroup.prototype._removeAction = function (action) { - this._container._removeAction(action); - this._groupActions.remove(action); -}; - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/argument/group.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/argument/group.js deleted file mode 100644 index 58b271f..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/argument/group.js +++ /dev/null @@ -1,75 +0,0 @@ -/** internal - * class ArgumentGroup - * - * Group arguments. - * By default, ArgumentParser groups command-line arguments - * into “positional arguments” and “optional arguments” - * when displaying help messages. When there is a better - * conceptual grouping of arguments than this default one, - * appropriate groups can be created using the addArgumentGroup() method - * - * This class inherited from [[ArgumentContainer]] - **/ -'use strict'; - -var util = require('util'); - -var ActionContainer = require('../action_container'); - - -/** - * new ArgumentGroup(container, options) - * - container (object): main container - * - options (object): hash of group options - * - * #### options - * - **prefixChars** group name prefix - * - **argumentDefault** default argument value - * - **title** group title - * - **description** group description - * - **/ -var ArgumentGroup = module.exports = function ArgumentGroup(container, options) { - - options = options || {}; - - // add any missing keyword arguments by checking the container - options.conflictHandler = (options.conflictHandler || container.conflictHandler); - options.prefixChars = (options.prefixChars || container.prefixChars); - options.argumentDefault = (options.argumentDefault || container.argumentDefault); - - ActionContainer.call(this, options); - - // group attributes - this.title = options.title; - this._groupActions = []; - - // share most attributes with the container - this._container = container; - this._registries = container._registries; - this._actions = container._actions; - this._optionStringActions = container._optionStringActions; - this._defaults = container._defaults; - this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals; - this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups; -}; -util.inherits(ArgumentGroup, ActionContainer); - - -ArgumentGroup.prototype._addAction = function (action) { - // Parent add action - action = ActionContainer.prototype._addAction.call(this, action); - this._groupActions.push(action); - return action; -}; - - -ArgumentGroup.prototype._removeAction = function (action) { - // Parent remove action - ActionContainer.prototype._removeAction.call(this, action); - var actionIndex = this._groupActions.indexOf(action); - if (actionIndex >= 0) { - this._groupActions.splice(actionIndex, 1); - } -}; - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/argument_parser.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/argument_parser.js deleted file mode 100644 index 97cf098..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/argument_parser.js +++ /dev/null @@ -1,1165 +0,0 @@ -/** - * class ArgumentParser - * - * Object for parsing command line strings into js objects. - * - * Inherited from [[ActionContainer]] - **/ -'use strict'; - -var util = require('util'); -var format = require('util').format; -var Path = require('path'); - -var _ = require('underscore'); -_.str = require('underscore.string'); - -// Constants -var $$ = require('./const'); - -var ActionContainer = require('./action_container'); - -// Errors -var argumentErrorHelper = require('./argument/error'); - -var HelpFormatter = require('./help/formatter'); - -var Namespace = require('./namespace'); - - -/** - * new ArgumentParser(options) - * - * Create a new ArgumentParser object. - * - * ##### Options: - * - `prog` The name of the program (default: sys.argv[0]) - * - `usage` A usage message (default: auto-generated from arguments) - * - `description` A description of what the program does - * - `epilog` Text following the argument descriptions - * - `parents` Parsers whose arguments should be copied into this one - * - `formatterClass` HelpFormatter class for printing help messages - * - `prefixChars` Characters that prefix optional arguments - * - `fromfilePrefixChars` Characters that prefix files containing additional arguments - * - `argumentDefault` The default value for all arguments - * - `addHelp` Add a -h/-help option - * - `conflictHandler` Specifies how to handle conflicting argument names - * - `debug` Enable debug mode. Argument errors throw exception in - * debug mode and process.exit in normal. Used for development and - * testing (default: false) - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#argumentparser-objects - **/ -var ArgumentParser = module.exports = function ArgumentParser(options) { - var self = this; - options = options || {}; - - options.description = (options.description || null); - options.argumentDefault = (options.argumentDefault || null); - options.prefixChars = (options.prefixChars || '-'); - options.conflictHandler = (options.conflictHandler || 'error'); - ActionContainer.call(this, options); - - options.addHelp = (options.addHelp === undefined || !!options.addHelp); - options.parents = (options.parents || []); - // default program name - options.prog = (options.prog || Path.basename(process.argv[1])); - this.prog = options.prog; - this.usage = options.usage; - this.epilog = options.epilog; - this.version = options.version; - - this.debug = (options.debug === true); - - this.formatterClass = (options.formatterClass || HelpFormatter); - this.fromfilePrefixChars = options.fromfilePrefixChars || null; - this._positionals = this.addArgumentGroup({title: 'Positional arguments'}); - this._optionals = this.addArgumentGroup({title: 'Optional arguments'}); - this._subparsers = null; - - // register types - var FUNCTION_IDENTITY = function (o) { - return o; - }; - this.register('type', 'auto', FUNCTION_IDENTITY); - this.register('type', null, FUNCTION_IDENTITY); - this.register('type', 'int', function (x) { - var result = parseInt(x, 10); - if (isNaN(result)) { - throw new Error(x + ' is not a valid integer.'); - } - return result; - }); - this.register('type', 'float', function (x) { - var result = parseFloat(x); - if (isNaN(result)) { - throw new Error(x + ' is not a valid float.'); - } - return result; - }); - this.register('type', 'string', function (x) { - return '' + x; - }); - - // add help and version arguments if necessary - var defaultPrefix = (this.prefixChars.indexOf('-') > -1) ? '-' : this.prefixChars[0]; - if (options.addHelp) { - this.addArgument( - [defaultPrefix + 'h', defaultPrefix + defaultPrefix + 'help'], - { - action: 'help', - defaultValue: $$.SUPPRESS, - help: 'Show this help message and exit.' - } - ); - } - if (this.version !== undefined) { - this.addArgument( - [defaultPrefix + 'v', defaultPrefix + defaultPrefix + 'version'], - { - action: 'version', - version: this.version, - defaultValue: $$.SUPPRESS, - help: "Show program's version number and exit." - } - ); - } - - // add parent arguments and defaults - options.parents.forEach(function (parent) { - self._addContainerActions(parent); - if (parent._defaults !== undefined) { - for (var defaultKey in parent._defaults) { - if (parent._defaults.hasOwnProperty(defaultKey)) { - self._defaults[defaultKey] = parent._defaults[defaultKey]; - } - } - } - }); - -}; -util.inherits(ArgumentParser, ActionContainer); - -/** - * ArgumentParser#addSubparsers(options) -> [[ActionSubparsers]] - * - options (object): hash of options see [[ActionSubparsers.new]] - * - * See also [subcommands][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#sub-commands - **/ -ArgumentParser.prototype.addSubparsers = function (options) { - if (!!this._subparsers) { - this.error('Cannot have multiple subparser arguments.'); - } - - options = options || {}; - options.debug = (this.debug === true); - options.optionStrings = []; - options.parserClass = (options.parserClass || ArgumentParser); - - - if (!!options.title || !!options.description) { - - this._subparsers = this.addArgumentGroup({ - title: (options.title || 'subcommands'), - description: options.description - }); - delete options.title; - delete options.description; - - } else { - this._subparsers = this._positionals; - } - - // prog defaults to the usage message of this parser, skipping - // optional arguments and with no "usage:" prefix - if (!options.prog) { - var formatter = this._getFormatter(); - var positionals = this._getPositionalActions(); - var groups = this._mutuallyExclusiveGroups; - formatter.addUsage(this.usage, positionals, groups, ''); - options.prog = _.str.strip(formatter.formatHelp()); - } - - // create the parsers action and add it to the positionals list - var ParsersClass = this._popActionClass(options, 'parsers'); - var action = new ParsersClass(options); - this._subparsers._addAction(action); - - // return the created parsers action - return action; -}; - -ArgumentParser.prototype._addAction = function (action) { - if (action.isOptional()) { - this._optionals._addAction(action); - } else { - this._positionals._addAction(action); - } - return action; -}; - -ArgumentParser.prototype._getOptionalActions = function () { - return this._actions.filter(function (action) { - return action.isOptional(); - }); -}; - -ArgumentParser.prototype._getPositionalActions = function () { - return this._actions.filter(function (action) { - return action.isPositional(); - }); -}; - - -/** - * ArgumentParser#parseArgs(args, namespace) -> Namespace|Object - * - args (array): input elements - * - namespace (Namespace|Object): result object - * - * Parsed args and throws error if some arguments are not recognized - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#the-parse-args-method - **/ -ArgumentParser.prototype.parseArgs = function (args, namespace) { - var argv; - var result = this.parseKnownArgs(args, namespace); - - args = result[0]; - argv = result[1]; - if (argv && argv.length > 0) { - this.error( - format('Unrecognized arguments: %s.', argv.join(' ')) - ); - } - return args; -}; - -/** - * ArgumentParser#parseKnownArgs(args, namespace) -> array - * - args (array): input options - * - namespace (Namespace|Object): result object - * - * Parse known arguments and return tuple of result object - * and unknown args - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#partial-parsing - **/ -ArgumentParser.prototype.parseKnownArgs = function (args, namespace) { - var self = this; - - // args default to the system args - args = args || process.argv.slice(2); - - // default Namespace built from parser defaults - namespace = namespace || new Namespace(); - - self._actions.forEach(function (action) { - if (action.dest !== $$.SUPPRESS) { - if (!_.has(namespace, action.dest)) { - if (action.defaultValue !== $$.SUPPRESS) { - var defaultValue = action.defaultValue; - if (_.isString(action.defaultValue)) { - defaultValue = self._getValue(action, defaultValue); - } - namespace[action.dest] = defaultValue; - } - } - } - }); - - _.keys(self._defaults).forEach(function (dest) { - namespace[dest] = self._defaults[dest]; - }); - - // parse the arguments and exit if there are any errors - try { - var res = this._parseKnownArgs(args, namespace); - - namespace = res[0]; - args = res[1]; - if (_.has(namespace, $$._UNRECOGNIZED_ARGS_ATTR)) { - args = _.union(args, namespace[$$._UNRECOGNIZED_ARGS_ATTR]); - delete namespace[$$._UNRECOGNIZED_ARGS_ATTR]; - } - return [namespace, args]; - } catch (e) { - this.error(e); - } -}; - -ArgumentParser.prototype._parseKnownArgs = function (argStrings, namespace) { - var self = this; - - var extras = []; - - // replace arg strings that are file references - if (this.fromfilePrefixChars !== null) { - argStrings = this._readArgsFromFiles(argStrings); - } - // map all mutually exclusive arguments to the other arguments - // they can't occur with - // Python has 'conflicts = action_conflicts.setdefault(mutex_action, [])' - // though I can't conceive of a way in which an action could be a member - // of two different mutually exclusive groups. - - function actionHash(action) { - // some sort of hashable key for this action - // action itself cannot be a key in actionConflicts - // I think getName() (join of optionStrings) is unique enough - return action.getName(); - } - var conflicts, key; - var actionConflicts = {}; - this._mutuallyExclusiveGroups.forEach(function (mutexGroup) { - mutexGroup._groupActions.forEach(function (mutexAction, i, groupActions) { - key = actionHash(mutexAction); - if (!_.has(actionConflicts, key)) { - actionConflicts[key] = []; - } - conflicts = actionConflicts[key]; - conflicts.push.apply(conflicts, groupActions.slice(0, i)); - conflicts.push.apply(conflicts, groupActions.slice(i + 1)); - }); - }); - - // find all option indices, and determine the arg_string_pattern - // which has an 'O' if there is an option at an index, - // an 'A' if there is an argument, or a '-' if there is a '--' - var optionStringIndices = {}; - - var argStringPatternParts = []; - - argStrings.forEach(function (argString, argStringIndex) { - if (argString === '--') { - argStringPatternParts.push('-'); - while (argStringIndex < argStrings.length) { - argStringPatternParts.push('A'); - argStringIndex++; - } - } - // otherwise, add the arg to the arg strings - // and note the index if it was an option - else { - var pattern; - var optionTuple = self._parseOptional(argString); - if (!optionTuple) { - pattern = 'A'; - } - else { - optionStringIndices[argStringIndex] = optionTuple; - pattern = 'O'; - } - argStringPatternParts.push(pattern); - } - }); - var argStringsPattern = argStringPatternParts.join(''); - - var seenActions = []; - var seenNonDefaultActions = []; - - - function takeAction(action, argumentStrings, optionString) { - seenActions.push(action); - var argumentValues = self._getValues(action, argumentStrings); - - // error if this argument is not allowed with other previously - // seen arguments, assuming that actions that use the default - // value don't really count as "present" - if (argumentValues !== action.defaultValue) { - seenNonDefaultActions.push(action); - if (!!actionConflicts[actionHash(action)]) { - actionConflicts[actionHash(action)].forEach(function (actionConflict) { - if (seenNonDefaultActions.indexOf(actionConflict) >= 0) { - throw argumentErrorHelper( - action, - format('Not allowed with argument "%s".', actionConflict.getName()) - ); - } - }); - } - } - - if (argumentValues !== $$.SUPPRESS) { - action.call(self, namespace, argumentValues, optionString); - } - } - - function consumeOptional(startIndex) { - // get the optional identified at this index - var optionTuple = optionStringIndices[startIndex]; - var action = optionTuple[0]; - var optionString = optionTuple[1]; - var explicitArg = optionTuple[2]; - - // identify additional optionals in the same arg string - // (e.g. -xyz is the same as -x -y -z if no args are required) - var actionTuples = []; - - var args, argCount, start, stop; - - while (true) { - if (!action) { - extras.push(argStrings[startIndex]); - return startIndex + 1; - } - if (!!explicitArg) { - argCount = self._matchArgument(action, 'A'); - - // if the action is a single-dash option and takes no - // arguments, try to parse more single-dash options out - // of the tail of the option string - var chars = self.prefixChars; - if (argCount === 0 && chars.indexOf(optionString[1]) < 0) { - actionTuples.push([action, [], optionString]); - optionString = optionString[0] + explicitArg[0]; - var newExplicitArg = explicitArg.slice(1) || null; - var optionalsMap = self._optionStringActions; - - if (_.keys(optionalsMap).indexOf(optionString) >= 0) { - action = optionalsMap[optionString]; - explicitArg = newExplicitArg; - } - else { - var msg = 'ignored explicit argument %r'; - throw argumentErrorHelper(action, msg); - } - } - // if the action expect exactly one argument, we've - // successfully matched the option; exit the loop - else if (argCount === 1) { - stop = startIndex + 1; - args = [explicitArg]; - actionTuples.push([action, args, optionString]); - break; - } - // error if a double-dash option did not use the - // explicit argument - else { - var message = 'ignored explicit argument %r'; - throw argumentErrorHelper(action, _.str.sprintf(message, explicitArg)); - } - } - // if there is no explicit argument, try to match the - // optional's string arguments with the following strings - // if successful, exit the loop - else { - - start = startIndex + 1; - var selectedPatterns = argStringsPattern.substr(start); - - argCount = self._matchArgument(action, selectedPatterns); - stop = start + argCount; - - - args = argStrings.slice(start, stop); - - actionTuples.push([action, args, optionString]); - break; - } - - } - - // add the Optional to the list and return the index at which - // the Optional's string args stopped - if (actionTuples.length < 1) { - throw new Error('length should be > 0'); - } - for (var i = 0; i < actionTuples.length; i++) { - takeAction.apply(self, actionTuples[i]); - } - return stop; - } - - // the list of Positionals left to be parsed; this is modified - // by consume_positionals() - var positionals = self._getPositionalActions(); - - function consumePositionals(startIndex) { - // match as many Positionals as possible - var selectedPattern = argStringsPattern.substr(startIndex); - var argCounts = self._matchArgumentsPartial(positionals, selectedPattern); - - // slice off the appropriate arg strings for each Positional - // and add the Positional and its args to the list - _.zip(positionals, argCounts).forEach(function (item) { - var action = item[0]; - var argCount = item[1]; - if (argCount === undefined) { - return; - } - var args = argStrings.slice(startIndex, startIndex + argCount); - - startIndex += argCount; - takeAction(action, args); - }); - - // slice off the Positionals that we just parsed and return the - // index at which the Positionals' string args stopped - positionals = positionals.slice(argCounts.length); - return startIndex; - } - - // consume Positionals and Optionals alternately, until we have - // passed the last option string - var startIndex = 0; - var position; - - var maxOptionStringIndex = -1; - if (!!optionStringIndices) { - for (position in optionStringIndices) { - maxOptionStringIndex = Math.max(maxOptionStringIndex, parseInt(position, 10)); - } - } - - var positionalsEndIndex, nextOptionStringIndex; - - while (startIndex <= maxOptionStringIndex) { - // consume any Positionals preceding the next option - nextOptionStringIndex = null; - for (position in optionStringIndices) { - position = parseInt(position, 10); - if (position >= startIndex) { - if (nextOptionStringIndex !== null) { - nextOptionStringIndex = Math.min(nextOptionStringIndex, position); - } - else { - nextOptionStringIndex = position; - } - } - } - - if (startIndex !== nextOptionStringIndex) { - positionalsEndIndex = consumePositionals(startIndex); - // only try to parse the next optional if we didn't consume - // the option string during the positionals parsing - if (positionalsEndIndex > startIndex) { - startIndex = positionalsEndIndex; - continue; - } - else { - startIndex = positionalsEndIndex; - } - } - - // if we consumed all the positionals we could and we're not - // at the index of an option string, there were extra arguments - if (!optionStringIndices[startIndex]) { - var strings = argStrings.slice(startIndex, nextOptionStringIndex); - extras = extras.concat(strings); - startIndex = nextOptionStringIndex; - } - // consume the next optional and any arguments for it - startIndex = consumeOptional(startIndex); - } - - // consume any positionals following the last Optional - var stopIndex = consumePositionals(startIndex); - - // if we didn't consume all the argument strings, there were extras - extras = extras.concat(_.rest(argStrings, stopIndex)); - - // if we didn't use all the Positional objects, there were too few - // arg strings supplied. - if (positionals.length > 0) { - self.error('too few arguments'); - } - - // make sure all required actions were present - self._actions.forEach(function (action) { - if (action.required) { - if (_.indexOf(seenActions, action) < 0) { - self.error(format('Argument "%s" is required', action.getName())); - } - } - }); - - // make sure all required groups have one option present - var actionUsed = false; - self._mutuallyExclusiveGroups.forEach(function (group) { - if (group.required) { - actionUsed = _.any(group._groupActions, function (action) { - return _.contains(seenNonDefaultActions, action); - }); - - // if no actions were used, report the error - if (!actionUsed) { - var names = []; - group._groupActions.forEach(function (action) { - if (action.help !== $$.SUPPRESS) { - names.push(action.getName()); - } - }); - names = names.join(' '); - var msg = 'one of the arguments ' + names + ' is required'; - self.error(msg); - } - } - }); - - // return the updated namespace and the extra arguments - return [namespace, extras]; -}; - -ArgumentParser.prototype._readArgsFromFiles = function (argStrings) { - // expand arguments referencing files - var _this = this; - var fs = require('fs'); - var newArgStrings = []; - argStrings.forEach(function (argString) { - if (_this.fromfilePrefixChars.indexOf(argString[0]) < 0) { - // for regular arguments, just add them back into the list - newArgStrings.push(argString); - } else { - // replace arguments referencing files with the file content - try { - var argstrs = []; - var filename = argString.slice(1); - var content = fs.readFileSync(filename, 'utf8'); - content = content.trim().split('\n'); - content.forEach(function (argLine) { - _this.convertArgLineToArgs(argLine).forEach(function (arg) { - argstrs.push(arg); - }); - argstrs = _this._readArgsFromFiles(argstrs); - }); - newArgStrings.push.apply(newArgStrings, argstrs); - } catch (error) { - return _this.error(error.message); - } - } - }); - return newArgStrings; -}; - -ArgumentParser.prototype.convertArgLineToArgs = function (argLine) { - return [argLine]; -}; - -ArgumentParser.prototype._matchArgument = function (action, regexpArgStrings) { - - // match the pattern for this action to the arg strings - var regexpNargs = new RegExp('^' + this._getNargsPattern(action)); - var matches = regexpArgStrings.match(regexpNargs); - var message; - - // throw an exception if we weren't able to find a match - if (!matches) { - switch (action.nargs) { - case undefined: - case null: - message = 'Expected one argument.'; - break; - case $$.OPTIONAL: - message = 'Expected at most one argument.'; - break; - case $$.ONE_OR_MORE: - message = 'Expected at least one argument.'; - break; - default: - message = 'Expected %s argument(s)'; - } - - throw argumentErrorHelper( - action, - format(message, action.nargs) - ); - } - // return the number of arguments matched - return matches[1].length; -}; - -ArgumentParser.prototype._matchArgumentsPartial = function (actions, regexpArgStrings) { - // progressively shorten the actions list by slicing off the - // final actions until we find a match - var self = this; - var result = []; - var actionSlice, pattern, matches; - var i, j; - - var getLength = function (string) { - return string.length; - }; - - for (i = actions.length; i > 0; i -= 1) { - pattern = ''; - actionSlice = actions.slice(0, i); - for (j in actionSlice) { - pattern += self._getNargsPattern(actionSlice[j]); - } - - pattern = new RegExp('^' + pattern); - matches = regexpArgStrings.match(pattern); - - if (matches && matches.length > 0) { - // need only groups - matches = matches.splice(1); - result = result.concat(matches.map(getLength)); - break; - } - } - - // return the list of arg string counts - return result; -}; - -ArgumentParser.prototype._parseOptional = function (argString) { - var action, optionString, argExplicit, optionTuples; - - // if it's an empty string, it was meant to be a positional - if (!argString) { - return null; - } - - // if it doesn't start with a prefix, it was meant to be positional - if (this.prefixChars.indexOf(argString[0]) < 0) { - return null; - } - - // if the option string is present in the parser, return the action - if (!!this._optionStringActions[argString]) { - return [this._optionStringActions[argString], argString, null]; - } - - // if it's just a single character, it was meant to be positional - if (argString.length === 1) { - return null; - } - - // if the option string before the "=" is present, return the action - if (argString.indexOf('=') >= 0) { - var argStringSplit = argString.split('='); - optionString = argStringSplit[0]; - argExplicit = argStringSplit[1]; - - if (!!this._optionStringActions[optionString]) { - action = this._optionStringActions[optionString]; - return [action, optionString, argExplicit]; - } - } - - // search through all possible prefixes of the option string - // and all actions in the parser for possible interpretations - optionTuples = this._getOptionTuples(argString); - - // if multiple actions match, the option string was ambiguous - if (optionTuples.length > 1) { - var optionStrings = optionTuples.map(function (optionTuple) { - return optionTuple[1]; - }); - this.error(format( - 'Ambiguous option: "%s" could match %s.', - argString, optionStrings.join(', ') - )); - // if exactly one action matched, this segmentation is good, - // so return the parsed action - } else if (optionTuples.length === 1) { - return optionTuples[0]; - } - - // if it was not found as an option, but it looks like a negative - // number, it was meant to be positional - // unless there are negative-number-like options - if (argString.match(this._regexpNegativeNumber)) { - if (!_.any(this._hasNegativeNumberOptionals)) { - return null; - } - } - // if it contains a space, it was meant to be a positional - if (argString.search(' ') >= 0) { - return null; - } - - // it was meant to be an optional but there is no such option - // in this parser (though it might be a valid option in a subparser) - return [null, argString, null]; -}; - -ArgumentParser.prototype._getOptionTuples = function (optionString) { - var result = []; - var chars = this.prefixChars; - var optionPrefix; - var argExplicit; - var action; - var actionOptionString; - - // option strings starting with two prefix characters are only split at - // the '=' - if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) >= 0) { - if (optionString.indexOf('=') >= 0) { - var optionStringSplit = optionString.split('=', 1); - - optionPrefix = optionStringSplit[0]; - argExplicit = optionStringSplit[1]; - } else { - optionPrefix = optionString; - argExplicit = null; - } - - for (actionOptionString in this._optionStringActions) { - if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { - action = this._optionStringActions[actionOptionString]; - result.push([action, actionOptionString, argExplicit]); - } - } - - // single character options can be concatenated with their arguments - // but multiple character options always have to have their argument - // separate - } else if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) < 0) { - optionPrefix = optionString; - argExplicit = null; - var optionPrefixShort = optionString.substr(0, 2); - var argExplicitShort = optionString.substr(2); - - for (actionOptionString in this._optionStringActions) { - action = this._optionStringActions[actionOptionString]; - if (actionOptionString === optionPrefixShort) { - result.push([action, actionOptionString, argExplicitShort]); - } else if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { - result.push([action, actionOptionString, argExplicit]); - } - } - - // shouldn't ever get here - } else { - throw new Error(format('Unexpected option string: %s.', optionString)); - } - // return the collected option tuples - return result; -}; - -ArgumentParser.prototype._getNargsPattern = function (action) { - // in all examples below, we have to allow for '--' args - // which are represented as '-' in the pattern - var regexpNargs; - - switch (action.nargs) { - // the default (null) is assumed to be a single argument - case undefined: - case null: - regexpNargs = '(-*A-*)'; - break; - // allow zero or more arguments - case $$.OPTIONAL: - regexpNargs = '(-*A?-*)'; - break; - // allow zero or more arguments - case $$.ZERO_OR_MORE: - regexpNargs = '(-*[A-]*)'; - break; - // allow one or more arguments - case $$.ONE_OR_MORE: - regexpNargs = '(-*A[A-]*)'; - break; - // allow any number of options or arguments - case $$.REMAINDER: - regexpNargs = '([-AO]*)'; - break; - // allow one argument followed by any number of options or arguments - case $$.PARSER: - regexpNargs = '(-*A[-AO]*)'; - break; - // all others should be integers - default: - regexpNargs = '(-*' + _.str.repeat('-*A', action.nargs) + '-*)'; - } - - // if this is an optional action, -- is not allowed - if (action.isOptional()) { - regexpNargs = regexpNargs.replace(/-\*/g, ''); - regexpNargs = regexpNargs.replace(/-/g, ''); - } - - // return the pattern - return regexpNargs; -}; - -// -// Value conversion methods -// - -ArgumentParser.prototype._getValues = function (action, argStrings) { - var self = this; - - // for everything but PARSER args, strip out '--' - if (action.nargs !== $$.PARSER && action.nargs !== $$.REMAINDER) { - argStrings = argStrings.filter(function (arrayElement) { - return arrayElement !== '--'; - }); - } - - var value, argString; - - // optional argument produces a default when not present - if (argStrings.length === 0 && action.nargs === $$.OPTIONAL) { - - value = (action.isOptional()) ? action.constant: action.defaultValue; - - if (typeof(value) === 'string') { - value = this._getValue(action, value); - this._checkValue(action, value); - } - - // when nargs='*' on a positional, if there were no command-line - // args, use the default if it is anything other than None - } else if (argStrings.length === 0 && action.nargs === $$.ZERO_OR_MORE && - action.optionStrings.length === 0) { - - value = (action.defaultValue || argStrings); - this._checkValue(action, value); - - // single argument or optional argument produces a single value - } else if (argStrings.length === 1 && - (!action.nargs || action.nargs === $$.OPTIONAL)) { - - argString = argStrings[0]; - value = this._getValue(action, argString); - this._checkValue(action, value); - - // REMAINDER arguments convert all values, checking none - } else if (action.nargs === $$.REMAINDER) { - value = argStrings.map(function (v) { - return self._getValue(action, v); - }); - - // PARSER arguments convert all values, but check only the first - } else if (action.nargs === $$.PARSER) { - value = argStrings.map(function (v) { - return self._getValue(action, v); - }); - this._checkValue(action, value[0]); - - // all other types of nargs produce a list - } else { - value = argStrings.map(function (v) { - return self._getValue(action, v); - }); - value.forEach(function (v) { - self._checkValue(action, v); - }); - } - - // return the converted value - return value; -}; - -ArgumentParser.prototype._getValue = function (action, argString) { - var result; - - var typeFunction = this._registryGet('type', action.type, action.type); - if (!_.isFunction(typeFunction)) { - var message = format('%s is not callable', typeFunction); - throw argumentErrorHelper(action, message); - } - - // convert the value to the appropriate type - try { - result = typeFunction(argString); - - // ArgumentTypeErrors indicate errors - // If action.type is not a registered string, it is a function - // Try to deduce its name for inclusion in the error message - // Failing that, include the error message it raised. - } catch (e) { - var name = null; - if (_.isString(action.type)) { - name = action.type; - } else { - name = action.type.name || action.type.displayName || ''; - } - var msg = format('Invalid %s value: %s', name, argString); - if (name === '') {msg += '\n' + e.message; } - throw argumentErrorHelper(action, msg); - } - // return the converted value - return result; -}; - -ArgumentParser.prototype._checkValue = function (action, value) { - // converted value must be one of the choices (if specified) - var choices = action.choices; - if (!!choices) { - // choise for argument can by array or string - if ((_.isString(choices) || _.isArray(choices)) && - choices.indexOf(value) !== -1) { - return; - } - // choise for subparsers can by only hash - if (_.isObject(choices) && !_.isArray(choices) && choices[value]) { - return; - } - - if (_.isString(choices)) { - choices = choices.split('').join(', '); - } - else if (_.isArray(choices)) { - choices = choices.join(', '); - } - else { - choices = _.keys(choices).join(', '); - } - var message = format('Invalid choice: %s (choose from [%s])', value, choices); - throw argumentErrorHelper(action, message); - } -}; - -// -// Help formatting methods -// - -/** - * ArgumentParser#formatUsage -> string - * - * Return usage string - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.formatUsage = function () { - var formatter = this._getFormatter(); - formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); - return formatter.formatHelp(); -}; - -/** - * ArgumentParser#formatHelp -> string - * - * Return help - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.formatHelp = function () { - var formatter = this._getFormatter(); - - // usage - formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); - - // description - formatter.addText(this.description); - - // positionals, optionals and user-defined groups - this._actionGroups.forEach(function (actionGroup) { - formatter.startSection(actionGroup.title); - formatter.addText(actionGroup.description); - formatter.addArguments(actionGroup._groupActions); - formatter.endSection(); - }); - - // epilog - formatter.addText(this.epilog); - - // determine help from format above - return formatter.formatHelp(); -}; - -ArgumentParser.prototype._getFormatter = function () { - var FormatterClass = this.formatterClass; - var formatter = new FormatterClass({prog: this.prog}); - return formatter; -}; - -// -// Print functions -// - -/** - * ArgumentParser#printUsage() -> Void - * - * Print usage - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.printUsage = function () { - this._printMessage(this.formatUsage()); -}; - -/** - * ArgumentParser#printHelp() -> Void - * - * Print help - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#printing-help - **/ -ArgumentParser.prototype.printHelp = function () { - this._printMessage(this.formatHelp()); -}; - -ArgumentParser.prototype._printMessage = function (message, stream) { - if (!stream) { - stream = process.stdout; - } - if (message) { - stream.write('' + message); - } -}; - -// -// Exit functions -// - -/** - * ArgumentParser#exit(status=0, message) -> Void - * - status (int): exit status - * - message (string): message - * - * Print message in stderr/stdout and exit program - **/ -ArgumentParser.prototype.exit = function (status, message) { - if (!!message) { - if (status === 0) { - this._printMessage(message); - } - else { - this._printMessage(message, process.stderr); - } - } - - process.exit(status); -}; - -/** - * ArgumentParser#error(message) -> Void - * - err (Error|string): message - * - * Error method Prints a usage message incorporating the message to stderr and - * exits. If you override this in a subclass, - * it should not return -- it should - * either exit or throw an exception. - * - **/ -ArgumentParser.prototype.error = function (err) { - var message; - if (err instanceof Error) { - if (this.debug === true) { - throw err; - } - message = err.message; - } - else { - message = err; - } - var msg = format('%s: error: %s', this.prog, message) + $$.EOL; - - if (this.debug === true) { - throw new Error(msg); - } - - this.printUsage(process.stderr); - - return this.exit(2, msg); -}; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/const.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/const.js deleted file mode 100644 index de831ba..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/const.js +++ /dev/null @@ -1,18 +0,0 @@ -// -// Constants -// -module.exports.EOL = '\n'; - -module.exports.SUPPRESS = '==SUPPRESS=='; - -module.exports.OPTIONAL = '?'; - -module.exports.ZERO_OR_MORE = '*'; - -module.exports.ONE_OR_MORE = '+'; - -module.exports.PARSER = 'A...'; - -module.exports.REMAINDER = '...'; - -module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/help/added_formatters.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/help/added_formatters.js deleted file mode 100644 index cd2f369..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/help/added_formatters.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -var util = require('util'); -var _ = require('underscore'); -_.str = require('underscore.string'); - -// Constants -var $$ = require('../const'); - -var HelpFormatter = require('./formatter.js'); - -/** - * new RawDescriptionHelpFormatter(options) - * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) - * - * Help message formatter which adds default values to argument help. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - **/ - -var ArgumentDefaultsHelpFormatter = function ArgumentDefaultsHelpFormatter(options) { - HelpFormatter.call(this, options); -}; - -util.inherits(ArgumentDefaultsHelpFormatter, HelpFormatter); - -ArgumentDefaultsHelpFormatter.prototype._getHelpString = function (action) { - var help = action.help; - if (action.help.indexOf('%(defaultValue)s') === -1) { - if (action.defaultValue !== $$.SUPPRESS) { - var defaulting_nargs = [$$.OPTIONAL, $$.ZERO_OR_MORE]; - if (action.isOptional() || (defaulting_nargs.indexOf(action.nargs) >= 0)) { - help += ' (default: %(defaultValue)s)'; - } - } - } - return help; -}; - -module.exports.ArgumentDefaultsHelpFormatter = ArgumentDefaultsHelpFormatter; - -/** - * new RawDescriptionHelpFormatter(options) - * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) - * - * Help message formatter which retains any formatting in descriptions. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - **/ - -var RawDescriptionHelpFormatter = function RawDescriptionHelpFormatter(options) { - HelpFormatter.call(this, options); -}; - -util.inherits(RawDescriptionHelpFormatter, HelpFormatter); - -RawDescriptionHelpFormatter.prototype._fillText = function (text, width, indent) { - var lines = text.split('\n'); - lines = lines.map(function (line) { - return _.str.rtrim(indent + line); - }); - return lines.join('\n'); -}; -module.exports.RawDescriptionHelpFormatter = RawDescriptionHelpFormatter; - -/** - * new RawTextHelpFormatter(options) - * new ArgumentParser({formatterClass: argparse.RawTextHelpFormatter, ...}) - * - * Help message formatter which retains formatting of all help text. - * - * Only the name of this class is considered a public API. All the methods - * provided by the class are considered an implementation detail. - **/ - -var RawTextHelpFormatter = function RawTextHelpFormatter(options) { - RawDescriptionHelpFormatter.call(this, options); -}; - -util.inherits(RawTextHelpFormatter, RawDescriptionHelpFormatter); - -RawTextHelpFormatter.prototype._splitLines = function (text) { - return text.split('\n'); -}; - -module.exports.RawTextHelpFormatter = RawTextHelpFormatter; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/help/formatter.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/help/formatter.js deleted file mode 100644 index 541d918..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/help/formatter.js +++ /dev/null @@ -1,803 +0,0 @@ -/** - * class HelpFormatter - * - * Formatter for generating usage messages and argument help strings. Only the - * name of this class is considered a public API. All the methods provided by - * the class are considered an implementation detail. - * - * Do not call in your code, use this class only for inherits your own forvatter - * - * ToDo add [additonal formatters][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#formatter-class - **/ -'use strict'; - -var _ = require('underscore'); -_.str = require('underscore.string'); - -// Constants -var $$ = require('../const'); - - -/*:nodoc:* internal - * new Support(parent, heding) - * - parent (object): parent section - * - heading (string): header string - * - **/ -function Section(parent, heading) { - this._parent = parent; - this._heading = heading; - this._items = []; -} - -/*:nodoc:* internal - * Section#addItem(callback) -> Void - * - callback (array): tuple with function and args - * - * Add function for single element - **/ -Section.prototype.addItem = function (callback) { - this._items.push(callback); -}; - -/*:nodoc:* internal - * Section#formatHelp(formatter) -> string - * - formatter (HelpFormatter): current formatter - * - * Form help section string - * - **/ -Section.prototype.formatHelp = function (formatter) { - var itemHelp, heading; - - // format the indented section - if (!!this._parent) { - formatter._indent(); - } - - itemHelp = this._items.map(function (item) { - var obj, func, args; - - obj = formatter; - func = item[0]; - args = item[1]; - return func.apply(obj, args); - }); - itemHelp = formatter._joinParts(itemHelp); - - if (!!this._parent) { - formatter._dedent(); - } - - // return nothing if the section was empty - if (!itemHelp) { - return ''; - } - - // add the heading if the section was non-empty - heading = ''; - if (!!this._heading && this._heading !== $$.SUPPRESS) { - var currentIndent = formatter.currentIndent; - heading = _.str.repeat(' ', currentIndent) + this._heading + ':' + $$.EOL; - } - - // join the section-initialize newline, the heading and the help - return formatter._joinParts([$$.EOL, heading, itemHelp, $$.EOL]); -}; - -/** - * new HelpFormatter(options) - * - * #### Options: - * - `prog`: program name - * - `indentIncriment`: indent step, default value 2 - * - `maxHelpPosition`: max help position, default value = 24 - * - `width`: line width - * - **/ -var HelpFormatter = module.exports = function HelpFormatter(options) { - options = options || {}; - - this._prog = options.prog; - - this._maxHelpPosition = options.maxHelpPosition || 24; - this._width = (options.width || ((process.env.COLUMNS || 80) - 2)); - - this._currentIndent = 0; - this._indentIncriment = options.indentIncriment || 2; - this._level = 0; - this._actionMaxLength = 0; - - this._rootSection = new Section(null); - this._currentSection = this._rootSection; - - this._whitespaceMatcher = new RegExp('\\s+', 'g'); - this._longBreakMatcher = new RegExp($$.EOL + $$.EOL + $$.EOL + '+', 'g'); -}; - -HelpFormatter.prototype._indent = function () { - this._currentIndent += this._indentIncriment; - this._level += 1; -}; - -HelpFormatter.prototype._dedent = function () { - this._currentIndent -= this._indentIncriment; - this._level -= 1; - if (this._currentIndent < 0) { - throw new Error('Indent decreased below 0.'); - } -}; - -HelpFormatter.prototype._addItem = function (func, args) { - this._currentSection.addItem([func, args]); -}; - -// -// Message building methods -// - -/** - * HelpFormatter#startSection(heading) -> Void - * - heading (string): header string - * - * Start new help section - * - * See alse [code example][1] - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - * - **/ -HelpFormatter.prototype.startSection = function (heading) { - this._indent(); - var section = new Section(this._currentSection, heading); - var func = section.formatHelp.bind(section); - this._addItem(func, [this]); - this._currentSection = section; -}; - -/** - * HelpFormatter#endSection -> Void - * - * End help section - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - **/ -HelpFormatter.prototype.endSection = function () { - this._currentSection = this._currentSection._parent; - this._dedent(); -}; - -/** - * HelpFormatter#addText(text) -> Void - * - text (string): plain text - * - * Add plain text into current section - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - * - **/ -HelpFormatter.prototype.addText = function (text) { - if (!!text && text !== $$.SUPPRESS) { - this._addItem(this._formatText, [text]); - } -}; - -/** - * HelpFormatter#addUsage(usage, actions, groups, prefix) -> Void - * - usage (string): usage text - * - actions (array): actions list - * - groups (array): groups list - * - prefix (string): usage prefix - * - * Add usage data into current section - * - * ##### Example - * - * formatter.addUsage(this.usage, this._actions, []); - * return formatter.formatHelp(); - * - **/ -HelpFormatter.prototype.addUsage = function (usage, actions, groups, prefix) { - if (usage !== $$.SUPPRESS) { - this._addItem(this._formatUsage, [usage, actions, groups, prefix]); - } -}; - -/** - * HelpFormatter#addArgument(action) -> Void - * - action (object): action - * - * Add argument into current section - * - * Single variant of [[HelpFormatter#addArguments]] - **/ -HelpFormatter.prototype.addArgument = function (action) { - if (action.help !== $$.SUPPRESS) { - var self = this; - - // find all invocations - var invocations = [this._formatActionInvocation(action)]; - var invocationLength = invocations[0].length; - - var actionLength; - - if (!!action._getSubactions) { - this._indent(); - action._getSubactions().forEach(function (subaction) { - - var invocationNew = self._formatActionInvocation(subaction); - invocations.push(invocationNew); - invocationLength = Math.max(invocationLength, invocationNew.length); - - }); - this._dedent(); - } - - // update the maximum item length - actionLength = invocationLength + this._currentIndent; - this._actionMaxLength = Math.max(this._actionMaxLength, actionLength); - - // add the item to the list - this._addItem(this._formatAction, [action]); - } -}; - -/** - * HelpFormatter#addArguments(actions) -> Void - * - actions (array): actions list - * - * Mass add arguments into current section - * - * ##### Example - * - * formatter.startSection(actionGroup.title); - * formatter.addText(actionGroup.description); - * formatter.addArguments(actionGroup._groupActions); - * formatter.endSection(); - * - **/ -HelpFormatter.prototype.addArguments = function (actions) { - var self = this; - actions.forEach(function (action) { - self.addArgument(action); - }); -}; - -// -// Help-formatting methods -// - -/** - * HelpFormatter#formatHelp -> string - * - * Format help - * - * ##### Example - * - * formatter.addText(this.epilog); - * return formatter.formatHelp(); - * - **/ -HelpFormatter.prototype.formatHelp = function () { - var help = this._rootSection.formatHelp(this); - if (help) { - help = help.replace(this._longBreakMatcher, $$.EOL + $$.EOL); - help = _.str.strip(help, $$.EOL) + $$.EOL; - } - return help; -}; - -HelpFormatter.prototype._joinParts = function (partStrings) { - return partStrings.filter(function (part) { - return (!!part && part !== $$.SUPPRESS); - }).join(''); -}; - -HelpFormatter.prototype._formatUsage = function (usage, actions, groups, prefix) { - if (!prefix && !_.isString(prefix)) { - prefix = 'usage: '; - } - - actions = actions || []; - groups = groups || []; - - - // if usage is specified, use that - if (usage) { - usage = _.str.sprintf(usage, {prog: this._prog}); - - // if no optionals or positionals are available, usage is just prog - } else if (!usage && actions.length === 0) { - usage = this._prog; - - // if optionals and positionals are available, calculate usage - } else if (!usage) { - var prog = this._prog; - var optionals = []; - var positionals = []; - var actionUsage; - var textWidth; - - // split optionals from positionals - actions.forEach(function (action) { - if (action.isOptional()) { - optionals.push(action); - } else { - positionals.push(action); - } - }); - - // build full usage string - actionUsage = this._formatActionsUsage([].concat(optionals, positionals), groups); - usage = [prog, actionUsage].join(' '); - - // wrap the usage parts if it's too long - textWidth = this._width - this._currentIndent; - if ((prefix.length + usage.length) > textWidth) { - - // break usage into wrappable parts - var regexpPart = new RegExp('\\(.*?\\)+|\\[.*?\\]+|\\S+', 'g'); - var optionalUsage = this._formatActionsUsage(optionals, groups); - var positionalUsage = this._formatActionsUsage(positionals, groups); - - - var optionalParts = optionalUsage.match(regexpPart); - var positionalParts = positionalUsage.match(regexpPart) || []; - - if (optionalParts.join(' ') !== optionalUsage) { - throw new Error('assert "optionalParts.join(\' \') === optionalUsage"'); - } - if (positionalParts.join(' ') !== positionalUsage) { - throw new Error('assert "positionalParts.join(\' \') === positionalUsage"'); - } - - // helper for wrapping lines - var _getLines = function (parts, indent, prefix) { - var lines = []; - var line = []; - - var lineLength = !!prefix ? prefix.length - 1: indent.length - 1; - - parts.forEach(function (part) { - if (lineLength + 1 + part.length > textWidth) { - lines.push(indent + line.join(' ')); - line = []; - lineLength = indent.length - 1; - } - line.push(part); - lineLength += part.length + 1; - }); - - if (line) { - lines.push(indent + line.join(' ')); - } - if (prefix) { - lines[0] = lines[0].substr(indent.length); - } - return lines; - }; - - var lines, indent, parts; - // if prog is short, follow it with optionals or positionals - if (prefix.length + prog.length <= 0.75 * textWidth) { - indent = _.str.repeat(' ', (prefix.length + prog.length + 1)); - if (optionalParts) { - lines = [].concat( - _getLines([prog].concat(optionalParts), indent, prefix), - _getLines(positionalParts, indent) - ); - } else if (positionalParts) { - lines = _getLines([prog].concat(positionalParts), indent, prefix); - } else { - lines = [prog]; - } - - // if prog is long, put it on its own line - } else { - indent = _.str.repeat(' ', prefix.length); - parts = optionalParts + positionalParts; - lines = _getLines(parts, indent); - if (lines.length > 1) { - lines = [].concat( - _getLines(optionalParts, indent), - _getLines(positionalParts, indent) - ); - } - lines = [prog] + lines; - } - // join lines into usage - usage = lines.join($$.EOL); - } - } - - // prefix with 'usage:' - return prefix + usage + $$.EOL + $$.EOL; -}; - -HelpFormatter.prototype._formatActionsUsage = function (actions, groups) { - // find group indices and identify actions in groups - var groupActions = []; - var inserts = []; - var self = this; - - groups.forEach(function (group) { - var end; - var i; - - var start = actions.indexOf(group._groupActions[0]); - if (start >= 0) { - end = start + group._groupActions.length; - - //if (actions.slice(start, end) === group._groupActions) { - if (_.isEqual(actions.slice(start, end), group._groupActions)) { - group._groupActions.forEach(function (action) { - groupActions.push(action); - }); - - if (!group.required) { - if (!!inserts[start]) { - inserts[start] += ' ['; - } - else { - inserts[start] = '['; - } - inserts[end] = ']'; - } else { - if (!!inserts[start]) { - inserts[start] += ' ('; - } - else { - inserts[start] = '('; - } - inserts[end] = ')'; - } - for (i = start + 1; i < end; i += 1) { - inserts[i] = '|'; - } - } - } - }); - - // collect all actions format strings - var parts = []; - - actions.forEach(function (action, actionIndex) { - var part; - var optionString; - var argsDefault; - var argsString; - - // suppressed arguments are marked with None - // remove | separators for suppressed arguments - if (action.help === $$.SUPPRESS) { - parts.push(null); - if (inserts[actionIndex] === '|') { - inserts.splice(actionIndex, actionIndex); - } else if (inserts[actionIndex + 1] === '|') { - inserts.splice(actionIndex + 1, actionIndex + 1); - } - - // produce all arg strings - } else if (!action.isOptional()) { - part = self._formatArgs(action, action.dest); - - // if it's in a group, strip the outer [] - if (groupActions.indexOf(action) >= 0) { - if (part[0] === '[' && part[part.length - 1] === ']') { - part = part.slice(1, -1); - } - } - // add the action string to the list - parts.push(part); - - // produce the first way to invoke the option in brackets - } else { - optionString = action.optionStrings[0]; - - // if the Optional doesn't take a value, format is: -s or --long - if (action.nargs === 0) { - part = '' + optionString; - - // if the Optional takes a value, format is: -s ARGS or --long ARGS - } else { - argsDefault = action.dest.toUpperCase(); - argsString = self._formatArgs(action, argsDefault); - part = optionString + ' ' + argsString; - } - // make it look optional if it's not required or in a group - if (!action.required && groupActions.indexOf(action) < 0) { - part = '[' + part + ']'; - } - // add the action string to the list - parts.push(part); - } - }); - - // insert things at the necessary indices - for (var i = inserts.length - 1; i >= 0; --i) { - if (inserts[i] !== null) { - parts.splice(i, 0, inserts[i]); - } - } - - // join all the action items with spaces - var text = parts.filter(function (part) { - return !!part; - }).join(' '); - - // clean up separators for mutually exclusive groups - text = text.replace(/([\[(]) /g, '$1'); // remove spaces - text = text.replace(/ ([\])])/g, '$1'); - text = text.replace(/\[ *\]/g, ''); // remove empty groups - text = text.replace(/\( *\)/g, ''); - text = text.replace(/\(([^|]*)\)/g, '$1'); // remove () from single action groups - - text = _.str.strip(text); - - // return the text - return text; -}; - -HelpFormatter.prototype._formatText = function (text) { - text = _.str.sprintf(text, {prog: this._prog}); - var textWidth = this._width - this._currentIndent; - var indentIncriment = _.str.repeat(' ', this._currentIndent); - return this._fillText(text, textWidth, indentIncriment) + $$.EOL + $$.EOL; -}; - -HelpFormatter.prototype._formatAction = function (action) { - var self = this; - - var helpText; - var helpLines; - var parts; - var indentFirst; - - // determine the required width and the entry label - var helpPosition = Math.min(this._actionMaxLength + 2, this._maxHelpPosition); - var helpWidth = this._width - helpPosition; - var actionWidth = helpPosition - this._currentIndent - 2; - var actionHeader = this._formatActionInvocation(action); - - // no help; start on same line and add a final newline - if (!action.help) { - actionHeader = _.str.repeat(' ', this._currentIndent) + actionHeader + $$.EOL; - - // short action name; start on the same line and pad two spaces - } else if (actionHeader.length <= actionWidth) { - actionHeader = _.str.repeat(' ', this._currentIndent) + - actionHeader + - ' ' + - _.str.repeat(' ', actionWidth - actionHeader.length); - indentFirst = 0; - - // long action name; start on the next line - } else { - actionHeader = _.str.repeat(' ', this._currentIndent) + actionHeader + $$.EOL; - indentFirst = helpPosition; - } - - // collect the pieces of the action help - parts = [actionHeader]; - - // if there was help for the action, add lines of help text - if (!!action.help) { - helpText = this._expandHelp(action); - helpLines = this._splitLines(helpText, helpWidth); - parts.push(_.str.repeat(' ', indentFirst) + helpLines[0] + $$.EOL); - helpLines.slice(1).forEach(function (line) { - parts.push(_.str.repeat(' ', helpPosition) + line + $$.EOL); - }); - - // or add a newline if the description doesn't end with one - } else if (actionHeader.charAt(actionHeader.length - 1) !== $$.EOL) { - parts.push($$.EOL); - } - // if there are any sub-actions, add their help as well - if (!!action._getSubactions) { - this._indent(); - action._getSubactions().forEach(function (subaction) { - parts.push(self._formatAction(subaction)); - }); - this._dedent(); - } - // return a single string - return this._joinParts(parts); -}; - -HelpFormatter.prototype._formatActionInvocation = function (action) { - if (!action.isOptional()) { - var format_func = this._metavarFormatter(action, action.dest); - var metavars = format_func(1); - return metavars[0]; - } else { - var parts = []; - var argsDefault; - var argsString; - - // if the Optional doesn't take a value, format is: -s, --long - if (action.nargs === 0) { - parts = parts.concat(action.optionStrings); - - // if the Optional takes a value, format is: -s ARGS, --long ARGS - } else { - argsDefault = action.dest.toUpperCase(); - argsString = this._formatArgs(action, argsDefault); - action.optionStrings.forEach(function (optionString) { - parts.push(optionString + ' ' + argsString); - }); - } - return parts.join(', '); - } -}; - -HelpFormatter.prototype._metavarFormatter = function (action, metavarDefault) { - var result; - - if (!!action.metavar || action.metavar === '') { - result = action.metavar; - } else if (!!action.choices) { - var choices = action.choices; - - if (_.isString(choices)) { - choices = choices.split('').join(', '); - } else if (_.isArray(choices)) { - choices = choices.join(','); - } - else - { - choices = _.keys(choices).join(','); - } - result = '{' + choices + '}'; - } else { - result = metavarDefault; - } - - return function (size) { - if (Array.isArray(result)) { - return result; - } else { - var metavars = []; - for (var i = 0; i < size; i += 1) { - metavars.push(result); - } - return metavars; - } - }; -}; - -HelpFormatter.prototype._formatArgs = function (action, metavarDefault) { - var result; - var metavars; - - var buildMetavar = this._metavarFormatter(action, metavarDefault); - - switch (action.nargs) { - case undefined: - case null: - metavars = buildMetavar(1); - result = '' + metavars[0]; - break; - case $$.OPTIONAL: - metavars = buildMetavar(1); - result = '[' + metavars[0] + ']'; - break; - case $$.ZERO_OR_MORE: - metavars = buildMetavar(2); - result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]'; - break; - case $$.ONE_OR_MORE: - metavars = buildMetavar(2); - result = '' + metavars[0] + ' [' + metavars[1] + ' ...]'; - break; - case $$.REMAINDER: - result = '...'; - break; - case $$.PARSER: - metavars = buildMetavar(1); - result = metavars[0] + ' ...'; - break; - default: - metavars = buildMetavar(action.nargs); - result = metavars.join(' '); - } - return result; -}; - -HelpFormatter.prototype._expandHelp = function (action) { - var actionProperty; - var actionValue; - - var params = {prog: this._prog}; - - for (actionProperty in action) { - if (action.hasOwnProperty(actionProperty)) { - actionValue = action[actionProperty]; - - if (actionValue !== $$.SUPPRESS) { - params[actionProperty] = actionValue; - } - } - } - - if (!!params.choices) { - if (_.isString(params.choices)) { - params.choices = params.choices.split('').join(', '); - } - else if (_.isArray(params.choices)) { - params.choices = params.choices.join(', '); - } - else { - params.choices = _.keys(params.choices).join(', '); - } - } - - return _.str.sprintf(this._getHelpString(action), params); -}; - -HelpFormatter.prototype._splitLines = function (text, width) { - var lines = []; - var delimiters = [" ", ".", ",", "!", "?"]; - var re = new RegExp('[' + delimiters.join('') + '][^' + delimiters.join('') + ']*$'); - - text = text.replace(/[\n\|\t]/g, ' '); - - text = _.str.strip(text); - text = text.replace(this._whitespaceMatcher, ' '); - - // Wraps the single paragraph in text (a string) so every line - // is at most width characters long. - text.split($$.EOL).forEach(function (line) { - if (width >= line.length) { - lines.push(line); - return; - } - - var wrapStart = 0; - var wrapEnd = width; - var delimiterIndex = 0; - while (wrapEnd <= line.length) { - if (wrapEnd !== line.length && delimiters.indexOf(line[wrapEnd] < -1)) { - delimiterIndex = (re.exec(line.substring(wrapStart, wrapEnd)) || {}).index; - wrapEnd = wrapStart + delimiterIndex + 1; - } - lines.push(line.substring(wrapStart, wrapEnd)); - wrapStart = wrapEnd; - wrapEnd += width; - } - if (wrapStart < line.length) { - lines.push(line.substring(wrapStart, wrapEnd)); - } - }); - - return lines; -}; - -HelpFormatter.prototype._fillText = function (text, width, indent) { - var lines = this._splitLines(text, width); - lines = lines.map(function (line) { - return indent + line; - }); - return lines.join($$.EOL); -}; - -HelpFormatter.prototype._getHelpString = function (action) { - return action.help; -}; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/lib/namespace.js b/support/process/node_modules/yamljs/node_modules/argparse/lib/namespace.js deleted file mode 100644 index 3546f2d..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/lib/namespace.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * class Namespace - * - * Simple object for storing attributes. Implements equality by attribute names - * and values, and provides a simple string representation. - * - * See also [original guide][1] - * - * [1]:http://docs.python.org/dev/library/argparse.html#the-namespace-object - **/ -'use strict'; - -var _ = require('underscore'); - -/** - * new Namespace(options) - * - options(object): predefined propertis for result object - * - **/ -var Namespace = module.exports = function Namespace(options) { - _.extend(this, options); -}; - -/** - * Namespace#isset(key) -> Boolean - * - key (string|number): property name - * - * Tells whenever `namespace` contains given `key` or not. - **/ -Namespace.prototype.isset = function (key) { - return _.has(this, key); -}; - -/** - * Namespace#set(key, value) -> self - * -key (string|number|object): propery name - * -value (mixed): new property value - * - * Set the property named key with value. - * If key object then set all key properties to namespace object - **/ -Namespace.prototype.set = function (key, value) { - if (typeof (key) === 'object') { - _.extend(this, key); - } else { - this[key] = value; - } - return this; -}; - -/** - * Namespace#get(key, defaultValue) -> mixed - * - key (string|number): property name - * - defaultValue (mixed): default value - * - * Return the property key or defaulValue if not set - **/ -Namespace.prototype.get = function (key, defaultValue) { - return !this[key] ? defaultValue: this[key]; -}; - -/** - * Namespace#unset(key, defaultValue) -> mixed - * - key (string|number): property name - * - defaultValue (mixed): default value - * - * Return data[key](and delete it) or defaultValue - **/ -Namespace.prototype.unset = function (key, defaultValue) { - var value = this[key]; - if (value !== null) { - delete this[key]; - return value; - } else { - return defaultValue; - } -}; diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/.travis.yml b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/.travis.yml deleted file mode 100644 index ab27b29..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: ruby -rvm: - - 1.9.3 - -before_script: - - "export DISPLAY=:99.0" - - "sh -e /etc/init.d/xvfb start" - - sleep 2 \ No newline at end of file diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/Gemfile b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/Gemfile deleted file mode 100644 index 8ebff7e..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/Gemfile +++ /dev/null @@ -1,4 +0,0 @@ -source :rubygems - -gem 'uglifier' -gem 'rake' \ No newline at end of file diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/Gemfile.lock b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/Gemfile.lock deleted file mode 100644 index c41e4a7..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/Gemfile.lock +++ /dev/null @@ -1,17 +0,0 @@ -GEM - remote: http://rubygems.org/ - specs: - execjs (1.4.0) - multi_json (~> 1.0) - multi_json (1.3.6) - rake (0.9.2.2) - uglifier (1.3.0) - execjs (>= 0.3.0) - multi_json (~> 1.0, >= 1.0.2) - -PLATFORMS - ruby - -DEPENDENCIES - rake - uglifier diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/README.markdown b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/README.markdown deleted file mode 100644 index fc88498..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/README.markdown +++ /dev/null @@ -1,744 +0,0 @@ -# Underscore.string [![Build Status](https://secure.travis-ci.org/epeli/underscore.string.png?branch=master)](http://travis-ci.org/epeli/underscore.string) # - - - -Javascript lacks complete string manipulation operations. -This an attempt to fill that gap. List of build-in methods can be found -for example from [Dive Into JavaScript][d]. - -[d]: http://www.diveintojavascript.com/core-javascript-reference/the-string-object - - -As name states this an extension for [Underscore.js][u], but it can be used -independently from **_s**-global variable. But with Underscore.js you can -use Object-Oriented style and chaining: - -[u]: http://documentcloud.github.com/underscore/ - -```javascript -_(" epeli ").chain().trim().capitalize().value() -=> "Epeli" -``` - -## Download ## - - * [Development version](https://raw.github.com/epeli/underscore.string/master/lib/underscore.string.js) *Uncompressed with Comments 18kb* - * [Production version](https://github.com/epeli/underscore.string/raw/master/dist/underscore.string.min.js) *Minified 7kb* - - -## Node.js installation ## - -**npm package** - - npm install underscore.string - -**Standalone usage**: - -```javascript -var _s = require('underscore.string'); -``` - -**Integrate with Underscore.js**: - -```javascript -var _ = require('underscore'); - -// Import Underscore.string to separate object, because there are conflict functions (include, reverse, contains) -_.str = require('underscore.string'); - -// Mix in non-conflict functions to Underscore namespace if you want -_.mixin(_.str.exports()); - -// All functions, include conflict, will be available through _.str object -_.str.include('Underscore.string', 'string'); // => true -``` - -## String Functions ## - -For availability of functions in this way you need to mix in Underscore.string functions: - -```javascript -_.mixin(_.string.exports()); -``` - -otherwise functions from examples will be available through _.string or _.str objects: - -```javascript -_.str.capitalize('epeli') -=> "Epeli" -``` - -**numberFormat** _.numberFormat(number, [ decimals=0, decimalSeparator='.', orderSeparator=',']) - -Formats the numbers. - -```javascript -_.numberFormat(1000, 2) -=> "1,000.00" - -_.numberFormat(123456789.123, 5, '.', ',') -=> "123,456,789.12300" -``` - - -**levenshtein** _.levenshtein(string1, string2) - -Calculates [Levenshtein distance][ld] between two strings. -[ld]: http://en.wikipedia.org/wiki/Levenshtein_distance - -```javascript -_.levenshtein('kitten', 'kittah') -=> 2 -``` - -**capitalize** _.capitalize(string) - -Converts first letter of the string to uppercase. - -```javascript -_.capitalize("foo Bar") -=> "Foo Bar" -``` - -**chop** _.chop(string, step) - -```javascript -_.chop('whitespace', 3) -=> ['whi','tes','pac','e'] -``` - -**clean** _.clean(str) - -Compress some whitespaces to one. - -```javascript -_.clean(" foo bar ") -=> 'foo bar' -``` - -**chars** _.chars(str) - -```javascript -_.chars('Hello') -=> ['H','e','l','l','o'] -``` - -**swapCase** _.swapCase(str) - -Returns a copy of the string in which all the case-based characters have had their case swapped. - -```javascript -_.swapCase('hELLO') -=> 'Hello' -``` - -**include** available only through _.str object, because Underscore has function with the same name. - -```javascript -_.str.include("foobar", "ob") -=> true -``` - -(removed) **includes** _.includes(string, substring) - -Tests if string contains a substring. - -```javascript -_.includes("foobar", "ob") -=> true -``` - -**includes** function was removed - -But you can create it in this way, for compatibility with previous versions: - -```javascript -_.includes = _.str.include -``` - -**count** _.count(string, substring) - -```javascript -_('Hello world').count('l') -=> 3 -``` - -**escapeHTML** _.escapeHTML(string) - -Converts HTML special characters to their entity equivalents. - -```javascript -_('
Blah blah blah
').escapeHTML(); -=> '<div>Blah blah blah</div>' -``` - -**unescapeHTML** _.unescapeHTML(string) - -Converts entity characters to HTML equivalents. - -```javascript -_('<div>Blah blah blah</div>').unescapeHTML(); -=> '
Blah blah blah
' -``` - -**insert** _.insert(string, index, substing) - -```javascript -_('Hello ').insert(6, 'world') -=> 'Hello world' -``` - -**isBlank** _.isBlank(string) - -```javascript -_('').isBlank(); // => true -_('\n').isBlank(); // => true -_(' ').isBlank(); // => true -_('a').isBlank(); // => false -``` - -**join** _.join(separator, *strings) - -Joins strings together with given separator - -```javascript -_.join(" ", "foo", "bar") -=> "foo bar" -``` - -**lines** _.lines(str) - -```javascript -_.lines("Hello\nWorld") -=> ["Hello", "World"] -``` - -**reverse** available only through _.str object, because Underscore has function with the same name. - -Return reversed string: - -```javascript -_.str.reverse("foobar") -=> 'raboof' -``` - -**splice** _.splice(string, index, howmany, substring) - -Like a array splice. - -```javascript -_('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli') -=> 'https://edtsech@bitbucket.org/epeli/underscore.strings' -``` - -**startsWith** _.startsWith(string, starts) - -This method checks whether string starts with starts. - -```javascript -_("image.gif").startsWith("image") -=> true -``` - -**endsWith** _.endsWith(string, ends) - -This method checks whether string ends with ends. - -```javascript -_("image.gif").endsWith("gif") -=> true -``` - -**succ** _.succ(str) - -Returns the successor to str. - -```javascript -_('a').succ() -=> 'b' - -_('A').succ() -=> 'B' -``` - -**supplant** - -Supplant function was removed, use Underscore.js [template function][p]. - -[p]: http://documentcloud.github.com/underscore/#template - -**strip** alias for *trim* - -**lstrip** alias for *ltrim* - -**rstrip** alias for *rtrim* - -**titleize** _.titleize(string) - -```javascript -_('my name is epeli').titleize() -=> 'My Name Is Epeli' -``` - -**camelize** _.camelize(string) - -Converts underscored or dasherized string to a camelized one - -```javascript -_('-moz-transform').camelize() -=> 'MozTransform' -``` - -**classify** _.classify(string) - -Converts string to camelized class name - -```javascript -_('some_class_name').classify() -=> 'SomeClassName' -``` - -**underscored** _.underscored(string) - -Converts a camelized or dasherized string into an underscored one - -```javascript -_('MozTransform').underscored() -=> 'moz_transform' -``` - -**dasherize** _.dasherize(string) - -Converts a underscored or camelized string into an dasherized one - -```javascript -_('MozTransform').dasherize() -=> '-moz-transform' -``` - -**humanize** _.humanize(string) - -Converts an underscored, camelized, or dasherized string into a humanized one. -Also removes beginning and ending whitespace, and removes the postfix '_id'. - -```javascript -_(' capitalize dash-CamelCase_underscore trim ').humanize() -=> 'Capitalize dash camel case underscore trim' -``` - -**trim** _.trim(string, [characters]) - -trims defined characters from begining and ending of the string. -Defaults to whitespace characters. - -```javascript -_.trim(" foobar ") -=> "foobar" - -_.trim("_-foobar-_", "_-") -=> "foobar" -``` - - -**ltrim** _.ltrim(string, [characters]) - -Left trim. Similar to trim, but only for left side. - - -**rtrim** _.rtrim(string, [characters]) - -Right trim. Similar to trim, but only for right side. - -**truncate** _.truncate(string, length, truncateString) - -```javascript -_('Hello world').truncate(5) -=> 'Hello...' - -_('Hello').truncate(10) -=> 'Hello' -``` - -**prune** _.prune(string, length, pruneString) - -Elegant version of truncate. -Makes sure the pruned string does not exceed the original length. -Avoid half-chopped words when truncating. - -```javascript -_('Hello, world').prune(5) -=> 'Hello...' - -_('Hello, world').prune(8) -=> 'Hello...' - -_('Hello, world').prune(5, ' (read a lot more)') -=> 'Hello, world' (as adding "(read a lot more)" would be longer than the original string) - -_('Hello, cruel world').prune(15) -=> 'Hello, cruel...' - -_('Hello').prune(10) -=> 'Hello' -``` - -**words** _.words(str, delimiter=/\s+/) - -Split string by delimiter (String or RegExp), /\s+/ by default. - -```javascript -_.words(" I love you ") -=> ["I","love","you"] - -_.words("I_love_you", "_") -=> ["I","love","you"] - -_.words("I-love-you", /-/) -=> ["I","love","you"] - -_.words(" ") -=> [] -``` - -**sprintf** _.sprintf(string format, *arguments) - -C like string formatting. -Credits goes to [Alexandru Marasteanu][o]. -For more detailed documentation, see the [original page][o]. - -[o]: http://www.diveintojavascript.com/projects/sprintf-for-javascript - -```javascript -_.sprintf("%.1f", 1.17) -"1.2" -``` - -**pad** _.pad(str, length, [padStr, type]) - -pads the `str` with characters until the total string length is equal to the passed `length` parameter. By default, pads on the **left** with the space char (`" "`). `padStr` is truncated to a single character if necessary. - -```javascript -_.pad("1", 8) --> " 1"; - -_.pad("1", 8, '0') --> "00000001"; - -_.pad("1", 8, '0', 'right') --> "10000000"; - -_.pad("1", 8, '0', 'both') --> "00001000"; - -_.pad("1", 8, 'bleepblorp', 'both') --> "bbbb1bbb"; -``` - -**lpad** _.lpad(str, length, [padStr]) - -left-pad a string. Alias for `pad(str, length, padStr, 'left')` - -```javascript -_.lpad("1", 8, '0') --> "00000001"; -``` - -**rpad** _.rpad(str, length, [padStr]) - -right-pad a string. Alias for `pad(str, length, padStr, 'right')` - -```javascript -_.rpad("1", 8, '0') --> "10000000"; -``` - -**lrpad** _.lrpad(str, length, [padStr]) - -left/right-pad a string. Alias for `pad(str, length, padStr, 'both')` - -```javascript -_.lrpad("1", 8, '0') --> "00001000"; -``` - -**center** alias for **lrpad** - -**ljust** alias for *rpad* - -**rjust** alias for *lpad* - -**toNumber** _.toNumber(string, [decimals]) - -Parse string to number. Returns NaN if string can't be parsed to number. - -```javascript -_('2.556').toNumber() -=> 3 - -_('2.556').toNumber(1) -=> 2.6 -``` - -**strRight** _.strRight(string, pattern) - -Searches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strRight('_') -=> "is_a_test_string"; -``` - -**strRightBack** _.strRightBack(string, pattern) - -Searches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strRightBack('_') -=> "string"; -``` - -**strLeft** _.strLeft(string, pattern) - -Searches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strLeft('_') -=> "This"; -``` - -**strLeftBack** _.strLeftBack(string, pattern) - -Searches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found. - -```javascript -_('This_is_a_test_string').strLeftBack('_') -=> "This_is_a_test"; -``` - -**stripTags** - -Removes all html tags from string. - -```javascript -_('a link').stripTags() -=> 'a link' - -_('a link').stripTags() -=> 'a linkalert("hello world!")' -``` - -**toSentence** _.toSentence(array, [delimiter, lastDelimiter]) - -Join an array into a human readable sentence. - -```javascript -_.toSentence(['jQuery', 'Mootools', 'Prototype']) -=> 'jQuery, Mootools and Prototype'; - -_.toSentence(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt ') -=> 'jQuery, Mootools unt Prototype'; -``` - -**toSentenceSerial** _.toSentenceSerial(array, [delimiter, lastDelimiter]) - -The same as `toSentence`, but adjusts delimeters to use [Serial comma](http://en.wikipedia.org/wiki/Serial_comma). - -```javascript -_.toSentenceSerial(['jQuery', 'Mootools']) -=> 'jQuery and Mootools'; - -_.toSentenceSerial(['jQuery', 'Mootools', 'Prototype']) -=> 'jQuery, Mootools, and Prototype' - -_.toSentenceSerial(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt '); -=> 'jQuery, Mootools, unt Prototype'; -``` - -**repeat** _.repeat(string, count, [separator]) - -Repeats a string count times. - -```javascript -_.repeat("foo", 3) -=> 'foofoofoo'; - -_.repeat("foo", 3, "bar") -=> 'foobarfoobarfoo' -``` - -**surround** _.surround(string, wrap) - -Surround a string with another string. - -```javascript -_.surround("foo", "ab") -=> 'abfooab'; -``` - -**quote** _.quote(string) or _.q(string) - -Quotes a string. - -```javascript -_.quote('foo') -=> '"foo"'; -``` - - -**slugify** _.slugify(string) - -Transform text into a URL slug. Replaces whitespaces, accentuated, and special characters with a dash. - -```javascript -_.slugify("Un éléphant à l'orée du bois") -=> 'un-elephant-a-loree-du-bois'; -``` - -***Caution: this function is charset dependent*** - -## Roadmap ## - -Any suggestions or bug reports are welcome. Just email me or more preferably open an issue. - -#### Problems - -We lose two things for `include` and `reverse` methods from `_.string`: - -* Calls like `_('foobar').include('bar')` aren't available; -* Chaining isn't available too. - -But if you need this functionality you can create aliases for conflict functions which will be convenient for you: - -```javascript -_.mixin({ - includeString: _.str.include, - reverseString: _.str.reverse -}) - -// Now wrapper calls and chaining are available. -_('foobar').chain().reverseString().includeString('rab').value() -``` - -#### Standalone Usage - -If you are using Underscore.string without Underscore. You also have `_.string` namespace for it and `_.str` alias -But of course you can just reassign `_` variable with `_.string` - -```javascript -_ = _.string -``` - -## Changelog ## - -### 2.3.1 ### - -* Changed integration logic, now trying everything in order -* Fixed classify method to chew some unexpected input -* Fixed toNumber method failing to recognize '0.0' as a proper number - - -### 2.3.0 ### - -* Added `numberformat` method -* Added `levenshtein` method (Levenshtein distance calculation) -* Added `swapCase` method -* Changed default behavior of `words` method -* Added `toSentenceSerial` method -* Added `surround` and `quote` methods - -### 2.2.0 ### - -* Capitalize method behavior changed -* Various perfomance tweaks - -### 2.1.1### - -* Fixed words method bug -* Added classify method - -### 2.1.0 ### - -* AMD support -* Added toSentence method -* Added slugify method -* Lots of speed optimizations - -### 2.0.0 ### - -* Added prune, humanize functions -* Added _.string (_.str) namespace for Underscore.string library -* Removed includes function - -For upgrading to this version you need to mix in Underscore.string library to Underscore object: - -```javascript -_.mixin(_.string.exports()); -``` - -and all non-conflict Underscore.string functions will be available through Underscore object. -Also function `includes` has been removed, you should replace this function by `_.str.include` -or create alias `_.includes = _.str.include` and all your code will work fine. - -### 1.1.6 ### - -* Fixed reverse and truncate -* Added isBlank, stripTags, inlude(alias for includes) -* Added uglifier compression - -### 1.1.5 ### - -* Added strRight, strRightBack, strLeft, strLeftBack - -### 1.1.4 ### - -* Added pad, lpad, rpad, lrpad methods and aliases center, ljust, rjust -* Integration with Underscore 1.1.6 - -### 1.1.3 ### - -* Added methods: underscored, camelize, dasherize -* Support newer version of npm - -### 1.1.2 ### - -* Created functions: lines, chars, words functions - -### 1.0.2 ### - -* Created integration test suite with underscore.js 1.1.4 (now it's absolutely compatible) -* Removed 'reverse' function, because this function override underscore.js 'reverse' - -## Contribute ## - -* Fork & pull request. Don't forget about tests. -* If you planning add some feature please create issue before. - -Otherwise changes will be rejected. - -## Contributors list ## -[Can be found here](https://github.com/epeli/underscore.string/graphs/contributors). - - -## Licence ## - -The MIT License - -Copyright (c) 2011 Esa-Matti Suuronen esa-matti@suuronen.org - -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. diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/Rakefile b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/Rakefile deleted file mode 100644 index 587c81b..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/Rakefile +++ /dev/null @@ -1,23 +0,0 @@ -# encoding: utf-8 -task default: :test - -desc 'Use UglifyJS to compress Underscore.string' -task :build do - require 'uglifier' - source = File.read('lib/underscore.string.js') - compressed = Uglifier.compile(source, copyright: false) - File.open('dist/underscore.string.min.js', 'w'){ |f| f.write compressed } - compression_rate = compressed.length.to_f/source.length - puts "compressed dist/underscore.string.min.js: #{compressed.length}/#{source.length} #{(compression_rate * 100).round}%" -end - -desc 'Run tests' -task :test do - puts "Running underscore.string test suite." - result1 = system %{phantomjs ./test/run-qunit.js "test/test.html"} - - puts "Running Underscore test suite." - result2 = system %{phantomjs ./test/run-qunit.js "test/test_underscore/index.html"} - - exit(result1 && result2 ? 0 : 1) -end \ No newline at end of file diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js deleted file mode 100644 index 3465543..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"use strict";var n=t.prototype.trim,r=t.prototype.trimRight,i=t.prototype.trimLeft,s=function(e){return e*1||0},o=function(e,t){if(t<1)return"";var n="";while(t>0)t&1&&(n+=e),t>>=1,e+=e;return n},u=[].slice,a=function(e){return e==null?"\\s":e.source?e.source:"["+p.escapeRegExp(e)+"]"},f={lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},l={};for(var c in f)l[f[c]]=c;l["'"]="#39";var h=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var n=o,r=function(){return r.cache.hasOwnProperty(arguments[0])||(r.cache[arguments[0]]=r.parse(arguments[0])),r.format.call(null,r.cache[arguments[0]],arguments)};return r.format=function(r,i){var s=1,o=r.length,u="",a,f=[],l,c,p,d,v,m;for(l=0;l=0?"+"+a:a,v=p[4]?p[4]=="0"?"0":p[4].charAt(1):" ",m=p[6]-t(a).length,d=p[6]?n(v,m):"",f.push(p[5]?a+d:d+a)}}return f.join("")},r.cache={},r.parse=function(e){var t=e,n=[],r=[],i=0;while(t){if((n=/^[^\x25]+/.exec(t))!==null)r.push(n[0]);else if((n=/^\x25{2}/.exec(t))!==null)r.push("%");else{if((n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t))===null)throw new Error("[_.sprintf] huh?");if(n[2]){i|=1;var s=[],o=n[2],u=[];if((u=/^([a-z_][a-z_\d]*)/i.exec(o))===null)throw new Error("[_.sprintf] huh?");s.push(u[1]);while((o=o.substring(u[0].length))!=="")if((u=/^\.([a-z_][a-z_\d]*)/i.exec(o))!==null)s.push(u[1]);else{if((u=/^\[(\d+)\]/.exec(o))===null)throw new Error("[_.sprintf] huh?");s.push(u[1])}n[2]=s}else i|=2;if(i===3)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");r.push(n)}t=t.substring(n[0].length)}return r},r}(),p={VERSION:"2.3.0",isBlank:function(e){return e==null&&(e=""),/^\s*$/.test(e)},stripTags:function(e){return e==null?"":t(e).replace(/<\/?[^>]+>/g,"")},capitalize:function(e){return e=e==null?"":t(e),e.charAt(0).toUpperCase()+e.slice(1)},chop:function(e,n){return e==null?[]:(e=t(e),n=~~n,n>0?e.match(new RegExp(".{1,"+n+"}","g")):[e])},clean:function(e){return p.strip(e).replace(/\s+/g," ")},count:function(e,n){if(e==null||n==null)return 0;e=t(e),n=t(n);var r=0,i=0,s=n.length;for(;;){i=e.indexOf(n,i);if(i===-1)break;r++,i+=s}return r},chars:function(e){return e==null?[]:t(e).split("")},swapCase:function(e){return e==null?"":t(e).replace(/\S/g,function(e){return e===e.toUpperCase()?e.toLowerCase():e.toUpperCase()})},escapeHTML:function(e){return e==null?"":t(e).replace(/[&<>"']/g,function(e){return"&"+l[e]+";"})},unescapeHTML:function(e){return e==null?"":t(e).replace(/\&([^;]+);/g,function(e,n){var r;return n in f?f[n]:(r=n.match(/^#x([\da-fA-F]+)$/))?t.fromCharCode(parseInt(r[1],16)):(r=n.match(/^#(\d+)$/))?t.fromCharCode(~~r[1]):e})},escapeRegExp:function(e){return e==null?"":t(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(e,t,n,r){var i=p.chars(e);return i.splice(~~t,~~n,r),i.join("")},insert:function(e,t,n){return p.splice(e,t,0,n)},include:function(e,n){return n===""?!0:e==null?!1:t(e).indexOf(n)!==-1},join:function(){var e=u.call(arguments),t=e.shift();return t==null&&(t=""),e.join(t)},lines:function(e){return e==null?[]:t(e).split("\n")},reverse:function(e){return p.chars(e).reverse().join("")},startsWith:function(e,n){return n===""?!0:e==null||n==null?!1:(e=t(e),n=t(n),e.length>=n.length&&e.slice(0,n.length)===n)},endsWith:function(e,n){return n===""?!0:e==null||n==null?!1:(e=t(e),n=t(n),e.length>=n.length&&e.slice(e.length-n.length)===n)},succ:function(e){return e==null?"":(e=t(e),e.slice(0,-1)+t.fromCharCode(e.charCodeAt(e.length-1)+1))},titleize:function(e){return e==null?"":t(e).replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()})},camelize:function(e){return p.trim(e).replace(/[-_\s]+(.)?/g,function(e,t){return t.toUpperCase()})},underscored:function(e){return p.trim(e).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(e){return p.trim(e).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(e){return p.titleize(t(e).replace(/_/g," ")).replace(/\s/g,"")},humanize:function(e){return p.capitalize(p.underscored(e).replace(/_id$/,"").replace(/_/g," "))},trim:function(e,r){return e==null?"":!r&&n?n.call(e):(r=a(r),t(e).replace(new RegExp("^"+r+"+|"+r+"+$","g"),""))},ltrim:function(e,n){return e==null?"":!n&&i?i.call(e):(n=a(n),t(e).replace(new RegExp("^"+n+"+"),""))},rtrim:function(e,n){return e==null?"":!n&&r?r.call(e):(n=a(n),t(e).replace(new RegExp(n+"+$"),""))},truncate:function(e,n,r){return e==null?"":(e=t(e),r=r||"...",n=~~n,e.length>n?e.slice(0,n)+r:e)},prune:function(e,n,r){if(e==null)return"";e=t(e),n=~~n,r=r!=null?t(r):"...";if(e.length<=n)return e;var i=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},s=e.slice(0,n+1).replace(/.(?=\W*\w*$)/g,i);return s.slice(s.length-2).match(/\w\w/)?s=s.replace(/\s*\S+$/,""):s=p.rtrim(s.slice(0,s.length-1)),(s+r).length>e.length?e:e.slice(0,s.length)+r},words:function(e,t){return p.isBlank(e)?[]:p.trim(e,t).split(t||/\s+/)},pad:function(e,n,r,i){e=e==null?"":t(e),n=~~n;var s=0;r?r.length>1&&(r=r.charAt(0)):r=" ";switch(i){case"right":return s=n-e.length,e+o(r,s);case"both":return s=n-e.length,o(r,Math.ceil(s/2))+e+o(r,Math.floor(s/2));default:return s=n-e.length,o(r,s)+e}},lpad:function(e,t,n){return p.pad(e,t,n)},rpad:function(e,t,n){return p.pad(e,t,n,"right")},lrpad:function(e,t,n){return p.pad(e,t,n,"both")},sprintf:h,vsprintf:function(e,t){return t.unshift(e),h.apply(null,t)},toNumber:function(e,n){if(e==null||e=="")return 0;e=t(e);var r=s(s(e).toFixed(~~n));return r===0&&!e.match(/^0+$/)?Number.NaN:r},numberFormat:function(e,t,n,r){if(isNaN(e)||e==null)return"";e=e.toFixed(~~t),r=typeof r=="string"?r:",";var i=e.split("."),s=i[0],o=i[1]?(n||".")+i[1]:"";return s.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+r)+o},strRight:function(e,n){if(e==null)return"";e=t(e),n=n!=null?t(n):n;var r=n?e.indexOf(n):-1;return~r?e.slice(r+n.length,e.length):e},strRightBack:function(e,n){if(e==null)return"";e=t(e),n=n!=null?t(n):n;var r=n?e.lastIndexOf(n):-1;return~r?e.slice(r+n.length,e.length):e},strLeft:function(e,n){if(e==null)return"";e=t(e),n=n!=null?t(n):n;var r=n?e.indexOf(n):-1;return~r?e.slice(0,r):e},strLeftBack:function(e,t){if(e==null)return"";e+="",t=t!=null?""+t:t;var n=e.lastIndexOf(t);return~n?e.slice(0,n):e},toSentence:function(e,t,n,r){t=t||", ",n=n||" and ";var i=e.slice(),s=i.pop();return e.length>2&&r&&(n=p.rtrim(t)+n),i.length?i.join(t)+n+s:s},toSentenceSerial:function(){var e=u.call(arguments);return e[3]=!0,p.toSentence.apply(p,e)},slugify:function(e){if(e==null)return"";var n="ąàáäâãåæćęèéëêìíïîłńòóöôõøùúüûñçżź",r="aaaaaaaaceeeeeiiiilnoooooouuuunczz",i=new RegExp(a(n),"g");return e=t(e).toLowerCase().replace(i,function(e){var t=n.indexOf(e);return r.charAt(t)||"-"}),p.dasherize(e.replace(/[^\w\s-]/g,""))},surround:function(e,t){return[t,e,t].join("")},quote:function(e){return p.surround(e,'"')},exports:function(){var e={};for(var t in this){if(!this.hasOwnProperty(t)||t.match(/^(?:include|contains|reverse)$/))continue;e[t]=this[t]}return e},repeat:function(e,n,r){if(e==null)return"";n=~~n;if(r==null)return o(t(e),n);for(var i=[];n>0;i[--n]=e);return i.join(r)},levenshtein:function(e,n){if(e==null&&n==null)return 0;if(e==null)return t(n).length;if(n==null)return t(e).length;e=t(e),n=t(n);var r=[],i,s;for(var o=0;o<=n.length;o++)for(var u=0;u<=e.length;u++)o&&u?e.charAt(u-1)===n.charAt(o-1)?s=i:s=Math.min(r[u],r[u-1],i)+1:s=o+u,i=r[u],r[u]=s;return r.pop()}};p.strip=p.trim,p.lstrip=p.ltrim,p.rstrip=p.rtrim,p.center=p.lrpad,p.rjust=p.lpad,p.ljust=p.rpad,p.contains=p.include,p.q=p.quote,typeof exports!="undefined"&&(typeof module!="undefined"&&module.exports&&(module.exports=p),exports._s=p),typeof define=="function"&&define.amd&&define("underscore.string",[],function(){return p}),e._=e._||{},e._.string=e._.str=p}(this,String); \ No newline at end of file diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js deleted file mode 100644 index a10c980..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js +++ /dev/null @@ -1,614 +0,0 @@ -// Underscore.string -// (c) 2010 Esa-Matti Suuronen -// Underscore.string is freely distributable under the terms of the MIT license. -// Documentation: https://github.com/epeli/underscore.string -// Some code is borrowed from MooTools and Alexandru Marasteanu. -// Version '2.3.1' - -!function(root, String){ - 'use strict'; - - // Defining helper functions. - - var nativeTrim = String.prototype.trim; - var nativeTrimRight = String.prototype.trimRight; - var nativeTrimLeft = String.prototype.trimLeft; - - var parseNumber = function(source) { return source * 1 || 0; }; - - var strRepeat = function(str, qty){ - if (qty < 1) return ''; - var result = ''; - while (qty > 0) { - if (qty & 1) result += str; - qty >>= 1, str += str; - } - return result; - }; - - var slice = [].slice; - - var defaultToWhiteSpace = function(characters) { - if (characters == null) - return '\\s'; - else if (characters.source) - return characters.source; - else - return '[' + _s.escapeRegExp(characters) + ']'; - }; - - var escapeChars = { - lt: '<', - gt: '>', - quot: '"', - amp: '&', - apos: "'" - }; - - var reversedEscapeChars = {}; - for(var key in escapeChars) reversedEscapeChars[escapeChars[key]] = key; - reversedEscapeChars["'"] = '#39'; - - // sprintf() for JavaScript 0.7-beta1 - // http://www.diveintojavascript.com/projects/javascript-sprintf - // - // Copyright (c) Alexandru Marasteanu - // All rights reserved. - - var sprintf = (function() { - function get_type(variable) { - return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase(); - } - - var str_repeat = strRepeat; - - var str_format = function() { - if (!str_format.cache.hasOwnProperty(arguments[0])) { - str_format.cache[arguments[0]] = str_format.parse(arguments[0]); - } - return str_format.format.call(null, str_format.cache[arguments[0]], arguments); - }; - - str_format.format = function(parse_tree, argv) { - var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length; - for (i = 0; i < tree_length; i++) { - node_type = get_type(parse_tree[i]); - if (node_type === 'string') { - output.push(parse_tree[i]); - } - else if (node_type === 'array') { - match = parse_tree[i]; // convenience purposes only - if (match[2]) { // keyword argument - arg = argv[cursor]; - for (k = 0; k < match[2].length; k++) { - if (!arg.hasOwnProperty(match[2][k])) { - throw new Error(sprintf('[_.sprintf] property "%s" does not exist', match[2][k])); - } - arg = arg[match[2][k]]; - } - } else if (match[1]) { // positional argument (explicit) - arg = argv[match[1]]; - } - else { // positional argument (implicit) - arg = argv[cursor++]; - } - - if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) { - throw new Error(sprintf('[_.sprintf] expecting number but found %s', get_type(arg))); - } - switch (match[8]) { - case 'b': arg = arg.toString(2); break; - case 'c': arg = String.fromCharCode(arg); break; - case 'd': arg = parseInt(arg, 10); break; - case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break; - case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break; - case 'o': arg = arg.toString(8); break; - case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break; - case 'u': arg = Math.abs(arg); break; - case 'x': arg = arg.toString(16); break; - case 'X': arg = arg.toString(16).toUpperCase(); break; - } - arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg); - pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' '; - pad_length = match[6] - String(arg).length; - pad = match[6] ? str_repeat(pad_character, pad_length) : ''; - output.push(match[5] ? arg + pad : pad + arg); - } - } - return output.join(''); - }; - - str_format.cache = {}; - - str_format.parse = function(fmt) { - var _fmt = fmt, match = [], parse_tree = [], arg_names = 0; - while (_fmt) { - if ((match = /^[^\x25]+/.exec(_fmt)) !== null) { - parse_tree.push(match[0]); - } - else if ((match = /^\x25{2}/.exec(_fmt)) !== null) { - parse_tree.push('%'); - } - else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) { - if (match[2]) { - arg_names |= 1; - var field_list = [], replacement_field = match[2], field_match = []; - if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') { - if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - } - else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - } - else { - throw new Error('[_.sprintf] huh?'); - } - } - } - else { - throw new Error('[_.sprintf] huh?'); - } - match[2] = field_list; - } - else { - arg_names |= 2; - } - if (arg_names === 3) { - throw new Error('[_.sprintf] mixing positional and named placeholders is not (yet) supported'); - } - parse_tree.push(match); - } - else { - throw new Error('[_.sprintf] huh?'); - } - _fmt = _fmt.substring(match[0].length); - } - return parse_tree; - }; - - return str_format; - })(); - - - - // Defining underscore.string - - var _s = { - - VERSION: '2.3.1', - - isBlank: function(str){ - if (str == null) str = ''; - return (/^\s*$/).test(str); - }, - - stripTags: function(str){ - if (str == null) return ''; - return String(str).replace(/<\/?[^>]+>/g, ''); - }, - - capitalize : function(str){ - str = str == null ? '' : String(str); - return str.charAt(0).toUpperCase() + str.slice(1); - }, - - chop: function(str, step){ - if (str == null) return []; - str = String(str); - step = ~~step; - return step > 0 ? str.match(new RegExp('.{1,' + step + '}', 'g')) : [str]; - }, - - clean: function(str){ - return _s.strip(str).replace(/\s+/g, ' '); - }, - - count: function(str, substr){ - if (str == null || substr == null) return 0; - - str = String(str); - substr = String(substr); - - var count = 0, - pos = 0, - length = substr.length; - - while (true) { - pos = str.indexOf(substr, pos); - if (pos === -1) break; - count++; - pos += length; - } - - return count; - }, - - chars: function(str) { - if (str == null) return []; - return String(str).split(''); - }, - - swapCase: function(str) { - if (str == null) return ''; - return String(str).replace(/\S/g, function(c){ - return c === c.toUpperCase() ? c.toLowerCase() : c.toUpperCase(); - }); - }, - - escapeHTML: function(str) { - if (str == null) return ''; - return String(str).replace(/[&<>"']/g, function(m){ return '&' + reversedEscapeChars[m] + ';'; }); - }, - - unescapeHTML: function(str) { - if (str == null) return ''; - return String(str).replace(/\&([^;]+);/g, function(entity, entityCode){ - var match; - - if (entityCode in escapeChars) { - return escapeChars[entityCode]; - } else if (match = entityCode.match(/^#x([\da-fA-F]+)$/)) { - return String.fromCharCode(parseInt(match[1], 16)); - } else if (match = entityCode.match(/^#(\d+)$/)) { - return String.fromCharCode(~~match[1]); - } else { - return entity; - } - }); - }, - - escapeRegExp: function(str){ - if (str == null) return ''; - return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); - }, - - splice: function(str, i, howmany, substr){ - var arr = _s.chars(str); - arr.splice(~~i, ~~howmany, substr); - return arr.join(''); - }, - - insert: function(str, i, substr){ - return _s.splice(str, i, 0, substr); - }, - - include: function(str, needle){ - if (needle === '') return true; - if (str == null) return false; - return String(str).indexOf(needle) !== -1; - }, - - join: function() { - var args = slice.call(arguments), - separator = args.shift(); - - if (separator == null) separator = ''; - - return args.join(separator); - }, - - lines: function(str) { - if (str == null) return []; - return String(str).split("\n"); - }, - - reverse: function(str){ - return _s.chars(str).reverse().join(''); - }, - - startsWith: function(str, starts){ - if (starts === '') return true; - if (str == null || starts == null) return false; - str = String(str); starts = String(starts); - return str.length >= starts.length && str.slice(0, starts.length) === starts; - }, - - endsWith: function(str, ends){ - if (ends === '') return true; - if (str == null || ends == null) return false; - str = String(str); ends = String(ends); - return str.length >= ends.length && str.slice(str.length - ends.length) === ends; - }, - - succ: function(str){ - if (str == null) return ''; - str = String(str); - return str.slice(0, -1) + String.fromCharCode(str.charCodeAt(str.length-1) + 1); - }, - - titleize: function(str){ - if (str == null) return ''; - return String(str).replace(/(?:^|\s)\S/g, function(c){ return c.toUpperCase(); }); - }, - - camelize: function(str){ - return _s.trim(str).replace(/[-_\s]+(.)?/g, function(match, c){ return c.toUpperCase(); }); - }, - - underscored: function(str){ - return _s.trim(str).replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/[-\s]+/g, '_').toLowerCase(); - }, - - dasherize: function(str){ - return _s.trim(str).replace(/([A-Z])/g, '-$1').replace(/[-_\s]+/g, '-').toLowerCase(); - }, - - classify: function(str){ - return _s.titleize(String(str).replace(/[\W_]/g, ' ')).replace(/\s/g, ''); - }, - - humanize: function(str){ - return _s.capitalize(_s.underscored(str).replace(/_id$/,'').replace(/_/g, ' ')); - }, - - trim: function(str, characters){ - if (str == null) return ''; - if (!characters && nativeTrim) return nativeTrim.call(str); - characters = defaultToWhiteSpace(characters); - return String(str).replace(new RegExp('\^' + characters + '+|' + characters + '+$', 'g'), ''); - }, - - ltrim: function(str, characters){ - if (str == null) return ''; - if (!characters && nativeTrimLeft) return nativeTrimLeft.call(str); - characters = defaultToWhiteSpace(characters); - return String(str).replace(new RegExp('^' + characters + '+'), ''); - }, - - rtrim: function(str, characters){ - if (str == null) return ''; - if (!characters && nativeTrimRight) return nativeTrimRight.call(str); - characters = defaultToWhiteSpace(characters); - return String(str).replace(new RegExp(characters + '+$'), ''); - }, - - truncate: function(str, length, truncateStr){ - if (str == null) return ''; - str = String(str); truncateStr = truncateStr || '...'; - length = ~~length; - return str.length > length ? str.slice(0, length) + truncateStr : str; - }, - - /** - * _s.prune: a more elegant version of truncate - * prune extra chars, never leaving a half-chopped word. - * @author github.com/rwz - */ - prune: function(str, length, pruneStr){ - if (str == null) return ''; - - str = String(str); length = ~~length; - pruneStr = pruneStr != null ? String(pruneStr) : '...'; - - if (str.length <= length) return str; - - var tmpl = function(c){ return c.toUpperCase() !== c.toLowerCase() ? 'A' : ' '; }, - template = str.slice(0, length+1).replace(/.(?=\W*\w*$)/g, tmpl); // 'Hello, world' -> 'HellAA AAAAA' - - if (template.slice(template.length-2).match(/\w\w/)) - template = template.replace(/\s*\S+$/, ''); - else - template = _s.rtrim(template.slice(0, template.length-1)); - - return (template+pruneStr).length > str.length ? str : str.slice(0, template.length)+pruneStr; - }, - - words: function(str, delimiter) { - if (_s.isBlank(str)) return []; - return _s.trim(str, delimiter).split(delimiter || /\s+/); - }, - - pad: function(str, length, padStr, type) { - str = str == null ? '' : String(str); - length = ~~length; - - var padlen = 0; - - if (!padStr) - padStr = ' '; - else if (padStr.length > 1) - padStr = padStr.charAt(0); - - switch(type) { - case 'right': - padlen = length - str.length; - return str + strRepeat(padStr, padlen); - case 'both': - padlen = length - str.length; - return strRepeat(padStr, Math.ceil(padlen/2)) + str - + strRepeat(padStr, Math.floor(padlen/2)); - default: // 'left' - padlen = length - str.length; - return strRepeat(padStr, padlen) + str; - } - }, - - lpad: function(str, length, padStr) { - return _s.pad(str, length, padStr); - }, - - rpad: function(str, length, padStr) { - return _s.pad(str, length, padStr, 'right'); - }, - - lrpad: function(str, length, padStr) { - return _s.pad(str, length, padStr, 'both'); - }, - - sprintf: sprintf, - - vsprintf: function(fmt, argv){ - argv.unshift(fmt); - return sprintf.apply(null, argv); - }, - - toNumber: function(str, decimals) { - if (!str) return 0; - str = _s.trim(str); - if (!str.match(/^-?\d+(?:\.\d+)?$/)) return NaN; - return parseNumber(parseNumber(str).toFixed(~~decimals)); - }, - - numberFormat : function(number, dec, dsep, tsep) { - if (isNaN(number) || number == null) return ''; - - number = number.toFixed(~~dec); - tsep = typeof tsep == 'string' ? tsep : ','; - - var parts = number.split('.'), fnums = parts[0], - decimals = parts[1] ? (dsep || '.') + parts[1] : ''; - - return fnums.replace(/(\d)(?=(?:\d{3})+$)/g, '$1' + tsep) + decimals; - }, - - strRight: function(str, sep){ - if (str == null) return ''; - str = String(str); sep = sep != null ? String(sep) : sep; - var pos = !sep ? -1 : str.indexOf(sep); - return ~pos ? str.slice(pos+sep.length, str.length) : str; - }, - - strRightBack: function(str, sep){ - if (str == null) return ''; - str = String(str); sep = sep != null ? String(sep) : sep; - var pos = !sep ? -1 : str.lastIndexOf(sep); - return ~pos ? str.slice(pos+sep.length, str.length) : str; - }, - - strLeft: function(str, sep){ - if (str == null) return ''; - str = String(str); sep = sep != null ? String(sep) : sep; - var pos = !sep ? -1 : str.indexOf(sep); - return ~pos ? str.slice(0, pos) : str; - }, - - strLeftBack: function(str, sep){ - if (str == null) return ''; - str += ''; sep = sep != null ? ''+sep : sep; - var pos = str.lastIndexOf(sep); - return ~pos ? str.slice(0, pos) : str; - }, - - toSentence: function(array, separator, lastSeparator, serial) { - separator = separator || ', ' - lastSeparator = lastSeparator || ' and ' - var a = array.slice(), lastMember = a.pop(); - - if (array.length > 2 && serial) lastSeparator = _s.rtrim(separator) + lastSeparator; - - return a.length ? a.join(separator) + lastSeparator + lastMember : lastMember; - }, - - toSentenceSerial: function() { - var args = slice.call(arguments); - args[3] = true; - return _s.toSentence.apply(_s, args); - }, - - slugify: function(str) { - if (str == null) return ''; - - var from = "ąàáäâãåæćęèéëêìíïîłńòóöôõøùúüûñçżź", - to = "aaaaaaaaceeeeeiiiilnoooooouuuunczz", - regex = new RegExp(defaultToWhiteSpace(from), 'g'); - - str = String(str).toLowerCase().replace(regex, function(c){ - var index = from.indexOf(c); - return to.charAt(index) || '-'; - }); - - return _s.dasherize(str.replace(/[^\w\s-]/g, '')); - }, - - surround: function(str, wrapper) { - return [wrapper, str, wrapper].join(''); - }, - - quote: function(str) { - return _s.surround(str, '"'); - }, - - exports: function() { - var result = {}; - - for (var prop in this) { - if (!this.hasOwnProperty(prop) || prop.match(/^(?:include|contains|reverse)$/)) continue; - result[prop] = this[prop]; - } - - return result; - }, - - repeat: function(str, qty, separator){ - if (str == null) return ''; - - qty = ~~qty; - - // using faster implementation if separator is not needed; - if (separator == null) return strRepeat(String(str), qty); - - // this one is about 300x slower in Google Chrome - for (var repeat = []; qty > 0; repeat[--qty] = str) {} - return repeat.join(separator); - }, - - levenshtein: function(str1, str2) { - if (str1 == null && str2 == null) return 0; - if (str1 == null) return String(str2).length; - if (str2 == null) return String(str1).length; - - str1 = String(str1); str2 = String(str2); - - var current = [], prev, value; - - for (var i = 0; i <= str2.length; i++) - for (var j = 0; j <= str1.length; j++) { - if (i && j) - if (str1.charAt(j - 1) === str2.charAt(i - 1)) - value = prev; - else - value = Math.min(current[j], current[j - 1], prev) + 1; - else - value = i + j; - - prev = current[j]; - current[j] = value; - } - - return current.pop(); - } - }; - - // Aliases - - _s.strip = _s.trim; - _s.lstrip = _s.ltrim; - _s.rstrip = _s.rtrim; - _s.center = _s.lrpad; - _s.rjust = _s.lpad; - _s.ljust = _s.rpad; - _s.contains = _s.include; - _s.q = _s.quote; - - // Exporting - - // CommonJS module is defined - if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) - module.exports = _s; - - exports._s = _s; - } - - // Register as a named module with AMD. - if (typeof define === 'function' && define.amd) - define('underscore.string', [], function(){ return _s; }); - - - // Integrate with Underscore.js if defined - // or create our own underscore object. - root._ = root._ || {}; - root._.string = root._.str = _s; -}(this, String); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/package.json b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/package.json deleted file mode 100644 index a42b465..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "underscore.string", - "version": "2.3.1", - "description": "String manipulation extensions for Underscore.js javascript library.", - "homepage": "http://epeli.github.com/underscore.string/", - "contributors": [ - { - "name": "Esa-Matti Suuronen", - "email": "esa-matti@suuronen.org", - "url": "http://esa-matti.suuronen.org/" - }, - { - "name": "Edward Tsech", - "email": "edtsech@gmail.com" - }, - { - "name": "Pavel Pravosud", - "email": "pavel@pravosud.com", - "url": "" - }, - { - "name": "Sasha Koss", - "email": "kossnocorp@gmail.com", - "url": "http://koss.nocorp.me/" - }, - { - "name": "Vladimir Dronnikov", - "email": "dronnikov@gmail.com" - }, - { - "name": "Pete Kruckenberg", - "email": "https://github.com/kruckenb", - "url": "" - }, - { - "name": "Paul Chavard", - "email": "paul@chavard.net", - "url": "" - }, - { - "name": "Ed Finkler", - "email": "coj@funkatron.com", - "url": "" - } - ], - "keywords": [ - "underscore", - "string" - ], - "main": "./lib/underscore.string", - "directories": { - "lib": "./lib" - }, - "engines": { - "node": "*" - }, - "repository": { - "type": "git", - "url": "https://github.com/epeli/underscore.string.git" - }, - "bugs": { - "url": "https://github.com/epeli/underscore.string/issues" - }, - "licenses": [ - { - "type": "MIT" - } - ], - "readme": "# Underscore.string [![Build Status](https://secure.travis-ci.org/epeli/underscore.string.png?branch=master)](http://travis-ci.org/epeli/underscore.string) #\n\n\n\nJavascript lacks complete string manipulation operations.\nThis an attempt to fill that gap. List of build-in methods can be found\nfor example from [Dive Into JavaScript][d].\n\n[d]: http://www.diveintojavascript.com/core-javascript-reference/the-string-object\n\n\nAs name states this an extension for [Underscore.js][u], but it can be used\nindependently from **_s**-global variable. But with Underscore.js you can\nuse Object-Oriented style and chaining:\n\n[u]: http://documentcloud.github.com/underscore/\n\n```javascript\n_(\" epeli \").chain().trim().capitalize().value()\n=> \"Epeli\"\n```\n\n## Download ##\n\n * [Development version](https://raw.github.com/epeli/underscore.string/master/lib/underscore.string.js) *Uncompressed with Comments 18kb*\n * [Production version](https://github.com/epeli/underscore.string/raw/master/dist/underscore.string.min.js) *Minified 7kb*\n\n\n## Node.js installation ##\n\n**npm package**\n\n npm install underscore.string\n\n**Standalone usage**:\n\n```javascript\nvar _s = require('underscore.string');\n```\n\n**Integrate with Underscore.js**:\n\n```javascript\nvar _ = require('underscore');\n\n// Import Underscore.string to separate object, because there are conflict functions (include, reverse, contains)\n_.str = require('underscore.string');\n\n// Mix in non-conflict functions to Underscore namespace if you want\n_.mixin(_.str.exports());\n\n// All functions, include conflict, will be available through _.str object\n_.str.include('Underscore.string', 'string'); // => true\n```\n\n## String Functions ##\n\nFor availability of functions in this way you need to mix in Underscore.string functions:\n\n```javascript\n_.mixin(_.string.exports());\n```\n\notherwise functions from examples will be available through _.string or _.str objects:\n\n```javascript\n_.str.capitalize('epeli')\n=> \"Epeli\"\n```\n\n**numberFormat** _.numberFormat(number, [ decimals=0, decimalSeparator='.', orderSeparator=','])\n\nFormats the numbers.\n\n```javascript\n_.numberFormat(1000, 2)\n=> \"1,000.00\"\n\n_.numberFormat(123456789.123, 5, '.', ',')\n=> \"123,456,789.12300\"\n```\n\n\n**levenshtein** _.levenshtein(string1, string2)\n\nCalculates [Levenshtein distance][ld] between two strings.\n[ld]: http://en.wikipedia.org/wiki/Levenshtein_distance\n\n```javascript\n_.levenshtein('kitten', 'kittah')\n=> 2\n```\n\n**capitalize** _.capitalize(string)\n\nConverts first letter of the string to uppercase.\n\n```javascript\n_.capitalize(\"foo Bar\")\n=> \"Foo Bar\"\n```\n\n**chop** _.chop(string, step)\n\n```javascript\n_.chop('whitespace', 3)\n=> ['whi','tes','pac','e']\n```\n\n**clean** _.clean(str)\n\nCompress some whitespaces to one.\n\n```javascript\n_.clean(\" foo bar \")\n=> 'foo bar'\n```\n\n**chars** _.chars(str)\n\n```javascript\n_.chars('Hello')\n=> ['H','e','l','l','o']\n```\n\n**swapCase** _.swapCase(str)\n\nReturns a copy of the string in which all the case-based characters have had their case swapped.\n\n```javascript\n_.swapCase('hELLO')\n=> 'Hello'\n```\n\n**include** available only through _.str object, because Underscore has function with the same name.\n\n```javascript\n_.str.include(\"foobar\", \"ob\")\n=> true\n```\n\n(removed) **includes** _.includes(string, substring)\n\nTests if string contains a substring.\n\n```javascript\n_.includes(\"foobar\", \"ob\")\n=> true\n```\n\n**includes** function was removed\n\nBut you can create it in this way, for compatibility with previous versions:\n\n```javascript\n_.includes = _.str.include\n```\n\n**count** _.count(string, substring)\n\n```javascript\n_('Hello world').count('l')\n=> 3\n```\n\n**escapeHTML** _.escapeHTML(string)\n\nConverts HTML special characters to their entity equivalents.\n\n```javascript\n_('
Blah blah blah
').escapeHTML();\n=> '<div>Blah blah blah</div>'\n```\n\n**unescapeHTML** _.unescapeHTML(string)\n\nConverts entity characters to HTML equivalents.\n\n```javascript\n_('<div>Blah blah blah</div>').unescapeHTML();\n=> '
Blah blah blah
'\n```\n\n**insert** _.insert(string, index, substing)\n\n```javascript\n_('Hello ').insert(6, 'world')\n=> 'Hello world'\n```\n\n**isBlank** _.isBlank(string)\n\n```javascript\n_('').isBlank(); // => true\n_('\\n').isBlank(); // => true\n_(' ').isBlank(); // => true\n_('a').isBlank(); // => false\n```\n\n**join** _.join(separator, *strings)\n\nJoins strings together with given separator\n\n```javascript\n_.join(\" \", \"foo\", \"bar\")\n=> \"foo bar\"\n```\n\n**lines** _.lines(str)\n\n```javascript\n_.lines(\"Hello\\nWorld\")\n=> [\"Hello\", \"World\"]\n```\n\n**reverse** available only through _.str object, because Underscore has function with the same name.\n\nReturn reversed string:\n\n```javascript\n_.str.reverse(\"foobar\")\n=> 'raboof'\n```\n\n**splice** _.splice(string, index, howmany, substring)\n\nLike a array splice.\n\n```javascript\n_('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli')\n=> 'https://edtsech@bitbucket.org/epeli/underscore.strings'\n```\n\n**startsWith** _.startsWith(string, starts)\n\nThis method checks whether string starts with starts.\n\n```javascript\n_(\"image.gif\").startsWith(\"image\")\n=> true\n```\n\n**endsWith** _.endsWith(string, ends)\n\nThis method checks whether string ends with ends.\n\n```javascript\n_(\"image.gif\").endsWith(\"gif\")\n=> true\n```\n\n**succ** _.succ(str)\n\nReturns the successor to str.\n\n```javascript\n_('a').succ()\n=> 'b'\n\n_('A').succ()\n=> 'B'\n```\n\n**supplant**\n\nSupplant function was removed, use Underscore.js [template function][p].\n\n[p]: http://documentcloud.github.com/underscore/#template\n\n**strip** alias for *trim*\n\n**lstrip** alias for *ltrim*\n\n**rstrip** alias for *rtrim*\n\n**titleize** _.titleize(string)\n\n```javascript\n_('my name is epeli').titleize()\n=> 'My Name Is Epeli'\n```\n\n**camelize** _.camelize(string)\n\nConverts underscored or dasherized string to a camelized one\n\n```javascript\n_('-moz-transform').camelize()\n=> 'MozTransform'\n```\n\n**classify** _.classify(string)\n\nConverts string to camelized class name\n\n```javascript\n_('some_class_name').classify()\n=> 'SomeClassName'\n```\n\n**underscored** _.underscored(string)\n\nConverts a camelized or dasherized string into an underscored one\n\n```javascript\n_('MozTransform').underscored()\n=> 'moz_transform'\n```\n\n**dasherize** _.dasherize(string)\n\nConverts a underscored or camelized string into an dasherized one\n\n```javascript\n_('MozTransform').dasherize()\n=> '-moz-transform'\n```\n\n**humanize** _.humanize(string)\n\nConverts an underscored, camelized, or dasherized string into a humanized one.\nAlso removes beginning and ending whitespace, and removes the postfix '_id'.\n\n```javascript\n_(' capitalize dash-CamelCase_underscore trim ').humanize()\n=> 'Capitalize dash camel case underscore trim'\n```\n\n**trim** _.trim(string, [characters])\n\ntrims defined characters from begining and ending of the string.\nDefaults to whitespace characters.\n\n```javascript\n_.trim(\" foobar \")\n=> \"foobar\"\n\n_.trim(\"_-foobar-_\", \"_-\")\n=> \"foobar\"\n```\n\n\n**ltrim** _.ltrim(string, [characters])\n\nLeft trim. Similar to trim, but only for left side.\n\n\n**rtrim** _.rtrim(string, [characters])\n\nRight trim. Similar to trim, but only for right side.\n\n**truncate** _.truncate(string, length, truncateString)\n\n```javascript\n_('Hello world').truncate(5)\n=> 'Hello...'\n\n_('Hello').truncate(10)\n=> 'Hello'\n```\n\n**prune** _.prune(string, length, pruneString)\n\nElegant version of truncate.\nMakes sure the pruned string does not exceed the original length.\nAvoid half-chopped words when truncating.\n\n```javascript\n_('Hello, world').prune(5)\n=> 'Hello...'\n\n_('Hello, world').prune(8)\n=> 'Hello...'\n\n_('Hello, world').prune(5, ' (read a lot more)')\n=> 'Hello, world' (as adding \"(read a lot more)\" would be longer than the original string)\n\n_('Hello, cruel world').prune(15)\n=> 'Hello, cruel...'\n\n_('Hello').prune(10)\n=> 'Hello'\n```\n\n**words** _.words(str, delimiter=/\\s+/)\n\nSplit string by delimiter (String or RegExp), /\\s+/ by default.\n\n```javascript\n_.words(\" I love you \")\n=> [\"I\",\"love\",\"you\"]\n\n_.words(\"I_love_you\", \"_\")\n=> [\"I\",\"love\",\"you\"]\n\n_.words(\"I-love-you\", /-/)\n=> [\"I\",\"love\",\"you\"]\n\n_.words(\" \")\n=> []\n```\n\n**sprintf** _.sprintf(string format, *arguments)\n\nC like string formatting.\nCredits goes to [Alexandru Marasteanu][o].\nFor more detailed documentation, see the [original page][o].\n\n[o]: http://www.diveintojavascript.com/projects/sprintf-for-javascript\n\n```javascript\n_.sprintf(\"%.1f\", 1.17)\n\"1.2\"\n```\n\n**pad** _.pad(str, length, [padStr, type])\n\npads the `str` with characters until the total string length is equal to the passed `length` parameter. By default, pads on the **left** with the space char (`\" \"`). `padStr` is truncated to a single character if necessary.\n\n```javascript\n_.pad(\"1\", 8)\n-> \" 1\";\n\n_.pad(\"1\", 8, '0')\n-> \"00000001\";\n\n_.pad(\"1\", 8, '0', 'right')\n-> \"10000000\";\n\n_.pad(\"1\", 8, '0', 'both')\n-> \"00001000\";\n\n_.pad(\"1\", 8, 'bleepblorp', 'both')\n-> \"bbbb1bbb\";\n```\n\n**lpad** _.lpad(str, length, [padStr])\n\nleft-pad a string. Alias for `pad(str, length, padStr, 'left')`\n\n```javascript\n_.lpad(\"1\", 8, '0')\n-> \"00000001\";\n```\n\n**rpad** _.rpad(str, length, [padStr])\n\nright-pad a string. Alias for `pad(str, length, padStr, 'right')`\n\n```javascript\n_.rpad(\"1\", 8, '0')\n-> \"10000000\";\n```\n\n**lrpad** _.lrpad(str, length, [padStr])\n\nleft/right-pad a string. Alias for `pad(str, length, padStr, 'both')`\n\n```javascript\n_.lrpad(\"1\", 8, '0')\n-> \"00001000\";\n```\n\n**center** alias for **lrpad**\n\n**ljust** alias for *rpad*\n\n**rjust** alias for *lpad*\n\n**toNumber** _.toNumber(string, [decimals])\n\nParse string to number. Returns NaN if string can't be parsed to number.\n\n```javascript\n_('2.556').toNumber()\n=> 3\n\n_('2.556').toNumber(1)\n=> 2.6\n```\n\n**strRight** _.strRight(string, pattern)\n\nSearches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strRight('_')\n=> \"is_a_test_string\";\n```\n\n**strRightBack** _.strRightBack(string, pattern)\n\nSearches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strRightBack('_')\n=> \"string\";\n```\n\n**strLeft** _.strLeft(string, pattern)\n\nSearches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strLeft('_')\n=> \"This\";\n```\n\n**strLeftBack** _.strLeftBack(string, pattern)\n\nSearches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found.\n\n```javascript\n_('This_is_a_test_string').strLeftBack('_')\n=> \"This_is_a_test\";\n```\n\n**stripTags**\n\nRemoves all html tags from string.\n\n```javascript\n_('a link').stripTags()\n=> 'a link'\n\n_('a link').stripTags()\n=> 'a linkalert(\"hello world!\")'\n```\n\n**toSentence** _.toSentence(array, [delimiter, lastDelimiter])\n\nJoin an array into a human readable sentence.\n\n```javascript\n_.toSentence(['jQuery', 'Mootools', 'Prototype'])\n=> 'jQuery, Mootools and Prototype';\n\n_.toSentence(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt ')\n=> 'jQuery, Mootools unt Prototype';\n```\n\n**toSentenceSerial** _.toSentenceSerial(array, [delimiter, lastDelimiter])\n\nThe same as `toSentence`, but adjusts delimeters to use [Serial comma](http://en.wikipedia.org/wiki/Serial_comma).\n\n```javascript\n_.toSentenceSerial(['jQuery', 'Mootools'])\n=> 'jQuery and Mootools';\n\n_.toSentenceSerial(['jQuery', 'Mootools', 'Prototype'])\n=> 'jQuery, Mootools, and Prototype'\n\n_.toSentenceSerial(['jQuery', 'Mootools', 'Prototype'], ', ', ' unt ');\n=> 'jQuery, Mootools, unt Prototype';\n```\n\n**repeat** _.repeat(string, count, [separator])\n\nRepeats a string count times.\n\n```javascript\n_.repeat(\"foo\", 3)\n=> 'foofoofoo';\n\n_.repeat(\"foo\", 3, \"bar\")\n=> 'foobarfoobarfoo'\n```\n\n**surround** _.surround(string, wrap)\n\nSurround a string with another string.\n\n```javascript\n_.surround(\"foo\", \"ab\")\n=> 'abfooab';\n```\n\n**quote** _.quote(string) or _.q(string)\n\nQuotes a string.\n\n```javascript\n_.quote('foo')\n=> '\"foo\"';\n```\n\n\n**slugify** _.slugify(string)\n\nTransform text into a URL slug. Replaces whitespaces, accentuated, and special characters with a dash.\n\n```javascript\n_.slugify(\"Un éléphant à l'orée du bois\")\n=> 'un-elephant-a-loree-du-bois';\n```\n\n***Caution: this function is charset dependent***\n\n## Roadmap ##\n\nAny suggestions or bug reports are welcome. Just email me or more preferably open an issue.\n\n#### Problems\n\nWe lose two things for `include` and `reverse` methods from `_.string`:\n\n* Calls like `_('foobar').include('bar')` aren't available;\n* Chaining isn't available too.\n\nBut if you need this functionality you can create aliases for conflict functions which will be convenient for you:\n\n```javascript\n_.mixin({\n includeString: _.str.include,\n reverseString: _.str.reverse\n})\n\n// Now wrapper calls and chaining are available.\n_('foobar').chain().reverseString().includeString('rab').value()\n```\n\n#### Standalone Usage\n\nIf you are using Underscore.string without Underscore. You also have `_.string` namespace for it and `_.str` alias\nBut of course you can just reassign `_` variable with `_.string`\n\n```javascript\n_ = _.string\n```\n\n## Changelog ##\n\n### 2.3.1 ###\n\n* Changed integration logic, now trying everything in order\n* Fixed classify method to chew some unexpected input\n* Fixed toNumber method failing to recognize '0.0' as a proper number\n\n\n### 2.3.0 ###\n\n* Added `numberformat` method\n* Added `levenshtein` method (Levenshtein distance calculation)\n* Added `swapCase` method\n* Changed default behavior of `words` method\n* Added `toSentenceSerial` method\n* Added `surround` and `quote` methods\n\n### 2.2.0 ###\n\n* Capitalize method behavior changed\n* Various perfomance tweaks\n\n### 2.1.1###\n\n* Fixed words method bug\n* Added classify method\n\n### 2.1.0 ###\n\n* AMD support\n* Added toSentence method\n* Added slugify method\n* Lots of speed optimizations\n\n### 2.0.0 ###\n\n* Added prune, humanize functions\n* Added _.string (_.str) namespace for Underscore.string library\n* Removed includes function\n\nFor upgrading to this version you need to mix in Underscore.string library to Underscore object:\n\n```javascript\n_.mixin(_.string.exports());\n```\n\nand all non-conflict Underscore.string functions will be available through Underscore object.\nAlso function `includes` has been removed, you should replace this function by `_.str.include`\nor create alias `_.includes = _.str.include` and all your code will work fine.\n\n### 1.1.6 ###\n\n* Fixed reverse and truncate\n* Added isBlank, stripTags, inlude(alias for includes)\n* Added uglifier compression\n\n### 1.1.5 ###\n\n* Added strRight, strRightBack, strLeft, strLeftBack\n\n### 1.1.4 ###\n\n* Added pad, lpad, rpad, lrpad methods and aliases center, ljust, rjust\n* Integration with Underscore 1.1.6\n\n### 1.1.3 ###\n\n* Added methods: underscored, camelize, dasherize\n* Support newer version of npm\n\n### 1.1.2 ###\n\n* Created functions: lines, chars, words functions\n\n### 1.0.2 ###\n\n* Created integration test suite with underscore.js 1.1.4 (now it's absolutely compatible)\n* Removed 'reverse' function, because this function override underscore.js 'reverse'\n\n## Contribute ##\n\n* Fork & pull request. Don't forget about tests.\n* If you planning add some feature please create issue before.\n\nOtherwise changes will be rejected.\n\n## Contributors list ##\n[Can be found here](https://github.com/epeli/underscore.string/graphs/contributors).\n\n\n## Licence ##\n\nThe MIT License\n\nCopyright (c) 2011 Esa-Matti Suuronen esa-matti@suuronen.org\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "readmeFilename": "README.markdown", - "_id": "underscore.string@2.3.1", - "_from": "underscore.string@~2.3.1" -} diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js deleted file mode 100644 index 44a2167..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js +++ /dev/null @@ -1,45 +0,0 @@ -function waitFor(test, complete, timeout) { - var result, start = new Date().getTime() - setInterval(function interval() { - if ((new Date().getTime() - start < timeout) && !result) { - result = test() - } else { - if (!result) { - phantom.exit(1) - } else { - complete() - clearInterval(interval) - } - } - }, 100) -} - - -var fs = require('fs'), page = require('webpage').create(); -var url = 'file://localhost' + fs.workingDirectory + '/' + phantom.args[0]; - -page.onConsoleMessage = function(msg) { - console.log(msg) -} - -page.open(url, function(status) { - waitFor(function() { - return page.evaluate(function(){ - var el = document.getElementById('qunit-testresult') - return el && el.innerText.match('completed') - }) - }, function() { - var failures = page.evaluate(function() { - var el = document.getElementById('qunit-testresult'), - fails = document.getElementsByClassName('fail') - - for (var i = 0; i < fails.length; i++) - console.log(fails[i].innerText) - - console.log(el.innerText) - - return parseInt(el.getElementsByClassName('failed')[0].innerHTML) - }) - phantom.exit(failures > 0 ? 1 : 0) - }, 10000) -}) \ No newline at end of file diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/speed.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/speed.js deleted file mode 100644 index 9ceeea7..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/speed.js +++ /dev/null @@ -1,148 +0,0 @@ -(function() { - - JSLitmus.test('levenshtein', function() { - return [ - _.levenshtein('pineapple', 'potato'), - _.levenshtein('seven', 'eight'), - _.levenshtein('the very same string', 'the very same string'), - _.levenshtein('very very very long string', 'something completely different') - ]; - }); - - - JSLitmus.test('trimNoNative', function() { - return _.trim(" foobar ", " "); - }); - - JSLitmus.test('trim', function() { - return _.trim(" foobar "); - }); - - JSLitmus.test('trim object-oriented', function() { - return _(" foobar ").trim(); - }); - - JSLitmus.test('trim jQuery', function() { - return jQuery.trim(" foobar "); - }); - - JSLitmus.test('ltrimp', function() { - return _.ltrim(" foobar ", " "); - }); - - JSLitmus.test('rtrimp', function() { - return _.rtrim(" foobar ", " "); - }); - - JSLitmus.test('startsWith', function() { - return _.startsWith("foobar", "foo"); - }); - - JSLitmus.test('endsWith', function() { - return _.endsWith("foobar", "xx"); - }); - - JSLitmus.test('chop', function(){ - return _('whitespace').chop(2); - }); - - JSLitmus.test('count', function(){ - return _('Hello worls').count('l'); - }); - - JSLitmus.test('insert', function() { - return _('Hello ').insert(6, 'world'); - }); - - JSLitmus.test('splice', function() { - return _('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli'); - }); - - JSLitmus.test('succ', function(){ - var let = 'a', alphabet = []; - - for (var i=0; i < 26; i++) { - alphabet.push(let); - let = _(let).succ(); - } - - return alphabet; - }); - - JSLitmus.test('titleize', function(){ - return _('the titleize string method').titleize(); - }); - - JSLitmus.test('truncate', function(){ - return _('Hello world').truncate(5); - }); - - JSLitmus.test('prune', function(){ - return _('Hello world').prune(5); - }); - - JSLitmus.test('isBlank', function(){ - return _('').isBlank(); - }); - - JSLitmus.test('escapeHTML', function(){ - _('
Blah blah blah
').escapeHTML(); - }); - - JSLitmus.test('unescapeHTML', function(){ - _('<div>Blah blah blah</div>').unescapeHTML(); - }); - - JSLitmus.test('reverse', function(){ - _('Hello World').reverse(); - }); - - JSLitmus.test('pad default', function(){ - _('foo').pad(12); - }); - - JSLitmus.test('pad hash left', function(){ - _('foo').pad(12, '#'); - }); - - JSLitmus.test('pad hash right', function(){ - _('foo').pad(12, '#', 'right'); - }); - - JSLitmus.test('pad hash both', function(){ - _('foo').pad(12, '#', 'both'); - }); - - JSLitmus.test('pad hash both longPad', function(){ - _('foo').pad(12, 'f00f00f00', 'both'); - }); - - JSLitmus.test('toNumber', function(){ - _('10.232323').toNumber(2); - }); - - JSLitmus.test('strRight', function(){ - _('aaa_bbb_ccc').strRight('_'); - }); - - JSLitmus.test('strRightBack', function(){ - _('aaa_bbb_ccc').strRightBack('_'); - }); - - JSLitmus.test('strLeft', function(){ - _('aaa_bbb_ccc').strLeft('_'); - }); - - JSLitmus.test('strLeftBack', function(){ - _('aaa_bbb_ccc').strLeftBack('_'); - }); - - JSLitmus.test('join', function(){ - _('separator').join(1, 2, 3, 4, 5, 6, 7, 8, 'foo', 'bar', 'lol', 'wut'); - }); - - JSLitmus.test('slugify', function(){ - _("Un éléphant à l'orée du bois").slugify(); - }); - -})(); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/strings.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/strings.js deleted file mode 100644 index 727b96e..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/strings.js +++ /dev/null @@ -1,641 +0,0 @@ -$(document).ready(function() { - - // Include Underscore.string methods to Underscore namespace - _.mixin(_.str.exports()); - - module('String extensions'); - - test('Strings: trim', function() { - equal(_.trim(123), '123', 'Non string'); - equal(_(' foo').trim(), 'foo'); - equal(_('foo ').trim(), 'foo'); - equal(_(' foo ').trim(), 'foo'); - equal(_(' foo ').trim(), 'foo'); - equal(_(' foo ').trim(' '), 'foo', 'Manually set whitespace'); - equal(_('\t foo \t ').trim(/\s/), 'foo', 'Manually set RegExp /\\s+/'); - - equal(_('ffoo').trim('f'), 'oo'); - equal(_('ooff').trim('f'), 'oo'); - equal(_('ffooff').trim('f'), 'oo'); - - - equal(_('_-foobar-_').trim('_-'), 'foobar'); - - equal(_('http://foo/').trim('/'), 'http://foo'); - equal(_('c:\\').trim('\\'), 'c:'); - - equal(_(123).trim(), '123'); - equal(_(123).trim(3), '12'); - equal(_('').trim(), '', 'Trim empty string should return empty string'); - equal(_(null).trim(), '', 'Trim null should return empty string'); - equal(_(undefined).trim(), '', 'Trim undefined should return empty string'); - }); - - test('String: levenshtein', function() { - equal(_.levenshtein('Godfather', 'Godfather'), 0); - equal(_.levenshtein('Godfather', 'Godfathe'), 1); - equal(_.levenshtein('Godfather', 'odfather'), 1); - equal(_.levenshtein('Godfather', 'Gdfthr'), 3); - equal(_.levenshtein('seven', 'eight'), 5); - equal(_.levenshtein('123', 123), 0); - equal(_.levenshtein(321, '321'), 0); - equal(_.levenshtein('lol', null), 3); - equal(_.levenshtein('lol'), 3); - equal(_.levenshtein(null, 'lol'), 3); - equal(_.levenshtein(undefined, 'lol'), 3); - equal(_.levenshtein(), 0); - }); - - test('Strings: ltrim', function() { - equal(_(' foo').ltrim(), 'foo'); - equal(_(' foo').ltrim(), 'foo'); - equal(_('foo ').ltrim(), 'foo '); - equal(_(' foo ').ltrim(), 'foo '); - equal(_('').ltrim(), '', 'ltrim empty string should return empty string'); - equal(_(null).ltrim(), '', 'ltrim null should return empty string'); - equal(_(undefined).ltrim(), '', 'ltrim undefined should return empty string'); - - equal(_('ffoo').ltrim('f'), 'oo'); - equal(_('ooff').ltrim('f'), 'ooff'); - equal(_('ffooff').ltrim('f'), 'ooff'); - - equal(_('_-foobar-_').ltrim('_-'), 'foobar-_'); - - equal(_(123).ltrim(1), '23'); - }); - - test('Strings: rtrim', function() { - equal(_('http://foo/').rtrim('/'), 'http://foo', 'clean trailing slash'); - equal(_(' foo').rtrim(), ' foo'); - equal(_('foo ').rtrim(), 'foo'); - equal(_('foo ').rtrim(), 'foo'); - equal(_('foo bar ').rtrim(), 'foo bar'); - equal(_(' foo ').rtrim(), ' foo'); - - equal(_('ffoo').rtrim('f'), 'ffoo'); - equal(_('ooff').rtrim('f'), 'oo'); - equal(_('ffooff').rtrim('f'), 'ffoo'); - - equal(_('_-foobar-_').rtrim('_-'), '_-foobar'); - - equal(_(123).rtrim(3), '12'); - equal(_('').rtrim(), '', 'rtrim empty string should return empty string'); - equal(_(null).rtrim(), '', 'rtrim null should return empty string'); - }); - - test('Strings: capitalize', function() { - equal(_('fabio').capitalize(), 'Fabio', 'First letter is upper case'); - equal(_.capitalize('fabio'), 'Fabio', 'First letter is upper case'); - equal(_.capitalize('FOO'), 'FOO', 'Other letters unchanged'); - equal(_(123).capitalize(), '123', 'Non string'); - equal(_.capitalize(''), '', 'Capitalizing empty string returns empty string'); - equal(_.capitalize(null), '', 'Capitalizing null returns empty string'); - equal(_.capitalize(undefined), '', 'Capitalizing undefined returns empty string'); - }); - - test('Strings: join', function() { - equal(_.join('', 'foo', 'bar'), 'foobar', 'basic join'); - equal(_.join('', 1, 'foo', 2), '1foo2', 'join numbers and strings'); - equal(_.join(' ','foo', 'bar'), 'foo bar', 'join with spaces'); - equal(_.join('1', '2', '2'), '212', 'join number strings'); - equal(_.join(1, 2, 2), '212', 'join numbers'); - equal(_.join('','foo', null), 'foo', 'join null with string returns string'); - equal(_.join(null,'foo', 'bar'), 'foobar', 'join strings with null returns string'); - equal(_(' ').join('foo', 'bar'), 'foo bar', 'join object oriented'); - }); - - test('Strings: reverse', function() { - equal(_.str.reverse('foo'), 'oof' ); - equal(_.str.reverse('foobar'), 'raboof' ); - equal(_.str.reverse('foo bar'), 'rab oof' ); - equal(_.str.reverse('saippuakauppias'), 'saippuakauppias' ); - equal(_.str.reverse(123), '321', 'Non string'); - equal(_.str.reverse(123.45), '54.321', 'Non string'); - equal(_.str.reverse(''), '', 'reversing empty string returns empty string' ); - equal(_.str.reverse(null), '', 'reversing null returns empty string' ); - equal(_.str.reverse(undefined), '', 'reversing undefined returns empty string' ); - }); - - test('Strings: clean', function() { - equal(_(' foo bar ').clean(), 'foo bar'); - equal(_(123).clean(), '123'); - equal(_('').clean(), '', 'claning empty string returns empty string'); - equal(_(null).clean(), '', 'claning null returns empty string'); - equal(_(undefined).clean(), '', 'claning undefined returns empty string'); - }); - - test('Strings: sprintf', function() { - // Should be very tested function already. Thanks to - // http://www.diveintojavascript.com/projects/sprintf-for-javascript - equal(_.sprintf('Hello %s', 'me'), 'Hello me', 'basic'); - equal(_('Hello %s').sprintf('me'), 'Hello me', 'object'); - equal(_('hello %s').chain().sprintf('me').capitalize().value(), 'Hello me', 'Chaining works'); - equal(_.sprintf('%.1f', 1.22222), '1.2', 'round'); - equal(_.sprintf('%.1f', 1.17), '1.2', 'round 2'); - equal(_.sprintf('%(id)d - %(name)s', {id: 824, name: 'Hello World'}), '824 - Hello World', 'Named replacements work'); - equal(_.sprintf('%(args[0].id)d - %(args[1].name)s', {args: [{id: 824}, {name: 'Hello World'}]}), '824 - Hello World', 'Named replacements with arrays work'); - }); - - - test('Strings: vsprintf', function() { - equal(_.vsprintf('Hello %s', ['me']), 'Hello me', 'basic'); - equal(_('Hello %s').vsprintf(['me']), 'Hello me', 'object'); - equal(_('hello %s').chain().vsprintf(['me']).capitalize().value(), 'Hello me', 'Chaining works'); - equal(_.vsprintf('%.1f', [1.22222]), '1.2', 'round'); - equal(_.vsprintf('%.1f', [1.17]), '1.2', 'round 2'); - equal(_.vsprintf('%(id)d - %(name)s', [{id: 824, name: 'Hello World'}]), '824 - Hello World', 'Named replacement works'); - equal(_.vsprintf('%(args[0].id)d - %(args[1].name)s', [{args: [{id: 824}, {name: 'Hello World'}]}]), '824 - Hello World', 'Named replacement with arrays works'); - }); - - test('Strings: startsWith', function() { - ok(_('foobar').startsWith('foo'), 'foobar starts with foo'); - ok(!_('oobar').startsWith('foo'), 'oobar does not start with foo'); - ok(_(12345).startsWith(123), '12345 starts with 123'); - ok(!_(2345).startsWith(123), '2345 does not start with 123'); - ok(_('').startsWith(''), 'empty string starts with empty string'); - ok(_(null).startsWith(''), 'null starts with empty string'); - ok(!_(null).startsWith('foo'), 'null starts with foo'); - }); - - test('Strings: endsWith', function() { - ok(_('foobar').endsWith('bar'), 'foobar ends with bar'); - ok(_.endsWith('foobar', 'bar'), 'foobar ends with bar'); - ok(_.endsWith('00018-0000062.Plone.sdh264.1a7264e6912a91aa4a81b64dc5517df7b8875994.mp4', 'mp4'), 'endsWith .mp4'); - ok(!_('fooba').endsWith('bar'), 'fooba does not end with bar'); - ok(_.endsWith(12345, 45), '12345 ends with 45'); - ok(!_.endsWith(12345, 6), '12345 does not end with 6'); - ok(_('').endsWith(''), 'empty string ends with empty string'); - ok(_(null).endsWith(''), 'null ends with empty string'); - ok(!_(null).endsWith('foo'), 'null ends with foo'); - }); - - test('Strings: include', function() { - ok(_.str.include('foobar', 'bar'), 'foobar includes bar'); - ok(!_.str.include('foobar', 'buzz'), 'foobar does not includes buzz'); - ok(_.str.include(12345, 34), '12345 includes 34'); - ok(!_.str.contains(12345, 6), '12345 does not includes 6'); - ok(!_.str.include('', 34), 'empty string includes 34'); - ok(!_.str.include(null, 34), 'null includes 34'); - ok(_.str.include(null, ''), 'null includes empty string'); - }); - - test('String: chop', function(){ - ok(_('whitespace').chop(2).length === 5, 'output [wh, it, es, pa, ce]'); - ok(_('whitespace').chop(3).length === 4, 'output [whi, tes, pac, e]'); - ok(_('whitespace').chop()[0].length === 10, 'output [whitespace]'); - ok(_(12345).chop(1).length === 5, 'output [1, 2, 3, 4, 5]'); - }); - - test('String: clean', function(){ - equal(_.clean(' foo bar '), 'foo bar'); - equal(_.clean(''), ''); - equal(_.clean(null), ''); - equal(_.clean(1), '1'); - }); - - test('String: count', function(){ - equal(_('Hello world').count('l'), 3); - equal(_('Hello world').count('Hello'), 1); - equal(_('Hello world').count('foo'), 0); - equal(_('x.xx....x.x').count('x'), 5); - equal(_('').count('x'), 0); - equal(_(null).count('x'), 0); - equal(_(undefined).count('x'), 0); - equal(_(12345).count(1), 1); - equal(_(11345).count(1), 2); - }); - - test('String: insert', function(){ - equal(_('Hello ').insert(6, 'Jessy'), 'Hello Jessy'); - equal(_('Hello ').insert(100, 'Jessy'), 'Hello Jessy'); - equal(_('').insert(100, 'Jessy'), 'Jessy'); - equal(_(null).insert(100, 'Jessy'), 'Jessy'); - equal(_(undefined).insert(100, 'Jessy'), 'Jessy'); - equal(_(12345).insert(6, 'Jessy'), '12345Jessy'); - }); - - test('String: splice', function(){ - equal(_('https://edtsech@bitbucket.org/edtsech/underscore.strings').splice(30, 7, 'epeli'), - 'https://edtsech@bitbucket.org/epeli/underscore.strings'); - equal(_.splice(12345, 1, 2, 321), '132145', 'Non strings'); - }); - - test('String: succ', function(){ - equal(_('a').succ(), 'b'); - equal(_('A').succ(), 'B'); - equal(_('+').succ(), ','); - equal(_(1).succ(), '2'); - }); - - test('String: titleize', function(){ - equal(_('the titleize string method').titleize(), 'The Titleize String Method'); - equal(_('the titleize string method').titleize(), 'The Titleize String Method'); - equal(_('').titleize(), '', 'Titleize empty string returns empty string'); - equal(_(null).titleize(), '', 'Titleize null returns empty string'); - equal(_(undefined).titleize(), '', 'Titleize undefined returns empty string'); - equal(_('let\'s have some fun').titleize(), 'Let\'s Have Some Fun'); - equal(_(123).titleize(), '123'); - }); - - test('String: camelize', function(){ - equal(_('the_camelize_string_method').camelize(), 'theCamelizeStringMethod'); - equal(_('-the-camelize-string-method').camelize(), 'TheCamelizeStringMethod'); - equal(_('the camelize string method').camelize(), 'theCamelizeStringMethod'); - equal(_(' the camelize string method').camelize(), 'theCamelizeStringMethod'); - equal(_('the camelize string method').camelize(), 'theCamelizeStringMethod'); - equal(_('').camelize(), '', 'Camelize empty string returns empty string'); - equal(_(null).camelize(), '', 'Camelize null returns empty string'); - equal(_(undefined).camelize(), '', 'Camelize undefined returns empty string'); - equal(_(123).camelize(), '123'); - }); - - test('String: underscored', function(){ - equal(_('the-underscored-string-method').underscored(), 'the_underscored_string_method'); - equal(_('theUnderscoredStringMethod').underscored(), 'the_underscored_string_method'); - equal(_('TheUnderscoredStringMethod').underscored(), 'the_underscored_string_method'); - equal(_(' the underscored string method').underscored(), 'the_underscored_string_method'); - equal(_('').underscored(), ''); - equal(_(null).underscored(), ''); - equal(_(undefined).underscored(), ''); - equal(_(123).underscored(), '123'); - }); - - test('String: dasherize', function(){ - equal(_('the_dasherize_string_method').dasherize(), 'the-dasherize-string-method'); - equal(_('TheDasherizeStringMethod').dasherize(), '-the-dasherize-string-method'); - equal(_('thisIsATest').dasherize(), 'this-is-a-test'); - equal(_('this Is A Test').dasherize(), 'this-is-a-test'); - equal(_('thisIsATest123').dasherize(), 'this-is-a-test123'); - equal(_('123thisIsATest').dasherize(), '123this-is-a-test'); - equal(_('the dasherize string method').dasherize(), 'the-dasherize-string-method'); - equal(_('the dasherize string method ').dasherize(), 'the-dasherize-string-method'); - equal(_('téléphone').dasherize(), 'téléphone'); - equal(_('foo$bar').dasherize(), 'foo$bar'); - equal(_('').dasherize(), ''); - equal(_(null).dasherize(), ''); - equal(_(undefined).dasherize(), ''); - equal(_(123).dasherize(), '123'); - }); - - test('String: camelize', function(){ - equal(_.camelize('-moz-transform'), 'MozTransform'); - equal(_.camelize('webkit-transform'), 'webkitTransform'); - equal(_.camelize('under_scored'), 'underScored'); - equal(_.camelize(' with spaces'), 'withSpaces'); - equal(_('').camelize(), ''); - equal(_(null).camelize(), ''); - equal(_(undefined).camelize(), ''); - }); - - test('String: join', function(){ - equal(_.join(1, 2, 3, 4), '21314'); - equal(_.join('|', 'foo', 'bar', 'baz'), 'foo|bar|baz'); - equal(_.join('',2,3,null), '23'); - equal(_.join(null,2,3), '23'); - }); - - test('String: classify', function(){ - equal(_.classify(1), '1'); - equal(_('some_class_name').classify(), 'SomeClassName'); - equal(_('my wonderfull class_name').classify(), 'MyWonderfullClassName'); - equal(_('my wonderfull.class.name').classify(), 'MyWonderfullClassName'); - }); - - test('String: humanize', function(){ - equal(_('the_humanize_string_method').humanize(), 'The humanize string method'); - equal(_('ThehumanizeStringMethod').humanize(), 'Thehumanize string method'); - equal(_('the humanize string method').humanize(), 'The humanize string method'); - equal(_('the humanize_id string method_id').humanize(), 'The humanize id string method'); - equal(_('the humanize string method ').humanize(), 'The humanize string method'); - equal(_(' capitalize dash-CamelCase_underscore trim ').humanize(), 'Capitalize dash camel case underscore trim'); - equal(_(123).humanize(), '123'); - equal(_('').humanize(), ''); - equal(_(null).humanize(), ''); - equal(_(undefined).humanize(), ''); - }); - - test('String: truncate', function(){ - equal(_('Hello world').truncate(6, 'read more'), 'Hello read more'); - equal(_('Hello world').truncate(5), 'Hello...'); - equal(_('Hello').truncate(10), 'Hello'); - equal(_('').truncate(10), ''); - equal(_(null).truncate(10), ''); - equal(_(undefined).truncate(10), ''); - equal(_(1234567890).truncate(5), '12345...'); - }); - - test('String: prune', function(){ - equal(_('Hello, cruel world').prune(6, ' read more'), 'Hello read more'); - equal(_('Hello, world').prune(5, 'read a lot more'), 'Hello, world'); - equal(_('Hello, world').prune(5), 'Hello...'); - equal(_('Hello, world').prune(8), 'Hello...'); - equal(_('Hello, cruel world').prune(15), 'Hello, cruel...'); - equal(_('Hello world').prune(22), 'Hello world'); - equal(_('Привет, жестокий мир').prune(6, ' read more'), 'Привет read more'); - equal(_('Привет, мир').prune(6, 'read a lot more'), 'Привет, мир'); - equal(_('Привет, мир').prune(6), 'Привет...'); - equal(_('Привет, мир').prune(8), 'Привет...'); - equal(_('Привет, жестокий мир').prune(16), 'Привет, жестокий...'); - equal(_('Привет, мир').prune(22), 'Привет, мир'); - equal(_('alksjd!!!!!!....').prune(100, ''), 'alksjd!!!!!!....'); - equal(_(123).prune(10), '123'); - equal(_(123).prune(1, 321), '321'); - equal(_('').prune(5), ''); - equal(_(null).prune(5), ''); - equal(_(undefined).prune(5), ''); - }); - - test('String: isBlank', function(){ - ok(_('').isBlank()); - ok(_(' ').isBlank()); - ok(_('\n').isBlank()); - ok(!_('a').isBlank()); - ok(!_('0').isBlank()); - ok(!_(0).isBlank()); - ok(_('').isBlank()); - ok(_(null).isBlank()); - ok(_(undefined).isBlank()); - }); - - test('String: escapeRegExp', function(){ - equal(_.escapeRegExp(/hello(?=\sworld)/.source), 'hello\\(\\?\\=\\\\sworld\\)', 'with lookahead'); - equal(_.escapeRegExp(/hello(?!\shell)/.source), 'hello\\(\\?\\!\\\\shell\\)', 'with negative lookahead'); - }); - - test('String: escapeHTML', function(){ - equal(_('
Blah & "blah" & \'blah\'
').escapeHTML(), - '<div>Blah & "blah" & 'blah'</div>'); - equal(_('<').escapeHTML(), '&lt;'); - equal(_(5).escapeHTML(), '5'); - equal(_('').escapeHTML(), ''); - equal(_(null).escapeHTML(), ''); - equal(_(undefined).escapeHTML(), ''); - }); - - test('String: unescapeHTML', function(){ - equal(_('<div>Blah & "blah" & 'blah'</div>').unescapeHTML(), - '
Blah & "blah" & \'blah\'
'); - equal(_('&lt;').unescapeHTML(), '<'); - equal(_(''').unescapeHTML(), '\''); - equal(_(''').unescapeHTML(), '\''); - equal(_(''').unescapeHTML(), '\''); - equal(_('J').unescapeHTML(), 'J'); - equal(_('J').unescapeHTML(), 'J'); - equal(_('J').unescapeHTML(), 'J'); - equal(_('&_#39;').unescapeHTML(), '&_#39;'); - equal(_(''_;').unescapeHTML(), ''_;'); - equal(_('&#38;').unescapeHTML(), '&'); - equal(_('&amp;').unescapeHTML(), '&'); - equal(_('').unescapeHTML(), ''); - equal(_(null).unescapeHTML(), ''); - equal(_(undefined).unescapeHTML(), ''); - equal(_(5).unescapeHTML(), '5'); - // equal(_(undefined).unescapeHTML(), ''); - }); - - test('String: words', function() { - deepEqual(_('I love you!').words(), ['I', 'love', 'you!']); - deepEqual(_(' I love you! ').words(), ['I', 'love', 'you!']); - deepEqual(_('I_love_you!').words('_'), ['I', 'love', 'you!']); - deepEqual(_('I-love-you!').words(/-/), ['I', 'love', 'you!']); - deepEqual(_(123).words(), ['123'], '123 number has one word "123".'); - deepEqual(_(0).words(), ['0'], 'Zero number has one word "0".'); - deepEqual(_('').words(), [], 'Empty strings has no words.'); - deepEqual(_(' ').words(), [], 'Blank strings has no words.'); - deepEqual(_(null).words(), [], 'null has no words.'); - deepEqual(_(undefined).words(), [], 'undefined has no words.'); - }); - - test('String: chars', function() { - equal(_('Hello').chars().length, 5); - equal(_(123).chars().length, 3); - equal(_('').chars().length, 0); - equal(_(null).chars().length, 0); - equal(_(undefined).chars().length, 0); - }); - - test('String: swapCase', function(){ - equal(_('AaBbCcDdEe').swapCase(), 'aAbBcCdDeE'); - equal(_('Hello World').swapCase(), 'hELLO wORLD'); - equal(_('').swapCase(), ''); - equal(_(null).swapCase(), ''); - equal(_(undefined).swapCase(), ''); - }); - - test('String: lines', function() { - equal(_('Hello\nWorld').lines().length, 2); - equal(_('Hello World').lines().length, 1); - equal(_(123).lines().length, 1); - equal(_('').lines().length, 1); - equal(_(null).lines().length, 0); - equal(_(undefined).lines().length, 0); - }); - - test('String: pad', function() { - equal(_('1').pad(8), ' 1'); - equal(_(1).pad(8), ' 1'); - equal(_('1').pad(8, '0'), '00000001'); - equal(_('1').pad(8, '0', 'left'), '00000001'); - equal(_('1').pad(8, '0', 'right'), '10000000'); - equal(_('1').pad(8, '0', 'both'), '00001000'); - equal(_('foo').pad(8, '0', 'both'), '000foo00'); - equal(_('foo').pad(7, '0', 'both'), '00foo00'); - equal(_('foo').pad(7, '!@$%dofjrofj', 'both'), '!!foo!!'); - equal(_('').pad(2), ' '); - equal(_(null).pad(2), ' '); - equal(_(undefined).pad(2), ' '); - }); - - test('String: lpad', function() { - equal(_('1').lpad(8), ' 1'); - equal(_(1).lpad(8), ' 1'); - equal(_('1').lpad(8, '0'), '00000001'); - equal(_('1').lpad(8, '0', 'left'), '00000001'); - equal(_('').lpad(2), ' '); - equal(_(null).lpad(2), ' '); - equal(_(undefined).lpad(2), ' '); - }); - - test('String: rpad', function() { - equal(_('1').rpad(8), '1 '); - equal(_(1).lpad(8), ' 1'); - equal(_('1').rpad(8, '0'), '10000000'); - equal(_('foo').rpad(8, '0'), 'foo00000'); - equal(_('foo').rpad(7, '0'), 'foo0000'); - equal(_('').rpad(2), ' '); - equal(_(null).rpad(2), ' '); - equal(_(undefined).rpad(2), ' '); - }); - - test('String: lrpad', function() { - equal(_('1').lrpad(8), ' 1 '); - equal(_(1).lrpad(8), ' 1 '); - equal(_('1').lrpad(8, '0'), '00001000'); - equal(_('foo').lrpad(8, '0'), '000foo00'); - equal(_('foo').lrpad(7, '0'), '00foo00'); - equal(_('foo').lrpad(7, '!@$%dofjrofj'), '!!foo!!'); - equal(_('').lrpad(2), ' '); - equal(_(null).lrpad(2), ' '); - equal(_(undefined).lrpad(2), ' '); - }); - - test('String: toNumber', function() { - deepEqual(_('not a number').toNumber(), NaN); - equal(_(0).toNumber(), 0); - equal(_('0').toNumber(), 0); - equal(_('0.0').toNumber(), 0); - equal(_('0.1').toNumber(), 0); - equal(_('0.1').toNumber(1), 0.1); - equal(_(' 0.1 ').toNumber(1), 0.1); - equal(_('0000').toNumber(), 0); - equal(_('2.345').toNumber(), 2); - equal(_('2.345').toNumber(NaN), 2); - equal(_('2.345').toNumber(2), 2.35); - equal(_('2.344').toNumber(2), 2.34); - equal(_('2').toNumber(2), 2.00); - equal(_(2).toNumber(2), 2.00); - equal(_(-2).toNumber(), -2); - equal(_('-2').toNumber(), -2); - equal(_('').toNumber(), 0); - equal(_(null).toNumber(), 0); - equal(_(undefined).toNumber(), 0); - }); - - test('String: numberFormat', function() { - equal(_.numberFormat(9000), '9,000'); - equal(_.numberFormat(9000, 0), '9,000'); - equal(_.numberFormat(9000, 0, '', ''), '9000'); - equal(_.numberFormat(90000, 2), '90,000.00'); - equal(_.numberFormat(1000.754), '1,001'); - equal(_.numberFormat(1000.754, 2), '1,000.75'); - equal(_.numberFormat(1000.754, 0, ',', '.'), '1.001'); - equal(_.numberFormat(1000.754, 2, ',', '.'), '1.000,75'); - equal(_.numberFormat(1000000.754, 2, ',', '.'), '1.000.000,75'); - equal(_.numberFormat(1000000000), '1,000,000,000'); - equal(_.numberFormat(100000000), '100,000,000'); - equal(_.numberFormat('not number'), ''); - equal(_.numberFormat(), ''); - equal(_.numberFormat(null, '.', ','), ''); - equal(_.numberFormat(undefined, '.', ','), ''); - equal(_.numberFormat(new Number(5000)), '5,000'); - }); - - test('String: strRight', function() { - equal(_('This_is_a_test_string').strRight('_'), 'is_a_test_string'); - equal(_('This_is_a_test_string').strRight('string'), ''); - equal(_('This_is_a_test_string').strRight(), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strRight(''), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strRight('-'), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strRight(''), 'This_is_a_test_string'); - equal(_('').strRight('foo'), ''); - equal(_(null).strRight('foo'), ''); - equal(_(undefined).strRight('foo'), ''); - equal(_(12345).strRight(2), '345'); - }); - - test('String: strRightBack', function() { - equal(_('This_is_a_test_string').strRightBack('_'), 'string'); - equal(_('This_is_a_test_string').strRightBack('string'), ''); - equal(_('This_is_a_test_string').strRightBack(), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strRightBack(''), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strRightBack('-'), 'This_is_a_test_string'); - equal(_('').strRightBack('foo'), ''); - equal(_(null).strRightBack('foo'), ''); - equal(_(undefined).strRightBack('foo'), ''); - equal(_(12345).strRightBack(2), '345'); - }); - - test('String: strLeft', function() { - equal(_('This_is_a_test_string').strLeft('_'), 'This'); - equal(_('This_is_a_test_string').strLeft('This'), ''); - equal(_('This_is_a_test_string').strLeft(), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strLeft(''), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strLeft('-'), 'This_is_a_test_string'); - equal(_('').strLeft('foo'), ''); - equal(_(null).strLeft('foo'), ''); - equal(_(undefined).strLeft('foo'), ''); - equal(_(123454321).strLeft(3), '12'); - }); - - test('String: strLeftBack', function() { - equal(_('This_is_a_test_string').strLeftBack('_'), 'This_is_a_test'); - equal(_('This_is_a_test_string').strLeftBack('This'), ''); - equal(_('This_is_a_test_string').strLeftBack(), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strLeftBack(''), 'This_is_a_test_string'); - equal(_('This_is_a_test_string').strLeftBack('-'), 'This_is_a_test_string'); - equal(_('').strLeftBack('foo'), ''); - equal(_(null).strLeftBack('foo'), ''); - equal(_(undefined).strLeftBack('foo'), ''); - equal(_(123454321).strLeftBack(3), '123454'); - }); - - test('Strings: stripTags', function() { - equal(_('a link').stripTags(), 'a link'); - equal(_('a link - - - - - - - - -

Underscore.string Test Suite

-

-

-
    -
    -

    Underscore.string Speed Suite

    - -
    - - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html deleted file mode 100644 index 9854c17..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - Underscore.strings Test Suite - - - - - - - - -

    Underscore.string Test Suite

    -

    -

    -
      - - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js deleted file mode 100644 index 32252a3..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js +++ /dev/null @@ -1,200 +0,0 @@ -$(document).ready(function() { - - module("Arrays"); - - test("first", function() { - equal(_.first([1,2,3]), 1, 'can pull out the first element of an array'); - equal(_([1, 2, 3]).first(), 1, 'can perform OO-style "first()"'); - equal(_.first([1,2,3], 0).join(', '), "", 'can pass an index to first'); - equal(_.first([1,2,3], 2).join(', '), '1, 2', 'can pass an index to first'); - equal(_.first([1,2,3], 5).join(', '), '1, 2, 3', 'can pass an index to first'); - var result = (function(){ return _.first(arguments); })(4, 3, 2, 1); - equal(result, 4, 'works on an arguments object.'); - result = _.map([[1,2,3],[1,2,3]], _.first); - equal(result.join(','), '1,1', 'works well with _.map'); - result = (function() { return _.take([1,2,3], 2); })(); - equal(result.join(','), '1,2', 'aliased as take'); - - equal(_.first(null), undefined, 'handles nulls'); - }); - - test("rest", function() { - var numbers = [1, 2, 3, 4]; - equal(_.rest(numbers).join(", "), "2, 3, 4", 'working rest()'); - equal(_.rest(numbers, 0).join(", "), "1, 2, 3, 4", 'working rest(0)'); - equal(_.rest(numbers, 2).join(', '), '3, 4', 'rest can take an index'); - var result = (function(){ return _(arguments).tail(); })(1, 2, 3, 4); - equal(result.join(', '), '2, 3, 4', 'aliased as tail and works on arguments object'); - result = _.map([[1,2,3],[1,2,3]], _.rest); - equal(_.flatten(result).join(','), '2,3,2,3', 'works well with _.map'); - result = (function(){ return _(arguments).drop(); })(1, 2, 3, 4); - equal(result.join(', '), '2, 3, 4', 'aliased as drop and works on arguments object'); - }); - - test("initial", function() { - equal(_.initial([1,2,3,4,5]).join(", "), "1, 2, 3, 4", 'working initial()'); - equal(_.initial([1,2,3,4],2).join(", "), "1, 2", 'initial can take an index'); - var result = (function(){ return _(arguments).initial(); })(1, 2, 3, 4); - equal(result.join(", "), "1, 2, 3", 'initial works on arguments object'); - result = _.map([[1,2,3],[1,2,3]], _.initial); - equal(_.flatten(result).join(','), '1,2,1,2', 'initial works with _.map'); - }); - - test("last", function() { - equal(_.last([1,2,3]), 3, 'can pull out the last element of an array'); - equal(_.last([1,2,3], 0).join(', '), "", 'can pass an index to last'); - equal(_.last([1,2,3], 2).join(', '), '2, 3', 'can pass an index to last'); - equal(_.last([1,2,3], 5).join(', '), '1, 2, 3', 'can pass an index to last'); - var result = (function(){ return _(arguments).last(); })(1, 2, 3, 4); - equal(result, 4, 'works on an arguments object'); - result = _.map([[1,2,3],[1,2,3]], _.last); - equal(result.join(','), '3,3', 'works well with _.map'); - - equal(_.last(null), undefined, 'handles nulls'); - }); - - test("compact", function() { - equal(_.compact([0, 1, false, 2, false, 3]).length, 3, 'can trim out all falsy values'); - var result = (function(){ return _(arguments).compact().length; })(0, 1, false, 2, false, 3); - equal(result, 3, 'works on an arguments object'); - }); - - test("flatten", function() { - if (window.JSON) { - var list = [1, [2], [3, [[[4]]]]]; - equal(JSON.stringify(_.flatten(list)), '[1,2,3,4]', 'can flatten nested arrays'); - equal(JSON.stringify(_.flatten(list, true)), '[1,2,3,[[[4]]]]', 'can shallowly flatten nested arrays'); - var result = (function(){ return _.flatten(arguments); })(1, [2], [3, [[[4]]]]); - equal(JSON.stringify(result), '[1,2,3,4]', 'works on an arguments object'); - } - }); - - test("without", function() { - var list = [1, 2, 1, 0, 3, 1, 4]; - equal(_.without(list, 0, 1).join(', '), '2, 3, 4', 'can remove all instances of an object'); - var result = (function(){ return _.without(arguments, 0, 1); })(1, 2, 1, 0, 3, 1, 4); - equal(result.join(', '), '2, 3, 4', 'works on an arguments object'); - - var list = [{one : 1}, {two : 2}]; - ok(_.without(list, {one : 1}).length == 2, 'uses real object identity for comparisons.'); - ok(_.without(list, list[0]).length == 1, 'ditto.'); - }); - - test("uniq", function() { - var list = [1, 2, 1, 3, 1, 4]; - equal(_.uniq(list).join(', '), '1, 2, 3, 4', 'can find the unique values of an unsorted array'); - - var list = [1, 1, 1, 2, 2, 3]; - equal(_.uniq(list, true).join(', '), '1, 2, 3', 'can find the unique values of a sorted array faster'); - - var list = [{name:'moe'}, {name:'curly'}, {name:'larry'}, {name:'curly'}]; - var iterator = function(value) { return value.name; }; - equal(_.map(_.uniq(list, false, iterator), iterator).join(', '), 'moe, curly, larry', 'can find the unique values of an array using a custom iterator'); - - var iterator = function(value) { return value +1; }; - var list = [1, 2, 2, 3, 4, 4]; - equal(_.uniq(list, true, iterator).join(', '), '1, 2, 3, 4', 'iterator works with sorted array'); - - var result = (function(){ return _.uniq(arguments); })(1, 2, 1, 3, 1, 4); - equal(result.join(', '), '1, 2, 3, 4', 'works on an arguments object'); - }); - - test("intersection", function() { - var stooges = ['moe', 'curly', 'larry'], leaders = ['moe', 'groucho']; - equal(_.intersection(stooges, leaders).join(''), 'moe', 'can take the set intersection of two arrays'); - equal(_(stooges).intersection(leaders).join(''), 'moe', 'can perform an OO-style intersection'); - var result = (function(){ return _.intersection(arguments, leaders); })('moe', 'curly', 'larry'); - equal(result.join(''), 'moe', 'works on an arguments object'); - }); - - test("union", function() { - var result = _.union([1, 2, 3], [2, 30, 1], [1, 40]); - equal(result.join(' '), '1 2 3 30 40', 'takes the union of a list of arrays'); - - var result = _.union([1, 2, 3], [2, 30, 1], [1, 40, [1]]); - equal(result.join(' '), '1 2 3 30 40 1', 'takes the union of a list of nested arrays'); - }); - - test("difference", function() { - var result = _.difference([1, 2, 3], [2, 30, 40]); - equal(result.join(' '), '1 3', 'takes the difference of two arrays'); - - var result = _.difference([1, 2, 3, 4], [2, 30, 40], [1, 11, 111]); - equal(result.join(' '), '3 4', 'takes the difference of three arrays'); - }); - - test('zip', function() { - var names = ['moe', 'larry', 'curly'], ages = [30, 40, 50], leaders = [true]; - var stooges = _.zip(names, ages, leaders); - equal(String(stooges), 'moe,30,true,larry,40,,curly,50,', 'zipped together arrays of different lengths'); - }); - - test('object', function() { - var result = _.object(['moe', 'larry', 'curly'], [30, 40, 50]); - var shouldBe = {moe: 30, larry: 40, curly: 50}; - ok(_.isEqual(result, shouldBe), 'two arrays zipped together into an object'); - - result = _.object([['one', 1], ['two', 2], ['three', 3]]); - shouldBe = {one: 1, two: 2, three: 3}; - ok(_.isEqual(result, shouldBe), 'an array of pairs zipped together into an object'); - - var stooges = {moe: 30, larry: 40, curly: 50}; - ok(_.isEqual(_.object(_.pairs(stooges)), stooges), 'an object converted to pairs and back to an object'); - - ok(_.isEqual(_.object(null), {}), 'handles nulls'); - }); - - test("indexOf", function() { - var numbers = [1, 2, 3]; - numbers.indexOf = null; - equal(_.indexOf(numbers, 2), 1, 'can compute indexOf, even without the native function'); - var result = (function(){ return _.indexOf(arguments, 2); })(1, 2, 3); - equal(result, 1, 'works on an arguments object'); - equal(_.indexOf(null, 2), -1, 'handles nulls properly'); - - var numbers = [10, 20, 30, 40, 50], num = 35; - var index = _.indexOf(numbers, num, true); - equal(index, -1, '35 is not in the list'); - - numbers = [10, 20, 30, 40, 50]; num = 40; - index = _.indexOf(numbers, num, true); - equal(index, 3, '40 is in the list'); - - numbers = [1, 40, 40, 40, 40, 40, 40, 40, 50, 60, 70]; num = 40; - index = _.indexOf(numbers, num, true); - equal(index, 1, '40 is in the list'); - - numbers = [1, 2, 3, 1, 2, 3, 1, 2, 3]; - index = _.indexOf(numbers, 2, 5); - equal(index, 7, 'supports the fromIndex argument'); - }); - - test("lastIndexOf", function() { - var numbers = [1, 0, 1]; - equal(_.lastIndexOf(numbers, 1), 2); - - numbers = [1, 0, 1, 0, 0, 1, 0, 0, 0]; - numbers.lastIndexOf = null; - equal(_.lastIndexOf(numbers, 1), 5, 'can compute lastIndexOf, even without the native function'); - equal(_.lastIndexOf(numbers, 0), 8, 'lastIndexOf the other element'); - var result = (function(){ return _.lastIndexOf(arguments, 1); })(1, 0, 1, 0, 0, 1, 0, 0, 0); - equal(result, 5, 'works on an arguments object'); - equal(_.indexOf(null, 2), -1, 'handles nulls properly'); - - numbers = [1, 2, 3, 1, 2, 3, 1, 2, 3]; - index = _.lastIndexOf(numbers, 2, 2); - equal(index, 1, 'supports the fromIndex argument'); - }); - - test("range", function() { - equal(_.range(0).join(''), '', 'range with 0 as a first argument generates an empty array'); - equal(_.range(4).join(' '), '0 1 2 3', 'range with a single positive argument generates an array of elements 0,1,2,...,n-1'); - equal(_.range(5, 8).join(' '), '5 6 7', 'range with two arguments a & b, a<b generates an array of elements a,a+1,a+2,...,b-2,b-1'); - equal(_.range(8, 5).join(''), '', 'range with two arguments a & b, b<a generates an empty array'); - equal(_.range(3, 10, 3).join(' '), '3 6 9', 'range with three arguments a & b & c, c < b-a, a < b generates an array of elements a,a+c,a+2c,...,b - (multiplier of a) < c'); - equal(_.range(3, 10, 15).join(''), '3', 'range with three arguments a & b & c, c > b-a, a < b generates an array with a single element, equal to a'); - equal(_.range(12, 7, -2).join(' '), '12 10 8', 'range with three arguments a & b & c, a > b, c < 0 generates an array of elements a,a-c,a-2c and ends with the number not less than b'); - equal(_.range(0, -10, -1).join(' '), '0 -1 -2 -3 -4 -5 -6 -7 -8 -9', 'final example in the Python docs'); - }); - -}); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js deleted file mode 100644 index 16cf7bf..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js +++ /dev/null @@ -1,59 +0,0 @@ -$(document).ready(function() { - - module("Chaining"); - - test("map/flatten/reduce", function() { - var lyrics = [ - "I'm a lumberjack and I'm okay", - "I sleep all night and I work all day", - "He's a lumberjack and he's okay", - "He sleeps all night and he works all day" - ]; - var counts = _(lyrics).chain() - .map(function(line) { return line.split(''); }) - .flatten() - .reduce(function(hash, l) { - hash[l] = hash[l] || 0; - hash[l]++; - return hash; - }, {}).value(); - ok(counts['a'] == 16 && counts['e'] == 10, 'counted all the letters in the song'); - }); - - test("select/reject/sortBy", function() { - var numbers = [1,2,3,4,5,6,7,8,9,10]; - numbers = _(numbers).chain().select(function(n) { - return n % 2 == 0; - }).reject(function(n) { - return n % 4 == 0; - }).sortBy(function(n) { - return -n; - }).value(); - equal(numbers.join(', '), "10, 6, 2", "filtered and reversed the numbers"); - }); - - test("select/reject/sortBy in functional style", function() { - var numbers = [1,2,3,4,5,6,7,8,9,10]; - numbers = _.chain(numbers).select(function(n) { - return n % 2 == 0; - }).reject(function(n) { - return n % 4 == 0; - }).sortBy(function(n) { - return -n; - }).value(); - equal(numbers.join(', '), "10, 6, 2", "filtered and reversed the numbers"); - }); - - test("reverse/concat/unshift/pop/map", function() { - var numbers = [1,2,3,4,5]; - numbers = _(numbers).chain() - .reverse() - .concat([5, 5, 5]) - .unshift(17) - .pop() - .map(function(n){ return n * 2; }) - .value(); - equal(numbers.join(', '), "34, 10, 8, 6, 4, 2, 10, 10", 'can chain together array functions.'); - }); - -}); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js deleted file mode 100644 index e089626..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js +++ /dev/null @@ -1,426 +0,0 @@ -$(document).ready(function() { - - module("Collections"); - - test("each", function() { - _.each([1, 2, 3], function(num, i) { - equal(num, i + 1, 'each iterators provide value and iteration count'); - }); - - var answers = []; - _.each([1, 2, 3], function(num){ answers.push(num * this.multiplier);}, {multiplier : 5}); - equal(answers.join(', '), '5, 10, 15', 'context object property accessed'); - - answers = []; - _.forEach([1, 2, 3], function(num){ answers.push(num); }); - equal(answers.join(', '), '1, 2, 3', 'aliased as "forEach"'); - - answers = []; - var obj = {one : 1, two : 2, three : 3}; - obj.constructor.prototype.four = 4; - _.each(obj, function(value, key){ answers.push(key); }); - equal(answers.join(", "), 'one, two, three', 'iterating over objects works, and ignores the object prototype.'); - delete obj.constructor.prototype.four; - - answer = null; - _.each([1, 2, 3], function(num, index, arr){ if (_.include(arr, num)) answer = true; }); - ok(answer, 'can reference the original collection from inside the iterator'); - - answers = 0; - _.each(null, function(){ ++answers; }); - equal(answers, 0, 'handles a null properly'); - }); - - test('map', function() { - var doubled = _.map([1, 2, 3], function(num){ return num * 2; }); - equal(doubled.join(', '), '2, 4, 6', 'doubled numbers'); - - doubled = _.collect([1, 2, 3], function(num){ return num * 2; }); - equal(doubled.join(', '), '2, 4, 6', 'aliased as "collect"'); - - var tripled = _.map([1, 2, 3], function(num){ return num * this.multiplier; }, {multiplier : 3}); - equal(tripled.join(', '), '3, 6, 9', 'tripled numbers with context'); - - var doubled = _([1, 2, 3]).map(function(num){ return num * 2; }); - equal(doubled.join(', '), '2, 4, 6', 'OO-style doubled numbers'); - - if (document.querySelectorAll) { - var ids = _.map(document.querySelectorAll('#map-test *'), function(n){ return n.id; }); - deepEqual(ids, ['id1', 'id2'], 'Can use collection methods on NodeLists.'); - } - - var ids = _.map($('#map-test').children(), function(n){ return n.id; }); - deepEqual(ids, ['id1', 'id2'], 'Can use collection methods on jQuery Array-likes.'); - - var ids = _.map(document.images, function(n){ return n.id; }); - ok(ids[0] == 'chart_image', 'can use collection methods on HTMLCollections'); - - var ifnull = _.map(null, function(){}); - ok(_.isArray(ifnull) && ifnull.length === 0, 'handles a null properly'); - }); - - test('reduce', function() { - var sum = _.reduce([1, 2, 3], function(sum, num){ return sum + num; }, 0); - equal(sum, 6, 'can sum up an array'); - - var context = {multiplier : 3}; - sum = _.reduce([1, 2, 3], function(sum, num){ return sum + num * this.multiplier; }, 0, context); - equal(sum, 18, 'can reduce with a context object'); - - sum = _.inject([1, 2, 3], function(sum, num){ return sum + num; }, 0); - equal(sum, 6, 'aliased as "inject"'); - - sum = _([1, 2, 3]).reduce(function(sum, num){ return sum + num; }, 0); - equal(sum, 6, 'OO-style reduce'); - - var sum = _.reduce([1, 2, 3], function(sum, num){ return sum + num; }); - equal(sum, 6, 'default initial value'); - - var ifnull; - try { - _.reduce(null, function(){}); - } catch (ex) { - ifnull = ex; - } - ok(ifnull instanceof TypeError, 'handles a null (without inital value) properly'); - - ok(_.reduce(null, function(){}, 138) === 138, 'handles a null (with initial value) properly'); - equal(_.reduce([], function(){}, undefined), undefined, 'undefined can be passed as a special case'); - raises(function() { _.reduce([], function(){}); }, TypeError, 'throws an error for empty arrays with no initial value'); - }); - - test('reduceRight', function() { - var list = _.reduceRight(["foo", "bar", "baz"], function(memo, str){ return memo + str; }, ''); - equal(list, 'bazbarfoo', 'can perform right folds'); - - var list = _.foldr(["foo", "bar", "baz"], function(memo, str){ return memo + str; }, ''); - equal(list, 'bazbarfoo', 'aliased as "foldr"'); - - var list = _.foldr(["foo", "bar", "baz"], function(memo, str){ return memo + str; }); - equal(list, 'bazbarfoo', 'default initial value'); - - var ifnull; - try { - _.reduceRight(null, function(){}); - } catch (ex) { - ifnull = ex; - } - ok(ifnull instanceof TypeError, 'handles a null (without inital value) properly'); - - var sum = _.reduceRight({a: 1, b: 2, c: 3}, function(sum, num){ return sum + num; }); - equal(sum, 6, 'default initial value on object'); - - ok(_.reduceRight(null, function(){}, 138) === 138, 'handles a null (with initial value) properly'); - - equal(_.reduceRight([], function(){}, undefined), undefined, 'undefined can be passed as a special case'); - raises(function() { _.reduceRight([], function(){}); }, TypeError, 'throws an error for empty arrays with no initial value'); - - // Assert that the correct arguments are being passed. - - var args, - memo = {}, - object = {a: 1, b: 2}, - lastKey = _.keys(object).pop(); - - var expected = lastKey == 'a' - ? [memo, 1, 'a', object] - : [memo, 2, 'b', object]; - - _.reduceRight(object, function() { - args || (args = _.toArray(arguments)); - }, memo); - - deepEqual(args, expected); - - // And again, with numeric keys. - - object = {'2': 'a', '1': 'b'}; - lastKey = _.keys(object).pop(); - args = null; - - expected = lastKey == '2' - ? [memo, 'a', '2', object] - : [memo, 'b', '1', object]; - - _.reduceRight(object, function() { - args || (args = _.toArray(arguments)); - }, memo); - - deepEqual(args, expected); - }); - - test('find', function() { - var array = [1, 2, 3, 4]; - strictEqual(_.find(array, function(n) { return n > 2; }), 3, 'should return first found `value`'); - strictEqual(_.find(array, function() { return false; }), void 0, 'should return `undefined` if `value` is not found'); - }); - - test('detect', function() { - var result = _.detect([1, 2, 3], function(num){ return num * 2 == 4; }); - equal(result, 2, 'found the first "2" and broke the loop'); - }); - - test('select', function() { - var evens = _.select([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); - equal(evens.join(', '), '2, 4, 6', 'selected each even number'); - - evens = _.filter([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); - equal(evens.join(', '), '2, 4, 6', 'aliased as "filter"'); - }); - - test('reject', function() { - var odds = _.reject([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); - equal(odds.join(', '), '1, 3, 5', 'rejected each even number'); - - var context = "obj"; - - var evens = _.reject([1, 2, 3, 4, 5, 6], function(num){ - equal(context, "obj"); - return num % 2 != 0; - }, context); - equal(evens.join(', '), '2, 4, 6', 'rejected each odd number'); - }); - - test('all', function() { - ok(_.all([], _.identity), 'the empty set'); - ok(_.all([true, true, true], _.identity), 'all true values'); - ok(!_.all([true, false, true], _.identity), 'one false value'); - ok(_.all([0, 10, 28], function(num){ return num % 2 == 0; }), 'even numbers'); - ok(!_.all([0, 11, 28], function(num){ return num % 2 == 0; }), 'an odd number'); - ok(_.all([1], _.identity) === true, 'cast to boolean - true'); - ok(_.all([0], _.identity) === false, 'cast to boolean - false'); - ok(_.every([true, true, true], _.identity), 'aliased as "every"'); - ok(!_.all([undefined, undefined, undefined], _.identity), 'works with arrays of undefined'); - }); - - test('any', function() { - var nativeSome = Array.prototype.some; - Array.prototype.some = null; - ok(!_.any([]), 'the empty set'); - ok(!_.any([false, false, false]), 'all false values'); - ok(_.any([false, false, true]), 'one true value'); - ok(_.any([null, 0, 'yes', false]), 'a string'); - ok(!_.any([null, 0, '', false]), 'falsy values'); - ok(!_.any([1, 11, 29], function(num){ return num % 2 == 0; }), 'all odd numbers'); - ok(_.any([1, 10, 29], function(num){ return num % 2 == 0; }), 'an even number'); - ok(_.any([1], _.identity) === true, 'cast to boolean - true'); - ok(_.any([0], _.identity) === false, 'cast to boolean - false'); - ok(_.some([false, false, true]), 'aliased as "some"'); - Array.prototype.some = nativeSome; - }); - - test('include', function() { - ok(_.include([1,2,3], 2), 'two is in the array'); - ok(!_.include([1,3,9], 2), 'two is not in the array'); - ok(_.contains({moe:1, larry:3, curly:9}, 3) === true, '_.include on objects checks their values'); - ok(_([1,2,3]).include(2), 'OO-style include'); - }); - - test('invoke', function() { - var list = [[5, 1, 7], [3, 2, 1]]; - var result = _.invoke(list, 'sort'); - equal(result[0].join(', '), '1, 5, 7', 'first array sorted'); - equal(result[1].join(', '), '1, 2, 3', 'second array sorted'); - }); - - test('invoke w/ function reference', function() { - var list = [[5, 1, 7], [3, 2, 1]]; - var result = _.invoke(list, Array.prototype.sort); - equal(result[0].join(', '), '1, 5, 7', 'first array sorted'); - equal(result[1].join(', '), '1, 2, 3', 'second array sorted'); - }); - - // Relevant when using ClojureScript - test('invoke when strings have a call method', function() { - String.prototype.call = function() { - return 42; - }; - var list = [[5, 1, 7], [3, 2, 1]]; - var s = "foo"; - equal(s.call(), 42, "call function exists"); - var result = _.invoke(list, 'sort'); - equal(result[0].join(', '), '1, 5, 7', 'first array sorted'); - equal(result[1].join(', '), '1, 2, 3', 'second array sorted'); - delete String.prototype.call; - equal(s.call, undefined, "call function removed"); - }); - - test('pluck', function() { - var people = [{name : 'moe', age : 30}, {name : 'curly', age : 50}]; - equal(_.pluck(people, 'name').join(', '), 'moe, curly', 'pulls names out of objects'); - }); - - test('where', function() { - var list = [{a: 1, b: 2}, {a: 2, b: 2}, {a: 1, b: 3}, {a: 1, b: 4}]; - var result = _.where(list, {a: 1}); - equal(result.length, 3); - equal(result[result.length - 1].b, 4); - result = _.where(list, {b: 2}); - equal(result.length, 2); - equal(result[0].a, 1); - }); - - test('max', function() { - equal(3, _.max([1, 2, 3]), 'can perform a regular Math.max'); - - var neg = _.max([1, 2, 3], function(num){ return -num; }); - equal(neg, 1, 'can perform a computation-based max'); - - equal(-Infinity, _.max({}), 'Maximum value of an empty object'); - equal(-Infinity, _.max([]), 'Maximum value of an empty array'); - - equal(299999, _.max(_.range(1,300000)), "Maximum value of a too-big array"); - }); - - test('min', function() { - equal(1, _.min([1, 2, 3]), 'can perform a regular Math.min'); - - var neg = _.min([1, 2, 3], function(num){ return -num; }); - equal(neg, 3, 'can perform a computation-based min'); - - equal(Infinity, _.min({}), 'Minimum value of an empty object'); - equal(Infinity, _.min([]), 'Minimum value of an empty array'); - - var now = new Date(9999999999); - var then = new Date(0); - equal(_.min([now, then]), then); - - equal(1, _.min(_.range(1,300000)), "Minimum value of a too-big array"); - }); - - test('sortBy', function() { - var people = [{name : 'curly', age : 50}, {name : 'moe', age : 30}]; - people = _.sortBy(people, function(person){ return person.age; }); - equal(_.pluck(people, 'name').join(', '), 'moe, curly', 'stooges sorted by age'); - - var list = [undefined, 4, 1, undefined, 3, 2]; - equal(_.sortBy(list, _.identity).join(','), '1,2,3,4,,', 'sortBy with undefined values'); - - var list = ["one", "two", "three", "four", "five"]; - var sorted = _.sortBy(list, 'length'); - equal(sorted.join(' '), 'one two four five three', 'sorted by length'); - - function Pair(x, y) { - this.x = x; - this.y = y; - } - - var collection = [ - new Pair(1, 1), new Pair(1, 2), - new Pair(1, 3), new Pair(1, 4), - new Pair(1, 5), new Pair(1, 6), - new Pair(2, 1), new Pair(2, 2), - new Pair(2, 3), new Pair(2, 4), - new Pair(2, 5), new Pair(2, 6), - new Pair(undefined, 1), new Pair(undefined, 2), - new Pair(undefined, 3), new Pair(undefined, 4), - new Pair(undefined, 5), new Pair(undefined, 6) - ]; - - var actual = _.sortBy(collection, function(pair) { - return pair.x; - }); - - deepEqual(actual, collection, 'sortBy should be stable'); - }); - - test('groupBy', function() { - var parity = _.groupBy([1, 2, 3, 4, 5, 6], function(num){ return num % 2; }); - ok('0' in parity && '1' in parity, 'created a group for each value'); - equal(parity[0].join(', '), '2, 4, 6', 'put each even number in the right group'); - - var list = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"]; - var grouped = _.groupBy(list, 'length'); - equal(grouped['3'].join(' '), 'one two six ten'); - equal(grouped['4'].join(' '), 'four five nine'); - equal(grouped['5'].join(' '), 'three seven eight'); - - var context = {}; - _.groupBy([{}], function(){ ok(this === context); }, context); - - grouped = _.groupBy([4.2, 6.1, 6.4], function(num) { - return Math.floor(num) > 4 ? 'hasOwnProperty' : 'constructor'; - }); - equal(grouped.constructor.length, 1); - equal(grouped.hasOwnProperty.length, 2); - - var array = [{}]; - _.groupBy(array, function(value, index, obj){ ok(obj === array); }); - }); - - test('countBy', function() { - var parity = _.countBy([1, 2, 3, 4, 5], function(num){ return num % 2 == 0; }); - equal(parity['true'], 2); - equal(parity['false'], 3); - - var list = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"]; - var grouped = _.countBy(list, 'length'); - equal(grouped['3'], 4); - equal(grouped['4'], 3); - equal(grouped['5'], 3); - - var context = {}; - _.countBy([{}], function(){ ok(this === context); }, context); - - grouped = _.countBy([4.2, 6.1, 6.4], function(num) { - return Math.floor(num) > 4 ? 'hasOwnProperty' : 'constructor'; - }); - equal(grouped.constructor, 1); - equal(grouped.hasOwnProperty, 2); - - var array = [{}]; - _.countBy(array, function(value, index, obj){ ok(obj === array); }); - }); - - test('sortedIndex', function() { - var numbers = [10, 20, 30, 40, 50], num = 35; - var indexForNum = _.sortedIndex(numbers, num); - equal(indexForNum, 3, '35 should be inserted at index 3'); - - var indexFor30 = _.sortedIndex(numbers, 30); - equal(indexFor30, 2, '30 should be inserted at index 2'); - - var objects = [{x: 10}, {x: 20}, {x: 30}, {x: 40}]; - var iterator = function(obj){ return obj.x; }; - strictEqual(_.sortedIndex(objects, {x: 25}, iterator), 2); - strictEqual(_.sortedIndex(objects, {x: 35}, 'x'), 3); - - var context = {1: 2, 2: 3, 3: 4}; - iterator = function(obj){ return this[obj]; }; - strictEqual(_.sortedIndex([1, 3], 2, iterator, context), 1); - }); - - test('shuffle', function() { - var numbers = _.range(10); - var shuffled = _.shuffle(numbers).sort(); - notStrictEqual(numbers, shuffled, 'original object is unmodified'); - equal(shuffled.join(','), numbers.join(','), 'contains the same members before and after shuffle'); - }); - - test('toArray', function() { - ok(!_.isArray(arguments), 'arguments object is not an array'); - ok(_.isArray(_.toArray(arguments)), 'arguments object converted into array'); - var a = [1,2,3]; - ok(_.toArray(a) !== a, 'array is cloned'); - equal(_.toArray(a).join(', '), '1, 2, 3', 'cloned array contains same elements'); - - var numbers = _.toArray({one : 1, two : 2, three : 3}); - equal(numbers.join(', '), '1, 2, 3', 'object flattened into array'); - }); - - test('size', function() { - equal(_.size({one : 1, two : 2, three : 3}), 3, 'can compute the size of an object'); - equal(_.size([1, 2, 3]), 3, 'can compute the size of an array'); - - var func = function() { - return _.size(arguments); - }; - - equal(func(1, 2, 3, 4), 4, 'can test the size of the arguments object'); - - equal(_.size('hello'), 5, 'can compute the size of a string'); - - equal(_.size(null), 0, 'handles nulls'); - }); - -}); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js deleted file mode 100644 index a529658..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js +++ /dev/null @@ -1,259 +0,0 @@ -$(document).ready(function() { - - module("Functions"); - - test("bind", function() { - var context = {name : 'moe'}; - var func = function(arg) { return "name: " + (this.name || arg); }; - var bound = _.bind(func, context); - equal(bound(), 'name: moe', 'can bind a function to a context'); - - bound = _(func).bind(context); - equal(bound(), 'name: moe', 'can do OO-style binding'); - - bound = _.bind(func, null, 'curly'); - equal(bound(), 'name: curly', 'can bind without specifying a context'); - - func = function(salutation, name) { return salutation + ': ' + name; }; - func = _.bind(func, this, 'hello'); - equal(func('moe'), 'hello: moe', 'the function was partially applied in advance'); - - var func = _.bind(func, this, 'curly'); - equal(func(), 'hello: curly', 'the function was completely applied in advance'); - - var func = function(salutation, firstname, lastname) { return salutation + ': ' + firstname + ' ' + lastname; }; - func = _.bind(func, this, 'hello', 'moe', 'curly'); - equal(func(), 'hello: moe curly', 'the function was partially applied in advance and can accept multiple arguments'); - - func = function(context, message) { equal(this, context, message); }; - _.bind(func, 0, 0, 'can bind a function to `0`')(); - _.bind(func, '', '', 'can bind a function to an empty string')(); - _.bind(func, false, false, 'can bind a function to `false`')(); - - // These tests are only meaningful when using a browser without a native bind function - // To test this with a modern browser, set underscore's nativeBind to undefined - var F = function () { return this; }; - var Boundf = _.bind(F, {hello: "moe curly"}); - equal(new Boundf().hello, undefined, "function should not be bound to the context, to comply with ECMAScript 5"); - equal(Boundf().hello, "moe curly", "When called without the new operator, it's OK to be bound to the context"); - }); - - test("bindAll", function() { - var curly = {name : 'curly'}, moe = { - name : 'moe', - getName : function() { return 'name: ' + this.name; }, - sayHi : function() { return 'hi: ' + this.name; } - }; - curly.getName = moe.getName; - _.bindAll(moe, 'getName', 'sayHi'); - curly.sayHi = moe.sayHi; - equal(curly.getName(), 'name: curly', 'unbound function is bound to current object'); - equal(curly.sayHi(), 'hi: moe', 'bound function is still bound to original object'); - - curly = {name : 'curly'}; - moe = { - name : 'moe', - getName : function() { return 'name: ' + this.name; }, - sayHi : function() { return 'hi: ' + this.name; } - }; - _.bindAll(moe); - curly.sayHi = moe.sayHi; - equal(curly.sayHi(), 'hi: moe', 'calling bindAll with no arguments binds all functions to the object'); - }); - - test("memoize", function() { - var fib = function(n) { - return n < 2 ? n : fib(n - 1) + fib(n - 2); - }; - var fastFib = _.memoize(fib); - equal(fib(10), 55, 'a memoized version of fibonacci produces identical results'); - equal(fastFib(10), 55, 'a memoized version of fibonacci produces identical results'); - - var o = function(str) { - return str; - }; - var fastO = _.memoize(o); - equal(o('toString'), 'toString', 'checks hasOwnProperty'); - equal(fastO('toString'), 'toString', 'checks hasOwnProperty'); - }); - - asyncTest("delay", 2, function() { - var delayed = false; - _.delay(function(){ delayed = true; }, 100); - setTimeout(function(){ ok(!delayed, "didn't delay the function quite yet"); }, 50); - setTimeout(function(){ ok(delayed, 'delayed the function'); start(); }, 150); - }); - - asyncTest("defer", 1, function() { - var deferred = false; - _.defer(function(bool){ deferred = bool; }, true); - _.delay(function(){ ok(deferred, "deferred the function"); start(); }, 50); - }); - - asyncTest("throttle", 2, function() { - var counter = 0; - var incr = function(){ counter++; }; - var throttledIncr = _.throttle(incr, 100); - throttledIncr(); throttledIncr(); throttledIncr(); - setTimeout(throttledIncr, 70); - setTimeout(throttledIncr, 120); - setTimeout(throttledIncr, 140); - setTimeout(throttledIncr, 190); - setTimeout(throttledIncr, 220); - setTimeout(throttledIncr, 240); - _.delay(function(){ equal(counter, 1, "incr was called immediately"); }, 30); - _.delay(function(){ equal(counter, 4, "incr was throttled"); start(); }, 400); - }); - - asyncTest("throttle arguments", 2, function() { - var value = 0; - var update = function(val){ value = val; }; - var throttledUpdate = _.throttle(update, 100); - throttledUpdate(1); throttledUpdate(2); throttledUpdate(3); - setTimeout(function(){ throttledUpdate(4); }, 120); - setTimeout(function(){ throttledUpdate(5); }, 140); - setTimeout(function(){ throttledUpdate(6); }, 250); - _.delay(function(){ equal(value, 1, "updated to latest value"); }, 40); - _.delay(function(){ equal(value, 6, "updated to latest value"); start(); }, 400); - }); - - asyncTest("throttle once", 2, function() { - var counter = 0; - var incr = function(){ return ++counter; }; - var throttledIncr = _.throttle(incr, 100); - var result = throttledIncr(); - _.delay(function(){ - equal(result, 1, "throttled functions return their value"); - equal(counter, 1, "incr was called once"); start(); - }, 220); - }); - - asyncTest("throttle twice", 1, function() { - var counter = 0; - var incr = function(){ counter++; }; - var throttledIncr = _.throttle(incr, 100); - throttledIncr(); throttledIncr(); - _.delay(function(){ equal(counter, 2, "incr was called twice"); start(); }, 220); - }); - - asyncTest("throttle repeatedly with results", 9, function() { - var counter = 0; - var incr = function(){ return ++counter; }; - var throttledIncr = _.throttle(incr, 100); - var results = []; - var saveResult = function() { results.push(throttledIncr()); }; - saveResult(); saveResult(); saveResult(); - setTimeout(saveResult, 70); - setTimeout(saveResult, 120); - setTimeout(saveResult, 140); - setTimeout(saveResult, 190); - setTimeout(saveResult, 240); - setTimeout(saveResult, 260); - _.delay(function() { - equal(results[0], 1, "incr was called once"); - equal(results[1], 1, "incr was throttled"); - equal(results[2], 1, "incr was throttled"); - equal(results[3], 1, "incr was throttled"); - equal(results[4], 2, "incr was called twice"); - equal(results[5], 2, "incr was throttled"); - equal(results[6], 2, "incr was throttled"); - equal(results[7], 3, "incr was called thrice"); - equal(results[8], 3, "incr was throttled"); - start(); - }, 400); - }); - - asyncTest("debounce", 1, function() { - var counter = 0; - var incr = function(){ counter++; }; - var debouncedIncr = _.debounce(incr, 50); - debouncedIncr(); debouncedIncr(); debouncedIncr(); - setTimeout(debouncedIncr, 30); - setTimeout(debouncedIncr, 60); - setTimeout(debouncedIncr, 90); - setTimeout(debouncedIncr, 120); - setTimeout(debouncedIncr, 150); - _.delay(function(){ equal(counter, 1, "incr was debounced"); start(); }, 220); - }); - - asyncTest("debounce asap", 5, function() { - var a, b, c; - var counter = 0; - var incr = function(){ return ++counter; }; - var debouncedIncr = _.debounce(incr, 50, true); - a = debouncedIncr(); - b = debouncedIncr(); - c = debouncedIncr(); - equal(a, 1); - equal(b, 1); - equal(c, 1); - equal(counter, 1, 'incr was called immediately'); - setTimeout(debouncedIncr, 30); - setTimeout(debouncedIncr, 60); - setTimeout(debouncedIncr, 90); - setTimeout(debouncedIncr, 120); - setTimeout(debouncedIncr, 150); - _.delay(function(){ equal(counter, 1, "incr was debounced"); start(); }, 220); - }); - - asyncTest("debounce asap recursively", 2, function() { - var counter = 0; - var debouncedIncr = _.debounce(function(){ - counter++; - if (counter < 5) debouncedIncr(); - }, 50, true); - debouncedIncr(); - equal(counter, 1, 'incr was called immediately'); - _.delay(function(){ equal(counter, 1, "incr was debounced"); start(); }, 70); - }); - - test("once", function() { - var num = 0; - var increment = _.once(function(){ num++; }); - increment(); - increment(); - equal(num, 1); - }); - - test("wrap", function() { - var greet = function(name){ return "hi: " + name; }; - var backwards = _.wrap(greet, function(func, name){ return func(name) + ' ' + name.split('').reverse().join(''); }); - equal(backwards('moe'), 'hi: moe eom', 'wrapped the saluation function'); - - var inner = function(){ return "Hello "; }; - var obj = {name : "Moe"}; - obj.hi = _.wrap(inner, function(fn){ return fn() + this.name; }); - equal(obj.hi(), "Hello Moe"); - - var noop = function(){}; - var wrapped = _.wrap(noop, function(fn){ return Array.prototype.slice.call(arguments, 0); }); - var ret = wrapped(['whats', 'your'], 'vector', 'victor'); - deepEqual(ret, [noop, ['whats', 'your'], 'vector', 'victor']); - }); - - test("compose", function() { - var greet = function(name){ return "hi: " + name; }; - var exclaim = function(sentence){ return sentence + '!'; }; - var composed = _.compose(exclaim, greet); - equal(composed('moe'), 'hi: moe!', 'can compose a function that takes another'); - - composed = _.compose(greet, exclaim); - equal(composed('moe'), 'hi: moe!', 'in this case, the functions are also commutative'); - }); - - test("after", function() { - var testAfter = function(afterAmount, timesCalled) { - var afterCalled = 0; - var after = _.after(afterAmount, function() { - afterCalled++; - }); - while (timesCalled--) after(); - return afterCalled; - }; - - equal(testAfter(5, 5), 1, "after(N) should fire after being called N times"); - equal(testAfter(5, 4), 0, "after(N) should not fire unless called N times"); - equal(testAfter(0, 0), 1, "after(0) should fire immediately"); - }); - -}); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html deleted file mode 100644 index 064fa98..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - Underscore Test Suite - - - - - - - - - - - - - - - - -
      -
      -
      -
      -
      -
      -
      -
      -

      Underscore Speed Suite

      -

      - A representative sample of the functions are benchmarked here, to provide - a sense of how fast they might run in different browsers. - Each iteration runs on an array of 1000 elements.

      - For example, the 'intersection' test measures the number of times you can - find the intersection of two thousand-element arrays in one second. -

      -
      - - - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js deleted file mode 100644 index 22949c3..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js +++ /dev/null @@ -1,548 +0,0 @@ -$(document).ready(function() { - - module("Objects"); - - test("keys", function() { - equal(_.keys({one : 1, two : 2}).join(', '), 'one, two', 'can extract the keys from an object'); - // the test above is not safe because it relies on for-in enumeration order - var a = []; a[1] = 0; - equal(_.keys(a).join(', '), '1', 'is not fooled by sparse arrays; see issue #95'); - raises(function() { _.keys(null); }, TypeError, 'throws an error for `null` values'); - raises(function() { _.keys(void 0); }, TypeError, 'throws an error for `undefined` values'); - raises(function() { _.keys(1); }, TypeError, 'throws an error for number primitives'); - raises(function() { _.keys('a'); }, TypeError, 'throws an error for string primitives'); - raises(function() { _.keys(true); }, TypeError, 'throws an error for boolean primitives'); - }); - - test("values", function() { - equal(_.values({one: 1, two: 2}).join(', '), '1, 2', 'can extract the values from an object'); - equal(_.values({one: 1, two: 2, length: 3}).join(', '), '1, 2, 3', '... even when one of them is "length"'); - }); - - test("pairs", function() { - deepEqual(_.pairs({one: 1, two: 2}), [['one', 1], ['two', 2]], 'can convert an object into pairs'); - deepEqual(_.pairs({one: 1, two: 2, length: 3}), [['one', 1], ['two', 2], ['length', 3]], '... even when one of them is "length"'); - }); - - test("invert", function() { - var obj = {first: 'Moe', second: 'Larry', third: 'Curly'}; - equal(_.keys(_.invert(obj)).join(' '), 'Moe Larry Curly', 'can invert an object'); - ok(_.isEqual(_.invert(_.invert(obj)), obj), 'two inverts gets you back where you started'); - - var obj = {length: 3}; - ok(_.invert(obj)['3'] == 'length', 'can invert an object with "length"') - }); - - test("functions", function() { - var obj = {a : 'dash', b : _.map, c : (/yo/), d : _.reduce}; - ok(_.isEqual(['b', 'd'], _.functions(obj)), 'can grab the function names of any passed-in object'); - - var Animal = function(){}; - Animal.prototype.run = function(){}; - equal(_.functions(new Animal).join(''), 'run', 'also looks up functions on the prototype'); - }); - - test("extend", function() { - var result; - equal(_.extend({}, {a:'b'}).a, 'b', 'can extend an object with the attributes of another'); - equal(_.extend({a:'x'}, {a:'b'}).a, 'b', 'properties in source override destination'); - equal(_.extend({x:'x'}, {a:'b'}).x, 'x', 'properties not in source dont get overriden'); - result = _.extend({x:'x'}, {a:'a'}, {b:'b'}); - ok(_.isEqual(result, {x:'x', a:'a', b:'b'}), 'can extend from multiple source objects'); - result = _.extend({x:'x'}, {a:'a', x:2}, {a:'b'}); - ok(_.isEqual(result, {x:2, a:'b'}), 'extending from multiple source objects last property trumps'); - result = _.extend({}, {a: void 0, b: null}); - equal(_.keys(result).join(''), 'ab', 'extend does not copy undefined values'); - }); - - test("pick", function() { - var result; - result = _.pick({a:1, b:2, c:3}, 'a', 'c'); - ok(_.isEqual(result, {a:1, c:3}), 'can restrict properties to those named'); - result = _.pick({a:1, b:2, c:3}, ['b', 'c']); - ok(_.isEqual(result, {b:2, c:3}), 'can restrict properties to those named in an array'); - result = _.pick({a:1, b:2, c:3}, ['a'], 'b'); - ok(_.isEqual(result, {a:1, b:2}), 'can restrict properties to those named in mixed args'); - - var Obj = function(){}; - Obj.prototype = {a: 1, b: 2, c: 3}; - ok(_.isEqual(_.pick(new Obj, 'a', 'c'), {a:1, c: 3}), 'include prototype props'); - }); - - test("omit", function() { - var result; - result = _.omit({a:1, b:2, c:3}, 'b'); - ok(_.isEqual(result, {a:1, c:3}), 'can omit a single named property'); - result = _.omit({a:1, b:2, c:3}, 'a', 'c'); - ok(_.isEqual(result, {b:2}), 'can omit several named properties'); - result = _.omit({a:1, b:2, c:3}, ['b', 'c']); - ok(_.isEqual(result, {a:1}), 'can omit properties named in an array'); - - var Obj = function(){}; - Obj.prototype = {a: 1, b: 2, c: 3}; - ok(_.isEqual(_.omit(new Obj, 'b'), {a:1, c: 3}), 'include prototype props'); - }); - - test("defaults", function() { - var result; - var options = {zero: 0, one: 1, empty: "", nan: NaN, string: "string"}; - - _.defaults(options, {zero: 1, one: 10, twenty: 20}); - equal(options.zero, 0, 'value exists'); - equal(options.one, 1, 'value exists'); - equal(options.twenty, 20, 'default applied'); - - _.defaults(options, {empty: "full"}, {nan: "nan"}, {word: "word"}, {word: "dog"}); - equal(options.empty, "", 'value exists'); - ok(_.isNaN(options.nan), "NaN isn't overridden"); - equal(options.word, "word", 'new value is added, first one wins'); - }); - - test("clone", function() { - var moe = {name : 'moe', lucky : [13, 27, 34]}; - var clone = _.clone(moe); - equal(clone.name, 'moe', 'the clone as the attributes of the original'); - - clone.name = 'curly'; - ok(clone.name == 'curly' && moe.name == 'moe', 'clones can change shallow attributes without affecting the original'); - - clone.lucky.push(101); - equal(_.last(moe.lucky), 101, 'changes to deep attributes are shared with the original'); - - equal(_.clone(undefined), void 0, 'non objects should not be changed by clone'); - equal(_.clone(1), 1, 'non objects should not be changed by clone'); - equal(_.clone(null), null, 'non objects should not be changed by clone'); - }); - - test("isEqual", function() { - function First() { - this.value = 1; - } - First.prototype.value = 1; - function Second() { - this.value = 1; - } - Second.prototype.value = 2; - - // Basic equality and identity comparisons. - ok(_.isEqual(null, null), "`null` is equal to `null`"); - ok(_.isEqual(), "`undefined` is equal to `undefined`"); - - ok(!_.isEqual(0, -0), "`0` is not equal to `-0`"); - ok(!_.isEqual(-0, 0), "Commutative equality is implemented for `0` and `-0`"); - ok(!_.isEqual(null, undefined), "`null` is not equal to `undefined`"); - ok(!_.isEqual(undefined, null), "Commutative equality is implemented for `null` and `undefined`"); - - // String object and primitive comparisons. - ok(_.isEqual("Curly", "Curly"), "Identical string primitives are equal"); - ok(_.isEqual(new String("Curly"), new String("Curly")), "String objects with identical primitive values are equal"); - ok(_.isEqual(new String("Curly"), "Curly"), "String primitives and their corresponding object wrappers are equal"); - ok(_.isEqual("Curly", new String("Curly")), "Commutative equality is implemented for string objects and primitives"); - - ok(!_.isEqual("Curly", "Larry"), "String primitives with different values are not equal"); - ok(!_.isEqual(new String("Curly"), new String("Larry")), "String objects with different primitive values are not equal"); - ok(!_.isEqual(new String("Curly"), {toString: function(){ return "Curly"; }}), "String objects and objects with a custom `toString` method are not equal"); - - // Number object and primitive comparisons. - ok(_.isEqual(75, 75), "Identical number primitives are equal"); - ok(_.isEqual(new Number(75), new Number(75)), "Number objects with identical primitive values are equal"); - ok(_.isEqual(75, new Number(75)), "Number primitives and their corresponding object wrappers are equal"); - ok(_.isEqual(new Number(75), 75), "Commutative equality is implemented for number objects and primitives"); - ok(!_.isEqual(new Number(0), -0), "`new Number(0)` and `-0` are not equal"); - ok(!_.isEqual(0, new Number(-0)), "Commutative equality is implemented for `new Number(0)` and `-0`"); - - ok(!_.isEqual(new Number(75), new Number(63)), "Number objects with different primitive values are not equal"); - ok(!_.isEqual(new Number(63), {valueOf: function(){ return 63; }}), "Number objects and objects with a `valueOf` method are not equal"); - - // Comparisons involving `NaN`. - ok(_.isEqual(NaN, NaN), "`NaN` is equal to `NaN`"); - ok(!_.isEqual(61, NaN), "A number primitive is not equal to `NaN`"); - ok(!_.isEqual(new Number(79), NaN), "A number object is not equal to `NaN`"); - ok(!_.isEqual(Infinity, NaN), "`Infinity` is not equal to `NaN`"); - - // Boolean object and primitive comparisons. - ok(_.isEqual(true, true), "Identical boolean primitives are equal"); - ok(_.isEqual(new Boolean, new Boolean), "Boolean objects with identical primitive values are equal"); - ok(_.isEqual(true, new Boolean(true)), "Boolean primitives and their corresponding object wrappers are equal"); - ok(_.isEqual(new Boolean(true), true), "Commutative equality is implemented for booleans"); - ok(!_.isEqual(new Boolean(true), new Boolean), "Boolean objects with different primitive values are not equal"); - - // Common type coercions. - ok(!_.isEqual(true, new Boolean(false)), "Boolean objects are not equal to the boolean primitive `true`"); - ok(!_.isEqual("75", 75), "String and number primitives with like values are not equal"); - ok(!_.isEqual(new Number(63), new String(63)), "String and number objects with like values are not equal"); - ok(!_.isEqual(75, "75"), "Commutative equality is implemented for like string and number values"); - ok(!_.isEqual(0, ""), "Number and string primitives with like values are not equal"); - ok(!_.isEqual(1, true), "Number and boolean primitives with like values are not equal"); - ok(!_.isEqual(new Boolean(false), new Number(0)), "Boolean and number objects with like values are not equal"); - ok(!_.isEqual(false, new String("")), "Boolean primitives and string objects with like values are not equal"); - ok(!_.isEqual(12564504e5, new Date(2009, 9, 25)), "Dates and their corresponding numeric primitive values are not equal"); - - // Dates. - ok(_.isEqual(new Date(2009, 9, 25), new Date(2009, 9, 25)), "Date objects referencing identical times are equal"); - ok(!_.isEqual(new Date(2009, 9, 25), new Date(2009, 11, 13)), "Date objects referencing different times are not equal"); - ok(!_.isEqual(new Date(2009, 11, 13), { - getTime: function(){ - return 12606876e5; - } - }), "Date objects and objects with a `getTime` method are not equal"); - ok(!_.isEqual(new Date("Curly"), new Date("Curly")), "Invalid dates are not equal"); - - // Functions. - ok(!_.isEqual(First, Second), "Different functions with identical bodies and source code representations are not equal"); - - // RegExps. - ok(_.isEqual(/(?:)/gim, /(?:)/gim), "RegExps with equivalent patterns and flags are equal"); - ok(!_.isEqual(/(?:)/g, /(?:)/gi), "RegExps with equivalent patterns and different flags are not equal"); - ok(!_.isEqual(/Moe/gim, /Curly/gim), "RegExps with different patterns and equivalent flags are not equal"); - ok(!_.isEqual(/(?:)/gi, /(?:)/g), "Commutative equality is implemented for RegExps"); - ok(!_.isEqual(/Curly/g, {source: "Larry", global: true, ignoreCase: false, multiline: false}), "RegExps and RegExp-like objects are not equal"); - - // Empty arrays, array-like objects, and object literals. - ok(_.isEqual({}, {}), "Empty object literals are equal"); - ok(_.isEqual([], []), "Empty array literals are equal"); - ok(_.isEqual([{}], [{}]), "Empty nested arrays and objects are equal"); - ok(!_.isEqual({length: 0}, []), "Array-like objects and arrays are not equal."); - ok(!_.isEqual([], {length: 0}), "Commutative equality is implemented for array-like objects"); - - ok(!_.isEqual({}, []), "Object literals and array literals are not equal"); - ok(!_.isEqual([], {}), "Commutative equality is implemented for objects and arrays"); - - // Arrays with primitive and object values. - ok(_.isEqual([1, "Larry", true], [1, "Larry", true]), "Arrays containing identical primitives are equal"); - ok(_.isEqual([(/Moe/g), new Date(2009, 9, 25)], [(/Moe/g), new Date(2009, 9, 25)]), "Arrays containing equivalent elements are equal"); - - // Multi-dimensional arrays. - var a = [new Number(47), false, "Larry", /Moe/, new Date(2009, 11, 13), ['running', 'biking', new String('programming')], {a: 47}]; - var b = [new Number(47), false, "Larry", /Moe/, new Date(2009, 11, 13), ['running', 'biking', new String('programming')], {a: 47}]; - ok(_.isEqual(a, b), "Arrays containing nested arrays and objects are recursively compared"); - - // Overwrite the methods defined in ES 5.1 section 15.4.4. - a.forEach = a.map = a.filter = a.every = a.indexOf = a.lastIndexOf = a.some = a.reduce = a.reduceRight = null; - b.join = b.pop = b.reverse = b.shift = b.slice = b.splice = b.concat = b.sort = b.unshift = null; - - // Array elements and properties. - ok(_.isEqual(a, b), "Arrays containing equivalent elements and different non-numeric properties are equal"); - a.push("White Rocks"); - ok(!_.isEqual(a, b), "Arrays of different lengths are not equal"); - a.push("East Boulder"); - b.push("Gunbarrel Ranch", "Teller Farm"); - ok(!_.isEqual(a, b), "Arrays of identical lengths containing different elements are not equal"); - - // Sparse arrays. - ok(_.isEqual(Array(3), Array(3)), "Sparse arrays of identical lengths are equal"); - ok(!_.isEqual(Array(3), Array(6)), "Sparse arrays of different lengths are not equal when both are empty"); - - // Simple objects. - ok(_.isEqual({a: "Curly", b: 1, c: true}, {a: "Curly", b: 1, c: true}), "Objects containing identical primitives are equal"); - ok(_.isEqual({a: /Curly/g, b: new Date(2009, 11, 13)}, {a: /Curly/g, b: new Date(2009, 11, 13)}), "Objects containing equivalent members are equal"); - ok(!_.isEqual({a: 63, b: 75}, {a: 61, b: 55}), "Objects of identical sizes with different values are not equal"); - ok(!_.isEqual({a: 63, b: 75}, {a: 61, c: 55}), "Objects of identical sizes with different property names are not equal"); - ok(!_.isEqual({a: 1, b: 2}, {a: 1}), "Objects of different sizes are not equal"); - ok(!_.isEqual({a: 1}, {a: 1, b: 2}), "Commutative equality is implemented for objects"); - ok(!_.isEqual({x: 1, y: undefined}, {x: 1, z: 2}), "Objects with identical keys and different values are not equivalent"); - - // `A` contains nested objects and arrays. - a = { - name: new String("Moe Howard"), - age: new Number(77), - stooge: true, - hobbies: ["acting"], - film: { - name: "Sing a Song of Six Pants", - release: new Date(1947, 9, 30), - stars: [new String("Larry Fine"), "Shemp Howard"], - minutes: new Number(16), - seconds: 54 - } - }; - - // `B` contains equivalent nested objects and arrays. - b = { - name: new String("Moe Howard"), - age: new Number(77), - stooge: true, - hobbies: ["acting"], - film: { - name: "Sing a Song of Six Pants", - release: new Date(1947, 9, 30), - stars: [new String("Larry Fine"), "Shemp Howard"], - minutes: new Number(16), - seconds: 54 - } - }; - ok(_.isEqual(a, b), "Objects with nested equivalent members are recursively compared"); - - // Instances. - ok(_.isEqual(new First, new First), "Object instances are equal"); - ok(!_.isEqual(new First, new Second), "Objects with different constructors and identical own properties are not equal"); - ok(!_.isEqual({value: 1}, new First), "Object instances and objects sharing equivalent properties are not equal"); - ok(!_.isEqual({value: 2}, new Second), "The prototype chain of objects should not be examined"); - - // Circular Arrays. - (a = []).push(a); - (b = []).push(b); - ok(_.isEqual(a, b), "Arrays containing circular references are equal"); - a.push(new String("Larry")); - b.push(new String("Larry")); - ok(_.isEqual(a, b), "Arrays containing circular references and equivalent properties are equal"); - a.push("Shemp"); - b.push("Curly"); - ok(!_.isEqual(a, b), "Arrays containing circular references and different properties are not equal"); - - // More circular arrays #767. - a = ["everything is checked but", "this", "is not"]; - a[1] = a; - b = ["everything is checked but", ["this", "array"], "is not"]; - ok(!_.isEqual(a, b), "Comparison of circular references with non-circular references are not equal"); - - // Circular Objects. - a = {abc: null}; - b = {abc: null}; - a.abc = a; - b.abc = b; - ok(_.isEqual(a, b), "Objects containing circular references are equal"); - a.def = 75; - b.def = 75; - ok(_.isEqual(a, b), "Objects containing circular references and equivalent properties are equal"); - a.def = new Number(75); - b.def = new Number(63); - ok(!_.isEqual(a, b), "Objects containing circular references and different properties are not equal"); - - // More circular objects #767. - a = {everything: "is checked", but: "this", is: "not"}; - a.but = a; - b = {everything: "is checked", but: {that:"object"}, is: "not"}; - ok(!_.isEqual(a, b), "Comparison of circular references with non-circular object references are not equal"); - - // Cyclic Structures. - a = [{abc: null}]; - b = [{abc: null}]; - (a[0].abc = a).push(a); - (b[0].abc = b).push(b); - ok(_.isEqual(a, b), "Cyclic structures are equal"); - a[0].def = "Larry"; - b[0].def = "Larry"; - ok(_.isEqual(a, b), "Cyclic structures containing equivalent properties are equal"); - a[0].def = new String("Larry"); - b[0].def = new String("Curly"); - ok(!_.isEqual(a, b), "Cyclic structures containing different properties are not equal"); - - // Complex Circular References. - a = {foo: {b: {foo: {c: {foo: null}}}}}; - b = {foo: {b: {foo: {c: {foo: null}}}}}; - a.foo.b.foo.c.foo = a; - b.foo.b.foo.c.foo = b; - ok(_.isEqual(a, b), "Cyclic structures with nested and identically-named properties are equal"); - - // Chaining. - ok(!_.isEqual(_({x: 1, y: undefined}).chain(), _({x: 1, z: 2}).chain()), 'Chained objects containing different values are not equal'); - equal(_({x: 1, y: 2}).chain().isEqual(_({x: 1, y: 2}).chain()).value(), true, '`isEqual` can be chained'); - - // Custom `isEqual` methods. - var isEqualObj = {isEqual: function (o) { return o.isEqual == this.isEqual; }, unique: {}}; - var isEqualObjClone = {isEqual: isEqualObj.isEqual, unique: {}}; - - ok(_.isEqual(isEqualObj, isEqualObjClone), 'Both objects implement identical `isEqual` methods'); - ok(_.isEqual(isEqualObjClone, isEqualObj), 'Commutative equality is implemented for objects with custom `isEqual` methods'); - ok(!_.isEqual(isEqualObj, {}), 'Objects that do not implement equivalent `isEqual` methods are not equal'); - ok(!_.isEqual({}, isEqualObj), 'Commutative equality is implemented for objects with different `isEqual` methods'); - - // Objects from another frame. - ok(_.isEqual({}, iObject)); - }); - - test("isEmpty", function() { - ok(!_([1]).isEmpty(), '[1] is not empty'); - ok(_.isEmpty([]), '[] is empty'); - ok(!_.isEmpty({one : 1}), '{one : 1} is not empty'); - ok(_.isEmpty({}), '{} is empty'); - ok(_.isEmpty(new RegExp('')), 'objects with prototype properties are empty'); - ok(_.isEmpty(null), 'null is empty'); - ok(_.isEmpty(), 'undefined is empty'); - ok(_.isEmpty(''), 'the empty string is empty'); - ok(!_.isEmpty('moe'), 'but other strings are not'); - - var obj = {one : 1}; - delete obj.one; - ok(_.isEmpty(obj), 'deleting all the keys from an object empties it'); - }); - - // Setup remote variables for iFrame tests. - var iframe = document.createElement('iframe'); - jQuery(iframe).appendTo(document.body); - var iDoc = iframe.contentDocument || iframe.contentWindow.document; - iDoc.write( - "" - ); - iDoc.close(); - - test("isElement", function() { - ok(!_.isElement('div'), 'strings are not dom elements'); - ok(_.isElement($('html')[0]), 'the html tag is a DOM element'); - ok(_.isElement(iElement), 'even from another frame'); - }); - - test("isArguments", function() { - var args = (function(){ return arguments; })(1, 2, 3); - ok(!_.isArguments('string'), 'a string is not an arguments object'); - ok(!_.isArguments(_.isArguments), 'a function is not an arguments object'); - ok(_.isArguments(args), 'but the arguments object is an arguments object'); - ok(!_.isArguments(_.toArray(args)), 'but not when it\'s converted into an array'); - ok(!_.isArguments([1,2,3]), 'and not vanilla arrays.'); - ok(_.isArguments(iArguments), 'even from another frame'); - }); - - test("isObject", function() { - ok(_.isObject(arguments), 'the arguments object is object'); - ok(_.isObject([1, 2, 3]), 'and arrays'); - ok(_.isObject($('html')[0]), 'and DOM element'); - ok(_.isObject(iElement), 'even from another frame'); - ok(_.isObject(function () {}), 'and functions'); - ok(_.isObject(iFunction), 'even from another frame'); - ok(!_.isObject(null), 'but not null'); - ok(!_.isObject(undefined), 'and not undefined'); - ok(!_.isObject('string'), 'and not string'); - ok(!_.isObject(12), 'and not number'); - ok(!_.isObject(true), 'and not boolean'); - ok(_.isObject(new String('string')), 'but new String()'); - }); - - test("isArray", function() { - ok(!_.isArray(arguments), 'the arguments object is not an array'); - ok(_.isArray([1, 2, 3]), 'but arrays are'); - ok(_.isArray(iArray), 'even from another frame'); - }); - - test("isString", function() { - ok(!_.isString(document.body), 'the document body is not a string'); - ok(_.isString([1, 2, 3].join(', ')), 'but strings are'); - ok(_.isString(iString), 'even from another frame'); - }); - - test("isNumber", function() { - ok(!_.isNumber('string'), 'a string is not a number'); - ok(!_.isNumber(arguments), 'the arguments object is not a number'); - ok(!_.isNumber(undefined), 'undefined is not a number'); - ok(_.isNumber(3 * 4 - 7 / 10), 'but numbers are'); - ok(_.isNumber(NaN), 'NaN *is* a number'); - ok(_.isNumber(Infinity), 'Infinity is a number'); - ok(_.isNumber(iNumber), 'even from another frame'); - ok(!_.isNumber('1'), 'numeric strings are not numbers'); - }); - - test("isBoolean", function() { - ok(!_.isBoolean(2), 'a number is not a boolean'); - ok(!_.isBoolean("string"), 'a string is not a boolean'); - ok(!_.isBoolean("false"), 'the string "false" is not a boolean'); - ok(!_.isBoolean("true"), 'the string "true" is not a boolean'); - ok(!_.isBoolean(arguments), 'the arguments object is not a boolean'); - ok(!_.isBoolean(undefined), 'undefined is not a boolean'); - ok(!_.isBoolean(NaN), 'NaN is not a boolean'); - ok(!_.isBoolean(null), 'null is not a boolean'); - ok(_.isBoolean(true), 'but true is'); - ok(_.isBoolean(false), 'and so is false'); - ok(_.isBoolean(iBoolean), 'even from another frame'); - }); - - test("isFunction", function() { - ok(!_.isFunction([1, 2, 3]), 'arrays are not functions'); - ok(!_.isFunction('moe'), 'strings are not functions'); - ok(_.isFunction(_.isFunction), 'but functions are'); - ok(_.isFunction(iFunction), 'even from another frame'); - }); - - test("isDate", function() { - ok(!_.isDate(100), 'numbers are not dates'); - ok(!_.isDate({}), 'objects are not dates'); - ok(_.isDate(new Date()), 'but dates are'); - ok(_.isDate(iDate), 'even from another frame'); - }); - - test("isRegExp", function() { - ok(!_.isRegExp(_.identity), 'functions are not RegExps'); - ok(_.isRegExp(/identity/), 'but RegExps are'); - ok(_.isRegExp(iRegExp), 'even from another frame'); - }); - - test("isFinite", function() { - ok(!_.isFinite(undefined), 'undefined is not Finite'); - ok(!_.isFinite(null), 'null is not Finite'); - ok(!_.isFinite(NaN), 'NaN is not Finite'); - ok(!_.isFinite(Infinity), 'Infinity is not Finite'); - ok(!_.isFinite(-Infinity), '-Infinity is not Finite'); - ok(!_.isFinite('12'), 'Strings are not numbers'); - var obj = new Number(5); - ok(_.isFinite(obj), 'Number instances can be finite'); - ok(_.isFinite(0), '0 is Finite'); - ok(_.isFinite(123), 'Ints are Finite'); - ok(_.isFinite(-12.44), 'Floats are Finite'); - }); - - test("isNaN", function() { - ok(!_.isNaN(undefined), 'undefined is not NaN'); - ok(!_.isNaN(null), 'null is not NaN'); - ok(!_.isNaN(0), '0 is not NaN'); - ok(_.isNaN(NaN), 'but NaN is'); - ok(_.isNaN(iNaN), 'even from another frame'); - ok(_.isNaN(new Number(NaN)), 'wrapped NaN is still NaN'); - }); - - test("isNull", function() { - ok(!_.isNull(undefined), 'undefined is not null'); - ok(!_.isNull(NaN), 'NaN is not null'); - ok(_.isNull(null), 'but null is'); - ok(_.isNull(iNull), 'even from another frame'); - }); - - test("isUndefined", function() { - ok(!_.isUndefined(1), 'numbers are defined'); - ok(!_.isUndefined(null), 'null is defined'); - ok(!_.isUndefined(false), 'false is defined'); - ok(!_.isUndefined(NaN), 'NaN is defined'); - ok(_.isUndefined(), 'nothing is undefined'); - ok(_.isUndefined(undefined), 'undefined is undefined'); - ok(_.isUndefined(iUndefined), 'even from another frame'); - }); - - if (window.ActiveXObject) { - test("IE host objects", function() { - var xml = new ActiveXObject("Msxml2.DOMDocument.3.0"); - ok(!_.isNumber(xml)); - ok(!_.isBoolean(xml)); - ok(!_.isNaN(xml)); - ok(!_.isFunction(xml)); - ok(!_.isNull(xml)); - ok(!_.isUndefined(xml)); - }); - } - - test("tap", function() { - var intercepted = null; - var interceptor = function(obj) { intercepted = obj; }; - var returned = _.tap(1, interceptor); - equal(intercepted, 1, "passes tapped object to interceptor"); - equal(returned, 1, "returns tapped object"); - - returned = _([1,2,3]).chain(). - map(function(n){ return n * 2; }). - max(). - tap(interceptor). - value(); - ok(returned == 6 && intercepted == 6, 'can use tapped objects in a chain'); - }); -}); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js deleted file mode 100644 index 05e3f2a..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js +++ /dev/null @@ -1,75 +0,0 @@ -(function() { - - var numbers = []; - for (var i=0; i<1000; i++) numbers.push(i); - var objects = _.map(numbers, function(n){ return {num : n}; }); - var randomized = _.sortBy(numbers, function(){ return Math.random(); }); - var deep = _.map(_.range(100), function() { return _.range(1000); }); - - JSLitmus.test('_.each()', function() { - var timesTwo = []; - _.each(numbers, function(num){ timesTwo.push(num * 2); }); - return timesTwo; - }); - - JSLitmus.test('_(list).each()', function() { - var timesTwo = []; - _(numbers).each(function(num){ timesTwo.push(num * 2); }); - return timesTwo; - }); - - JSLitmus.test('jQuery.each()', function() { - var timesTwo = []; - jQuery.each(numbers, function(){ timesTwo.push(this * 2); }); - return timesTwo; - }); - - JSLitmus.test('_.map()', function() { - return _.map(objects, function(obj){ return obj.num; }); - }); - - JSLitmus.test('jQuery.map()', function() { - return jQuery.map(objects, function(obj){ return obj.num; }); - }); - - JSLitmus.test('_.pluck()', function() { - return _.pluck(objects, 'num'); - }); - - JSLitmus.test('_.uniq()', function() { - return _.uniq(randomized); - }); - - JSLitmus.test('_.uniq() (sorted)', function() { - return _.uniq(numbers, true); - }); - - JSLitmus.test('_.sortBy()', function() { - return _.sortBy(numbers, function(num){ return -num; }); - }); - - JSLitmus.test('_.isEqual()', function() { - return _.isEqual(numbers, randomized); - }); - - JSLitmus.test('_.keys()', function() { - return _.keys(objects); - }); - - JSLitmus.test('_.values()', function() { - return _.values(objects); - }); - - JSLitmus.test('_.intersection()', function() { - return _.intersection(numbers, randomized); - }); - - JSLitmus.test('_.range()', function() { - return _.range(1000); - }); - - JSLitmus.test('_.flatten()', function() { - return _.flatten(deep); - }); - -})(); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js deleted file mode 100644 index c9be20a..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js +++ /dev/null @@ -1,249 +0,0 @@ -$(document).ready(function() { - - var templateSettings; - - module("Utility", { - - setup: function() { - templateSettings = _.clone(_.templateSettings); - }, - - teardown: function() { - _.templateSettings = templateSettings; - } - - }); - - test("#750 - Return _ instance.", 2, function() { - var instance = _([]); - ok(_(instance) === instance); - ok(new _(instance) === instance); - }); - - test("identity", function() { - var moe = {name : 'moe'}; - equal(_.identity(moe), moe, 'moe is the same as his identity'); - }); - - test("uniqueId", function() { - var ids = [], i = 0; - while(i++ < 100) ids.push(_.uniqueId()); - equal(_.uniq(ids).length, ids.length, 'can generate a globally-unique stream of ids'); - }); - - test("times", function() { - var vals = []; - _.times(3, function (i) { vals.push(i); }); - ok(_.isEqual(vals, [0,1,2]), "is 0 indexed"); - // - vals = []; - _(3).times(function (i) { vals.push(i); }); - ok(_.isEqual(vals, [0,1,2]), "works as a wrapper"); - }); - - test("mixin", function() { - _.mixin({ - myReverse: function(string) { - return string.split('').reverse().join(''); - } - }); - equal(_.myReverse('panacea'), 'aecanap', 'mixed in a function to _'); - equal(_('champ').myReverse(), 'pmahc', 'mixed in a function to the OOP wrapper'); - }); - - test("_.escape", function() { - equal(_.escape("Curly & Moe"), "Curly & Moe"); - equal(_.escape("Curly & Moe"), "Curly &amp; Moe"); - equal(_.escape(null), ''); - }); - - test("_.unescape", function() { - var string = "Curly & Moe"; - equal(_.unescape("Curly & Moe"), string); - equal(_.unescape("Curly &amp; Moe"), "Curly & Moe"); - equal(_.unescape(null), ''); - equal(_.unescape(_.escape(string)), string); - }); - - test("template", function() { - var basicTemplate = _.template("<%= thing %> is gettin' on my noives!"); - var result = basicTemplate({thing : 'This'}); - equal(result, "This is gettin' on my noives!", 'can do basic attribute interpolation'); - - var sansSemicolonTemplate = _.template("A <% this %> B"); - equal(sansSemicolonTemplate(), "A B"); - - var backslashTemplate = _.template("<%= thing %> is \\ridanculous"); - equal(backslashTemplate({thing: 'This'}), "This is \\ridanculous"); - - var escapeTemplate = _.template('<%= a ? "checked=\\"checked\\"" : "" %>'); - equal(escapeTemplate({a: true}), 'checked="checked"', 'can handle slash escapes in interpolations.'); - - var fancyTemplate = _.template("
        <% \ - for (key in people) { \ - %>
      • <%= people[key] %>
      • <% } %>
      "); - result = fancyTemplate({people : {moe : "Moe", larry : "Larry", curly : "Curly"}}); - equal(result, "
      • Moe
      • Larry
      • Curly
      ", 'can run arbitrary javascript in templates'); - - var escapedCharsInJavascriptTemplate = _.template("
        <% _.each(numbers.split('\\n'), function(item) { %>
      • <%= item %>
      • <% }) %>
      "); - result = escapedCharsInJavascriptTemplate({numbers: "one\ntwo\nthree\nfour"}); - equal(result, "
      • one
      • two
      • three
      • four
      ", 'Can use escaped characters (e.g. \\n) in Javascript'); - - var namespaceCollisionTemplate = _.template("<%= pageCount %> <%= thumbnails[pageCount] %> <% _.each(thumbnails, function(p) { %>
      \">
      <% }); %>"); - result = namespaceCollisionTemplate({ - pageCount: 3, - thumbnails: { - 1: "p1-thumbnail.gif", - 2: "p2-thumbnail.gif", - 3: "p3-thumbnail.gif" - } - }); - equal(result, "3 p3-thumbnail.gif
      "); - - var noInterpolateTemplate = _.template("

      Just some text. Hey, I know this is silly but it aids consistency.

      "); - result = noInterpolateTemplate(); - equal(result, "

      Just some text. Hey, I know this is silly but it aids consistency.

      "); - - var quoteTemplate = _.template("It's its, not it's"); - equal(quoteTemplate({}), "It's its, not it's"); - - var quoteInStatementAndBody = _.template("<%\ - if(foo == 'bar'){ \ - %>Statement quotes and 'quotes'.<% } %>"); - equal(quoteInStatementAndBody({foo: "bar"}), "Statement quotes and 'quotes'."); - - var withNewlinesAndTabs = _.template('This\n\t\tis: <%= x %>.\n\tok.\nend.'); - equal(withNewlinesAndTabs({x: 'that'}), 'This\n\t\tis: that.\n\tok.\nend.'); - - var template = _.template("<%- value %>"); - var result = template({value: " - - - diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/index.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/index.js deleted file mode 100644 index 2cf0ca5..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./underscore'); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/package.json b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/package.json deleted file mode 100644 index 56024e0..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "underscore", - "description": "JavaScript's functional programming helper library.", - "homepage": "http://underscorejs.org", - "keywords": [ - "util", - "functional", - "server", - "client", - "browser" - ], - "author": { - "name": "Jeremy Ashkenas", - "email": "jeremy@documentcloud.org" - }, - "repository": { - "type": "git", - "url": "git://github.com/documentcloud/underscore.git" - }, - "main": "underscore.js", - "version": "1.4.4", - "devDependencies": { - "phantomjs": "0.2.2" - }, - "scripts": { - "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true" - }, - "readme": " __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usual functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n", - "readmeFilename": "README.md", - "_id": "underscore@1.4.4", - "_from": "underscore@~1.4.3" -} diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/underscore-min.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/underscore-min.js deleted file mode 100644 index c1d9d3a..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/underscore-min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,d=e.filter,g=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=function(n){return n instanceof w?n:this instanceof w?(this._wrapped=n,void 0):new w(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):n._=w,w.VERSION="1.4.4";var A=w.each=w.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(w.has(n,a)&&t.call(e,n[a],a,n)===r)return};w.map=w.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var O="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=w.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},w.reduceRight=w.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=w.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=w.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},w.find=w.detect=function(n,t,r){var e;return E(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},w.filter=w.select=function(n,t,r){var e=[];return null==n?e:d&&n.filter===d?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&(e[e.length]=n)}),e)},w.reject=function(n,t,r){return w.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},w.every=w.all=function(n,t,e){t||(t=w.identity);var u=!0;return null==n?u:g&&n.every===g?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var E=w.some=w.any=function(n,t,e){t||(t=w.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};w.contains=w.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:E(n,function(n){return n===t})},w.invoke=function(n,t){var r=o.call(arguments,2),e=w.isFunction(t);return w.map(n,function(n){return(e?t:n[t]).apply(n,r)})},w.pluck=function(n,t){return w.map(n,function(n){return n[t]})},w.where=function(n,t,r){return w.isEmpty(t)?r?null:[]:w[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},w.findWhere=function(n,t){return w.where(n,t,!0)},w.max=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.max.apply(Math,n);if(!t&&w.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},w.min=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.min.apply(Math,n);if(!t&&w.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;e.computed>a&&(e={value:n,computed:a})}),e.value},w.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=w.random(r++),e[r-1]=e[t],e[t]=n}),e};var k=function(n){return w.isFunction(n)?n:function(t){return t[n]}};w.sortBy=function(n,t,r){var e=k(t);return w.pluck(w.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.indexi;){var o=i+a>>>1;u>r.call(e,n[o])?i=o+1:a=o}return i},w.toArray=function(n){return n?w.isArray(n)?o.call(n):n.length===+n.length?w.map(n,w.identity):w.values(n):[]},w.size=function(n){return null==n?0:n.length===+n.length?n.length:w.keys(n).length},w.first=w.head=w.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},w.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},w.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},w.rest=w.tail=w.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},w.compact=function(n){return w.filter(n,w.identity)};var R=function(n,t,r){return A(n,function(n){w.isArray(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r};w.flatten=function(n,t){return R(n,t,[])},w.without=function(n){return w.difference(n,o.call(arguments,1))},w.uniq=w.unique=function(n,t,r,e){w.isFunction(t)&&(e=r,r=t,t=!1);var u=r?w.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:w.contains(a,r))||(a.push(r),i.push(n[e]))}),i},w.union=function(){return w.uniq(c.apply(e,arguments))},w.intersection=function(n){var t=o.call(arguments,1);return w.filter(w.uniq(n),function(n){return w.every(t,function(t){return w.indexOf(t,n)>=0})})},w.difference=function(n){var t=c.apply(e,o.call(arguments,1));return w.filter(n,function(n){return!w.contains(t,n)})},w.zip=function(){for(var n=o.call(arguments),t=w.max(w.pluck(n,"length")),r=Array(t),e=0;t>e;e++)r[e]=w.pluck(n,""+e);return r},w.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},w.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=w.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},w.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},w.range=function(n,t,r){1>=arguments.length&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=Array(e);e>u;)i[u++]=n,n+=r;return i},w.bind=function(n,t){if(n.bind===j&&j)return j.apply(n,o.call(arguments,1));var r=o.call(arguments,2);return function(){return n.apply(t,r.concat(o.call(arguments)))}},w.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},w.bindAll=function(n){var t=o.call(arguments,1);return 0===t.length&&(t=w.functions(n)),A(t,function(t){n[t]=w.bind(n[t],n)}),n},w.memoize=function(n,t){var r={};return t||(t=w.identity),function(){var e=t.apply(this,arguments);return w.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},w.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},w.defer=function(n){return w.delay.apply(w,[n,1].concat(o.call(arguments,1)))},w.throttle=function(n,t){var r,e,u,i,a=0,o=function(){a=new Date,u=null,i=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,0>=l?(clearTimeout(u),u=null,a=c,i=n.apply(r,e)):u||(u=setTimeout(o,l)),i}},w.debounce=function(n,t,r){var e,u;return function(){var i=this,a=arguments,o=function(){e=null,r||(u=n.apply(i,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(u=n.apply(i,a)),u}},w.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},w.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},w.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},w.after=function(n,t){return 0>=n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},w.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)w.has(n,r)&&(t[t.length]=r);return t},w.values=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push(n[r]);return t},w.pairs=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push([r,n[r]]);return t},w.invert=function(n){var t={};for(var r in n)w.has(n,r)&&(t[n[r]]=r);return t},w.functions=w.methods=function(n){var t=[];for(var r in n)w.isFunction(n[r])&&t.push(r);return t.sort()},w.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},w.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},w.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)w.contains(r,u)||(t[u]=n[u]);return t},w.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},w.clone=function(n){return w.isObject(n)?w.isArray(n)?n.slice():w.extend({},n):n},w.tap=function(n,t){return t(n),n};var I=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof w&&(n=n._wrapped),t instanceof w&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==t+"";case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;r.push(n),e.push(t);var a=0,o=!0;if("[object Array]"==u){if(a=n.length,o=a==t.length)for(;a--&&(o=I(n[a],t[a],r,e)););}else{var c=n.constructor,f=t.constructor;if(c!==f&&!(w.isFunction(c)&&c instanceof c&&w.isFunction(f)&&f instanceof f))return!1;for(var s in n)if(w.has(n,s)&&(a++,!(o=w.has(t,s)&&I(n[s],t[s],r,e))))break;if(o){for(s in t)if(w.has(t,s)&&!a--)break;o=!a}}return r.pop(),e.pop(),o};w.isEqual=function(n,t){return I(n,t,[],[])},w.isEmpty=function(n){if(null==n)return!0;if(w.isArray(n)||w.isString(n))return 0===n.length;for(var t in n)if(w.has(n,t))return!1;return!0},w.isElement=function(n){return!(!n||1!==n.nodeType)},w.isArray=x||function(n){return"[object Array]"==l.call(n)},w.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){w["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),w.isArguments(arguments)||(w.isArguments=function(n){return!(!n||!w.has(n,"callee"))}),"function"!=typeof/./&&(w.isFunction=function(n){return"function"==typeof n}),w.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},w.isNaN=function(n){return w.isNumber(n)&&n!=+n},w.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},w.isNull=function(n){return null===n},w.isUndefined=function(n){return n===void 0},w.has=function(n,t){return f.call(n,t)},w.noConflict=function(){return n._=t,this},w.identity=function(n){return n},w.times=function(n,t,r){for(var e=Array(n),u=0;n>u;u++)e[u]=t.call(r,u);return e},w.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var M={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};M.unescape=w.invert(M.escape);var S={escape:RegExp("["+w.keys(M.escape).join("")+"]","g"),unescape:RegExp("("+w.keys(M.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(n){w[n]=function(t){return null==t?"":(""+t).replace(S[n],function(t){return M[n][t]})}}),w.result=function(n,t){if(null==n)return null;var r=n[t];return w.isFunction(r)?r.call(n):r},w.mixin=function(n){A(w.functions(n),function(t){var r=w[t]=n[t];w.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),D.call(this,r.apply(w,n))}})};var N=0;w.uniqueId=function(n){var t=++N+"";return n?n+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var T=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(n,t,r){var e;r=w.defaults({},r,w.templateSettings);var u=RegExp([(r.escape||T).source,(r.interpolate||T).source,(r.evaluate||T).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(B,function(n){return"\\"+q[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,w);var c=function(n){return e.call(this,n,w)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},w.chain=function(n){return w(n).chain()};var D=function(n){return this._chain?w(n).chain():n};w.mixin(w),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];w.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],D.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];w.prototype[n]=function(){return D.call(this,t.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this); \ No newline at end of file diff --git a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/underscore.js b/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/underscore.js deleted file mode 100644 index a12f0d9..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/node_modules/underscore/underscore.js +++ /dev/null @@ -1,1226 +0,0 @@ -// Underscore.js 1.4.4 -// http://underscorejs.org -// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. -// Underscore may be freely distributed under the MIT license. - -(function() { - - // Baseline setup - // -------------- - - // Establish the root object, `window` in the browser, or `global` on the server. - var root = this; - - // Save the previous value of the `_` variable. - var previousUnderscore = root._; - - // Establish the object that gets returned to break out of a loop iteration. - var breaker = {}; - - // Save bytes in the minified (but not gzipped) version: - var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; - - // Create quick reference variables for speed access to core prototypes. - var push = ArrayProto.push, - slice = ArrayProto.slice, - concat = ArrayProto.concat, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - - // All **ECMAScript 5** native function implementations that we hope to use - // are declared here. - var - nativeForEach = ArrayProto.forEach, - nativeMap = ArrayProto.map, - nativeReduce = ArrayProto.reduce, - nativeReduceRight = ArrayProto.reduceRight, - nativeFilter = ArrayProto.filter, - nativeEvery = ArrayProto.every, - nativeSome = ArrayProto.some, - nativeIndexOf = ArrayProto.indexOf, - nativeLastIndexOf = ArrayProto.lastIndexOf, - nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeBind = FuncProto.bind; - - // Create a safe reference to the Underscore object for use below. - var _ = function(obj) { - if (obj instanceof _) return obj; - if (!(this instanceof _)) return new _(obj); - this._wrapped = obj; - }; - - // Export the Underscore object for **Node.js**, with - // backwards-compatibility for the old `require()` API. If we're in - // the browser, add `_` as a global object via a string identifier, - // for Closure Compiler "advanced" mode. - if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - exports = module.exports = _; - } - exports._ = _; - } else { - root._ = _; - } - - // Current version. - _.VERSION = '1.4.4'; - - // Collection Functions - // -------------------- - - // The cornerstone, an `each` implementation, aka `forEach`. - // Handles objects with the built-in `forEach`, arrays, and raw objects. - // Delegates to **ECMAScript 5**'s native `forEach` if available. - var each = _.each = _.forEach = function(obj, iterator, context) { - if (obj == null) return; - if (nativeForEach && obj.forEach === nativeForEach) { - obj.forEach(iterator, context); - } else if (obj.length === +obj.length) { - for (var i = 0, l = obj.length; i < l; i++) { - if (iterator.call(context, obj[i], i, obj) === breaker) return; - } - } else { - for (var key in obj) { - if (_.has(obj, key)) { - if (iterator.call(context, obj[key], key, obj) === breaker) return; - } - } - } - }; - - // Return the results of applying the iterator to each element. - // Delegates to **ECMAScript 5**'s native `map` if available. - _.map = _.collect = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); - each(obj, function(value, index, list) { - results[results.length] = iterator.call(context, value, index, list); - }); - return results; - }; - - var reduceError = 'Reduce of empty array with no initial value'; - - // **Reduce** builds up a single result from a list of values, aka `inject`, - // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available. - _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) { - var initial = arguments.length > 2; - if (obj == null) obj = []; - if (nativeReduce && obj.reduce === nativeReduce) { - if (context) iterator = _.bind(iterator, context); - return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); - } - each(obj, function(value, index, list) { - if (!initial) { - memo = value; - initial = true; - } else { - memo = iterator.call(context, memo, value, index, list); - } - }); - if (!initial) throw new TypeError(reduceError); - return memo; - }; - - // The right-associative version of reduce, also known as `foldr`. - // Delegates to **ECMAScript 5**'s native `reduceRight` if available. - _.reduceRight = _.foldr = function(obj, iterator, memo, context) { - var initial = arguments.length > 2; - if (obj == null) obj = []; - if (nativeReduceRight && obj.reduceRight === nativeReduceRight) { - if (context) iterator = _.bind(iterator, context); - return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); - } - var length = obj.length; - if (length !== +length) { - var keys = _.keys(obj); - length = keys.length; - } - each(obj, function(value, index, list) { - index = keys ? keys[--length] : --length; - if (!initial) { - memo = obj[index]; - initial = true; - } else { - memo = iterator.call(context, memo, obj[index], index, list); - } - }); - if (!initial) throw new TypeError(reduceError); - return memo; - }; - - // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, iterator, context) { - var result; - any(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) { - result = value; - return true; - } - }); - return result; - }; - - // Return all the elements that pass a truth test. - // Delegates to **ECMAScript 5**'s native `filter` if available. - // Aliased as `select`. - _.filter = _.select = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); - each(obj, function(value, index, list) { - if (iterator.call(context, value, index, list)) results[results.length] = value; - }); - return results; - }; - - // Return all the elements for which a truth test fails. - _.reject = function(obj, iterator, context) { - return _.filter(obj, function(value, index, list) { - return !iterator.call(context, value, index, list); - }, context); - }; - - // Determine whether all of the elements match a truth test. - // Delegates to **ECMAScript 5**'s native `every` if available. - // Aliased as `all`. - _.every = _.all = function(obj, iterator, context) { - iterator || (iterator = _.identity); - var result = true; - if (obj == null) return result; - if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); - each(obj, function(value, index, list) { - if (!(result = result && iterator.call(context, value, index, list))) return breaker; - }); - return !!result; - }; - - // Determine if at least one element in the object matches a truth test. - // Delegates to **ECMAScript 5**'s native `some` if available. - // Aliased as `any`. - var any = _.some = _.any = function(obj, iterator, context) { - iterator || (iterator = _.identity); - var result = false; - if (obj == null) return result; - if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); - each(obj, function(value, index, list) { - if (result || (result = iterator.call(context, value, index, list))) return breaker; - }); - return !!result; - }; - - // Determine if the array or object contains a given value (using `===`). - // Aliased as `include`. - _.contains = _.include = function(obj, target) { - if (obj == null) return false; - if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; - return any(obj, function(value) { - return value === target; - }); - }; - - // Invoke a method (with arguments) on every item in a collection. - _.invoke = function(obj, method) { - var args = slice.call(arguments, 2); - var isFunc = _.isFunction(method); - return _.map(obj, function(value) { - return (isFunc ? method : value[method]).apply(value, args); - }); - }; - - // Convenience version of a common use case of `map`: fetching a property. - _.pluck = function(obj, key) { - return _.map(obj, function(value){ return value[key]; }); - }; - - // Convenience version of a common use case of `filter`: selecting only objects - // containing specific `key:value` pairs. - _.where = function(obj, attrs, first) { - if (_.isEmpty(attrs)) return first ? null : []; - return _[first ? 'find' : 'filter'](obj, function(value) { - for (var key in attrs) { - if (attrs[key] !== value[key]) return false; - } - return true; - }); - }; - - // Convenience version of a common use case of `find`: getting the first object - // containing specific `key:value` pairs. - _.findWhere = function(obj, attrs) { - return _.where(obj, attrs, true); - }; - - // Return the maximum element or (element-based computation). - // Can't optimize arrays of integers longer than 65,535 elements. - // See: https://bugs.webkit.org/show_bug.cgi?id=80797 - _.max = function(obj, iterator, context) { - if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { - return Math.max.apply(Math, obj); - } - if (!iterator && _.isEmpty(obj)) return -Infinity; - var result = {computed : -Infinity, value: -Infinity}; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - computed >= result.computed && (result = {value : value, computed : computed}); - }); - return result.value; - }; - - // Return the minimum element (or element-based computation). - _.min = function(obj, iterator, context) { - if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { - return Math.min.apply(Math, obj); - } - if (!iterator && _.isEmpty(obj)) return Infinity; - var result = {computed : Infinity, value: Infinity}; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - computed < result.computed && (result = {value : value, computed : computed}); - }); - return result.value; - }; - - // Shuffle an array. - _.shuffle = function(obj) { - var rand; - var index = 0; - var shuffled = []; - each(obj, function(value) { - rand = _.random(index++); - shuffled[index - 1] = shuffled[rand]; - shuffled[rand] = value; - }); - return shuffled; - }; - - // An internal function to generate lookup iterators. - var lookupIterator = function(value) { - return _.isFunction(value) ? value : function(obj){ return obj[value]; }; - }; - - // Sort the object's values by a criterion produced by an iterator. - _.sortBy = function(obj, value, context) { - var iterator = lookupIterator(value); - return _.pluck(_.map(obj, function(value, index, list) { - return { - value : value, - index : index, - criteria : iterator.call(context, value, index, list) - }; - }).sort(function(left, right) { - var a = left.criteria; - var b = right.criteria; - if (a !== b) { - if (a > b || a === void 0) return 1; - if (a < b || b === void 0) return -1; - } - return left.index < right.index ? -1 : 1; - }), 'value'); - }; - - // An internal function used for aggregate "group by" operations. - var group = function(obj, value, context, behavior) { - var result = {}; - var iterator = lookupIterator(value || _.identity); - each(obj, function(value, index) { - var key = iterator.call(context, value, index, obj); - behavior(result, key, value); - }); - return result; - }; - - // Groups the object's values by a criterion. Pass either a string attribute - // to group by, or a function that returns the criterion. - _.groupBy = function(obj, value, context) { - return group(obj, value, context, function(result, key, value) { - (_.has(result, key) ? result[key] : (result[key] = [])).push(value); - }); - }; - - // Counts instances of an object that group by a certain criterion. Pass - // either a string attribute to count by, or a function that returns the - // criterion. - _.countBy = function(obj, value, context) { - return group(obj, value, context, function(result, key) { - if (!_.has(result, key)) result[key] = 0; - result[key]++; - }); - }; - - // Use a comparator function to figure out the smallest index at which - // an object should be inserted so as to maintain order. Uses binary search. - _.sortedIndex = function(array, obj, iterator, context) { - iterator = iterator == null ? _.identity : lookupIterator(iterator); - var value = iterator.call(context, obj); - var low = 0, high = array.length; - while (low < high) { - var mid = (low + high) >>> 1; - iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid; - } - return low; - }; - - // Safely convert anything iterable into a real, live array. - _.toArray = function(obj) { - if (!obj) return []; - if (_.isArray(obj)) return slice.call(obj); - if (obj.length === +obj.length) return _.map(obj, _.identity); - return _.values(obj); - }; - - // Return the number of elements in an object. - _.size = function(obj) { - if (obj == null) return 0; - return (obj.length === +obj.length) ? obj.length : _.keys(obj).length; - }; - - // Array Functions - // --------------- - - // Get the first element of an array. Passing **n** will return the first N - // values in the array. Aliased as `head` and `take`. The **guard** check - // allows it to work with `_.map`. - _.first = _.head = _.take = function(array, n, guard) { - if (array == null) return void 0; - return (n != null) && !guard ? slice.call(array, 0, n) : array[0]; - }; - - // Returns everything but the last entry of the array. Especially useful on - // the arguments object. Passing **n** will return all the values in - // the array, excluding the last N. The **guard** check allows it to work with - // `_.map`. - _.initial = function(array, n, guard) { - return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n)); - }; - - // Get the last element of an array. Passing **n** will return the last N - // values in the array. The **guard** check allows it to work with `_.map`. - _.last = function(array, n, guard) { - if (array == null) return void 0; - if ((n != null) && !guard) { - return slice.call(array, Math.max(array.length - n, 0)); - } else { - return array[array.length - 1]; - } - }; - - // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. - // Especially useful on the arguments object. Passing an **n** will return - // the rest N values in the array. The **guard** - // check allows it to work with `_.map`. - _.rest = _.tail = _.drop = function(array, n, guard) { - return slice.call(array, (n == null) || guard ? 1 : n); - }; - - // Trim out all falsy values from an array. - _.compact = function(array) { - return _.filter(array, _.identity); - }; - - // Internal implementation of a recursive `flatten` function. - var flatten = function(input, shallow, output) { - each(input, function(value) { - if (_.isArray(value)) { - shallow ? push.apply(output, value) : flatten(value, shallow, output); - } else { - output.push(value); - } - }); - return output; - }; - - // Return a completely flattened version of an array. - _.flatten = function(array, shallow) { - return flatten(array, shallow, []); - }; - - // Return a version of the array that does not contain the specified value(s). - _.without = function(array) { - return _.difference(array, slice.call(arguments, 1)); - }; - - // Produce a duplicate-free version of the array. If the array has already - // been sorted, you have the option of using a faster algorithm. - // Aliased as `unique`. - _.uniq = _.unique = function(array, isSorted, iterator, context) { - if (_.isFunction(isSorted)) { - context = iterator; - iterator = isSorted; - isSorted = false; - } - var initial = iterator ? _.map(array, iterator, context) : array; - var results = []; - var seen = []; - each(initial, function(value, index) { - if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) { - seen.push(value); - results.push(array[index]); - } - }); - return results; - }; - - // Produce an array that contains the union: each distinct element from all of - // the passed-in arrays. - _.union = function() { - return _.uniq(concat.apply(ArrayProto, arguments)); - }; - - // Produce an array that contains every item shared between all the - // passed-in arrays. - _.intersection = function(array) { - var rest = slice.call(arguments, 1); - return _.filter(_.uniq(array), function(item) { - return _.every(rest, function(other) { - return _.indexOf(other, item) >= 0; - }); - }); - }; - - // Take the difference between one array and a number of other arrays. - // Only the elements present in just the first array will remain. - _.difference = function(array) { - var rest = concat.apply(ArrayProto, slice.call(arguments, 1)); - return _.filter(array, function(value){ return !_.contains(rest, value); }); - }; - - // Zip together multiple lists into a single array -- elements that share - // an index go together. - _.zip = function() { - var args = slice.call(arguments); - var length = _.max(_.pluck(args, 'length')); - var results = new Array(length); - for (var i = 0; i < length; i++) { - results[i] = _.pluck(args, "" + i); - } - return results; - }; - - // Converts lists into objects. Pass either a single array of `[key, value]` - // pairs, or two parallel arrays of the same length -- one of keys, and one of - // the corresponding values. - _.object = function(list, values) { - if (list == null) return {}; - var result = {}; - for (var i = 0, l = list.length; i < l; i++) { - if (values) { - result[list[i]] = values[i]; - } else { - result[list[i][0]] = list[i][1]; - } - } - return result; - }; - - // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**), - // we need this function. Return the position of the first occurrence of an - // item in an array, or -1 if the item is not included in the array. - // Delegates to **ECMAScript 5**'s native `indexOf` if available. - // If the array is large and already in sort order, pass `true` - // for **isSorted** to use binary search. - _.indexOf = function(array, item, isSorted) { - if (array == null) return -1; - var i = 0, l = array.length; - if (isSorted) { - if (typeof isSorted == 'number') { - i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted); - } else { - i = _.sortedIndex(array, item); - return array[i] === item ? i : -1; - } - } - if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted); - for (; i < l; i++) if (array[i] === item) return i; - return -1; - }; - - // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available. - _.lastIndexOf = function(array, item, from) { - if (array == null) return -1; - var hasIndex = from != null; - if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) { - return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item); - } - var i = (hasIndex ? from : array.length); - while (i--) if (array[i] === item) return i; - return -1; - }; - - // Generate an integer Array containing an arithmetic progression. A port of - // the native Python `range()` function. See - // [the Python documentation](http://docs.python.org/library/functions.html#range). - _.range = function(start, stop, step) { - if (arguments.length <= 1) { - stop = start || 0; - start = 0; - } - step = arguments[2] || 1; - - var len = Math.max(Math.ceil((stop - start) / step), 0); - var idx = 0; - var range = new Array(len); - - while(idx < len) { - range[idx++] = start; - start += step; - } - - return range; - }; - - // Function (ahem) Functions - // ------------------ - - // Create a function bound to a given object (assigning `this`, and arguments, - // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if - // available. - _.bind = function(func, context) { - if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - var args = slice.call(arguments, 2); - return function() { - return func.apply(context, args.concat(slice.call(arguments))); - }; - }; - - // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. - _.partial = function(func) { - var args = slice.call(arguments, 1); - return function() { - return func.apply(this, args.concat(slice.call(arguments))); - }; - }; - - // Bind all of an object's methods to that object. Useful for ensuring that - // all callbacks defined on an object belong to it. - _.bindAll = function(obj) { - var funcs = slice.call(arguments, 1); - if (funcs.length === 0) funcs = _.functions(obj); - each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); - return obj; - }; - - // Memoize an expensive function by storing its results. - _.memoize = function(func, hasher) { - var memo = {}; - hasher || (hasher = _.identity); - return function() { - var key = hasher.apply(this, arguments); - return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments)); - }; - }; - - // Delays a function for the given number of milliseconds, and then calls - // it with the arguments supplied. - _.delay = function(func, wait) { - var args = slice.call(arguments, 2); - return setTimeout(function(){ return func.apply(null, args); }, wait); - }; - - // Defers a function, scheduling it to run after the current call stack has - // cleared. - _.defer = function(func) { - return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); - }; - - // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. - _.throttle = function(func, wait) { - var context, args, timeout, result; - var previous = 0; - var later = function() { - previous = new Date; - timeout = null; - result = func.apply(context, args); - }; - return function() { - var now = new Date; - var remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0) { - clearTimeout(timeout); - timeout = null; - previous = now; - result = func.apply(context, args); - } else if (!timeout) { - timeout = setTimeout(later, remaining); - } - return result; - }; - }; - - // Returns a function, that, as long as it continues to be invoked, will not - // be triggered. The function will be called after it stops being called for - // N milliseconds. If `immediate` is passed, trigger the function on the - // leading edge, instead of the trailing. - _.debounce = function(func, wait, immediate) { - var timeout, result; - return function() { - var context = this, args = arguments; - var later = function() { - timeout = null; - if (!immediate) result = func.apply(context, args); - }; - var callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) result = func.apply(context, args); - return result; - }; - }; - - // Returns a function that will be executed at most one time, no matter how - // often you call it. Useful for lazy initialization. - _.once = function(func) { - var ran = false, memo; - return function() { - if (ran) return memo; - ran = true; - memo = func.apply(this, arguments); - func = null; - return memo; - }; - }; - - // Returns the first function passed as an argument to the second, - // allowing you to adjust arguments, run code before and after, and - // conditionally execute the original function. - _.wrap = function(func, wrapper) { - return function() { - var args = [func]; - push.apply(args, arguments); - return wrapper.apply(this, args); - }; - }; - - // Returns a function that is the composition of a list of functions, each - // consuming the return value of the function that follows. - _.compose = function() { - var funcs = arguments; - return function() { - var args = arguments; - for (var i = funcs.length - 1; i >= 0; i--) { - args = [funcs[i].apply(this, args)]; - } - return args[0]; - }; - }; - - // Returns a function that will only be executed after being called N times. - _.after = function(times, func) { - if (times <= 0) return func(); - return function() { - if (--times < 1) { - return func.apply(this, arguments); - } - }; - }; - - // Object Functions - // ---------------- - - // Retrieve the names of an object's properties. - // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = nativeKeys || function(obj) { - if (obj !== Object(obj)) throw new TypeError('Invalid object'); - var keys = []; - for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key; - return keys; - }; - - // Retrieve the values of an object's properties. - _.values = function(obj) { - var values = []; - for (var key in obj) if (_.has(obj, key)) values.push(obj[key]); - return values; - }; - - // Convert an object into a list of `[key, value]` pairs. - _.pairs = function(obj) { - var pairs = []; - for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]); - return pairs; - }; - - // Invert the keys and values of an object. The values must be serializable. - _.invert = function(obj) { - var result = {}; - for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key; - return result; - }; - - // Return a sorted list of the function names available on the object. - // Aliased as `methods` - _.functions = _.methods = function(obj) { - var names = []; - for (var key in obj) { - if (_.isFunction(obj[key])) names.push(key); - } - return names.sort(); - }; - - // Extend a given object with all the properties in passed-in object(s). - _.extend = function(obj) { - each(slice.call(arguments, 1), function(source) { - if (source) { - for (var prop in source) { - obj[prop] = source[prop]; - } - } - }); - return obj; - }; - - // Return a copy of the object only containing the whitelisted properties. - _.pick = function(obj) { - var copy = {}; - var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); - each(keys, function(key) { - if (key in obj) copy[key] = obj[key]; - }); - return copy; - }; - - // Return a copy of the object without the blacklisted properties. - _.omit = function(obj) { - var copy = {}; - var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); - for (var key in obj) { - if (!_.contains(keys, key)) copy[key] = obj[key]; - } - return copy; - }; - - // Fill in a given object with default properties. - _.defaults = function(obj) { - each(slice.call(arguments, 1), function(source) { - if (source) { - for (var prop in source) { - if (obj[prop] == null) obj[prop] = source[prop]; - } - } - }); - return obj; - }; - - // Create a (shallow-cloned) duplicate of an object. - _.clone = function(obj) { - if (!_.isObject(obj)) return obj; - return _.isArray(obj) ? obj.slice() : _.extend({}, obj); - }; - - // Invokes interceptor with the obj, and then returns obj. - // The primary purpose of this method is to "tap into" a method chain, in - // order to perform operations on intermediate results within the chain. - _.tap = function(obj, interceptor) { - interceptor(obj); - return obj; - }; - - // Internal recursive comparison function for `isEqual`. - var eq = function(a, b, aStack, bStack) { - // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal. - if (a === b) return a !== 0 || 1 / a == 1 / b; - // A strict comparison is necessary because `null == undefined`. - if (a == null || b == null) return a === b; - // Unwrap any wrapped objects. - if (a instanceof _) a = a._wrapped; - if (b instanceof _) b = b._wrapped; - // Compare `[[Class]]` names. - var className = toString.call(a); - if (className != toString.call(b)) return false; - switch (className) { - // Strings, numbers, dates, and booleans are compared by value. - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return a == String(b); - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for - // other numeric values. - return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b); - case '[object Date]': - case '[object Boolean]': - // Coerce dates and booleans to numeric primitive values. Dates are compared by their - // millisecond representations. Note that invalid dates with millisecond representations - // of `NaN` are not equivalent. - return +a == +b; - // RegExps are compared by their source patterns and flags. - case '[object RegExp]': - return a.source == b.source && - a.global == b.global && - a.multiline == b.multiline && - a.ignoreCase == b.ignoreCase; - } - if (typeof a != 'object' || typeof b != 'object') return false; - // Assume equality for cyclic structures. The algorithm for detecting cyclic - // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. - var length = aStack.length; - while (length--) { - // Linear search. Performance is inversely proportional to the number of - // unique nested structures. - if (aStack[length] == a) return bStack[length] == b; - } - // Add the first object to the stack of traversed objects. - aStack.push(a); - bStack.push(b); - var size = 0, result = true; - // Recursively compare objects and arrays. - if (className == '[object Array]') { - // Compare array lengths to determine if a deep comparison is necessary. - size = a.length; - result = size == b.length; - if (result) { - // Deep compare the contents, ignoring non-numeric properties. - while (size--) { - if (!(result = eq(a[size], b[size], aStack, bStack))) break; - } - } - } else { - // Objects with different constructors are not equivalent, but `Object`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) && - _.isFunction(bCtor) && (bCtor instanceof bCtor))) { - return false; - } - // Deep compare objects. - for (var key in a) { - if (_.has(a, key)) { - // Count the expected number of properties. - size++; - // Deep compare each member. - if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break; - } - } - // Ensure that both objects contain the same number of properties. - if (result) { - for (key in b) { - if (_.has(b, key) && !(size--)) break; - } - result = !size; - } - } - // Remove the first object from the stack of traversed objects. - aStack.pop(); - bStack.pop(); - return result; - }; - - // Perform a deep comparison to check if two objects are equal. - _.isEqual = function(a, b) { - return eq(a, b, [], []); - }; - - // Is a given array, string, or object empty? - // An "empty" object has no enumerable own-properties. - _.isEmpty = function(obj) { - if (obj == null) return true; - if (_.isArray(obj) || _.isString(obj)) return obj.length === 0; - for (var key in obj) if (_.has(obj, key)) return false; - return true; - }; - - // Is a given value a DOM element? - _.isElement = function(obj) { - return !!(obj && obj.nodeType === 1); - }; - - // Is a given value an array? - // Delegates to ECMA5's native Array.isArray - _.isArray = nativeIsArray || function(obj) { - return toString.call(obj) == '[object Array]'; - }; - - // Is a given variable an object? - _.isObject = function(obj) { - return obj === Object(obj); - }; - - // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp. - each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) { - _['is' + name] = function(obj) { - return toString.call(obj) == '[object ' + name + ']'; - }; - }); - - // Define a fallback version of the method in browsers (ahem, IE), where - // there isn't any inspectable "Arguments" type. - if (!_.isArguments(arguments)) { - _.isArguments = function(obj) { - return !!(obj && _.has(obj, 'callee')); - }; - } - - // Optimize `isFunction` if appropriate. - if (typeof (/./) !== 'function') { - _.isFunction = function(obj) { - return typeof obj === 'function'; - }; - } - - // Is a given object a finite number? - _.isFinite = function(obj) { - return isFinite(obj) && !isNaN(parseFloat(obj)); - }; - - // Is the given value `NaN`? (NaN is the only number which does not equal itself). - _.isNaN = function(obj) { - return _.isNumber(obj) && obj != +obj; - }; - - // Is a given value a boolean? - _.isBoolean = function(obj) { - return obj === true || obj === false || toString.call(obj) == '[object Boolean]'; - }; - - // Is a given value equal to null? - _.isNull = function(obj) { - return obj === null; - }; - - // Is a given variable undefined? - _.isUndefined = function(obj) { - return obj === void 0; - }; - - // Shortcut function for checking if an object has a given property directly - // on itself (in other words, not on a prototype). - _.has = function(obj, key) { - return hasOwnProperty.call(obj, key); - }; - - // Utility Functions - // ----------------- - - // Run Underscore.js in *noConflict* mode, returning the `_` variable to its - // previous owner. Returns a reference to the Underscore object. - _.noConflict = function() { - root._ = previousUnderscore; - return this; - }; - - // Keep the identity function around for default iterators. - _.identity = function(value) { - return value; - }; - - // Run a function **n** times. - _.times = function(n, iterator, context) { - var accum = Array(n); - for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i); - return accum; - }; - - // Return a random integer between min and max (inclusive). - _.random = function(min, max) { - if (max == null) { - max = min; - min = 0; - } - return min + Math.floor(Math.random() * (max - min + 1)); - }; - - // List of HTML entities for escaping. - var entityMap = { - escape: { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '/': '/' - } - }; - entityMap.unescape = _.invert(entityMap.escape); - - // Regexes containing the keys and values listed immediately above. - var entityRegexes = { - escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'), - unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g') - }; - - // Functions for escaping and unescaping strings to/from HTML interpolation. - _.each(['escape', 'unescape'], function(method) { - _[method] = function(string) { - if (string == null) return ''; - return ('' + string).replace(entityRegexes[method], function(match) { - return entityMap[method][match]; - }); - }; - }); - - // If the value of the named property is a function then invoke it; - // otherwise, return it. - _.result = function(object, property) { - if (object == null) return null; - var value = object[property]; - return _.isFunction(value) ? value.call(object) : value; - }; - - // Add your own custom functions to the Underscore object. - _.mixin = function(obj) { - each(_.functions(obj), function(name){ - var func = _[name] = obj[name]; - _.prototype[name] = function() { - var args = [this._wrapped]; - push.apply(args, arguments); - return result.call(this, func.apply(_, args)); - }; - }); - }; - - // Generate a unique integer id (unique within the entire client session). - // Useful for temporary DOM ids. - var idCounter = 0; - _.uniqueId = function(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; - }; - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(text, data, settings) { - var render; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function(match) { return '\\' + escapes[match]; }); - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; - - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - if (data) return render(data, _); - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; - - return template; - }; - - // Add a "chain" function, which will delegate to the wrapper. - _.chain = function(obj) { - return _(obj).chain(); - }; - - // OOP - // --------------- - // If Underscore is called as a function, it returns a wrapped object that - // can be used OO-style. This wrapper holds altered versions of all the - // underscore functions. Wrapped objects may be chained. - - // Helper function to continue chaining intermediate results. - var result = function(obj) { - return this._chain ? _(obj).chain() : obj; - }; - - // Add all of the Underscore functions to the wrapper object. - _.mixin(_); - - // Add all mutator Array functions to the wrapper. - each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - var obj = this._wrapped; - method.apply(obj, arguments); - if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0]; - return result.call(this, obj); - }; - }); - - // Add all accessor Array functions to the wrapper. - each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - return result.call(this, method.apply(this._wrapped, arguments)); - }; - }); - - _.extend(_.prototype, { - - // Start chaining a wrapped Underscore object. - chain: function() { - this._chain = true; - return this; - }, - - // Extracts the result from a wrapped and chained object. - value: function() { - return this._wrapped; - } - - }); - -}).call(this); diff --git a/support/process/node_modules/yamljs/node_modules/argparse/package.json b/support/process/node_modules/yamljs/node_modules/argparse/package.json deleted file mode 100644 index 967a907..0000000 --- a/support/process/node_modules/yamljs/node_modules/argparse/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "argparse", - "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", - "version": "0.1.15", - "keywords": [ - "cli", - "parser", - "argparse", - "option", - "args" - ], - "homepage": "https://github.com/nodeca/argparse", - "contributors": [ - { - "name": "Eugene Shkuropat" - }, - { - "name": "Paul Jacobson" - } - ], - "bugs": { - "url": "https://github.com/nodeca/argparse/issues" - }, - "license": { - "type": "MIT", - "url": "https://github.com/nodeca/argparse/blob/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodeca/argparse.git" - }, - "main": "./index.js", - "scripts": { - "test": "make test" - }, - "dependencies": { - "underscore": "~1.4.3", - "underscore.string": "~2.3.1" - }, - "devDependencies": { - "mocha": "*" - }, - "engines": { - "node": ">= 0.6.0" - }, - "readme": "argparse\n========\n\n[![Build Status](https://secure.travis-ci.org/nodeca/argparse.png?branch=master)](http://travis-ci.org/nodeca/argparse)\n\nCLI arguments parser for node.js. Javascript port of python's\n[argparse](http://docs.python.org/dev/library/argparse.html) module\n(original version 3.2). That's a full port, except some very rare options,\nrecorded in issue tracker.\n\n**NB.** Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/).\n\n\nExample\n=======\n\ntest.js file:\n\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar ArgumentParser = require('../lib/argparse').ArgumentParser;\nvar parser = new ArgumentParser({\n version: '0.0.1',\n addHelp:true,\n description: 'Argparse example'\n});\nparser.addArgument(\n [ '-f', '--foo' ],\n {\n help: 'foo bar'\n }\n);\nparser.addArgument(\n [ '-b', '--bar' ],\n {\n help: 'bar foo'\n }\n);\nvar args = parser.parseArgs();\nconsole.dir(args);\n```\n\nDisplay help:\n\n```\n$ ./test.js -h\nusage: example.js [-h] [-v] [-f FOO] [-b BAR]\n\nArgparse example\n\nOptional arguments:\n -h, --help Show this help message and exit.\n -v, --version Show program's version number and exit.\n -f FOO, --foo FOO foo bar\n -b BAR, --bar BAR bar foo\n```\n\nParse arguments:\n\n```\n$ ./test.js -f=3 --bar=4\n{ foo: '3', bar: '4' }\n```\n\nMore [examples](https://github.com/nodeca/argparse/tree/master/examples).\n\n\nArgumentParser objects\n======================\n\n```\nnew ArgumentParser({paramters hash});\n```\n\nCreates a new ArgumentParser object.\n\n**Supported params:**\n\n- ```description``` - Text to display before the argument help.\n- ```epilog``` - Text to display after the argument help.\n- ```addHelp``` - Add a -h/–help option to the parser. (default: True)\n- ```argumentDefault``` - Set the global default value for arguments. (default: None)\n- ```parents``` - A list of ArgumentParser objects whose arguments should also be included.\n- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘)\n- ```formatterClass``` - A class for customizing the help output.\n- ```prog``` - The name of the program (default: sys.argv[0])\n- ```usage``` - The string describing the program usage (default: generated)\n- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals.\n\n**Not supportied yet**\n\n- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read.\n\n\nDetails in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects)\n\n\naddArgument() method\n====================\n\n```\nArgumentParser.addArgument([names or flags], {options})\n```\n\nDefines how a single command-line argument should be parsed.\n\n- ```name or flags``` - Either a name or a list of option strings, e.g. foo or -f, --foo.\n\nOptions:\n\n- ```action``` - The basic type of action to be taken when this argument is encountered at the command line.\n- ```nargs```- The number of command-line arguments that should be consumed.\n- ```constant``` - A constant value required by some action and nargs selections.\n- ```defaultValue``` - The value produced if the argument is absent from the command line.\n- ```type``` - The type to which the command-line argument should be converted.\n- ```choices``` - A container of the allowable values for the argument.\n- ```required``` - Whether or not the command-line option may be omitted (optionals only).\n- ```help``` - A brief description of what the argument does.\n- ```metavar``` - A name for the argument in usage messages.\n- ```dest``` - The name of the attribute to be added to the object returned by parseArgs().\n\nDetails in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method)\n\n\nAction (some details)\n================\n\nArgumentParser objects associate command-line arguments with actions.\nThese actions can do just about anything with the command-line arguments associated\nwith them, though most actions simply add an attribute to the object returned by\nparseArgs(). The action keyword argument specifies how the command-line arguments\nshould be handled. The supported actions are:\n\n- ```store``` - Just stores the argument’s value. This is the default action.\n- ```storeConst``` - Stores value, specified by the const keyword argument.\n (Note that the const keyword argument defaults to the rather unhelpful None.)\n The 'storeConst' action is most commonly used with optional arguments, that\n specify some sort of flag.\n- ```storeTrue``` and ```storeFalse``` - Stores values True and False\n respectively. These are special cases of 'storeConst'.\n- ```append``` - Stores a list, and appends each argument value to the list.\n This is useful to allow an option to be specified multiple times.\n- ```appendConst``` - Stores a list, and appends value, specified by the\n const keyword argument to the list. (Note, that the const keyword argument defaults\n is None.) The 'appendConst' action is typically used when multiple arguments need\n to store constants to the same list.\n- ```count``` - Counts the number of times a keyword argument occurs. For example,\n used for increasing verbosity levels.\n- ```help``` - Prints a complete help message for all the options in the current\n parser and then exits. By default a help action is automatically added to the parser.\n See ArgumentParser for details of how the output is created.\n- ```version``` - Prints version information and exit. Expects a `version=`\n keyword argument in the addArgument() call.\n\nDetails in [original action guide](http://docs.python.org/dev/library/argparse.html#action)\n\n\nSub-commands\n============\n\nArgumentParser.addSubparsers()\n\nMany programs split their functionality into a number of sub-commands, for\nexample, the svn program can invoke sub-commands like `svn checkout`, `svn update`,\nand `svn commit`. Splitting up functionality this way can be a particularly good\nidea when a program performs several different functions which require different\nkinds of command-line arguments. `ArgumentParser` supports creation of such\nsub-commands with `addSubparsers()` method. The `addSubparsers()` method is\nnormally called with no arguments and returns an special action object.\nThis object has a single method `addParser()`, which takes a command name and\nany `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object\nthat can be modified as usual.\n\nExample:\n\nsub_commands.js\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar ArgumentParser = require('../lib/argparse').ArgumentParser;\nvar parser = new ArgumentParser({\n version: '0.0.1',\n addHelp:true,\n description: 'Argparse examples: sub-commands',\n});\n\nvar subparsers = parser.addSubparsers({\n title:'subcommands',\n dest:\"subcommand_name\"\n});\n\nvar bar = subparsers.addParser('c1', {addHelp:true});\nbar.addArgument(\n [ '-f', '--foo' ],\n {\n action: 'store',\n help: 'foo3 bar3'\n }\n);\nvar bar = subparsers.addParser(\n 'c2',\n {aliases:['co'], addHelp:true}\n);\nbar.addArgument(\n [ '-b', '--bar' ],\n {\n action: 'store',\n type: 'int',\n help: 'foo3 bar3'\n }\n);\n\nvar args = parser.parseArgs();\nconsole.dir(args);\n\n```\n\nDetails in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands)\n\n\nContributors\n============\n\n- [Eugene Shkuropat](https://github.com/shkuropat)\n- [Paul Jacobson](https://github.com/hpaulj)\n\n[others](https://github.com/nodeca/argparse/graphs/contributors)\n\nLicense\n=======\n\nCopyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin).\nReleased under the MIT license. See\n[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details.\n\n\n", - "readmeFilename": "README.md", - "_id": "argparse@0.1.15", - "_from": "argparse@~0.1.4" -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/.npmignore b/support/process/node_modules/yamljs/node_modules/glob/.npmignore deleted file mode 100644 index 2af4b71..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.*.swp -test/a/ diff --git a/support/process/node_modules/yamljs/node_modules/glob/.travis.yml b/support/process/node_modules/yamljs/node_modules/glob/.travis.yml deleted file mode 100644 index baa0031..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.8 diff --git a/support/process/node_modules/yamljs/node_modules/glob/LICENSE b/support/process/node_modules/yamljs/node_modules/glob/LICENSE deleted file mode 100644 index 0c44ae7..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. 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. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. diff --git a/support/process/node_modules/yamljs/node_modules/glob/README.md b/support/process/node_modules/yamljs/node_modules/glob/README.md deleted file mode 100644 index 6e27df6..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# Glob - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -## Attention: node-glob users! - -The API has changed dramatically between 2.x and 3.x. This library is -now 100% JavaScript, and the integer flags have been replaced with an -options object. - -Also, there's an event emitter class, proper tests, and all the other -things you've come to expect from node modules. - -And best of all, no compilation! - -## Usage - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Features - -Please see the [minimatch -documentation](https://github.com/isaacs/minimatch) for more details. - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob(pattern, [options], cb) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* `cb` {Function} - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options] - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* return: {Array} filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instanting the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` {String} pattern to search for -* `options` {Object} -* `cb` {Function} Called when an error occurs, or matches are found - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `error` The error encountered. When an error is encountered, the - glob object is in an undefined state, and should be discarded. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the matched. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `abort` Stop the search. - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the glob object, as well. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. It will cause - ELOOP to be triggered one level sooner in the case of cyclical - symbolic links. -* `silent` When an unusual error is encountered - when attempting to read a directory, a warning will be printed to - stderr. Set the `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered - when attempting to read a directory, the process will just continue on - in search of other matches. Set the `strict` option to raise an error - in these cases. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary to - set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `sync` Perform a synchronous glob search. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. - Set this flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `nocase` Perform a case-insensitive match. Note that case-insensitive - filesystems will sometimes result in glob returning results that are - case-insensitively matched anyway, since readdir and stat will not - raise an error. -* `debug` Set to enable debug logging in minimatch and glob. -* `globDebug` Set to enable debug logging in glob, but not minimatch. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. **Note that this is different from the way that `**` is -handled by ruby's `Dir` class.** - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the statCache object is reused between glob calls. - -Users are thus advised not to use a glob result as a -guarantee of filesystem state in the face of rapid changes. -For the vast majority of operations, this is never a problem. diff --git a/support/process/node_modules/yamljs/node_modules/glob/examples/g.js b/support/process/node_modules/yamljs/node_modules/glob/examples/g.js deleted file mode 100644 index be122df..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/examples/g.js +++ /dev/null @@ -1,9 +0,0 @@ -var Glob = require("../").Glob - -var pattern = "test/a/**/[cg]/../[cg]" -console.log(pattern) - -var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) { - console.log("matches", matches) -}) -console.log("after") diff --git a/support/process/node_modules/yamljs/node_modules/glob/examples/usr-local.js b/support/process/node_modules/yamljs/node_modules/glob/examples/usr-local.js deleted file mode 100644 index 327a425..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/examples/usr-local.js +++ /dev/null @@ -1,9 +0,0 @@ -var Glob = require("../").Glob - -var pattern = "{./*/*,/*,/usr/local/*}" -console.log(pattern) - -var mg = new Glob(pattern, {mark: true}, function (er, matches) { - console.log("matches", matches) -}) -console.log("after") diff --git a/support/process/node_modules/yamljs/node_modules/glob/glob.js b/support/process/node_modules/yamljs/node_modules/glob/glob.js deleted file mode 100644 index 891c883..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/glob.js +++ /dev/null @@ -1,643 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// readdir(PREFIX) as ENTRIES -// If fails, END -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $]) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $]) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - - - -module.exports = glob - -var fs = require("graceful-fs") -, minimatch = require("minimatch") -, Minimatch = minimatch.Minimatch -, inherits = require("inherits") -, EE = require("events").EventEmitter -, path = require("path") -, isDir = {} -, assert = require("assert").ok - -function glob (pattern, options, cb) { - if (typeof options === "function") cb = options, options = {} - if (!options) options = {} - - if (typeof options === "number") { - deprecated() - return - } - - var g = new Glob(pattern, options, cb) - return g.sync ? g.found : g -} - -glob.fnmatch = deprecated - -function deprecated () { - throw new Error("glob's interface has changed. Please see the docs.") -} - -glob.sync = globSync -function globSync (pattern, options) { - if (typeof options === "number") { - deprecated() - return - } - - options = options || {} - options.sync = true - return glob(pattern, options) -} - - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (!(this instanceof Glob)) { - return new Glob(pattern, options, cb) - } - - if (typeof cb === "function") { - this.on("error", cb) - this.on("end", function (matches) { - cb(null, matches) - }) - } - - options = options || {} - - this.EOF = {} - this._emitQueue = [] - - this.maxDepth = options.maxDepth || 1000 - this.maxLength = options.maxLength || Infinity - this.statCache = options.statCache || {} - - this.changedCwd = false - var cwd = process.cwd() - if (!options.hasOwnProperty("cwd")) this.cwd = cwd - else { - this.cwd = options.cwd - this.changedCwd = path.resolve(options.cwd) !== cwd - } - - this.root = options.root || path.resolve(this.cwd, "/") - this.root = path.resolve(this.root) - if (process.platform === "win32") - this.root = this.root.replace(/\\/g, "/") - - this.nomount = !!options.nomount - - if (!pattern) { - throw new Error("must provide pattern") - } - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - this.strict = options.strict !== false - this.dot = !!options.dot - this.mark = !!options.mark - this.sync = !!options.sync - this.nounique = !!options.nounique - this.nonull = !!options.nonull - this.nosort = !!options.nosort - this.nocase = !!options.nocase - this.stat = !!options.stat - - this.debug = !!options.debug || !!options.globDebug - if (this.debug) - this.log = console.error - - this.silent = !!options.silent - - var mm = this.minimatch = new Minimatch(pattern, options) - this.options = mm.options - pattern = this.pattern = mm.pattern - - this.error = null - this.aborted = false - - EE.call(this) - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - this.minimatch.set.forEach(iterator.bind(this)) - function iterator (pattern, i, set) { - this._process(pattern, 0, i, function (er) { - if (er) this.emit("error", er) - if (-- n <= 0) this._finish() - }) - } -} - -Glob.prototype.log = function () {} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - - var nou = this.nounique - , all = nou ? [] : {} - - for (var i = 0, l = this.matches.length; i < l; i ++) { - var matches = this.matches[i] - this.log("matches[%d] =", i, matches) - // do like the shell, and spit out the literal glob - if (!matches) { - if (this.nonull) { - var literal = this.minimatch.globSet[i] - if (nou) all.push(literal) - else all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) all.push.apply(all, m) - else m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) all = Object.keys(all) - - if (!this.nosort) { - all = all.sort(this.nocase ? alphasorti : alphasort) - } - - if (this.mark) { - // at *some* point we statted all of these - all = all.map(function (m) { - var sc = this.statCache[m] - if (!sc) - return m - var isDir = (Array.isArray(sc) || sc === 2) - if (isDir && m.slice(-1) !== "/") { - return m + "/" - } - if (!isDir && m.slice(-1) === "/") { - return m.replace(/\/+$/, "") - } - return m - }, this) - } - - this.log("emitting end", all) - - this.EOF = this.found = all - this.emitMatch(this.EOF) -} - -function alphasorti (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return alphasort(a, b) -} - -function alphasort (a, b) { - return a > b ? 1 : a < b ? -1 : 0 -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit("abort") -} - -Glob.prototype.pause = function () { - if (this.paused) return - if (this.sync) - this.emit("error", new Error("Can't pause/resume sync glob")) - this.paused = true - this.emit("pause") -} - -Glob.prototype.resume = function () { - if (!this.paused) return - if (this.sync) - this.emit("error", new Error("Can't pause/resume sync glob")) - this.paused = false - this.emit("resume") - this._processEmitQueue() - //process.nextTick(this.emit.bind(this, "resume")) -} - -Glob.prototype.emitMatch = function (m) { - this._emitQueue.push(m) - this._processEmitQueue() -} - -Glob.prototype._processEmitQueue = function (m) { - while (!this._processingEmitQueue && - !this.paused) { - this._processingEmitQueue = true - var m = this._emitQueue.shift() - if (!m) { - this._processingEmitQueue = false - break - } - - this.log('emit!', m === this.EOF ? "end" : "match") - - this.emit(m === this.EOF ? "end" : "match", m) - this._processingEmitQueue = false - } -} - -Glob.prototype._process = function (pattern, depth, index, cb_) { - assert(this instanceof Glob) - - var cb = function cb (er, res) { - assert(this instanceof Glob) - if (this.paused) { - if (!this._processQueue) { - this._processQueue = [] - this.once("resume", function () { - var q = this._processQueue - this._processQueue = null - q.forEach(function (cb) { cb() }) - }) - } - this._processQueue.push(cb_.bind(this, er, res)) - } else { - cb_.call(this, er, res) - } - }.bind(this) - - if (this.aborted) return cb() - - if (depth > this.maxDepth) return cb() - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === "string") { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - prefix = pattern.join("/") - this._stat(prefix, function (exists, isDir) { - // either it's there, or it isn't. - // nothing more to do, either way. - if (exists) { - if (prefix && isAbsolute(prefix) && !this.nomount) { - if (prefix.charAt(0) === "/") { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - } - } - - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/") - - this.matches[index] = this.matches[index] || {} - this.matches[index][prefix] = true - this.emitMatch(prefix) - } - return cb() - }) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's "absolute" like /foo/bar, - // or "relative" like "../baz" - prefix = pattern.slice(0, n) - prefix = prefix.join("/") - break - } - - // get the list of entries. - var read - if (prefix === null) read = "." - else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { - if (!prefix || !isAbsolute(prefix)) { - prefix = path.join("/", prefix) - } - read = prefix = path.resolve(prefix) - - // if (process.platform === "win32") - // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/") - - this.log('absolute: ', prefix, this.root, pattern, read) - } else { - read = prefix - } - - this.log('readdir(%j)', read, this.cwd, this.root) - - return this._readdir(read, function (er, entries) { - if (er) { - // not a directory! - // this means that, whatever else comes after this, it can never match - return cb() - } - - // globstar is special - if (pattern[n] === minimatch.GLOBSTAR) { - // test without the globstar, and with every child both below - // and replacing the globstar. - var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ] - entries.forEach(function (e) { - if (e.charAt(0) === "." && !this.dot) return - // instead of the globstar - s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))) - // below the globstar - s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n))) - }, this) - - // now asyncForEach over this - var l = s.length - , errState = null - s.forEach(function (gsPattern) { - this._process(gsPattern, depth + 1, index, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (--l <= 0) return cb() - }) - }, this) - - return - } - - // not a globstar - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = pattern[n] - if (typeof pn === "string") { - var found = entries.indexOf(pn) !== -1 - entries = found ? entries[pn] : [] - } else { - var rawGlob = pattern[n]._glob - , dotOk = this.dot || rawGlob.charAt(0) === "." - - entries = entries.filter(function (e) { - return (e.charAt(0) !== "." || dotOk) && - (typeof pattern[n] === "string" && e === pattern[n] || - e.match(pattern[n])) - }) - } - - // If n === pattern.length - 1, then there's no need for the extra stat - // *unless* the user has specified "mark" or "stat" explicitly. - // We know that they exist, since the readdir returned them. - if (n === pattern.length - 1 && - !this.mark && - !this.stat) { - entries.forEach(function (e) { - if (prefix) { - if (prefix !== "/") e = prefix + "/" + e - else e = prefix + e - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path.join(this.root, e) - } - - if (process.platform === "win32") - e = e.replace(/\\/g, "/") - - this.matches[index] = this.matches[index] || {} - this.matches[index][e] = true - this.emitMatch(e) - }, this) - return cb.call(this) - } - - - // now test all the remaining entries as stand-ins for that part - // of the pattern. - var l = entries.length - , errState = null - if (l === 0) return cb() // no matches possible - entries.forEach(function (e) { - var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)) - this._process(p, depth + 1, index, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (--l === 0) return cb.call(this) - }) - }, this) - }) - -} - -Glob.prototype._stat = function (f, cb) { - assert(this instanceof Glob) - var abs = f - if (f.charAt(0) === "/") { - abs = path.join(this.root, f) - } else if (this.changedCwd) { - abs = path.resolve(this.cwd, f) - } - this.log('stat', [this.cwd, f, '=', abs]) - if (f.length > this.maxLength) { - var er = new Error("Path name too long") - er.code = "ENAMETOOLONG" - er.path = f - return this._afterStat(f, abs, cb, er) - } - - if (this.statCache.hasOwnProperty(f)) { - var exists = this.statCache[f] - , isDir = exists && (Array.isArray(exists) || exists === 2) - if (this.sync) return cb.call(this, !!exists, isDir) - return process.nextTick(cb.bind(this, !!exists, isDir)) - } - - if (this.sync) { - var er, stat - try { - stat = fs.statSync(abs) - } catch (e) { - er = e - } - this._afterStat(f, abs, cb, er, stat) - } else { - fs.stat(abs, this._afterStat.bind(this, f, abs, cb)) - } -} - -Glob.prototype._afterStat = function (f, abs, cb, er, stat) { - var exists - assert(this instanceof Glob) - - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) { - this.log("should be ENOTDIR, fake it") - - er = new Error("ENOTDIR, not a directory '" + abs + "'") - er.path = abs - er.code = "ENOTDIR" - stat = null - } - - if (er || !stat) { - exists = false - } else { - exists = stat.isDirectory() ? 2 : 1 - } - this.statCache[f] = this.statCache[f] || exists - cb.call(this, !!exists, exists === 2) -} - -Glob.prototype._readdir = function (f, cb) { - assert(this instanceof Glob) - var abs = f - if (f.charAt(0) === "/") { - abs = path.join(this.root, f) - } else if (isAbsolute(f)) { - abs = f - } else if (this.changedCwd) { - abs = path.resolve(this.cwd, f) - } - - this.log('readdir', [this.cwd, f, abs]) - if (f.length > this.maxLength) { - var er = new Error("Path name too long") - er.code = "ENAMETOOLONG" - er.path = f - return this._afterReaddir(f, abs, cb, er) - } - - if (this.statCache.hasOwnProperty(f)) { - var c = this.statCache[f] - if (Array.isArray(c)) { - if (this.sync) return cb.call(this, null, c) - return process.nextTick(cb.bind(this, null, c)) - } - - if (!c || c === 1) { - // either ENOENT or ENOTDIR - var code = c ? "ENOTDIR" : "ENOENT" - , er = new Error((c ? "Not a directory" : "Not found") + ": " + f) - er.path = f - er.code = code - this.log(f, er) - if (this.sync) return cb.call(this, er) - return process.nextTick(cb.bind(this, er)) - } - - // at this point, c === 2, meaning it's a dir, but we haven't - // had to read it yet, or c === true, meaning it's *something* - // but we don't have any idea what. Need to read it, either way. - } - - if (this.sync) { - var er, entries - try { - entries = fs.readdirSync(abs) - } catch (e) { - er = e - } - return this._afterReaddir(f, abs, cb, er, entries) - } - - fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb)) -} - -Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) { - assert(this instanceof Glob) - if (entries && !er) { - this.statCache[f] = entries - // if we haven't asked to stat everything for suresies, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. This also gets us one step - // further into ELOOP territory. - if (!this.mark && !this.stat) { - entries.forEach(function (e) { - if (f === "/") e = f + e - else e = f + "/" + e - this.statCache[e] = true - }, this) - } - - return cb.call(this, er, entries) - } - - // now handle errors, and cache the information - if (er) switch (er.code) { - case "ENOTDIR": // totally normal. means it *does* exist. - this.statCache[f] = 1 - return cb.call(this, er) - case "ENOENT": // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.statCache[f] = false - return cb.call(this, er) - default: // some unusual error. Treat as failure. - this.statCache[f] = false - if (this.strict) this.emit("error", er) - if (!this.silent) console.error("glob error", er) - return cb.call(this, er) - } -} - -var isAbsolute = process.platform === "win32" ? absWin : absUnix - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ - , result = splitDeviceRe.exec(p) - , device = result[1] || '' - , isUnc = device && device.charAt(1) !== ':' - , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/.npmignore b/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/.npmignore deleted file mode 100644 index c2658d7..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/LICENSE b/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/LICENSE deleted file mode 100644 index 05a4010..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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. diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/README.md b/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/README.md deleted file mode 100644 index 01af3d6..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over fs module - -graceful-fs: - -* keeps track of how many file descriptors are open, and by default - limits this to 1024. Any further requests to open a file are put in a - queue until new slots become available. If 1024 turns out to be too - much, it decreases the limit further. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. - -## Configuration - -The maximum number of open file descriptors that graceful-fs manages may -be adjusted by setting `fs.MAX_OPEN` to a different number. The default -is 1024. diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/graceful-fs.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index fe9c3f4..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,316 +0,0 @@ -// this keeps a queue of opened file descriptors, and will make -// fs operations wait until some have closed before trying to open more. - -var fs_ = require("fs") - -var fs = module.exports = {} - -Object.getOwnPropertyNames(fs_).forEach(function(prop) { - var desc = Object.getOwnPropertyDescriptor(fs_, prop) - Object.defineProperty(fs, prop, desc) -}) - -var queue = [] - , constants = require("constants") - -exports = module.exports = fs -fs._curOpen = 0 - -fs.MIN_MAX_OPEN = 64 -fs.MAX_OPEN = 1024 - -var originalOpen = fs.open - , originalOpenSync = fs.openSync - , originalClose = fs.close - , originalCloseSync = fs.closeSync - - -// prevent EMFILE errors -function OpenReq (path, flags, mode, cb) { - this.path = path - this.flags = flags - this.mode = mode - this.cb = cb -} - -function noop () {} - -fs.open = gracefulOpen - -function gracefulOpen (path, flags, mode, cb) { - if (typeof mode === "function") cb = mode, mode = null - if (typeof cb !== "function") cb = noop - - if (fs._curOpen >= fs.MAX_OPEN) { - queue.push(new OpenReq(path, flags, mode, cb)) - setTimeout(flush) - return - } - open(path, flags, mode, function (er, fd) { - if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) { - // that was too many. reduce max, get back in queue. - // this should only happen once in a great while, and only - // if the ulimit -n is set lower than 1024. - fs.MAX_OPEN = fs._curOpen - 1 - return fs.open(path, flags, mode, cb) - } - cb(er, fd) - }) -} - -function open (path, flags, mode, cb) { - cb = cb || noop - fs._curOpen ++ - originalOpen.call(fs, path, flags, mode, function (er, fd) { - if (er) onclose() - cb(er, fd) - }) -} - -fs.openSync = function (path, flags, mode) { - var ret - ret = originalOpenSync.call(fs, path, flags, mode) - fs._curOpen ++ - return ret -} - -function onclose () { - fs._curOpen -- - flush() -} - -function flush () { - while (fs._curOpen < fs.MAX_OPEN) { - var req = queue.shift() - if (!req) return - open(req.path, req.flags || "r", req.mode || 0777, req.cb) - } -} - -fs.close = function (fd, cb) { - cb = cb || noop - originalClose.call(fs, fd, function (er) { - onclose() - cb(er) - }) -} - -fs.closeSync = function (fd) { - onclose() - return originalCloseSync.call(fs, fd) -} - - -// (re-)implement some things that are known busted or missing. - -var constants = require("constants") - -// lchmod, broken prior to 0.6.2 -// back-port the fix here. -if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - fs.lchmod = function (path, mode, callback) { - callback = callback || noop - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var err, err2 - try { - var ret = fs.fchmodSync(fd, mode) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } -} - - -// lutimes implementation, or no-op -if (!fs.lutimes) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - cb = cb || noop - if (er) return cb(er) - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - return cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - , err - , err2 - , ret - - try { - var ret = fs.futimesSync(fd, at, mt) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } - - } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) { - // maybe utimensat will be bound soonish? - fs.lutimes = function (path, at, mt, cb) { - fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb) - } - - fs.lutimesSync = function (path, at, mt) { - return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW) - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } - fs.lutimesSync = function () {} - } -} - - -// https://github.com/isaacs/node-graceful-fs/issues/4 -// Chown should not fail on einval or eperm if non-root. - -fs.chown = chownFix(fs.chown) -fs.fchown = chownFix(fs.fchown) -fs.lchown = chownFix(fs.lchown) - -fs.chownSync = chownFixSync(fs.chownSync) -fs.fchownSync = chownFixSync(fs.fchownSync) -fs.lchownSync = chownFixSync(fs.lchownSync) - -function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er, res) { - if (chownErOk(er)) er = null - cb(er, res) - }) - } -} - -function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - -function chownErOk (er) { - // if there's no getuid, or if getuid() is something other than 0, - // and the error is EINVAL or EPERM, then just ignore it. - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // When running as root, or if other types of errors are encountered, - // then it's strict. - if (!er || (!process.getuid || process.getuid() !== 0) - && (er.code === "EINVAL" || er.code === "EPERM")) return true -} - - -// if lchmod/lchown do not exist, then make them no-ops -if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - process.nextTick(cb) - } - fs.lchmodSync = function () {} -} -if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - process.nextTick(cb) - } - fs.lchownSync = function () {} -} - - - -// on Windows, A/V software can lock the directory, causing this -// to fail with an EACCES or EPERM if the directory contains newly -// created files. Try again on failure, for up to 1 second. -if (process.platform === "win32") { - var rename_ = fs.rename - fs.rename = function rename (from, to, cb) { - var start = Date.now() - rename_(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 1000) { - return rename_(from, to, CB) - } - cb(er) - }) - } -} - - -// if read() returns EAGAIN, then just try it again. -var read = fs.read -fs.read = function (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return read.call(fs, fd, buffer, offset, length, position, callback) -} - -var readSync = fs.readSync -fs.readSync = function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/package.json b/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/package.json deleted file mode 100644 index 8cd0e1e..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "graceful-fs", - "description": "A drop-in replacement for fs, making various improvements.", - "version": "1.2.1", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-graceful-fs.git" - }, - "main": "graceful-fs.js", - "engines": { - "node": ">=0.4.0" - }, - "directories": { - "test": "test" - }, - "scripts": { - "test": "tap test/*.js" - }, - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "BSD", - "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* keeps track of how many file descriptors are open, and by default\n limits this to 1024. Any further requests to open a file are put in a\n queue until new slots become available. If 1024 turns out to be too\n much, it decreases the limit further.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n\n## Configuration\n\nThe maximum number of open file descriptors that graceful-fs manages may\nbe adjusted by setting `fs.MAX_OPEN` to a different number. The default\nis 1024.\n", - "readmeFilename": "README.md", - "_id": "graceful-fs@1.2.1", - "_from": "graceful-fs@~1.2.0" -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/test/open.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/test/open.js deleted file mode 100644 index 930d532..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/graceful-fs/test/open.js +++ /dev/null @@ -1,46 +0,0 @@ -var test = require('tap').test -var fs = require('../graceful-fs.js') - -test('graceful fs is not fs', function (t) { - t.notEqual(fs, require('fs')) - t.end() -}) - -test('open an existing file works', function (t) { - var start = fs._curOpen - var fd = fs.openSync(__filename, 'r') - t.equal(fs._curOpen, start + 1) - fs.closeSync(fd) - t.equal(fs._curOpen, start) - fs.open(__filename, 'r', function (er, fd) { - if (er) throw er - t.equal(fs._curOpen, start + 1) - fs.close(fd, function (er) { - if (er) throw er - t.equal(fs._curOpen, start) - t.end() - }) - }) -}) - -test('open a non-existing file throws', function (t) { - var start = fs._curOpen - var er - try { - var fd = fs.openSync('this file does not exist', 'r') - } catch (x) { - er = x - } - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - t.equal(fs._curOpen, start) - - fs.open('neither does this file', 'r', function (er, fd) { - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - t.equal(fs._curOpen, start) - t.end() - }) -}) diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/inherits/README.md b/support/process/node_modules/yamljs/node_modules/glob/node_modules/inherits/README.md deleted file mode 100644 index b2beaed..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/inherits/README.md +++ /dev/null @@ -1,51 +0,0 @@ -A dead simple way to do inheritance in JS. - - var inherits = require("inherits") - - function Animal () { - this.alive = true - } - Animal.prototype.say = function (what) { - console.log(what) - } - - inherits(Dog, Animal) - function Dog () { - Dog.super.apply(this) - } - Dog.prototype.sniff = function () { - this.say("sniff sniff") - } - Dog.prototype.bark = function () { - this.say("woof woof") - } - - inherits(Chihuahua, Dog) - function Chihuahua () { - Chihuahua.super.apply(this) - } - Chihuahua.prototype.bark = function () { - this.say("yip yip") - } - - // also works - function Cat () { - Cat.super.apply(this) - } - Cat.prototype.hiss = function () { - this.say("CHSKKSS!!") - } - inherits(Cat, Animal, { - meow: function () { this.say("miao miao") } - }) - Cat.prototype.purr = function () { - this.say("purr purr") - } - - - var c = new Chihuahua - assert(c instanceof Chihuahua) - assert(c instanceof Dog) - assert(c instanceof Animal) - -The actual function is laughably small. 10-lines small. diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/inherits/inherits.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/inherits/inherits.js deleted file mode 100644 index 061b396..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/inherits/inherits.js +++ /dev/null @@ -1,29 +0,0 @@ -module.exports = inherits - -function inherits (c, p, proto) { - proto = proto || {} - var e = {} - ;[c.prototype, proto].forEach(function (s) { - Object.getOwnPropertyNames(s).forEach(function (k) { - e[k] = Object.getOwnPropertyDescriptor(s, k) - }) - }) - c.prototype = Object.create(p.prototype, e) - c.super = p -} - -//function Child () { -// Child.super.call(this) -// console.error([this -// ,this.constructor -// ,this.constructor === Child -// ,this.constructor.super === Parent -// ,Object.getPrototypeOf(this) === Child.prototype -// ,Object.getPrototypeOf(Object.getPrototypeOf(this)) -// === Parent.prototype -// ,this instanceof Child -// ,this instanceof Parent]) -//} -//function Parent () {} -//inherits(Child, Parent) -//new Child diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/inherits/package.json b/support/process/node_modules/yamljs/node_modules/glob/node_modules/inherits/package.json deleted file mode 100644 index ada6137..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/inherits/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "inherits", - "description": "A tiny simple way to do classic inheritance in js", - "version": "1.0.0", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented" - ], - "main": "./inherits.js", - "repository": { - "type": "git", - "url": "https://github.com/isaacs/inherits" - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "readme": "A dead simple way to do inheritance in JS.\n\n var inherits = require(\"inherits\")\n\n function Animal () {\n this.alive = true\n }\n Animal.prototype.say = function (what) {\n console.log(what)\n }\n\n inherits(Dog, Animal)\n function Dog () {\n Dog.super.apply(this)\n }\n Dog.prototype.sniff = function () {\n this.say(\"sniff sniff\")\n }\n Dog.prototype.bark = function () {\n this.say(\"woof woof\")\n }\n\n inherits(Chihuahua, Dog)\n function Chihuahua () {\n Chihuahua.super.apply(this)\n }\n Chihuahua.prototype.bark = function () {\n this.say(\"yip yip\")\n }\n\n // also works\n function Cat () {\n Cat.super.apply(this)\n }\n Cat.prototype.hiss = function () {\n this.say(\"CHSKKSS!!\")\n }\n inherits(Cat, Animal, {\n meow: function () { this.say(\"miao miao\") }\n })\n Cat.prototype.purr = function () {\n this.say(\"purr purr\")\n }\n\n\n var c = new Chihuahua\n assert(c instanceof Chihuahua)\n assert(c instanceof Dog)\n assert(c instanceof Animal)\n\nThe actual function is laughably small. 10-lines small.\n", - "readmeFilename": "README.md", - "_id": "inherits@1.0.0", - "_from": "inherits@1" -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/LICENSE b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/LICENSE deleted file mode 100644 index 05a4010..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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. diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/README.md b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/README.md deleted file mode 100644 index 6fd07d2..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/README.md +++ /dev/null @@ -1,218 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -Eventually, it will replace the C binding in node-glob. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -### Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. **Note that this is different from the way that `**` is -handled by ruby's `Dir` class.** - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - - -## Minimatch Class - -Create a minimatch object by instanting the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -## Functions - -The top-level exported function has a `cache` property, which is an LRU -cache set to store 100 items. So, calling these methods repeatedly -with the same pattern and options will use the same Minimatch object, -saving the cost of parsing it multiple times. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself. When set, an empty list is returned if there are -no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/minimatch.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/minimatch.js deleted file mode 100644 index 405746b..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,1079 +0,0 @@ -;(function (require, exports, module, platform) { - -if (module) module.exports = minimatch -else exports.minimatch = minimatch - -if (!require) { - require = function (id) { - switch (id) { - case "sigmund": return function sigmund (obj) { - return JSON.stringify(obj) - } - case "path": return { basename: function (f) { - f = f.split(/[\/\\]/) - var e = f.pop() - if (!e) e = f.pop() - return e - }} - case "lru-cache": return function LRUCache () { - // not quite an LRU, but still space-limited. - var cache = {} - var cnt = 0 - this.set = function (k, v) { - cnt ++ - if (cnt >= 100) cache = {} - cache[k] = v - } - this.get = function (k) { return cache[k] } - } - } - } -} - -minimatch.Minimatch = Minimatch - -var LRU = require("lru-cache") - , cache = minimatch.cache = new LRU({max: 100}) - , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} - , sigmund = require("sigmund") - -var path = require("path") - // any single thing other than / - // don't need to escape / when using new RegExp() - , qmark = "[^/]" - - // * => any number of characters - , star = qmark + "*?" - - // ** when dots are allowed. Anything goes, except .. and . - // not (^ or / followed by one or two dots followed by $ or /), - // followed by anything, any number of times. - , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" - - // not a ^ or / followed by a dot, - // followed by anything, any number of times. - , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" - - // characters that need to be escaped in RegExp. - , reSpecials = charSet("().*{}+?[]^$\\!") - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split("").reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.monkeyPatch = monkeyPatch -function monkeyPatch () { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "match") - var orig = desc.value - desc.value = function (p) { - if (p instanceof Minimatch) return p.match(this) - return orig.call(this, p) - } - Object.defineProperty(String.prototype, desc) -} - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - - -function minimatch (p, pattern, options) { - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - return false - } - - // "" only matches "" - if (pattern.trim() === "") return p === "" - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options, cache) - } - - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - pattern = pattern.split("\\").join("/") - } - - // lru storage. - // these things aren't particularly big, but walking down the string - // and turning it into a regexp can get pretty costly. - var cacheKey = pattern + "\n" + sigmund(options) - var cached = minimatch.cache.get(cacheKey) - if (cached) return cached - minimatch.cache.set(cacheKey, this) - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) console.error(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - if (options.debug) console.error(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - if (options.debug) console.error(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return -1 === s.indexOf(false) - }) - - if (options.debug) console.error(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - , negate = false - , options = this.options - , negateOffset = 0 - - if (options.nonegate) return - - for ( var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === "!" - ; i ++) { - negate = !negate - negateOffset ++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return new Minimatch(pattern, options).braceExpand() -} - -Minimatch.prototype.braceExpand = braceExpand -function braceExpand (pattern, options) { - options = options || this.options - pattern = typeof pattern === "undefined" - ? this.pattern : pattern - - if (typeof pattern === "undefined") { - throw new Error("undefined pattern") - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - var escaping = false - - // examples and comments refer to this crazy pattern: - // a{b,c{d,e},{f,g}h}x{y,z} - // expected: - // abxy - // abxz - // acdxy - // acdxz - // acexy - // acexz - // afhxy - // afhxz - // aghxy - // aghxz - - // everything before the first \{ is just a prefix. - // So, we pluck that off, and work with the rest, - // and then prepend it to everything we find. - if (pattern.charAt(0) !== "{") { - // console.error(pattern) - var prefix = null - for (var i = 0, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - // console.error(i, c) - if (c === "\\") { - escaping = !escaping - } else if (c === "{" && !escaping) { - prefix = pattern.substr(0, i) - break - } - } - - // actually no sets, all { were escaped. - if (prefix === null) { - // console.error("no sets") - return [pattern] - } - - var tail = braceExpand(pattern.substr(i), options) - return tail.map(function (t) { - return prefix + t - }) - } - - // now we have something like: - // {b,c{d,e},{f,g}h}x{y,z} - // walk through the set, expanding each part, until - // the set ends. then, we'll expand the suffix. - // If the set only has a single member, then'll put the {} back - - // first, handle numeric sets, since they're easier - var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) - if (numset) { - // console.error("numset", numset[1], numset[2]) - var suf = braceExpand(pattern.substr(numset[0].length), options) - , start = +numset[1] - , end = +numset[2] - , inc = start > end ? -1 : 1 - , set = [] - for (var i = start; i != (end + inc); i += inc) { - // append all the suffixes - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - set.push(i + suf[ii]) - } - } - return set - } - - // ok, walk through the set - // We hope, somewhat optimistically, that there - // will be a } at the end. - // If the closing brace isn't found, then the pattern is - // interpreted as braceExpand("\\" + pattern) so that - // the leading \{ will be interpreted literally. - var i = 1 // skip the \{ - , depth = 1 - , set = [] - , member = "" - , sawEnd = false - , escaping = false - - function addMember () { - set.push(member) - member = "" - } - - // console.error("Entering for") - FOR: for (i = 1, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - // console.error("", i, c) - - if (escaping) { - escaping = false - member += "\\" + c - } else { - switch (c) { - case "\\": - escaping = true - continue - - case "{": - depth ++ - member += "{" - continue - - case "}": - depth -- - // if this closes the actual set, then we're done - if (depth === 0) { - addMember() - // pluck off the close-brace - i ++ - break FOR - } else { - member += c - continue - } - - case ",": - if (depth === 1) { - addMember() - } else { - member += c - } - continue - - default: - member += c - continue - } // switch - } // else - } // for - - // now we've either finished the set, and the suffix is - // pattern.substr(i), or we have *not* closed the set, - // and need to escape the leading brace - if (depth !== 0) { - // console.error("didn't close", pattern) - return braceExpand("\\" + pattern, options) - } - - // x{y,z} -> ["xy", "xz"] - // console.error("set", set) - // console.error("suffix", pattern.substr(i)) - var suf = braceExpand(pattern.substr(i), options) - // ["b", "c{d,e}","{f,g}h"] -> - // [["b"], ["cd", "ce"], ["fh", "gh"]] - var addBraces = set.length === 1 - // console.error("set pre-expanded", set) - set = set.map(function (p) { - return braceExpand(p, options) - }) - // console.error("set expanded", set) - - - // [["b"], ["cd", "ce"], ["fh", "gh"]] -> - // ["b", "cd", "ce", "fh", "gh"] - set = set.reduce(function (l, r) { - return l.concat(r) - }) - - if (addBraces) { - set = set.map(function (s) { - return "{" + s + "}" - }) - } - - // now attach the suffixes. - var ret = [] - for (var i = 0, l = set.length; i < l; i ++) { - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - ret.push(set[i] + suf[ii]) - } - } - return ret -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === "**") return GLOBSTAR - if (pattern === "") return "" - - var re = "" - , hasMagic = !!options.nocase - , escaping = false - // ? => one single character - , patternListStack = [] - , plType - , stateChar - , inClass = false - , reClassStart = -1 - , classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - , patternStart = pattern.charAt(0) === "." ? "" // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" - : "(?!\\.)" - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case "*": - re += star - hasMagic = true - break - case "?": - re += qmark - hasMagic = true - break - default: - re += "\\"+stateChar - break - } - stateChar = false - } - } - - for ( var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i ++ ) { - - if (options.debug) { - console.error("%s\t%s %s %j", pattern, i, re, c) - } - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += "\\" + c - escaping = false - continue - } - - SWITCH: switch (c) { - case "/": - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case "\\": - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - if (options.debug) { - console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c) - } - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - if (c === "!" && i === classStart + 1) c = "^" - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case "(": - if (inClass) { - re += "(" - continue - } - - if (!stateChar) { - re += "\\(" - continue - } - - plType = stateChar - patternListStack.push({ type: plType - , start: i - 1 - , reStart: re.length }) - // negation is (?:(?!js)[^/]*) - re += stateChar === "!" ? "(?:(?!" : "(?:" - stateChar = false - continue - - case ")": - if (inClass || !patternListStack.length) { - re += "\\)" - continue - } - - hasMagic = true - re += ")" - plType = patternListStack.pop().type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case "!": - re += "[^/]*?)" - break - case "?": - case "+": - case "*": re += plType - case "@": break // the default anyway - } - continue - - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|" - escaping = false - continue - } - - re += "|" - continue - - // these are mostly the same in regexp and glob - case "[": - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += "\\" + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case "]": - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += "\\" + c - escaping = false - continue - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === "^" && inClass)) { - re += "\\" - } - - re += c - - } // switch - } // for - - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - var cs = pattern.substr(classStart + 1) - , sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - var pl - while (pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = "\\" - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + "|" - }) - - // console.error("tail=%j\n %s", tail, tail) - var t = pl.type === "*" ? star - : pl.type === "?" ? qmark - : "\\" + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) - + t + "\\(" - + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += "\\\\" - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case ".": - case "[": - case "(": addPatternStart = true - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== "" && hasMagic) re = "(?=.)" + re - - if (addPatternStart) re = patternStart + re - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [ re, hasMagic ] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? "i" : "" - , regExp = new RegExp("^" + re + "$", flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) return this.regexp = false - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - , flags = options.nocase ? "i" : "" - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === "string") ? regExpEscape(p) - : p._src - }).join("\\\/") - }).join("|") - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = "^(?:" + re + ")$" - - // can match anything, as long as it's not this. - if (this.negate) re = "^(?!" + re + ").*$" - - try { - return this.regexp = new RegExp(re, flags) - } catch (ex) { - return this.regexp = false - } -} - -minimatch.match = function (list, pattern, options) { - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - // console.error("match", f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === "" - - if (f === "/" && partial) return true - - var options = this.options - - // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - f = f.split("\\").join("/") - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - if (options.debug) { - console.error(this.pattern, "split", f) - } - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - // console.error(this.pattern, "set", set) - - for (var i = 0, l = set.length; i < l; i ++) { - var pattern = set[i] - var hit = this.matchOne(f, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - if (options.debug) { - console.error("matchOne", - { "this": this - , file: file - , pattern: pattern }) - } - - if (options.matchBase && pattern.length === 1) { - file = path.basename(file.join("/")).split("/") - } - - if (options.debug) { - console.error("matchOne", file.length, pattern.length) - } - - for ( var fi = 0 - , pi = 0 - , fl = file.length - , pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi ++, pi ++ ) { - - if (options.debug) { - console.error("matchOne loop") - } - var p = pattern[pi] - , f = file[fi] - - if (options.debug) { - console.error(pattern, p, f) - } - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - if (options.debug) - console.error('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - , pr = pi + 1 - if (pr === pl) { - if (options.debug) - console.error('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for ( ; fi < fl; fi ++) { - if (file[fi] === "." || file[fi] === ".." || - (!options.dot && file[fi].charAt(0) === ".")) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - WHILE: while (fr < fl) { - var swallowee = file[fr] - - if (options.debug) { - console.error('\nglobstar while', - file, fr, pattern, pr, swallowee) - } - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - if (options.debug) - console.error('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === "." || swallowee === ".." || - (!options.dot && swallowee.charAt(0) === ".")) { - if (options.debug) - console.error("dot detected!", file, fr, pattern, pr) - break WHILE - } - - // ** swallows a segment, and continue. - if (options.debug) - console.error('globstar swallow a segment, and continue') - fr ++ - } - } - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - // console.error("\n>>> no match, partial?", file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === "string") { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - if (options.debug) { - console.error("string match", p, f, hit) - } - } else { - hit = f.match(p) - if (options.debug) { - console.error("pattern match", p, f, hit) - } - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") - return emptyFileEnd - } - - // should be unreachable. - throw new Error("wtf?") -} - - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, "$1") -} - - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") -} - -})( typeof require === "function" ? require : null, - this, - typeof module === "object" ? module : null, - typeof process === "object" ? process.platform : "win32" - ) diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore deleted file mode 100644 index 07e6e47..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS deleted file mode 100644 index 016d7fb..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS +++ /dev/null @@ -1,8 +0,0 @@ -# Authors, sorted by whether or not they are me -Isaac Z. Schlueter -Carlos Brito Lage -Marko Mikulicic -Trent Mick -Kevin O'Hara -Marco Rogers -Jesse Dailey diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE deleted file mode 100644 index 05a4010..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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. diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md deleted file mode 100644 index 03ee0f9..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n) { return n * 2 } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = LRU(options) - , otherCache = LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -cache.reset() // empty the cache -``` - -If you put more stuff in it, then items will fall out. - -If you try to put an oversized thing in it, then it'll fall out right -away. - -## Options - -* `max` The maximum size of the cache, checked by applying the length - function to all values in the cache. Not setting this is kind of - silly, since that's the whole purpose of this lib, but it defaults - to `Infinity`. -* `maxAge` Maximum age in ms. Items are not pro-actively pruned out - as they age, but if you try to get an item that is too old, it'll - drop it and return undefined instead of giving it to you. -* `length` Function that is used to calculate the length of stored - items. If you're storing strings or buffers, then you probably want - to do something like `function(n){return n.length}`. The default is - `function(n){return 1}`, which is fine if you want to store `n` - like-sized things. -* `dispose` Function that is called on items when they are dropped - from the cache. This can be handy if you want to close file - descriptors or do other cleanup tasks when items are no longer - accessible. Called with `key, value`. It's called *before* - actually removing the item from the internal cache, so if you want - to immediately put it back in, you'll have to do that in a - `nextTick` or `setTimeout` callback or it won't do anything. -* `stale` By default, if you set a `maxAge`, it'll only actually pull - stale items out of the cache when you `get(key)`. (That is, it's - not pre-emptively doing a `setTimeout` or anything.) If you set - `stale:true`, it'll return the stale value before deleting it. If - you don't set this, then it'll return `undefined` when you try to - get a stale entry, as if it had already been deleted. - -## API - -* `set(key, value)` -* `get(key) => value` - - Both of these will update the "recently used"-ness of the key. - They do what you think. - -* `peek(key)` - - Returns the key value (or `undefined` if not found) without - updating the "recently used"-ness of the key. - - (If you find yourself using this a lot, you *might* be using the - wrong sort of data structure, but there are some use cases where - it's handy.) - -* `del(key)` - - Deletes a key out of the cache. - -* `reset()` - - Clear the cache entirely, throwing away all values. - -* `has(key)` - - Check if a key is in the cache, without updating the recent-ness - or deleting it for being stale. - -* `forEach(function(value,key,cache), [thisp])` - - Just like `Array.prototype.forEach`. Iterates over all the keys - in the cache, in order of recent-ness. (Ie, more recently used - items are iterated over first.) - -* `keys()` - - Return an array of the keys in the cache. - -* `values()` - - Return an array of the values in the cache. diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js deleted file mode 100644 index 8c80853..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +++ /dev/null @@ -1,257 +0,0 @@ -;(function () { // closure for web browsers - -if (typeof module === 'object' && module.exports) { - module.exports = LRUCache -} else { - // just set the global for non-node platforms. - this.LRUCache = LRUCache -} - -function hOP (obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key) -} - -function naiveLength () { return 1 } - -function LRUCache (options) { - if (!(this instanceof LRUCache)) { - return new LRUCache(options) - } - - var max - if (typeof options === 'number') { - max = options - options = { max: max } - } - - if (!options) options = {} - - max = options.max - - var lengthCalculator = options.length || naiveLength - - if (typeof lengthCalculator !== "function") { - lengthCalculator = naiveLength - } - - if (!max || !(typeof max === "number") || max <= 0 ) { - // a little bit silly. maybe this should throw? - max = Infinity - } - - var allowStale = options.stale || false - - var maxAge = options.maxAge || null - - var dispose = options.dispose - - var cache = Object.create(null) // hash of items by key - , lruList = Object.create(null) // list of items in order of use recency - , mru = 0 // most recently used - , lru = 0 // least recently used - , length = 0 // number of items in the list - , itemCount = 0 - - - // resize the cache when the max changes. - Object.defineProperty(this, "max", - { set : function (mL) { - if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity - max = mL - // if it gets above double max, trim right away. - // otherwise, do it whenever it's convenient. - if (length > max) trim() - } - , get : function () { return max } - , enumerable : true - }) - - // resize the cache when the lengthCalculator changes. - Object.defineProperty(this, "lengthCalculator", - { set : function (lC) { - if (typeof lC !== "function") { - lengthCalculator = naiveLength - length = itemCount - for (var key in cache) { - cache[key].length = 1 - } - } else { - lengthCalculator = lC - length = 0 - for (var key in cache) { - cache[key].length = lengthCalculator(cache[key].value) - length += cache[key].length - } - } - - if (length > max) trim() - } - , get : function () { return lengthCalculator } - , enumerable : true - }) - - Object.defineProperty(this, "length", - { get : function () { return length } - , enumerable : true - }) - - - Object.defineProperty(this, "itemCount", - { get : function () { return itemCount } - , enumerable : true - }) - - this.forEach = function (fn, thisp) { - thisp = thisp || this - var i = 0; - for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) { - i++ - var hit = lruList[k] - fn.call(thisp, hit.value, hit.key, this) - } - } - - this.keys = function () { - var keys = new Array(itemCount) - var i = 0 - for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) { - var hit = lruList[k] - keys[i++] = hit.key - } - return keys - } - - this.values = function () { - var values = new Array(itemCount) - var i = 0 - for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) { - var hit = lruList[k] - values[i++] = hit.value - } - return values - } - - this.reset = function () { - if (dispose) { - for (var k in cache) { - dispose(k, cache[k].value) - } - } - cache = {} - lruList = {} - lru = 0 - mru = 0 - length = 0 - itemCount = 0 - } - - // Provided for debugging/dev purposes only. No promises whatsoever that - // this API stays stable. - this.dump = function () { - return cache - } - - this.dumpLru = function () { - return lruList - } - - this.set = function (key, value) { - if (hOP(cache, key)) { - // dispose of the old one before overwriting - if (dispose) dispose(key, cache[key].value) - if (maxAge) cache[key].now = Date.now() - cache[key].value = value - this.get(key) - return true - } - - var len = lengthCalculator(value) - var age = maxAge ? Date.now() : 0 - var hit = new Entry(key, value, mru++, len, age) - - // oversized objects fall out of cache automatically. - if (hit.length > max) { - if (dispose) dispose(key, value) - return false - } - - length += hit.length - lruList[hit.lu] = cache[key] = hit - itemCount ++ - - if (length > max) trim() - return true - } - - this.has = function (key) { - if (!hOP(cache, key)) return false - var hit = cache[key] - if (maxAge && (Date.now() - hit.now > maxAge)) { - return false - } - return true - } - - this.get = function (key) { - return get(key, true) - } - - this.peek = function (key) { - return get(key, false) - } - - function get (key, doUse) { - var hit = cache[key] - if (hit) { - if (maxAge && (Date.now() - hit.now > maxAge)) { - del(hit) - if (!allowStale) hit = undefined - } else { - if (doUse) use(hit) - } - if (hit) hit = hit.value - } - return hit - } - - function use (hit) { - shiftLU(hit) - hit.lu = mru ++ - lruList[hit.lu] = hit - } - - this.del = function (key) { - del(cache[key]) - } - - function trim () { - while (lru < mru && length > max) - del(lruList[lru]) - } - - function shiftLU(hit) { - delete lruList[ hit.lu ] - while (lru < mru && !lruList[lru]) lru ++ - } - - function del(hit) { - if (hit) { - if (dispose) dispose(hit.key, hit.value) - length -= hit.length - itemCount -- - delete cache[ hit.key ] - shiftLU(hit) - } - } -} - -// classy, since V8 prefers predictable objects. -function Entry (key, value, mru, len, age) { - this.key = key - this.value = value - this.lu = mru - this.length = len - this.now = age -} - -})() diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json deleted file mode 100644 index 111e5d7..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "2.3.0", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "scripts": { - "test": "tap test --gc" - }, - "main": "lib/lru-cache.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-lru-cache.git" - }, - "devDependencies": { - "tap": "", - "weak": "" - }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE" - }, - "contributors": [ - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - { - "name": "Carlos Brito Lage", - "email": "carlos@carloslage.net" - }, - { - "name": "Marko Mikulicic", - "email": "marko.mikulicic@isti.cnr.it" - }, - { - "name": "Trent Mick", - "email": "trentm@gmail.com" - }, - { - "name": "Kevin O'Hara", - "email": "kevinohara80@gmail.com" - }, - { - "name": "Marco Rogers", - "email": "marco.rogers@gmail.com" - }, - { - "name": "Jesse Dailey", - "email": "jesse.dailey@gmail.com" - } - ], - "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n", - "readmeFilename": "README.md", - "_id": "lru-cache@2.3.0", - "_from": "lru-cache@2" -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/s.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/s.js deleted file mode 100644 index c2a9e54..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/s.js +++ /dev/null @@ -1,25 +0,0 @@ -var LRU = require('lru-cache'); - -var max = +process.argv[2] || 10240; -var more = 1024; - -var cache = LRU({ - max: max, maxAge: 86400e3 -}); - -// fill cache -for (var i = 0; i < max; ++i) { - cache.set(i, {}); -} - -var start = process.hrtime(); - -// adding more items -for ( ; i < max+more; ++i) { - cache.set(i, {}); -} - -var end = process.hrtime(start); -var msecs = end[0] * 1E3 + end[1] / 1E6; - -console.log('adding %d items took %d ms', more, msecs.toPrecision(5)); diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js deleted file mode 100644 index 70f3f8b..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js +++ /dev/null @@ -1,329 +0,0 @@ -var test = require("tap").test - , LRU = require("../") - -test("basic", function (t) { - var cache = new LRU({max: 10}) - cache.set("key", "value") - t.equal(cache.get("key"), "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.length, 1) - t.equal(cache.max, 10) - t.end() -}) - -test("least recently set", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.get("a") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), "A") - t.end() -}) - -test("del", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.del("a") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("max", function (t) { - var cache = new LRU(3) - - // test changing the max, verify that the LRU items get dropped. - cache.max = 100 - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - - // now remove the max restriction, and try again. - cache.max = "hello" - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - // should trigger an immediate resize - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - t.end() -}) - -test("reset", function (t) { - var cache = new LRU(10) - cache.set("a", "A") - cache.set("b", "B") - cache.reset() - t.equal(cache.length, 0) - t.equal(cache.max, 10) - t.equal(cache.get("a"), undefined) - t.equal(cache.get("b"), undefined) - t.end() -}) - - -// Note: `.dump()` is a debugging tool only. No guarantees are made -// about the format/layout of the response. -test("dump", function (t) { - var cache = new LRU(10) - var d = cache.dump(); - t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache") - cache.set("a", "A") - var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } } - t.ok(d.a) - t.equal(d.a.key, "a") - t.equal(d.a.value, "A") - t.equal(d.a.lu, 0) - - cache.set("b", "B") - cache.get("b") - d = cache.dump() - t.ok(d.b) - t.equal(d.b.key, "b") - t.equal(d.b.value, "B") - t.equal(d.b.lu, 2) - - t.end() -}) - - -test("basic with weighed length", function (t) { - var cache = new LRU({ - max: 100, - length: function (item) { return item.size } - }) - cache.set("key", {val: "value", size: 50}) - t.equal(cache.get("key").val, "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.lengthCalculator(cache.get("key")), 50) - t.equal(cache.length, 50) - t.equal(cache.max, 100) - t.end() -}) - - -test("weighed length item too large", function (t) { - var cache = new LRU({ - max: 10, - length: function (item) { return item.size } - }) - t.equal(cache.max, 10) - - // should fall out immediately - cache.set("key", {val: "value", size: 50}) - - t.equal(cache.length, 0) - t.equal(cache.get("key"), undefined) - t.end() -}) - -test("least recently set with weighed length", function (t) { - var cache = new LRU({ - max:8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.set("d", "DDDD") - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("c"), "CCC") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten with weighed length", function (t) { - var cache = new LRU({ - max: 8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.get("a") - cache.get("b") - cache.set("d", "DDDD") - t.equal(cache.get("c"), undefined) - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("b"), "BB") - t.equal(cache.get("a"), "A") - t.end() -}) - -test("set returns proper booleans", function(t) { - var cache = new LRU({ - max: 5, - length: function (item) { return item.length } - }) - - t.equal(cache.set("a", "A"), true) - - // should return false for max exceeded - t.equal(cache.set("b", "donuts"), false) - - t.equal(cache.set("b", "B"), true) - t.equal(cache.set("c", "CCCC"), true) - t.end() -}) - -test("drop the old items", function(t) { - var cache = new LRU({ - max: 5, - maxAge: 50 - }) - - cache.set("a", "A") - - setTimeout(function () { - cache.set("b", "b") - t.equal(cache.get("a"), "A") - }, 25) - - setTimeout(function () { - cache.set("c", "C") - // timed out - t.notOk(cache.get("a")) - }, 60) - - setTimeout(function () { - t.notOk(cache.get("b")) - t.equal(cache.get("c"), "C") - }, 90) - - setTimeout(function () { - t.notOk(cache.get("c")) - t.end() - }, 155) -}) - -test("disposal function", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - dispose: function (k, n) { - disposed = n - } - }) - - cache.set(1, 1) - cache.set(2, 2) - t.equal(disposed, 1) - cache.set(3, 3) - t.equal(disposed, 2) - cache.reset() - t.equal(disposed, 3) - t.end() -}) - -test("disposal function on too big of item", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - length: function (k) { - return k.length - }, - dispose: function (k, n) { - disposed = n - } - }) - var obj = [ 1, 2 ] - - t.equal(disposed, false) - cache.set("obj", obj) - t.equal(disposed, obj) - t.end() -}) - -test("has()", function(t) { - var cache = new LRU({ - max: 1, - maxAge: 10 - }) - - cache.set('foo', 'bar') - t.equal(cache.has('foo'), true) - cache.set('blu', 'baz') - t.equal(cache.has('foo'), false) - t.equal(cache.has('blu'), true) - setTimeout(function() { - t.equal(cache.has('blu'), false) - t.end() - }, 15) -}) - -test("stale", function(t) { - var cache = new LRU({ - maxAge: 10, - stale: true - }) - - cache.set('foo', 'bar') - t.equal(cache.get('foo'), 'bar') - t.equal(cache.has('foo'), true) - setTimeout(function() { - t.equal(cache.has('foo'), false) - t.equal(cache.get('foo'), 'bar') - t.equal(cache.get('foo'), undefined) - t.end() - }, 15) -}) - -test("lru update via set", function(t) { - var cache = LRU({ max: 2 }); - - cache.set('foo', 1); - cache.set('bar', 2); - cache.del('bar'); - cache.set('baz', 3); - cache.set('qux', 4); - - t.equal(cache.get('foo'), undefined) - t.equal(cache.get('bar'), undefined) - t.equal(cache.get('baz'), 3) - t.equal(cache.get('qux'), 4) - t.end() -}) - -test("least recently set w/ peek", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - t.equal(cache.peek("a"), "A") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js deleted file mode 100644 index eefb80d..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +++ /dev/null @@ -1,52 +0,0 @@ -var test = require('tap').test -var LRU = require('../') - -test('forEach', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - var i = 9 - l.forEach(function (val, key, cache) { - t.equal(cache, l) - t.equal(key, i.toString()) - t.equal(val, i.toString(2)) - i -= 1 - }) - - // get in order of most recently used - l.get(6) - l.get(8) - - var order = [ 8, 6, 9, 7, 5 ] - var i = 0 - - l.forEach(function (val, key, cache) { - var j = order[i ++] - t.equal(cache, l) - t.equal(key, j.toString()) - t.equal(val, j.toString(2)) - }) - - t.end() -}) - -test('keys() and values()', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - t.similar(l.keys(), ['9', '8', '7', '6', '5']) - t.similar(l.values(), ['1001', '1000', '111', '110', '101']) - - // get in order of most recently used - l.get(6) - l.get(8) - - t.similar(l.keys(), ['8', '6', '9', '7', '5']) - t.similar(l.values(), ['1000', '110', '1001', '111', '101']) - - t.end() -}) diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js deleted file mode 100644 index 7af45b0..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env node --expose_gc - -var weak = require('weak'); -var test = require('tap').test -var LRU = require('../') -var l = new LRU({ max: 10 }) -var refs = 0 -function X() { - refs ++ - weak(this, deref) -} - -function deref() { - refs -- -} - -test('no leaks', function (t) { - // fill up the cache - for (var i = 0; i < 100; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var start = process.memoryUsage() - - // capture the memory - var startRefs = refs - - // do it again, but more - for (var i = 0; i < 10000; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var end = process.memoryUsage() - t.equal(refs, startRefs, 'no leaky refs') - - console.error('start: %j\n' + - 'end: %j', start, end); - t.pass(); - t.end(); -}) diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE deleted file mode 100644 index 0c44ae7..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. 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. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md deleted file mode 100644 index 7e36512..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# sigmund - -Quick and dirty signatures for Objects. - -This is like a much faster `deepEquals` comparison, which returns a -string key suitable for caches and the like. - -## Usage - -```javascript -function doSomething (someObj) { - var key = sigmund(someObj, maxDepth) // max depth defaults to 10 - var cached = cache.get(key) - if (cached) return cached) - - var result = expensiveCalculation(someObj) - cache.set(key, result) - return result -} -``` - -The resulting key will be as unique and reproducible as calling -`JSON.stringify` or `util.inspect` on the object, but is much faster. -In order to achieve this speed, some differences are glossed over. -For example, the object `{0:'foo'}` will be treated identically to the -array `['foo']`. - -Also, just as there is no way to summon the soul from the scribblings -of a cocain-addled psychoanalyst, there is no way to revive the object -from the signature string that sigmund gives you. In fact, it's -barely even readable. - -As with `sys.inspect` and `JSON.stringify`, larger objects will -produce larger signature strings. - -Because sigmund is a bit less strict than the more thorough -alternatives, the strings will be shorter, and also there is a -slightly higher chance for collisions. For example, these objects -have the same signature: - - var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} - var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -Like a good Freudian, sigmund is most effective when you already have -some understanding of what you're looking for. It can help you help -yourself, but you must be willing to do some work as well. - -Cycles are handled, and cyclical objects are silently omitted (though -the key is included in the signature output.) - -The second argument is the maximum depth, which defaults to 10, -because that is the maximum object traversal depth covered by most -insurance carriers. diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js deleted file mode 100644 index 5acfd6d..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js +++ /dev/null @@ -1,283 +0,0 @@ -// different ways to id objects -// use a req/res pair, since it's crazy deep and cyclical - -// sparseFE10 and sigmund are usually pretty close, which is to be expected, -// since they are essentially the same algorithm, except that sigmund handles -// regular expression objects properly. - - -var http = require('http') -var util = require('util') -var sigmund = require('./sigmund.js') -var sreq, sres, creq, cres, test - -http.createServer(function (q, s) { - sreq = q - sres = s - sres.end('ok') - this.close(function () { setTimeout(function () { - start() - }, 200) }) -}).listen(1337, function () { - creq = http.get({ port: 1337 }) - creq.on('response', function (s) { cres = s }) -}) - -function start () { - test = [sreq, sres, creq, cres] - // test = sreq - // sreq.sres = sres - // sreq.creq = creq - // sreq.cres = cres - - for (var i in exports.compare) { - console.log(i) - var hash = exports.compare[i]() - console.log(hash) - console.log(hash.length) - console.log('') - } - - require('bench').runMain() -} - -function customWs (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '') - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return customWs(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + customWs(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function custom (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return '' + obj - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return custom(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + custom(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function sparseFE2 (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k + ':' - ch(v[k], depth + 1) - }) - soFar += '}' - } - ch(obj, 0) - return soFar -} - -function sparseFE (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k - ch(v[k], depth + 1) - }) - } - ch(obj, 0) - return soFar -} - -function sparse (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k - ch(v[k], depth + 1) - } - } - ch(obj, 0) - return soFar -} - -function noCommas (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - - -function flatten (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - soFar += ',' - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - -exports.compare = -{ - // 'custom 2': function () { - // return custom(test, 2, 0) - // }, - // 'customWs 2': function () { - // return customWs(test, 2, 0) - // }, - 'JSON.stringify (guarded)': function () { - var seen = [] - return JSON.stringify(test, function (k, v) { - if (typeof v !== 'object' || !v) return v - if (seen.indexOf(v) !== -1) return undefined - seen.push(v) - return v - }) - }, - - 'flatten 10': function () { - return flatten(test, 10) - }, - - // 'flattenFE 10': function () { - // return flattenFE(test, 10) - // }, - - 'noCommas 10': function () { - return noCommas(test, 10) - }, - - 'sparse 10': function () { - return sparse(test, 10) - }, - - 'sparseFE 10': function () { - return sparseFE(test, 10) - }, - - 'sparseFE2 10': function () { - return sparseFE2(test, 10) - }, - - sigmund: function() { - return sigmund(test, 10) - }, - - - // 'util.inspect 1': function () { - // return util.inspect(test, false, 1, false) - // }, - // 'util.inspect undefined': function () { - // util.inspect(test) - // }, - // 'util.inspect 2': function () { - // util.inspect(test, false, 2, false) - // }, - // 'util.inspect 3': function () { - // util.inspect(test, false, 3, false) - // }, - // 'util.inspect 4': function () { - // util.inspect(test, false, 4, false) - // }, - // 'util.inspect Infinity': function () { - // util.inspect(test, false, Infinity, false) - // } -} - -/** results -**/ diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json deleted file mode 100644 index 92a63e9..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "sigmund", - "version": "1.0.0", - "description": "Quick and dirty signatures for Objects.", - "main": "sigmund.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.3.0" - }, - "scripts": { - "test": "tap test/*.js", - "bench": "node bench.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/sigmund" - }, - "keywords": [ - "object", - "signature", - "key", - "data", - "psychoanalysis" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached)\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocain-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even readable.\n\nAs with `sys.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n", - "readmeFilename": "README.md", - "_id": "sigmund@1.0.0", - "_from": "sigmund@~1.0.0" -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js deleted file mode 100644 index 82c7ab8..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = sigmund -function sigmund (subject, maxSessions) { - maxSessions = maxSessions || 10; - var notes = []; - var analysis = ''; - var RE = RegExp; - - function psychoAnalyze (subject, session) { - if (session > maxSessions) return; - - if (typeof subject === 'function' || - typeof subject === 'undefined') { - return; - } - - if (typeof subject !== 'object' || !subject || - (subject instanceof RE)) { - analysis += subject; - return; - } - - if (notes.indexOf(subject) !== -1 || session === maxSessions) return; - - notes.push(subject); - analysis += '{'; - Object.keys(subject).forEach(function (issue, _, __) { - // pseudo-private values. skip those. - if (issue.charAt(0) === '_') return; - var to = typeof subject[issue]; - if (to === 'function' || to === 'undefined') return; - analysis += issue; - psychoAnalyze(subject[issue], session + 1); - }); - } - psychoAnalyze(subject, 0); - return analysis; -} - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js deleted file mode 100644 index 50c53a1..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tap').test -var sigmund = require('../sigmund.js') - - -// occasionally there are duplicates -// that's an acceptable edge-case. JSON.stringify and util.inspect -// have some collision potential as well, though less, and collision -// detection is expensive. -var hash = '{abc/def/g{0h1i2{jkl' -var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} -var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -var obj3 = JSON.parse(JSON.stringify(obj1)) -obj3.c = /def/ -obj3.g[2].cycle = obj3 -var cycleHash = '{abc/def/g{0h1i2{jklcycle' - -test('basic', function (t) { - t.equal(sigmund(obj1), hash) - t.equal(sigmund(obj2), hash) - t.equal(sigmund(obj3), cycleHash) - t.end() -}) - diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/package.json b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/package.json deleted file mode 100644 index 480a1cd..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "minimatch", - "description": "a glob matcher in javascript", - "version": "0.2.12", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "main": "minimatch.js", - "scripts": { - "test": "tap test" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "lru-cache": "2", - "sigmund": "~1.0.0" - }, - "devDependencies": { - "tap": "" - }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" - }, - "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n", - "readmeFilename": "README.md", - "_id": "minimatch@0.2.12", - "_from": "minimatch@~0.2.11" -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/basic.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/basic.js deleted file mode 100644 index ae7ac73..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/basic.js +++ /dev/null @@ -1,399 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - - -var patterns = - [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - // https://github.com/isaacs/minimatch/issues/5 - , function () { - files = [ 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' - , 'a/b/.x' - , 'a/b/.x/' - , 'a/.x/b' - , '.x' - , '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b/.x/c' - , '.x/.x' ] - } - , ["**/.x/**", [ '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b' - , 'a/b/.x/' - , 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' ] ] - - ] - -var regexps = - [ '/^(?:(?=.)a[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:\\*)$/', - '/^(?:(?=.)\\*[^/]*?)$/', - '/^(?:\\*\\*)$/', - '/^(?:(?=.)b[^/]*?\\/)$/', - '/^(?:(?=.)c[^/]*?)$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', - '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/', - '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/', - '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/', - '/^(?:(?=.)a[^/]*?[^c])$/', - '/^(?:(?=.)a[X-]b)$/', - '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/', - '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[^/]c)$/', - '/^(?:a\\*c)$/', - 'false', - '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/', - '/^(?:man\\/man1\\/bash\\.1)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[-abc])$/', - '/^(?:(?!\\.)(?=.)[abc-])$/', - '/^(?:\\\\)$/', - '/^(?:(?!\\.)(?=.)[\\\\])$/', - '/^(?:(?!\\.)(?=.)[\\[])$/', - '/^(?:\\[)$/', - '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[\\]])$/', - '/^(?:(?!\\.)(?=.)[\\]-])$/', - '/^(?:(?!\\.)(?=.)[a-z])$/', - '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:\\[\\])$/', - '/^(?:\\[abc)$/', - '/^(?:(?=.)XYZ)$/i', - '/^(?:(?=.)ab[^/]*?)$/i', - '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i', - '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/', - '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', - '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/', - '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', - '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/', - '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', - '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/', - '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/', - '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/', - '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/', - '/^(?:(?=.)a[^/]b)$/', - '/^(?:(?=.)#[^/]*?)$/', - '/^(?!^(?:(?=.)a[^/]*?)$).*$/', - '/^(?:(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)a[^/]*?)$/', - '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ] -var re = 0; - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - patterns.forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var m = new mm.Minimatch(pattern, options) - var r = m.makeRe() - var expectRe = regexps[re++] - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - - t.equal(tapOpts.re, expectRe, tapOpts) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/brace-expand.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/brace-expand.js deleted file mode 100644 index 7ee278a..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/brace-expand.js +++ /dev/null @@ -1,33 +0,0 @@ -var tap = require("tap") - , minimatch = require("../") - -tap.test("brace expansion", function (t) { - // [ pattern, [expanded] ] - ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}" - , [ "abxy" - , "abxz" - , "acdxy" - , "acdxz" - , "acexy" - , "acexz" - , "afhxy" - , "afhxz" - , "aghxy" - , "aghxz" ] ] - , [ "a{1..5}b" - , [ "a1b" - , "a2b" - , "a3b" - , "a4b" - , "a5b" ] ] - , [ "a{b}c", ["a{b}c"] ] - ].forEach(function (tc) { - var p = tc[0] - , expect = tc[1] - t.equivalent(minimatch.braceExpand(p), expect, p) - }) - console.error("ending") - t.end() -}) - - diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/caching.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/caching.js deleted file mode 100644 index 0fec4b0..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/caching.js +++ /dev/null @@ -1,14 +0,0 @@ -var Minimatch = require("../minimatch.js").Minimatch -var tap = require("tap") -tap.test("cache test", function (t) { - var mm1 = new Minimatch("a?b") - var mm2 = new Minimatch("a?b") - t.equal(mm1, mm2, "should get the same object") - // the lru should drop it after 100 entries - for (var i = 0; i < 100; i ++) { - new Minimatch("a"+i) - } - mm2 = new Minimatch("a?b") - t.notEqual(mm1, mm2, "cache should have dropped") - t.end() -}) diff --git a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/defaults.js b/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/defaults.js deleted file mode 100644 index 25f1f60..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/node_modules/minimatch/test/defaults.js +++ /dev/null @@ -1,274 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - ; [ "http://www.bashcookbook.com/bashinfo" + - "/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - ].forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var Class = mm.defaults(options).Minimatch - var m = new Class(pattern, {}) - var r = m.makeRe() - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/package.json b/support/process/node_modules/yamljs/node_modules/glob/package.json deleted file mode 100644 index f0522b9..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "glob", - "description": "a little globber", - "version": "3.1.21", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "main": "glob.js", - "engines": { - "node": "*" - }, - "dependencies": { - "minimatch": "~0.2.11", - "graceful-fs": "~1.2.0", - "inherits": "1" - }, - "devDependencies": { - "tap": "~0.4.0", - "mkdirp": "0", - "rimraf": "1" - }, - "scripts": { - "test": "tap test/*.js" - }, - "license": "BSD", - "readme": "# Glob\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options]\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the statCache object is reused between glob calls.\n\nUsers are thus advised not to use a glob result as a\nguarantee of filesystem state in the face of rapid changes.\nFor the vast majority of operations, this is never a problem.\n", - "readmeFilename": "README.md", - "_id": "glob@3.1.21", - "_from": "glob@~3.1.11" -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/test/00-setup.js b/support/process/node_modules/yamljs/node_modules/glob/test/00-setup.js deleted file mode 100644 index 245afaf..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/test/00-setup.js +++ /dev/null @@ -1,176 +0,0 @@ -// just a little pre-run script to set up the fixtures. -// zz-finish cleans it up - -var mkdirp = require("mkdirp") -var path = require("path") -var i = 0 -var tap = require("tap") -var fs = require("fs") -var rimraf = require("rimraf") - -var files = -[ "a/.abcdef/x/y/z/a" -, "a/abcdef/g/h" -, "a/abcfed/g/h" -, "a/b/c/d" -, "a/bc/e/f" -, "a/c/d/c/b" -, "a/cb/e/f" -] - -var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c") -var symlinkFrom = "../.." - -files = files.map(function (f) { - return path.resolve(__dirname, f) -}) - -tap.test("remove fixtures", function (t) { - rimraf(path.resolve(__dirname, "a"), function (er) { - t.ifError(er, "remove fixtures") - t.end() - }) -}) - -files.forEach(function (f) { - tap.test(f, function (t) { - var d = path.dirname(f) - mkdirp(d, 0755, function (er) { - if (er) { - t.fail(er) - return t.bailout() - } - fs.writeFile(f, "i like tests", function (er) { - t.ifError(er, "make file") - t.end() - }) - }) - }) -}) - -if (process.platform !== "win32") { - tap.test("symlinky", function (t) { - var d = path.dirname(symlinkTo) - console.error("mkdirp", d) - mkdirp(d, 0755, function (er) { - t.ifError(er) - fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) { - t.ifError(er, "make symlink") - t.end() - }) - }) - }) -} - -;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) { - w = "/tmp/glob-test/" + w - tap.test("create " + w, function (t) { - mkdirp(w, function (er) { - if (er) - throw er - t.pass(w) - t.end() - }) - }) -}) - - -// generate the bash pattern test-fixtures if possible -if (process.platform === "win32" || !process.env.TEST_REGEN) { - console.error("Windows, or TEST_REGEN unset. Using cached fixtures.") - return -} - -var spawn = require("child_process").spawn; -var globs = - // put more patterns here. - // anything that would be directly in / should be in /tmp/glob-test - ["test/a/*/+(c|g)/./d" - ,"test/a/**/[cg]/../[cg]" - ,"test/a/{b,c,d,e,f}/**/g" - ,"test/a/b/**" - ,"test/**/g" - ,"test/a/abc{fed,def}/g/h" - ,"test/a/abc{fed/g,def}/**/" - ,"test/a/abc{fed/g,def}/**///**/" - ,"test/**/a/**/" - ,"test/+(a|b|c)/a{/,bc*}/**" - ,"test/*/*/*/f" - ,"test/**/f" - ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**" - ,"{./*/*,/tmp/glob-test/*}" - ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me! - ,"test/a/!(symlink)/**" - ] -var bashOutput = {} -var fs = require("fs") - -globs.forEach(function (pattern) { - tap.test("generate fixture " + pattern, function (t) { - var cmd = "shopt -s globstar && " + - "shopt -s extglob && " + - "shopt -s nullglob && " + - // "shopt >&2; " + - "eval \'for i in " + pattern + "; do echo $i; done\'" - var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) }) - var out = [] - cp.stdout.on("data", function (c) { - out.push(c) - }) - cp.stderr.pipe(process.stderr) - cp.on("close", function (code) { - out = flatten(out) - if (!out) - out = [] - else - out = cleanResults(out.split(/\r*\n/)) - - bashOutput[pattern] = out - t.notOk(code, "bash test should finish nicely") - t.end() - }) - }) -}) - -tap.test("save fixtures", function (t) { - var fname = path.resolve(__dirname, "bash-results.json") - var data = JSON.stringify(bashOutput, null, 2) + "\n" - fs.writeFile(fname, data, function (er) { - t.ifError(er) - t.end() - }) -}) - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') - }) -} - -function flatten (chunks) { - var s = 0 - chunks.forEach(function (c) { s += c.length }) - var out = new Buffer(s) - s = 0 - chunks.forEach(function (c) { - c.copy(out, s) - s += c.length - }) - - return out.toString().trim() -} - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/test/bash-comparison.js b/support/process/node_modules/yamljs/node_modules/glob/test/bash-comparison.js deleted file mode 100644 index 239ed1a..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/test/bash-comparison.js +++ /dev/null @@ -1,63 +0,0 @@ -// basic test -// show that it does the same thing by default as the shell. -var tap = require("tap") -, child_process = require("child_process") -, bashResults = require("./bash-results.json") -, globs = Object.keys(bashResults) -, glob = require("../") -, path = require("path") - -// run from the root of the project -// this is usually where you're at anyway, but be sure. -process.chdir(path.resolve(__dirname, "..")) - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} - -globs.forEach(function (pattern) { - var expect = bashResults[pattern] - // anything regarding the symlink thing will fail on windows, so just skip it - if (process.platform === "win32" && - expect.some(function (m) { - return /\/symlink\//.test(m) - })) - return - - tap.test(pattern, function (t) { - glob(pattern, function (er, matches) { - if (er) - throw er - - // sort and unmark, just to match the shell results - matches = cleanResults(matches) - - t.deepEqual(matches, expect, pattern) - t.end() - }) - }) - - tap.test(pattern + " sync", function (t) { - var matches = cleanResults(glob.sync(pattern)) - - t.deepEqual(matches, expect, "should match shell") - t.end() - }) -}) - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/') - }) -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/test/bash-results.json b/support/process/node_modules/yamljs/node_modules/glob/test/bash-results.json deleted file mode 100644 index c227449..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/test/bash-results.json +++ /dev/null @@ -1,348 +0,0 @@ -{ - "test/a/*/+(c|g)/./d": [ - "test/a/b/c/./d" - ], - "test/a/**/[cg]/../[cg]": [ - "test/a/abcdef/g/../g", - "test/a/abcfed/g/../g", - "test/a/b/c/../c", - "test/a/c/../c", - "test/a/c/d/c/../c", - "test/a/symlink/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c" - ], - "test/a/{b,c,d,e,f}/**/g": [], - "test/a/b/**": [ - "test/a/b", - "test/a/b/c", - "test/a/b/c/d" - ], - "test/**/g": [ - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/a/abc{fed,def}/g/h": [ - "test/a/abcdef/g/h", - "test/a/abcfed/g/h" - ], - "test/a/abc{fed/g,def}/**/": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/a/abc{fed/g,def}/**///**/": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/**/a/**/": [ - "test/a", - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/b", - "test/a/b/c", - "test/a/bc", - "test/a/bc/e", - "test/a/c", - "test/a/c/d", - "test/a/c/d/c", - "test/a/cb", - "test/a/cb/e", - "test/a/symlink", - "test/a/symlink/a", - "test/a/symlink/a/b", - "test/a/symlink/a/b/c", - "test/a/symlink/a/b/c/a", - "test/a/symlink/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b" - ], - "test/+(a|b|c)/a{/,bc*}/**": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcdef/g/h", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/abcfed/g/h" - ], - "test/*/*/*/f": [ - "test/a/bc/e/f", - "test/a/cb/e/f" - ], - "test/**/f": [ - "test/a/bc/e/f", - "test/a/cb/e/f" - ], - "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [ - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c" - ], - "{./*/*,/tmp/glob-test/*}": [ - "./examples/g.js", - "./examples/usr-local.js", - "./node_modules/graceful-fs", - "./node_modules/inherits", - "./node_modules/minimatch", - "./node_modules/mkdirp", - "./node_modules/rimraf", - "./node_modules/tap", - "./test/00-setup.js", - "./test/a", - "./test/bash-comparison.js", - "./test/bash-results.json", - "./test/cwd-test.js", - "./test/mark.js", - "./test/nocase-nomagic.js", - "./test/pause-resume.js", - "./test/root-nomount.js", - "./test/root.js", - "./test/zz-cleanup.js", - "/tmp/glob-test/asdf", - "/tmp/glob-test/bar", - "/tmp/glob-test/baz", - "/tmp/glob-test/foo", - "/tmp/glob-test/quux", - "/tmp/glob-test/qwer", - "/tmp/glob-test/rewq" - ], - "{/tmp/glob-test/*,*}": [ - "/tmp/glob-test/asdf", - "/tmp/glob-test/bar", - "/tmp/glob-test/baz", - "/tmp/glob-test/foo", - "/tmp/glob-test/quux", - "/tmp/glob-test/qwer", - "/tmp/glob-test/rewq", - "examples", - "glob.js", - "LICENSE", - "node_modules", - "package.json", - "README.md", - "test" - ], - "test/a/!(symlink)/**": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcdef/g/h", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/abcfed/g/h", - "test/a/b", - "test/a/b/c", - "test/a/b/c/d", - "test/a/bc", - "test/a/bc/e", - "test/a/bc/e/f", - "test/a/c", - "test/a/c/d", - "test/a/c/d/c", - "test/a/c/d/c/b", - "test/a/cb", - "test/a/cb/e", - "test/a/cb/e/f" - ] -} diff --git a/support/process/node_modules/yamljs/node_modules/glob/test/cwd-test.js b/support/process/node_modules/yamljs/node_modules/glob/test/cwd-test.js deleted file mode 100644 index 352c27e..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/test/cwd-test.js +++ /dev/null @@ -1,55 +0,0 @@ -var tap = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -tap.test("changing cwd and searching for **/d", function (t) { - var glob = require('../') - var path = require('path') - t.test('.', function (t) { - glob('**/d', function (er, matches) { - t.ifError(er) - t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) - t.end() - }) - }) - - t.test('a', function (t) { - glob('**/d', {cwd:path.resolve('a')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'b/c/d', 'c/d' ]) - t.end() - }) - }) - - t.test('a/b', function (t) { - glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'c/d' ]) - t.end() - }) - }) - - t.test('a/b/', function (t) { - glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'c/d' ]) - t.end() - }) - }) - - t.test('.', function (t) { - glob('**/d', {cwd: process.cwd()}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) - t.end() - }) - }) - - t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() - }) - - t.end() -}) diff --git a/support/process/node_modules/yamljs/node_modules/glob/test/mark.js b/support/process/node_modules/yamljs/node_modules/glob/test/mark.js deleted file mode 100644 index ed68a33..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/test/mark.js +++ /dev/null @@ -1,74 +0,0 @@ -var test = require("tap").test -var glob = require('../') -process.chdir(__dirname) - -test("mark, no / on pattern", function (t) { - glob("a/*", {mark: true}, function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - - if (process.platform !== "win32") - expect.push('a/symlink/') - - t.same(results, expect) - t.end() - }) -}) - -test("mark=false, no / on pattern", function (t) { - glob("a/*", function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef', - 'a/abcfed', - 'a/b', - 'a/bc', - 'a/c', - 'a/cb' ] - - if (process.platform !== "win32") - expect.push('a/symlink') - t.same(results, expect) - t.end() - }) -}) - -test("mark=true, / on pattern", function (t) { - glob("a/*/", {mark: true}, function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - if (process.platform !== "win32") - expect.push('a/symlink/') - t.same(results, expect) - t.end() - }) -}) - -test("mark=false, / on pattern", function (t) { - glob("a/*/", function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - if (process.platform !== "win32") - expect.push('a/symlink/') - t.same(results, expect) - t.end() - }) -}) diff --git a/support/process/node_modules/yamljs/node_modules/glob/test/nocase-nomagic.js b/support/process/node_modules/yamljs/node_modules/glob/test/nocase-nomagic.js deleted file mode 100644 index d862970..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/test/nocase-nomagic.js +++ /dev/null @@ -1,113 +0,0 @@ -var fs = require('graceful-fs'); -var test = require('tap').test; -var glob = require('../'); - -test('mock fs', function(t) { - var stat = fs.stat - var statSync = fs.statSync - var readdir = fs.readdir - var readdirSync = fs.readdirSync - - function fakeStat(path) { - var ret - switch (path.toLowerCase()) { - case '/tmp': case '/tmp/': - ret = { isDirectory: function() { return true } } - break - case '/tmp/a': - ret = { isDirectory: function() { return false } } - break - } - return ret - } - - fs.stat = function(path, cb) { - var f = fakeStat(path); - if (f) { - process.nextTick(function() { - cb(null, f) - }) - } else { - stat.call(fs, path, cb) - } - } - - fs.statSync = function(path) { - return fakeStat(path) || statSync.call(fs, path) - } - - function fakeReaddir(path) { - var ret - switch (path.toLowerCase()) { - case '/tmp': case '/tmp/': - ret = [ 'a', 'A' ] - break - case '/': - ret = ['tmp', 'tMp', 'tMP', 'TMP'] - } - return ret - } - - fs.readdir = function(path, cb) { - var f = fakeReaddir(path) - if (f) - process.nextTick(function() { - cb(null, f) - }) - else - readdir.call(fs, path, cb) - } - - fs.readdirSync = function(path) { - return fakeReaddir(path) || readdirSync.call(fs, path) - } - - t.pass('mocked') - t.end() -}) - -test('nocase, nomagic', function(t) { - var n = 2 - var want = [ '/TMP/A', - '/TMP/a', - '/tMP/A', - '/tMP/a', - '/tMp/A', - '/tMp/a', - '/tmp/A', - '/tmp/a' ] - glob('/tmp/a', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - if (--n === 0) t.end() - }) - glob('/tmp/A', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - if (--n === 0) t.end() - }) -}) - -test('nocase, with some magic', function(t) { - t.plan(2) - var want = [ '/TMP/A', - '/TMP/a', - '/tMP/A', - '/tMP/a', - '/tMp/A', - '/tMp/a', - '/tmp/A', - '/tmp/a' ] - glob('/tmp/*', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - }) - glob('/tmp/*', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - }) -}) diff --git a/support/process/node_modules/yamljs/node_modules/glob/test/pause-resume.js b/support/process/node_modules/yamljs/node_modules/glob/test/pause-resume.js deleted file mode 100644 index e1ffbab..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/test/pause-resume.js +++ /dev/null @@ -1,73 +0,0 @@ -// show that no match events happen while paused. -var tap = require("tap") -, child_process = require("child_process") -// just some gnarly pattern with lots of matches -, pattern = "test/a/!(symlink)/**" -, bashResults = require("./bash-results.json") -, patterns = Object.keys(bashResults) -, glob = require("../") -, Glob = glob.Glob -, path = require("path") - -// run from the root of the project -// this is usually where you're at anyway, but be sure. -process.chdir(path.resolve(__dirname, "..")) - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') - }) -} - -var globResults = [] -tap.test("use a Glob object, and pause/resume it", function (t) { - var g = new Glob(pattern) - , paused = false - , res = [] - , expect = bashResults[pattern] - - g.on("pause", function () { - console.error("pause") - }) - - g.on("resume", function () { - console.error("resume") - }) - - g.on("match", function (m) { - t.notOk(g.paused, "must not be paused") - globResults.push(m) - g.pause() - t.ok(g.paused, "must be paused") - setTimeout(g.resume.bind(g), 10) - }) - - g.on("end", function (matches) { - t.pass("reached glob end") - globResults = cleanResults(globResults) - matches = cleanResults(matches) - t.deepEqual(matches, globResults, - "end event matches should be the same as match events") - - t.deepEqual(matches, expect, - "glob matches should be the same as bash results") - - t.end() - }) -}) - diff --git a/support/process/node_modules/yamljs/node_modules/glob/test/root-nomount.js b/support/process/node_modules/yamljs/node_modules/glob/test/root-nomount.js deleted file mode 100644 index 3ac5979..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/test/root-nomount.js +++ /dev/null @@ -1,39 +0,0 @@ -var tap = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -tap.test("changing root and searching for /b*/**", function (t) { - var glob = require('../') - var path = require('path') - t.test('.', function (t) { - glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, []) - t.end() - }) - }) - - t.test('a', function (t) { - glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) - t.end() - }) - }) - - t.test('root=a, cwd=a/b', function (t) { - glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) - t.end() - }) - }) - - t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() - }) - - t.end() -}) diff --git a/support/process/node_modules/yamljs/node_modules/glob/test/root.js b/support/process/node_modules/yamljs/node_modules/glob/test/root.js deleted file mode 100644 index 95c23f9..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/test/root.js +++ /dev/null @@ -1,46 +0,0 @@ -var t = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -var glob = require('../') -var path = require('path') - -t.test('.', function (t) { - glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) { - t.ifError(er) - t.like(matches, []) - t.end() - }) -}) - - -t.test('a', function (t) { - console.error("root=" + path.resolve('a')) - glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) { - t.ifError(er) - var wanted = [ - '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' - ].map(function (m) { - return path.join(path.resolve('a'), m).replace(/\\/g, '/') - }) - - t.like(matches, wanted) - t.end() - }) -}) - -t.test('root=a, cwd=a/b', function (t) { - glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) { - return path.join(path.resolve('a'), m).replace(/\\/g, '/') - })) - t.end() - }) -}) - -t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() -}) diff --git a/support/process/node_modules/yamljs/node_modules/glob/test/zz-cleanup.js b/support/process/node_modules/yamljs/node_modules/glob/test/zz-cleanup.js deleted file mode 100644 index e085f0f..0000000 --- a/support/process/node_modules/yamljs/node_modules/glob/test/zz-cleanup.js +++ /dev/null @@ -1,11 +0,0 @@ -// remove the fixtures -var tap = require("tap") -, rimraf = require("rimraf") -, path = require("path") - -tap.test("cleanup fixtures", function (t) { - rimraf(path.resolve(__dirname, "a"), function (er) { - t.ifError(er, "removed") - t.end() - }) -}) diff --git a/support/process/node_modules/yamljs/package.json b/support/process/node_modules/yamljs/package.json deleted file mode 100644 index 9feab9f..0000000 --- a/support/process/node_modules/yamljs/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "yamljs", - "version": "0.1.4", - "description": "Standalone JavaScript YAML 1.2 Parser & Encoder. Works under node.js and all major browsers. Also brings command line YAML/JSON conversion tools.", - "keywords": [ - "yaml", - "json", - "yaml2json", - "json2yaml" - ], - "author": { - "name": "Jeremy Faivre", - "email": "contact@jeremyfa.com" - }, - "main": "./bin/yaml.js", - "dependencies": { - "argparse": "~0.1.4", - "glob": "~3.1.11" - }, - "bin": { - "yaml2json": "./bin/yaml2json", - "json2yaml": "./bin/json2yaml" - }, - "devDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/jeremyfa/yaml.js.git" - }, - "readme": "yaml.js\n=======\n\nStandalone JavaScript YAML 1.2 Parser & Encoder. Works under node.js and all major browsers. Also brings command line YAML/JSON conversion tools.\n\nMainly inspired from [Symfony Yaml Component](https://github.com/symfony/Yaml).\n\nHow to use\n----------\n\nImport yaml.js in your html page:\n\n``` html\n\n```\n\nParse yaml string:\n\n``` js\nnativeObject = YAML.parse(yamlString);\n```\n\nDump native object into yaml string:\n\n``` js\nyamlString = YAML.stringify(nativeObject[, inline /* @integer depth to start using inline notation at */[, spaces /* @integer number of spaces to use for indentation */] ]);\n```\n\nLoad yaml file:\n\n``` js\nnativeObject = YAML.load('file.yml');\n```\n\nLoad yaml file:\n\n``` js\nYAML.load('file.yml', function(result)\n{\n nativeObject = result;\n});\n```\n\nUse with node.js\n----------------\n\nInstall module:\n\n``` bash\nnpm install yamljs\n```\n\nUse it:\n\n``` js\nYAML = require('yamljs');\n\n// parse YAML string\nnativeObject = YAML.parse(yamlString);\n\n// Generate YAML\nyamlString = YAML.stringify(nativeObject, 4);\n\n// Load yaml file using require\nnativeObject = require('./myfile.yml');\n\n// Load yaml file using YAML.load\nnativeObject = YAML.load('myfile.yml');\n```\n\nCommand line tools\n------------------\n\nYou can enable the command line tools by installing yamljs as a global module:\n\n``` bash\nnpm install -g yamljs\n```\n\nThen, two cli commands should become available: **yaml2json** and **json2yaml**. They let you convert YAML to JSON and JSON to YAML very easily.\n\n**yaml2json**\n\n```\nusage: yaml2json [-h] [-v] [-p] [-i INDENTATION] [-s] [-r] [-w] input\n\nPositional arguments:\n input YAML file or directory containing YAML files.\n\nOptional arguments:\n -h, --help Show this help message and exit.\n -v, --version Show program's version number and exit.\n -p, --pretty Output pretty (indented) JSON.\n -i INDENTATION, --indentation INDENTATION\n Number of space characters used to indent code (use \n with --pretty, default: 2).\n -s, --save Save output inside JSON file(s) with the same name.\n -r, --recursive If the input is a directory, also find YAML files in \n sub-directories recursively.\n -w, --watch Watch for changes.\n```\n\n**json2yaml**\n\n```\nusage: json2yaml [-h] [-v] [-d DEPTH] [-i INDENTATION] [-s] [-r] [-w] input\n\nPositional arguments:\n input JSON file or directory containing JSON files.\n\nOptional arguments:\n -h, --help Show this help message and exit.\n -v, --version Show program's version number and exit.\n -d DEPTH, --depth DEPTH\n Set minimum level of depth before generating inline \n YAML (default: 2).\n -i INDENTATION, --indentation INDENTATION\n Number of space characters used to indent code \n (default: 2).\n -s, --save Save output inside YML file(s) with the same name.\n -r, --recursive If the input is a directory, also find JSON files in \n sub-directories recursively.\n -w, --watch Watch for changes.\n```\n\n**examples**\n\n``` bash\n# Convert YAML to JSON and output resulting JSON on the console\nyaml2json myfile.yml\n\n# Store output inside a JSON file\nyaml2json myfile.yml > ouput.json\n\n# Output \"pretty\" (indented) JSON\nyaml2json myfile.yml --pretty\n\n# Save the output inside a file called myfile.json\nyaml2json myfile.yml --pretty --save\n\n# Watch a full directory and convert any YAML file into its JSON equivalent\nyaml2json mydirectory --pretty --save --recursive\n\n# Convert JSON to YAML and store output inside a JSON file\njson2yaml myfile.json > ouput.yml\n\n# Output YAML that will be inlined only after 8 levels of indentation\njson2yaml myfile.json --depth 8\n\n# Save the output inside a file called myfile.json with 4 spaces for each indentation\njson2yaml myfile.json --indentation 4\n\n# Watch a full directory and convert any JSON file into its YAML equivalent\njson2yaml mydirectory --pretty --save --recursive\n```\n\nImportant\n---------\n\nSymfony dropped support for YAML 1.1 spec. This means that `yes`, `no` and similar no longer convert to their *boolean* equivalents.\n\nThe internal `Yaml().load()` and `Yaml().loadFile()` methods renamed to `Yaml().parse()` and `Yaml().parseFile()` respectively. Exceptions replaced with `YamlParseException` object.\n\n", - "readmeFilename": "README.md", - "_id": "yamljs@0.1.4", - "_from": "yamljs@" -} diff --git a/support/process/node_modules/yamljs/src/cli/json2yaml.js b/support/process/node_modules/yamljs/src/cli/json2yaml.js deleted file mode 100644 index 38d0b86..0000000 --- a/support/process/node_modules/yamljs/src/cli/json2yaml.js +++ /dev/null @@ -1,167 +0,0 @@ - -/** - * yaml2json cli program - */ - -var YAML = require('./yaml.js'); - -var ArgumentParser = require('argparse').ArgumentParser; -var cli = new ArgumentParser({ - prog: "json2yaml", - version: require('../package.json').version, - addHelp: true -}); - -cli.addArgument( - ['-d', '--depth'], - { - action: 'store', - type: 'int', - help: 'Set minimum level of depth before generating inline YAML (default: 2).' - } -); - -cli.addArgument( - ['-i', '--indentation'], - { - action: 'store', - type: 'int', - help: 'Number of space characters used to indent code (default: 2).', - } -); - -cli.addArgument( - ['-s', '--save'], - { - help: 'Save output inside YML file(s) with the same name.', - action: 'storeTrue' - } -); - -cli.addArgument( - ['-r', '--recursive'], - { - help: 'If the input is a directory, also find JSON files in sub-directories recursively.', - action: 'storeTrue' - } -); - -cli.addArgument( - ['-w', '--watch'], - { - help: 'Watch for changes.', - action: 'storeTrue' - } -); - -cli.addArgument(['input'], { - help: 'JSON file or directory containing JSON files.' -}); - -try { - var options = cli.parseArgs(); - var path = require('path'); - var fs = require('fs'); - var glob = require('glob'); - - var rootPath = process.cwd(); - var parsePath = function(input) { - var output; - if (!(input != null)) { - return rootPath; - } - output = path.normalize(input); - if (output.length === 0) { - return rootPath; - } - if (output.charAt(0) !== '/') { - output = path.normalize(rootPath + '/./' + output); - } - if (output.length > 1 && output.charAt(output.length - 1) === '/') { - return output.substr(0, output.length - 1); - } - return output; - }; - - // Find files - var findFiles = function(input) { - var isDirectory = fs.statSync(input).isDirectory(); - var files = []; - - if (!isDirectory) { - files.push(input); - } - else { - if (options.recursive) { - files = files.concat(glob.sync(input+'/**/*.json')); - } - else { - files = files.concat(glob.sync(input+'/*.json')); - } - } - - return files; - }; - - // Convert to JSON - var convertToYAML = function(input, inline, save, spaces) { - var yaml; - if (inline == null) inline = 2; - if (spaces == null) spaces = 2; - - yaml = YAML.stringify(JSON.parse(fs.readFileSync(input)), inline, spaces); - - if (!save) { - // Ouput result - process.stdout.write(yaml); - } - else { - var output; - if (input.substring(input.length-5) == '.json') { - output = input.substr(0, input.length-5) + '.yaml'; - } - else { - output = input + '.yaml'; - } - - // Write file - var file = fs.openSync(output, 'w+'); - fs.writeSync(file, yaml); - fs.closeSync(file); - process.stdout.write("saved "+output+"\n"); - } - }; - - var input = parsePath(options.input); - var mtimes = []; - - var runCommand = function() { - try { - var files = findFiles(input); - var len = files.length; - - for (var i = 0; i < len; i++) { - var file = files[i]; - var stat = fs.statSync(file); - var time = stat.mtime.getTime(); - if (!stat.isDirectory()) { - if (!mtimes[file] || mtimes[file] < time) { - mtimes[file] = time; - convertToYAML(file, options.depth, options.save, options.indentation); - } - } - } - } catch (e) { - process.stderr.write((e.message ? e.message : e)+"\n"); - } - }; - - if (!options.watch) { - runCommand(); - } else { - runCommand(); - setInterval(runCommand, 1000); - } -} catch (e) { - process.stderr.write((e.message ? e.message : e)+"\n"); -} diff --git a/support/process/node_modules/yamljs/src/cli/yaml2json.js b/support/process/node_modules/yamljs/src/cli/yaml2json.js deleted file mode 100644 index 8772c4a..0000000 --- a/support/process/node_modules/yamljs/src/cli/yaml2json.js +++ /dev/null @@ -1,174 +0,0 @@ - -/** - * yaml2json cli program - */ - -var YAML = require('./yaml.js'); - -var ArgumentParser = require('argparse').ArgumentParser; -var cli = new ArgumentParser({ - prog: "yaml2json", - version: require('../package.json').version, - addHelp: true -}); - -cli.addArgument( - ['-p', '--pretty'], - { - help: 'Output pretty (indented) JSON.', - action: 'storeTrue' - } -); - -cli.addArgument( - ['-i', '--indentation'], - { - action: 'store', - type: 'int', - help: 'Number of space characters used to indent code (use with --pretty, default: 2).', - } -); - -cli.addArgument( - ['-s', '--save'], - { - help: 'Save output inside JSON file(s) with the same name.', - action: 'storeTrue' - } -); - -cli.addArgument( - ['-r', '--recursive'], - { - help: 'If the input is a directory, also find YAML files in sub-directories recursively.', - action: 'storeTrue' - } -); - -cli.addArgument( - ['-w', '--watch'], - { - help: 'Watch for changes.', - action: 'storeTrue' - } -); - -cli.addArgument(['input'], { - help: 'YAML file or directory containing YAML files.' -}); - -try { - var options = cli.parseArgs(); - var path = require('path'); - var fs = require('fs'); - var glob = require('glob'); - - var rootPath = process.cwd(); - var parsePath = function(input) { - var output; - if (!(input != null)) { - return rootPath; - } - output = path.normalize(input); - if (output.length === 0) { - return rootPath; - } - if (output.charAt(0) !== '/') { - output = path.normalize(rootPath + '/./' + output); - } - if (output.length > 1 && output.charAt(output.length - 1) === '/') { - return output.substr(0, output.length - 1); - } - return output; - }; - - // Find files - var findFiles = function(input) { - var isDirectory = fs.statSync(input).isDirectory(); - var files = []; - - if (!isDirectory) { - files.push(input); - } - else { - if (options.recursive) { - files = files.concat(glob.sync(input+'/**/*.yml')); - files = files.concat(glob.sync(input+'/**/*.yaml')); - } - else { - files = files.concat(glob.sync(input+'/*.yml')); - files = files.concat(glob.sync(input+'/*.yaml')); - } - } - - return files; - }; - - // Convert to JSON - var convertToJSON = function(input, pretty, save, spaces) { - var json; - if (spaces == null) spaces = 2; - if (pretty) { - json = JSON.stringify(YAML.load(input), null, spaces); - } - else { - json = JSON.stringify(YAML.load(input)); - } - - if (!save) { - // Ouput result - process.stdout.write(json+"\n"); - } - else { - var output; - if (input.substring(input.length-4) == '.yml') { - output = input.substr(0, input.length-4) + '.json'; - } - else if (input.substring(input.length-5) == '.yaml') { - output = input.substr(0, input.length-5) + '.json'; - } - else { - output = input + '.json'; - } - - // Write file - var file = fs.openSync(output, 'w+'); - fs.writeSync(file, json); - fs.closeSync(file); - process.stdout.write("saved "+output+"\n"); - } - }; - - var input = parsePath(options.input); - var mtimes = []; - - var runCommand = function() { - try { - var files = findFiles(input); - var len = files.length; - - for (var i = 0; i < len; i++) { - var file = files[i]; - var stat = fs.statSync(file); - var time = stat.mtime.getTime(); - if (!stat.isDirectory()) { - if (!mtimes[file] || mtimes[file] < time) { - mtimes[file] = time; - convertToJSON(file, options.pretty, options.save, options.indentation); - } - } - } - } catch (e) { - process.stderr.write((e.message ? e.message : e)+"\n"); - } - }; - - if (!options.watch) { - runCommand(); - } else { - runCommand(); - setInterval(runCommand, 1000); - } -} catch (e) { - process.stderr.write((e.message ? e.message : e)+"\n"); -} diff --git a/support/process/node_modules/yamljs/src/yaml/Yaml.js b/support/process/node_modules/yamljs/src/yaml/Yaml.js deleted file mode 100644 index 8a7af0f..0000000 --- a/support/process/node_modules/yamljs/src/yaml/Yaml.js +++ /dev/null @@ -1,231 +0,0 @@ -/** - * Yaml offers convenience methods to parse and dump YAML. - * - * @author Fabien Potencier - * - * @api - */ - -var YamlRunningUnderNode = false; -var Yaml = function(){}; -Yaml.prototype = -{ - - /** - * Parses YAML into a JS representation. - * - * The parse method, when supplied with a YAML stream (file), - * will do its best to convert YAML in a file into a JS representation. - * - * Usage: - * - * obj = yaml.parseFile('config.yml'); - * - * - * @param string input Path of YAML file - * - * @return array The YAML converted to a JS representation - * - * @throws YamlParseException If the YAML is not valid - */ - parseFile: function(file /* String */, callback /* Function */) - { - if ( callback == null ) - { - var input = this.getFileContents(file); - var ret = null; - try - { - ret = this.parse(input); - } - catch ( e ) - { - if ( e instanceof YamlParseException ) { - e.setParsedFile(file); - } - throw e; - } - return ret; - } - - this.getFileContents(file, function(data) - { - callback(new Yaml().parse(data)); - }); - }, - - /** - * Parses YAML into a JS representation. - * - * The parse method, when supplied with a YAML stream (string), - * will do its best to convert YAML into a JS representation. - * - * Usage: - * - * obj = yaml.parse(...); - * - * - * @param string input string containing YAML - * - * @return array The YAML converted to a JS representation - * - * @throws YamlParseException If the YAML is not valid - */ - parse: function(input /* String */) - { - var yaml = new YamlParser(); - - return yaml.parse(input); - }, - - /** - * Dumps a JS representation to a YAML string. - * - * The dump method, when supplied with an array, will do its best - * to convert the array into friendly YAML. - * - * @param array array JS representation - * @param integer inline The level where you switch to inline YAML - * - * @return string A YAML string representing the original JS representation - * - * @api - */ - dump: function(array, inline, spaces) - { - if ( inline == null ) inline = 2; - - var yaml = new YamlDumper(); - if (spaces) { - yaml.numSpacesForIndentation = spaces; - } - - return yaml.dump(array, inline); - }, - - getXHR: function() - { - if ( window.XMLHttpRequest ) - return new XMLHttpRequest(); - - if ( window.ActiveXObject ) - { - var names = [ - "Msxml2.XMLHTTP.6.0", - "Msxml2.XMLHTTP.3.0", - "Msxml2.XMLHTTP", - "Microsoft.XMLHTTP" - ]; - - for ( var i = 0; i < 4; i++ ) - { - try{ return new ActiveXObject(names[i]); } - catch(e){} - } - } - return null; - }, - - getFileContents: function(file, callback) - { - if ( YamlRunningUnderNode ) - { - var fs = require('fs'); - if ( callback == null ) - { - var data = fs.readFileSync(file); - if (data == null) return null; - return ''+data; - } - else - { - fs.readFile(file, function(err, data) - { - if (err) - callback(null); - else - callback(data); - }); - } - } - else - { - var request = this.getXHR(); - - // Sync - if ( callback == null ) - { - request.open('GET', file, false); - request.send(null); - - if ( request.status == 200 || request.status == 0 ) - return request.responseText; - - return null; - } - - // Async - request.onreadystatechange = function() - { - if ( request.readyState == 4 ) - if ( request.status == 200 || request.status == 0 ) - callback(request.responseText); - else - callback(null); - }; - request.open('GET', file, true); - request.send(null); - } - } -}; - -var YAML = -{ - /* - * @param integer inline The level where you switch to inline YAML - */ - - stringify: function(input, inline, spaces) - { - return new Yaml().dump(input, inline, spaces); - }, - - parse: function(input) - { - return new Yaml().parse(input); - }, - - load: function(file, callback) - { - return new Yaml().parseFile(file, callback); - } -}; - -// Handle node.js case -if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - exports = module.exports = YAML; - YamlRunningUnderNode = true; - - // Add require handler - (function () { - var require_handler = function (module, filename) { - // fill in result - module.exports = YAML.load(filename); - }; - - // register require extensions only if we're on node.js - // hack for browserify - if ( undefined !== require.extensions ) { - require.extensions['.yml'] = require_handler; - require.extensions['.yaml'] = require_handler; - } - }()); - } -} - -// Handle browser case -if ( typeof(window) != "undefined" ) -{ - window.YAML = YAML; -} diff --git a/support/process/node_modules/yamljs/src/yaml/YamlDumper.js b/support/process/node_modules/yamljs/src/yaml/YamlDumper.js deleted file mode 100644 index b1881f3..0000000 --- a/support/process/node_modules/yamljs/src/yaml/YamlDumper.js +++ /dev/null @@ -1,131 +0,0 @@ - -/** - * YamlDumper dumps JS variables to YAML strings. - * - * @author Fabien Potencier - */ -var YamlDumper = function(){}; -YamlDumper.prototype = -{ - /** - * Dumps a JS value to YAML. - * - * @param mixed input The JS value - * @param integer inline The level where you switch to inline YAML - * @param integer indent The level o indentation indentation (used internally) - * - * @return string The YAML representation of the JS value - */ - dump: function(input, inline, indent) - { - if ( inline == null ) inline = 0; - if ( indent == null ) indent = 0; - var output = ''; - var prefix = indent ? this.strRepeat(' ', indent) : ''; - var yaml; - if (!this.numSpacesForIndentation) this.numSpacesForIndentation = 2; - - if ( inline <= 0 || !this.isObject(input) || this.isEmpty(input) ) - { - yaml = new YamlInline(); - output += prefix + yaml.dump(input); - } - else - { - var isAHash = !this.arrayEquals(this.getKeys(input), this.range(0,input.length - 1)); - var willBeInlined; - - for ( var key in input ) - { - if ( input.hasOwnProperty(key) ) - { - willBeInlined = inline - 1 <= 0 || !this.isObject(input[key]) || this.isEmpty(input[key]); - - if ( isAHash ) yaml = new YamlInline(); - - output += - prefix + '' + - (isAHash ? yaml.dump(key)+':' : '-') + '' + - (willBeInlined ? ' ' : "\n") + '' + - this.dump(input[key], inline - 1, (willBeInlined ? 0 : indent + this.numSpacesForIndentation)) + '' + - (willBeInlined ? "\n" : ''); - } - } - } - - return output; - }, - - strRepeat: function(str /* String */, count /* Integer */) - { - var i; - var result = ''; - for ( i = 0; i < count; i++ ) result += str; - return result; - }, - - isObject: function(input) - { - return this.isDefined(input) && typeof(input) == 'object'; - }, - - isEmpty: function(input) - { - var ret = input == undefined || input == null || input == '' || input == 0 || input == "0" || input == false; - if ( !ret && typeof(input) == "object" && !(input instanceof Array)){ - var propCount = 0; - for ( var key in input ) - if ( input.hasOwnProperty(key) ) propCount++; - ret = !propCount; - } - return ret; - }, - - isDefined: function(input) - { - return input != undefined && input != null; - }, - - getKeys: function(tab) - { - var ret = []; - - for ( var name in tab ) - { - if ( tab.hasOwnProperty(name) ) - { - ret.push(name); - } - } - - return ret; - }, - - range: function(start, end) - { - if ( start > end ) return []; - - var ret = []; - - for ( var i = start; i <= end; i++ ) - { - ret.push(i); - } - - return ret; - }, - - arrayEquals: function(a,b) - { - if ( a.length != b.length ) return false; - - var len = a.length; - - for ( var i = 0; i < len; i++ ) - { - if ( a[i] != b[i] ) return false; - } - - return true; - } -}; diff --git a/support/process/node_modules/yamljs/src/yaml/YamlEscaper.js b/support/process/node_modules/yamljs/src/yaml/YamlEscaper.js deleted file mode 100644 index 8714c51..0000000 --- a/support/process/node_modules/yamljs/src/yaml/YamlEscaper.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * YamlEscaper encapsulates escaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - */ -YamlEscaper = function(){}; -YamlEscaper.prototype = -{ - /** - * Determines if a JS value would require double quoting in YAML. - * - * @param string value A JS value - * - * @return Boolean True if the value would require double quotes. - */ - requiresDoubleQuoting: function(value) - { - return new RegExp(YamlEscaper.REGEX_CHARACTER_TO_ESCAPE).test(value); - }, - - /** - * Escapes and surrounds a JS value with double quotes. - * - * @param string value A JS value - * - * @return string The quoted, escaped string - */ - escapeWithDoubleQuotes: function(value) - { - value = value + ''; - var len = YamlEscaper.escapees.length; - var maxlen = YamlEscaper.escaped.length; - var esc = YamlEscaper.escaped; - for (var i = 0; i < len; ++i) - if ( i >= maxlen ) esc.push(''); - - var ret = ''; - ret = value.replace(new RegExp(YamlEscaper.escapees.join('|'),'g'), function(str){ - for(var i = 0; i < len; ++i){ - if( str == YamlEscaper.escapees[i] ) - return esc[i]; - } - }); - return '"' + ret + '"'; - }, - - /** - * Determines if a JS value would require single quoting in YAML. - * - * @param string value A JS value - * - * @return Boolean True if the value would require single quotes. - */ - requiresSingleQuoting: function(value) - { - return /[\s'":{}[\],&*#?]|^[-?|<>=!%@`]/.test(value); - }, - - /** - * Escapes and surrounds a JS value with single quotes. - * - * @param string value A JS value - * - * @return string The quoted, escaped string - */ - escapeWithSingleQuotes : function(value) - { - return "'" + value.replace(/'/g, "''") + "'"; - } -}; - -// Characters that would cause a dumped string to require double quoting. -YamlEscaper.REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"; - -// Mapping arrays for escaping a double quoted string. The backslash is -// first to ensure proper escaping. -YamlEscaper.escapees = ['\\\\', '\\"', '"', - "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", - "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", - "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", - "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", - "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9"]; -YamlEscaper.escaped = ['\\"', '\\\\', '\\"', - "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", - "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", - "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", - "\\x18", "\\x19", "\\x1a", "\\e", "\\x1c", "\\x1d", "\\x1e", "\\x1f", - "\\N", "\\_", "\\L", "\\P"]; diff --git a/support/process/node_modules/yamljs/src/yaml/YamlInline.js b/support/process/node_modules/yamljs/src/yaml/YamlInline.js deleted file mode 100644 index 5fc2607..0000000 --- a/support/process/node_modules/yamljs/src/yaml/YamlInline.js +++ /dev/null @@ -1,558 +0,0 @@ - -/** - * YamlInline implements a YAML parser/dumper for the YAML inline syntax. - */ -var YamlInline = function(){}; -YamlInline.prototype = -{ - i: null, - - /** - * Convert a YAML string to a JS object. - * - * @param string value A YAML string - * - * @return object A JS object representing the YAML string - */ - parse: function(value) - { - var result = null; - value = this.trim(value); - - if ( 0 == value.length ) - { - return ''; - } - - switch ( value.charAt(0) ) - { - case '[': - result = this.parseSequence(value); - break; - case '{': - result = this.parseMapping(value); - break; - default: - result = this.parseScalar(value); - } - - // some comment can end the scalar - if ( value.substr(this.i+1).replace(/^\s*#.*$/, '') != '' ) { - console.log("oups "+value.substr(this.i+1)); - throw new YamlParseException('Unexpected characters near "'+value.substr(this.i)+'".'); - } - - return result; - }, - - /** - * Dumps a given JS variable to a YAML string. - * - * @param mixed value The JS variable to convert - * - * @return string The YAML string representing the JS object - */ - dump: function(value) - { - if ( undefined == value || null == value ) - return 'null'; - if ( value instanceof Date) - return value.toISOString(); - if ( typeof(value) == 'object') - return this.dumpObject(value); - if ( typeof(value) == 'boolean' ) - return value ? 'true' : 'false'; - if ( /^\d+$/.test(value) ) - return typeof(value) == 'string' ? "'"+value+"'" : parseInt(value); - if ( this.isNumeric(value) ) - return typeof(value) == 'string' ? "'"+value+"'" : parseFloat(value); - if ( typeof(value) == 'number' ) - return value == Infinity ? '.Inf' : ( value == -Infinity ? '-.Inf' : ( isNaN(value) ? '.NAN' : value ) ); - var yaml = new YamlEscaper(); - if ( yaml.requiresDoubleQuoting(value) ) - return yaml.escapeWithDoubleQuotes(value); - if ( yaml.requiresSingleQuoting(value) ) - return yaml.escapeWithSingleQuotes(value); - if ( '' == value ) - return ""; - if ( this.getTimestampRegex().test(value) ) - return "'"+value+"'"; - if ( this.inArray(value.toLowerCase(), ['null','~','true','false']) ) - return "'"+value+"'"; - // default - return value; - }, - - /** - * Dumps a JS object to a YAML string. - * - * @param object value The JS array to dump - * - * @return string The YAML string representing the JS object - */ - dumpObject: function(value) - { - var keys = this.getKeys(value); - var output = null; - var i; - var len = keys.length; - - // array - if ( value instanceof Array ) - /*( 1 == len && '0' == keys[0] ) - || - ( len > 1 && this.reduceArray(keys, function(v,w){return Math.floor(v+w);}, 0) == len * (len - 1) / 2) )*/ - { - output = []; - for ( i = 0; i < len; i++ ) - { - output.push(this.dump(value[keys[i]])); - } - - return '['+output.join(', ')+']'; - } - - // mapping - output = []; - for ( i = 0; i < len; i++ ) - { - output.push(this.dump(keys[i])+': '+this.dump(value[keys[i]])); - } - - return '{ '+output.join(', ')+' }'; - }, - - /** - * Parses a scalar to a YAML string. - * - * @param scalar scalar - * @param string delimiters - * @param object stringDelimiters - * @param integer i - * @param boolean evaluate - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseScalar: function(scalar, delimiters, stringDelimiters, i, evaluate) - { - if ( delimiters == undefined ) delimiters = null; - if ( stringDelimiters == undefined ) stringDelimiters = ['"', "'"]; - if ( i == undefined ) i = 0; - if ( evaluate == undefined ) evaluate = true; - - var output = null; - var pos = null; - var matches = null; - - if ( this.inArray(scalar[i], stringDelimiters) ) - { - // quoted scalar - output = this.parseQuotedScalar(scalar, i); - i = this.i; - if (null !== delimiters) { - var tmp = scalar.substr(i).replace(/^\s+/, ''); - if (!this.inArray(tmp.charAt(0), delimiters)) { - throw new YamlParseException('Unexpected characters ('+scalar.substr(i)+').'); - } - } - } - else - { - // "normal" string - if ( !delimiters ) - { - output = (scalar+'').substring(i); - - i += output.length; - - // remove comments - pos = output.indexOf(' #'); - if ( pos != -1 ) - { - output = output.substr(0, pos).replace(/\s+$/g,''); - } - } - else if ( matches = new RegExp('^(.+?)('+delimiters.join('|')+')').exec((scalar+'').substring(i)) ) - { - output = matches[1]; - i += output.length; - } - else - { - throw new YamlParseException('Malformed inline YAML string ('+scalar+').'); - } - output = evaluate ? this.evaluateScalar(output) : output; - } - - this.i = i; - - return output; - }, - - /** - * Parses a quoted scalar to YAML. - * - * @param string scalar - * @param integer i - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseQuotedScalar: function(scalar, i) - { - var matches = null; - //var item = /^(.*?)['"]\s*(?:[,:]|[}\]]\s*,)/.exec((scalar+'').substring(i))[1]; - - if ( !(matches = new RegExp('^'+YamlInline.REGEX_QUOTED_STRING).exec((scalar+'').substring(i))) ) - { - throw new YamlParseException('Malformed inline YAML string ('+(scalar+'').substring(i)+').'); - } - - var output = matches[0].substr(1, matches[0].length - 2); - - var unescaper = new YamlUnescaper(); - - if ( '"' == (scalar+'').charAt(i) ) - { - output = unescaper.unescapeDoubleQuotedString(output); - } - else - { - output = unescaper.unescapeSingleQuotedString(output); - } - - i += matches[0].length; - - this.i = i; - return output; - }, - - /** - * Parses a sequence to a YAML string. - * - * @param string sequence - * @param integer i - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseSequence: function(sequence, i) - { - if ( i == undefined ) i = 0; - - var output = []; - var len = sequence.length; - i += 1; - - // [foo, bar, ...] - while ( i < len ) - { - switch ( sequence.charAt(i) ) - { - case '[': - // nested sequence - output.push(this.parseSequence(sequence, i)); - i = this.i; - break; - case '{': - // nested mapping - output.push(this.parseMapping(sequence, i)); - i = this.i; - break; - case ']': - this.i = i; - return output; - case ',': - case ' ': - break; - default: - var isQuoted = this.inArray(sequence.charAt(i), ['"', "'"]); - var value = this.parseScalar(sequence, [',', ']'], ['"', "'"], i); - i = this.i; - - if ( !isQuoted && (value+'').indexOf(': ') != -1 ) - { - // embedded mapping? - try - { - value = this.parseMapping('{'+value+'}'); - } - catch ( e ) - { - if ( !(e instanceof YamlParseException ) ) throw e; - // no, it's not - } - } - - output.push(value); - - i--; - } - - i++; - } - - throw new YamlParseException('Malformed inline YAML string "'+sequence+'"'); - }, - - /** - * Parses a mapping to a YAML string. - * - * @param string mapping - * @param integer i - * - * @return string A YAML string - * - * @throws YamlParseException When malformed inline YAML string is parsed - */ - parseMapping: function(mapping, i) - { - if ( i == undefined ) i = 0; - var output = {}; - var len = mapping.length; - i += 1; - var done = false; - var doContinue = false; - - // {foo: bar, bar:foo, ...} - while ( i < len ) - { - doContinue = false; - - switch ( mapping.charAt(i) ) - { - case ' ': - case ',': - i++; - doContinue = true; - break; - case '}': - this.i = i; - return output; - } - - if ( doContinue ) continue; - - // key - var key = this.parseScalar(mapping, [':', ' '], ['"', "'"], i, false); - i = this.i; - - // value - done = false; - while ( i < len ) - { - switch ( mapping.charAt(i) ) - { - case '[': - // nested sequence - output[key] = this.parseSequence(mapping, i); - i = this.i; - done = true; - break; - case '{': - // nested mapping - output[key] = this.parseMapping(mapping, i); - i = this.i; - done = true; - break; - case ':': - case ' ': - break; - default: - output[key] = this.parseScalar(mapping, [',', '}'], ['"', "'"], i); - i = this.i; - done = true; - i--; - } - - ++i; - - if ( done ) - { - doContinue = true; - break; - } - } - - if ( doContinue ) continue; - } - - throw new YamlParseException('Malformed inline YAML string "'+mapping+'"'); - }, - - /** - * Evaluates scalars and replaces magic values. - * - * @param string scalar - * - * @return string A YAML string - */ - evaluateScalar: function(scalar) - { - scalar = this.trim(scalar); - - var raw = null; - var cast = null; - - if ( ( 'null' == scalar.toLowerCase() ) || - ( '' == scalar ) || - ( '~' == scalar ) ) - return null; - if ( (scalar+'').indexOf('!str ') == 0 ) - return (''+scalar).substring(5); - if ( (scalar+'').indexOf('! ') == 0 ) - return parseInt(this.parseScalar((scalar+'').substr(2))); - if ( /^\d+$/.test(scalar) ) - { - raw = scalar; - cast = parseInt(scalar); - return '0' == scalar.charAt(0) ? this.octdec(scalar) : (( ''+raw == ''+cast ) ? cast : raw); - } - if ( 'true' == (scalar+'').toLowerCase() ) - return true; - if ( 'false' == (scalar+'').toLowerCase() ) - return false; - if ( this.isNumeric(scalar) ) - return '0x' == (scalar+'').substr(0, 2) ? this.hexdec(scalar) : parseFloat(scalar); - if ( scalar.toLowerCase() == '.inf' ) - return Infinity; - if ( scalar.toLowerCase() == '.nan' ) - return NaN; - if ( scalar.toLowerCase() == '-.inf' ) - return -Infinity; - if ( /^(-|\+)?[0-9,]+(\.[0-9]+)?$/.test(scalar) ) - return parseFloat(scalar.split(',').join('')); - if ( this.getTimestampRegex().test(scalar) ) - return new Date(this.strtotime(scalar)); - //else - return ''+scalar; - }, - - /** - * Gets a regex that matches an unix timestamp - * - * @return string The regular expression - */ - getTimestampRegex: function() - { - return new RegExp('^'+ - '([0-9][0-9][0-9][0-9])'+ - '-([0-9][0-9]?)'+ - '-([0-9][0-9]?)'+ - '(?:(?:[Tt]|[ \t]+)'+ - '([0-9][0-9]?)'+ - ':([0-9][0-9])'+ - ':([0-9][0-9])'+ - '(?:\.([0-9]*))?'+ - '(?:[ \t]*(Z|([-+])([0-9][0-9]?)'+ - '(?::([0-9][0-9]))?))?)?'+ - '$','gi'); - }, - - trim: function(str /* String */) - { - return (str+'').replace(/^\s+/,'').replace(/\s+$/,''); - }, - - isNumeric: function(input) - { - return (input - 0) == input && input.length > 0 && input.replace(/\s+/g,'') != ''; - }, - - inArray: function(key, tab) - { - var i; - var len = tab.length; - for ( i = 0; i < len; i++ ) - { - if ( key == tab[i] ) return true; - } - return false; - }, - - getKeys: function(tab) - { - var ret = []; - - for ( var name in tab ) - { - if ( tab.hasOwnProperty(name) ) - { - ret.push(name); - } - } - - return ret; - }, - - /*reduceArray: function(tab, fun) - { - var len = tab.length; - if (typeof fun != "function") - throw new YamlParseException("fun is not a function"); - - // no value to return if no initial value and an empty array - if (len == 0 && arguments.length == 1) - throw new YamlParseException("empty array"); - - var i = 0; - if (arguments.length >= 2) - { - var rv = arguments[1]; - } - else - { - do - { - if (i in tab) - { - rv = tab[i++]; - break; - } - - // if array contains no values, no initial value to return - if (++i >= len) - throw new YamlParseException("no initial value to return"); - } - while (true); - } - - for (; i < len; i++) - { - if (i in tab) - rv = fun.call(null, rv, tab[i], i, tab); - } - - return rv; - },*/ - - octdec: function(input) - { - return parseInt((input+'').replace(/[^0-7]/gi, ''), 8); - }, - - hexdec: function(input) - { - input = this.trim(input); - if ( (input+'').substr(0, 2) == '0x' ) input = (input+'').substring(2); - return parseInt((input+'').replace(/[^a-f0-9]/gi, ''), 16); - }, - - /** - * @see http://phpjs.org/functions/strtotime - * @note we need timestamp with msecs so /1000 removed - * @note original contained binary | 0 (wtf?!) everywhere, which messes everything up - */ - strtotime: function (h,b){var f,c,g,k,d="";h=(h+"").replace(/\s{2,}|^\s|\s$/g," ").replace(/[\t\r\n]/g,"");if(h==="now"){return b===null||isNaN(b)?new Date().getTime()||0:b||0}else{if(!isNaN(d=Date.parse(h))){return d||0}else{if(b){b=new Date(b)}else{b=new Date()}}}h=h.toLowerCase();var e={day:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},mon:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]};var a=function(i){var o=(i[2]&&i[2]==="ago");var n=(n=i[0]==="last"?-1:1)*(o?-1:1);switch(i[0]){case"last":case"next":switch(i[1].substring(0,3)){case"yea":b.setFullYear(b.getFullYear()+n);break;case"wee":b.setDate(b.getDate()+(n*7));break;case"day":b.setDate(b.getDate()+n);break;case"hou":b.setHours(b.getHours()+n);break;case"min":b.setMinutes(b.getMinutes()+n);break;case"sec":b.setSeconds(b.getSeconds()+n);break;case"mon":if(i[1]==="month"){b.setMonth(b.getMonth()+n);break}default:var l=e.day[i[1].substring(0,3)];if(typeof l!=="undefined"){var p=l-b.getDay();if(p===0){p=7*n}else{if(p>0){if(i[0]==="last"){p-=7}}else{if(i[0]==="next"){p+=7}}}b.setDate(b.getDate()+p);b.setHours(0,0,0,0)}}break;default:if(/\d+/.test(i[0])){n*=parseInt(i[0],10);switch(i[1].substring(0,3)){case"yea":b.setFullYear(b.getFullYear()+n);break;case"mon":b.setMonth(b.getMonth()+n);break;case"wee":b.setDate(b.getDate()+(n*7));break;case"day":b.setDate(b.getDate()+n);break;case"hou":b.setHours(b.getHours()+n);break;case"min":b.setMinutes(b.getMinutes()+n);break;case"sec":b.setSeconds(b.getSeconds()+n);break}}else{return false}break}return true};g=h.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if(g!==null){if(!g[2]){g[2]="00:00:00"}else{if(!g[3]){g[2]+=":00"}}k=g[1].split(/-/g);k[1]=e.mon[k[1]-1]||k[1];k[0]=+k[0];k[0]=(k[0]>=0&&k[0]<=69)?"20"+(k[0]<10?"0"+k[0]:k[0]+""):(k[0]>=70&&k[0]<=99)?"19"+k[0]:k[0]+"";return parseInt(this.strtotime(k[2]+" "+k[1]+" "+k[0]+" "+g[2])+(g[4]?g[4]:""),10)}var j="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?";g=h.match(new RegExp(j,"gi"));if(g===null){return false}for(f=0,c=g.length;f - * - * @api - */ - -/** - * Constructor. - * - * @param string message The error message - * @param integer parsedLine The line where the error occurred - * @param integer snippet The snippet of code near the problem - * @param string parsedFile The file name where the error occurred - */ - -var YamlParseException = function(message, parsedLine, snippet, parsedFile){ - - this.rawMessage = message; - this.parsedLine = (parsedLine !== undefined) ? parsedLine : -1; - this.snippet = (snippet !== undefined) ? snippet : null; - this.parsedFile = (parsedFile !== undefined) ? parsedFile : null; - - this.updateRepr(); - - this.message = message; - -}; -YamlParseException.prototype = -{ - - name: 'YamlParseException', - message: null, - - parsedFile: null, - parsedLine: -1, - snippet: null, - rawMessage: null, - - isDefined: function(input) - { - return input != undefined && input != null; - }, - - /** - * Gets the snippet of code near the error. - * - * @return string The snippet of code - */ - getSnippet: function() - { - return this.snippet; - }, - - /** - * Sets the snippet of code near the error. - * - * @param string snippet The code snippet - */ - setSnippet: function(snippet) - { - this.snippet = snippet; - - this.updateRepr(); - }, - - /** - * Gets the filename where the error occurred. - * - * This method returns null if a string is parsed. - * - * @return string The filename - */ - getParsedFile: function() - { - return this.parsedFile; - }, - - /** - * Sets the filename where the error occurred. - * - * @param string parsedFile The filename - */ - setParsedFile: function(parsedFile) - { - this.parsedFile = parsedFile; - - this.updateRepr(); - }, - - /** - * Gets the line where the error occurred. - * - * @return integer The file line - */ - getParsedLine: function() - { - return this.parsedLine; - }, - - /** - * Sets the line where the error occurred. - * - * @param integer parsedLine The file line - */ - setParsedLine: function(parsedLine) - { - this.parsedLine = parsedLine; - - this.updateRepr(); - }, - - updateRepr: function() - { - this.message = this.rawMessage; - - var dot = false; - if ('.' === this.message.charAt(this.message.length - 1)) { - this.message = this.message.substring(0, this.message.length - 1); - dot = true; - } - - if (null !== this.parsedFile) { - this.message += ' in ' + JSON.stringify(this.parsedFile); - } - - if (this.parsedLine >= 0) { - this.message += ' at line ' + this.parsedLine; - } - - if (this.snippet) { - this.message += ' (near "' + this.snippet + '")'; - } - - if (dot) { - this.message += '.'; - } - } -} diff --git a/support/process/node_modules/yamljs/src/yaml/YamlParser.js b/support/process/node_modules/yamljs/src/yaml/YamlParser.js deleted file mode 100644 index 2e091d4..0000000 --- a/support/process/node_modules/yamljs/src/yaml/YamlParser.js +++ /dev/null @@ -1,807 +0,0 @@ - -/** - * YamlParser parses YAML strings to convert them to JS objects - * (port of Yaml Symfony Component) - */ -var YamlParser = function(offset /* Integer */) -{ - this.offset = (offset !== undefined) ? offset : 0; -}; -YamlParser.prototype = -{ - offset: 0, - lines: [], - currentLineNb: -1, - currentLine: '', - refs: {}, - - /** - * Parses a YAML string to a JS value. - * - * @param String value A YAML string - * - * @return mixed A JS value - */ - parse: function(value /* String */) - { - this.currentLineNb = -1; - this.currentLine = ''; - this.lines = this.cleanup(value).split("\n"); - - var data = null; - var context = null; - - while ( this.moveToNextLine() ) - { - if ( this.isCurrentLineEmpty() ) - { - continue; - } - - // tab? - if ( this.currentLine.charAt(0) == '\t' ) - { - throw new YamlParseException('A YAML file cannot contain tabs as indentation.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - - var isRef = false; - var isInPlace = false; - var isProcessed = false; - var values = null; - var matches = null; - var c = null; - var parser = null; - var block = null; - var key = null; - var parsed = null; - var len = null; - var reverse = null; - - if ( values = /^\-((\s+)(.+?))?\s*$/.exec(this.currentLine) ) - { - - if (context && 'mapping' == context) { - throw new YamlParseException('You cannot define a sequence item when in a mapping', this.getRealCurrentLineNb() + 1, this.currentLine); - } - context = 'sequence'; - - if ( !this.isDefined(data) ) data = []; - //if ( !(data instanceof Array) ) throw new YamlParseException("Non array entry", this.getRealCurrentLineNb() + 1, this.currentLine); - - values = {leadspaces: values[2], value: values[3]}; - - if ( this.isDefined(values.value) && ( matches = /^&([^ ]+) *(.*)/.exec(values.value) ) ) - { - matches = {ref: matches[1], value: matches[2]}; - isRef = matches.ref; - values.value = matches.value; - } - - // array - if ( !this.isDefined(values.value) || '' == this.trim(values.value) || values.value.replace(/^ +/,'').charAt(0) == '#' ) - { - c = this.getRealCurrentLineNb() + 1; - parser = new YamlParser(c); - parser.refs = this.refs; - data.push(parser.parse(this.getNextEmbedBlock())); - this.refs = parser.refs; - } - else - { - if ( this.isDefined(values.leadspaces) && - ' ' == values.leadspaces && - ( matches = new RegExp('^('+YamlInline.REGEX_QUOTED_STRING+'|[^ \'"\{\[].*?) *\:(\\s+(.+?))?\\s*$').exec(values.value) ) - ) { - matches = {key: matches[1], value: matches[3]}; - // this is a compact notation element, add to next block and parse - c = this.getRealCurrentLineNb(); - parser = new YamlParser(c); - parser.refs = this.refs; - block = values.value; - - if ( !this.isNextLineIndented() ) - { - block += "\n"+this.getNextEmbedBlock(this.getCurrentLineIndentation() + 2); - } - - data.push(parser.parse(block)); - this.refs = parser.refs; - } - else - { - data.push(this.parseValue(values.value)); - } - } - } - else if ( values = new RegExp('^('+YamlInline.REGEX_QUOTED_STRING+'|[^ \'"\[\{].*?) *\:(\\s+(.+?))?\\s*$').exec(this.currentLine) ) - { - if ( !this.isDefined(data) ) data = {}; - if (context && 'sequence' == context) { - throw new YamlParseException('You cannot define a mapping item when in a sequence', this.getRealCurrentLineNb() + 1, this.currentLine); - } - context = 'mapping'; - //if ( data instanceof Array ) throw new YamlParseException("Non mapped entry", this.getRealCurrentLineNb() + 1, this.currentLine); - - values = {key: values[1], value: values[3]}; - - try { - key = new YamlInline().parseScalar(values.key); - } catch (e) { - if ( e instanceof YamlParseException ) { - e.setParsedLine(this.getRealCurrentLineNb() + 1); - e.setSnippet(this.currentLine); - } - throw e; - } - - - if ( '<<' == key ) - { - if ( this.isDefined(values.value) && '*' == (values.value+'').charAt(0) ) - { - isInPlace = values.value.substr(1); - if ( this.refs[isInPlace] == undefined ) - { - throw new YamlParseException('Reference "'+value+'" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine); - } - } - else - { - if ( this.isDefined(values.value) && values.value != '' ) - { - value = values.value; - } - else - { - value = this.getNextEmbedBlock(); - } - - c = this.getRealCurrentLineNb() + 1; - parser = new YamlParser(c); - parser.refs = this.refs; - parsed = parser.parse(value); - this.refs = parser.refs; - - var merged = []; - if ( !this.isObject(parsed) ) - { - throw new YamlParseException("YAML merge keys used with a scalar value instead of an array", this.getRealCurrentLineNb() + 1, this.currentLine); - } - else if ( this.isDefined(parsed[0]) ) - { - // Numeric array, merge individual elements - reverse = this.reverseArray(parsed); - len = reverse.length; - for ( var i = 0; i < len; i++ ) - { - var parsedItem = reverse[i]; - if ( !this.isObject(reverse[i]) ) - { - throw new YamlParseException("Merge items must be arrays", this.getRealCurrentLineNb() + 1, this.currentLine); - } - merged = this.mergeObject(reverse[i], merged); - } - } - else - { - // Associative array, merge - merged = this.mergeObject(merged, parsed); - } - - isProcessed = merged; - } - } - else if ( this.isDefined(values.value) && (matches = /^&([^ ]+) *(.*)/.exec(values.value) ) ) - { - matches = {ref: matches[1], value: matches[2]}; - isRef = matches.ref; - values.value = matches.value; - } - - if ( isProcessed ) - { - // Merge keys - data = isProcessed; - } - // hash - else if ( !this.isDefined(values.value) || '' == this.trim(values.value) || this.trim(values.value).charAt(0) == '#' ) - { - // if next line is less indented or equal, then it means that the current value is null - if ( this.isNextLineIndented() && !this.isNextLineUnIndentedCollection() ) - { - data[key] = null; - } - else - { - c = this.getRealCurrentLineNb() + 1; - parser = new YamlParser(c); - parser.refs = this.refs; - data[key] = parser.parse(this.getNextEmbedBlock()); - this.refs = parser.refs; - } - } - else - { - if ( isInPlace ) - { - data = this.refs[isInPlace]; - } - else - { - data[key] = this.parseValue(values.value); - } - } - } - else - { - // 1-liner followed by newline - if ( 2 == this.lines.length && this.isEmpty(this.lines[1]) ) - { - try { - value = new YamlInline().parse(this.lines[0]); - } catch (e) { - if ( e instanceof YamlParseException ) { - e.setParsedLine(this.getRealCurrentLineNb() + 1); - e.setSnippet(this.currentLine); - } - throw e; - } - - if ( this.isObject(value) ) - { - var first = value[0]; - if ( typeof(value) == 'string' && '*' == first.charAt(0) ) - { - data = []; - len = value.length; - for ( var i = 0; i < len; i++ ) - { - data.push(this.refs[value[i].substr(1)]); - } - value = data; - } - } - - return value; - } - - throw new YamlParseException('Unable to parse.', this.getRealCurrentLineNb() + 1, this.currentLine); - } - - if ( isRef ) - { - if ( data instanceof Array ) - this.refs[isRef] = data[data.length-1]; - else - { - var lastKey = null; - for ( var k in data ) - { - if ( data.hasOwnProperty(k) ) lastKey = k; - } - this.refs[isRef] = data[k]; - } - } - } - - return this.isEmpty(data) ? null : data; - }, - - /** - * Returns the current line number (takes the offset into account). - * - * @return integer The current line number - */ - getRealCurrentLineNb: function() - { - return this.currentLineNb + this.offset; - }, - - /** - * Returns the current line indentation. - * - * @return integer The current line indentation - */ - getCurrentLineIndentation: function() - { - return this.currentLine.length - this.currentLine.replace(/^ +/g, '').length; - }, - - /** - * Returns the next embed block of YAML. - * - * @param integer indentation The indent level at which the block is to be read, or null for default - * - * @return string A YAML string - * - * @throws YamlParseException When indentation problem are detected - */ - getNextEmbedBlock: function(indentation) - { - this.moveToNextLine(); - var newIndent = null; - var indent = null; - - if ( !this.isDefined(indentation) ) - { - newIndent = this.getCurrentLineIndentation(); - - var unindentedEmbedBlock = this.isStringUnIndentedCollectionItem(this.currentLine); - - if ( !this.isCurrentLineEmpty() && 0 == newIndent && !unindentedEmbedBlock ) - { - throw new YamlParseException('Indentation problem A', this.getRealCurrentLineNb() + 1, this.currentLine); - } - } - else - { - newIndent = indentation; - } - - var data = [this.currentLine.substr(newIndent)]; - - var isUnindentedCollection = this.isStringUnIndentedCollectionItem(this.currentLine); - - var continuationIndent = -1; - if (isUnindentedCollection === true) { - continuationIndent = 1 + /^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)[2].length; - } - - while ( this.moveToNextLine() ) - { - - if (isUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && this.getCurrentLineIndentation() != continuationIndent) { - this.moveToPreviousLine(); - break; - } - - if ( this.isCurrentLineEmpty() ) - { - if ( this.isCurrentLineBlank() ) - { - data.push(this.currentLine.substr(newIndent)); - } - - continue; - } - - indent = this.getCurrentLineIndentation(); - var matches; - if ( matches = /^( *)$/.exec(this.currentLine) ) - { - // empty line - data.push(matches[1]); - } - else if ( indent >= newIndent ) - { - data.push(this.currentLine.substr(newIndent)); - } - else if ( 0 == indent ) - { - this.moveToPreviousLine(); - - break; - } - else - { - throw new YamlParseException('Indentation problem B', this.getRealCurrentLineNb() + 1, this.currentLine); - } - } - - return data.join("\n"); - }, - - /** - * Moves the parser to the next line. - * - * @return Boolean - */ - moveToNextLine: function() - { - if ( this.currentLineNb >= this.lines.length - 1 ) - { - return false; - } - - this.currentLineNb++; - this.currentLine = this.lines[this.currentLineNb]; - - return true; - }, - - /** - * Moves the parser to the previous line. - */ - moveToPreviousLine: function() - { - this.currentLineNb--; - this.currentLine = this.lines[this.currentLineNb]; - }, - - /** - * Parses a YAML value. - * - * @param string value A YAML value - * - * @return mixed A JS value - * - * @throws YamlParseException When reference does not exist - */ - parseValue: function(value) - { - if ( '*' == (value+'').charAt(0) ) - { - if ( this.trim(value).charAt(0) == '#' ) - { - value = (value+'').substr(1, value.indexOf('#') - 2); - } - else - { - value = (value+'').substr(1); - } - - if ( this.refs[value] == undefined ) - { - throw new YamlParseException('Reference "'+value+'" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine); - } - return this.refs[value]; - } - - var matches = null; - if ( matches = /^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(value) ) - { - matches = {separator: matches[1], modifiers: matches[2], comments: matches[3]}; - var modifiers = this.isDefined(matches.modifiers) ? matches.modifiers : ''; - - return this.parseFoldedScalar(matches.separator, modifiers.replace(/\d+/g, ''), Math.abs(parseInt(modifiers))); - } - try { - return new YamlInline().parse(value); - } catch (e) { - if ( e instanceof YamlParseException ) { - e.setParsedLine(this.getRealCurrentLineNb() + 1); - e.setSnippet(this.currentLine); - } - throw e; - } - }, - - /** - * Parses a folded scalar. - * - * @param string separator The separator that was used to begin this folded scalar (| or >) - * @param string indicator The indicator that was used to begin this folded scalar (+ or -) - * @param integer indentation The indentation that was used to begin this folded scalar - * - * @return string The text value - */ - parseFoldedScalar: function(separator, indicator, indentation) - { - if ( indicator == undefined ) indicator = ''; - if ( indentation == undefined ) indentation = 0; - - separator = '|' == separator ? "\n" : ' '; - var text = ''; - var diff = null; - - var notEOF = this.moveToNextLine(); - - while ( notEOF && this.isCurrentLineBlank() ) - { - text += "\n"; - - notEOF = this.moveToNextLine(); - } - - if ( !notEOF ) - { - return ''; - } - - var matches = null; - if ( !(matches = new RegExp('^('+(indentation ? this.strRepeat(' ', indentation) : ' +')+')(.*)$').exec(this.currentLine)) ) - { - this.moveToPreviousLine(); - - return ''; - } - - matches = {indent: matches[1], text: matches[2]}; - - var textIndent = matches.indent; - var previousIndent = 0; - - text += matches.text + separator; - while ( this.currentLineNb + 1 < this.lines.length ) - { - this.moveToNextLine(); - - if ( matches = new RegExp('^( {'+textIndent.length+',})(.+)$').exec(this.currentLine) ) - { - matches = {indent: matches[1], text: matches[2]}; - - if ( ' ' == separator && previousIndent != matches.indent ) - { - text = text.substr(0, text.length - 1)+"\n"; - } - - previousIndent = matches.indent; - - diff = matches.indent.length - textIndent.length; - text += this.strRepeat(' ', diff) + matches.text + (diff != 0 ? "\n" : separator); - } - else if ( matches = /^( *)$/.exec(this.currentLine) ) - { - text += matches[1].replace(new RegExp('^ {1,'+textIndent.length+'}','g'), '')+"\n"; - } - else - { - this.moveToPreviousLine(); - - break; - } - } - - if ( ' ' == separator ) - { - // replace last separator by a newline - text = text.replace(/ (\n*)$/g, "\n$1"); - } - - switch ( indicator ) - { - case '': - text = text.replace(/\n+$/g, "\n"); - break; - case '+': - break; - case '-': - text = text.replace(/\n+$/g, ''); - break; - } - - return text; - }, - - /** - * Returns true if the next line is indented. - * - * @return Boolean Returns true if the next line is indented, false otherwise - */ - isNextLineIndented: function() - { - var currentIndentation = this.getCurrentLineIndentation(); - var notEOF = this.moveToNextLine(); - - while ( notEOF && this.isCurrentLineEmpty() ) - { - notEOF = this.moveToNextLine(); - } - - if ( false == notEOF ) - { - return false; - } - - var ret = false; - if ( this.getCurrentLineIndentation() <= currentIndentation ) - { - ret = true; - } - - this.moveToPreviousLine(); - - return ret; - }, - - /** - * Returns true if the current line is blank or if it is a comment line. - * - * @return Boolean Returns true if the current line is empty or if it is a comment line, false otherwise - */ - isCurrentLineEmpty: function() - { - return this.isCurrentLineBlank() || this.isCurrentLineComment(); - }, - - /** - * Returns true if the current line is blank. - * - * @return Boolean Returns true if the current line is blank, false otherwise - */ - isCurrentLineBlank: function() - { - return '' == this.trim(this.currentLine); - }, - - /** - * Returns true if the current line is a comment line. - * - * @return Boolean Returns true if the current line is a comment line, false otherwise - */ - isCurrentLineComment: function() - { - //checking explicitly the first char of the trim is faster than loops or strpos - var ltrimmedLine = this.currentLine.replace(/^ +/g, ''); - return ltrimmedLine.charAt(0) == '#'; - }, - - /** - * Cleanups a YAML string to be parsed. - * - * @param string value The input YAML string - * - * @return string A cleaned up YAML string - */ - cleanup: function(value) - { - value = value.split("\r\n").join("\n").split("\r").join("\n"); - - if ( !/\n$/.test(value) ) - { - value += "\n"; - } - - // strip YAML header - var count = 0; - var regex = /^\%YAML[: ][\d\.]+.*\n/; - while ( regex.test(value) ) - { - value = value.replace(regex, ''); - count++; - } - this.offset += count; - - // remove leading comments - regex = /^(#.*?\n)+/; - if ( regex.test(value) ) - { - var trimmedValue = value.replace(regex, ''); - - // items have been removed, update the offset - this.offset += this.subStrCount(value, "\n") - this.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - } - - // remove start of the document marker (---) - regex = /^\-\-\-.*?\n/; - if ( regex.test(value) ) - { - trimmedValue = value.replace(regex, ''); - - // items have been removed, update the offset - this.offset += this.subStrCount(value, "\n") - this.subStrCount(trimmedValue, "\n"); - value = trimmedValue; - - // remove end of the document marker (...) - value = value.replace(/\.\.\.\s*$/g, ''); - } - - return value; - }, - - /** - * Returns true if the next line starts unindented collection - * - * @return Boolean Returns true if the next line starts unindented collection, false otherwise - */ - isNextLineUnIndentedCollection: function() - { - var currentIndentation = this.getCurrentLineIndentation(); - var notEOF = this.moveToNextLine(); - - while (notEOF && this.isCurrentLineEmpty()) { - notEOF = this.moveToNextLine(); - } - - if (false === notEOF) { - return false; - } - - var ret = false; - if ( - this.getCurrentLineIndentation() == currentIndentation - && - this.isStringUnIndentedCollectionItem(this.currentLine) - ) { - ret = true; - } - - this.moveToPreviousLine(); - - return ret; - }, - - /** - * Returns true if the string is unindented collection item - * - * @return Boolean Returns true if the string is unindented collection item, false otherwise - */ - isStringUnIndentedCollectionItem: function(string) - { - return (0 === this.currentLine.indexOf('- ')); - }, - - isObject: function(input) - { - return typeof(input) == 'object' && this.isDefined(input); - }, - - isEmpty: function(input) - { - return input == undefined || input == null || input == '' || input == 0 || input == "0" || input == false; - }, - - isDefined: function(input) - { - return input != undefined && input != null; - }, - - reverseArray: function(input /* Array */) - { - var result = []; - var len = input.length; - for ( var i = len-1; i >= 0; i-- ) - { - result.push(input[i]); - } - - return result; - }, - - merge: function(a /* Object */, b /* Object */) - { - var c = {}; - var i; - - for ( i in a ) - { - if ( a.hasOwnProperty(i) ) - if ( /^\d+$/.test(i) ) c.push(a); - else c[i] = a[i]; - } - for ( i in b ) - { - if ( b.hasOwnProperty(i) ) - if ( /^\d+$/.test(i) ) c.push(b); - else c[i] = b[i]; - } - - return c; - }, - - strRepeat: function(str /* String */, count /* Integer */) - { - var i; - var result = ''; - for ( i = 0; i < count; i++ ) result += str; - return result; - }, - - subStrCount: function(string, subString, start, length) - { - var c = 0; - - string = '' + string; - subString = '' + subString; - - if ( start != undefined ) string = string.substr(start); - if ( length != undefined ) string = string.substr(0, length); - - var len = string.length; - var sublen = subString.length; - for ( var i = 0; i < len; i++ ) - { - if ( subString == string.substr(i, sublen) ) - c++; - i += sublen - 1; - } - - return c; - }, - - trim: function(str /* String */) - { - return (str+'').replace(/^ +/,'').replace(/ +$/,''); - } -}; diff --git a/support/process/node_modules/yamljs/src/yaml/YamlUnescaper.js b/support/process/node_modules/yamljs/src/yaml/YamlUnescaper.js deleted file mode 100644 index ea4a2c6..0000000 --- a/support/process/node_modules/yamljs/src/yaml/YamlUnescaper.js +++ /dev/null @@ -1,108 +0,0 @@ -/** - * YamlUnescaper encapsulates unescaping rules for single and double-quoted - * YAML strings. - * - * @author Matthew Lewinski - */ -var YamlUnescaper = function(){}; -YamlUnescaper.prototype = -{ - /** - * Unescapes a single quoted string. - * - * @param string value A single quoted string. - * - * @return string The unescaped string. - */ - unescapeSingleQuotedString: function(value) - { - return value.replace(/''/g, "'"); - }, - - /** - * Unescapes a double quoted string. - * - * @param string value A double quoted string. - * - * @return string The unescaped string. - */ - unescapeDoubleQuotedString: function(value) - { - var callback = function(m) { - return new YamlUnescaper().unescapeCharacter(m); - }; - - // evaluate the string - return value.replace(new RegExp(YamlUnescaper.REGEX_ESCAPED_CHARACTER, 'g'), callback); - }, - - /** - * Unescapes a character that was found in a double-quoted string - * - * @param string value An escaped character - * - * @return string The unescaped character - */ - unescapeCharacter: function(value) - { - switch (value.charAt(1)) { - case '0': - return String.fromCharCode(0); - case 'a': - return String.fromCharCode(7); - case 'b': - return String.fromCharCode(8); - case 't': - return "\t"; - case "\t": - return "\t"; - case 'n': - return "\n"; - case 'v': - return String.fromCharCode(11); - case 'f': - return String.fromCharCode(12); - case 'r': - return String.fromCharCode(13); - case 'e': - return "\x1b"; - case ' ': - return ' '; - case '"': - return '"'; - case '/': - return '/'; - case '\\': - return '\\'; - case 'N': - // U+0085 NEXT LINE - return "\x00\x85"; - case '_': - // U+00A0 NO-BREAK SPACE - return "\x00\xA0"; - case 'L': - // U+2028 LINE SEPARATOR - return "\x20\x28"; - case 'P': - // U+2029 PARAGRAPH SEPARATOR - return "\x20\x29"; - case 'x': - return this.pack('n', new YamlInline().hexdec(value.substr(2, 2))); - case 'u': - return this.pack('n', new YamlInline().hexdec(value.substr(2, 4))); - case 'U': - return this.pack('N', new YamlInline().hexdec(value.substr(2, 8))); - } - }, - - /** - * @see http://phpjs.org/functions/pack - * @warning only modes used above copied - */ - pack: function(B){var g=0,o=1,m="",l="",z=0,p=[],E,s,C,I,h,c;var d,b,x,H,u,e,A,q,D,t,w,a,G,F,y,v,f;while(g(arguments.length-o)){throw new Error("Warning: pack() Type "+E+": too few arguments")}for(z=0;z>8&255);m+=String.fromCharCode(arguments[o]&255);o++}break;case"N":if(s==="*"){s=arguments.length-o}if(s>(arguments.length-o)){throw new Error("Warning: pack() Type "+E+": too few arguments")}for(z=0;z>24&255);m+=String.fromCharCode(arguments[o]>>16&255);m+=String.fromCharCode(arguments[o]>>8&255);m+=String.fromCharCode(arguments[o]&255);o++}break;default:throw new Error("Warning: pack() Type "+E+": unknown format code")}}if(o\n\ - can't you see\n\ - the beauty of yaml?\n\ - hmm\n\ -- dog\n\ -", - output: - [ - 'apple', - 'banana', - "can't you see the beauty of yaml? hmm\n", - 'dog' - ] - }, - { - title: "Folded Block as a Mapping Value", - input: -"\ ----\n\ -quote: >\n\ - Mark McGwire's\n\ - year was crippled\n\ - by a knee injury.\n\ -source: espn\n\ -", - output: - { - 'quote' : "Mark McGwire's year was crippled by a knee injury.\n", - 'source' : 'espn' - } - }, - { - title: "Three trailing newlines in folded blocks", - input: -'\ -clipped: >\n\ - This has one newline.\n\ -\n\ -\n\ -\n\ -same as "clipped" above: "This has one newline.\\n"\n\ -\n\ -stripped: >-\n\ - This has no newline.\n\ -\n\ -\n\ -\n\ -same as "stripped" above: "This has no newline."\n\ -\n\ -kept: >+\n\ - This has four newlines.\n\ -\n\ -\n\ -\n\ -same as "kept" above: "This has four newlines.\\n\\n\\n\\n"\n\ -', - output: - { - 'clipped' : "This has one newline.\n", - 'same as "clipped" above' : "This has one newline.\n", - 'stripped' : 'This has no newline.', - 'same as "stripped" above' : 'This has no newline.', - 'kept' : "This has four newlines.\n\n\n\n", - 'same as "kept" above' : "This has four newlines.\n\n\n\n" - } - }, - { - title: "Simple Alias Example", - input: -"\ -- &showell Steve\n\ -- Clark\n\ -- Brian\n\ -- Oren\n\ -- *showell\n\ -", - output: [ 'Steve', 'Clark', 'Brian', 'Oren', 'Steve' ] - - }, - { - title: "Alias of a Mapping", - input: -"\ -- &hello\n\ - Meat: pork\n\ - Starch: potato\n\ -- banana\n\ -- *hello\n\ -", - output: - [ - { 'Meat' : 'pork', 'Starch' : 'potato' }, - 'banana', - { 'Meat' : 'pork', 'Starch' : 'potato' } - ] - }, -/* { - title: "Trailing Document Separator", - input: -"\ -- foo: 1\n\ - bar: 2\n\ ----\n\ -more: stuff\n\ -", - output: [ { 'foo' : 1, 'bar' : 2 } ] - - },*/ - { - title: "Leading Document Separator", - input: -"\ ----\n\ -- foo: 1\n\ - bar: 2\n\ -# ---\n\ -# more: stuff\n\ -", - output: [ { 'foo' : 1, 'bar' : 2 } ] - - }, - { - title: "YAML Header", - input: -"\ ---- %YAML:1.0\n\ -foo: 1\n\ -bar: 2\n\ -", - output: { 'foo' : 1, 'bar' : 2 } - - }, - { - title: "Red Herring Document Separator", - input: -"\ -foo: |\n\ - ---\n\ -", - output: { 'foo' : "---\n" } - - }, - { - title: "Strings", - input: -"\ -foo: |\n\ - ---\n\ - foo: bar\n\ - ---\n\ - yo: baz\n\ -bar: |\n\ - fooness\n\ -", - output: - { - 'foo' : "---\nfoo: bar\n---\nyo: baz\n", - 'bar' : "fooness\n" - } - - }, - -]; diff --git a/support/process/node_modules/yamljs/test/libs/jasmine-1.2.0/jasmine-html.js b/support/process/node_modules/yamljs/test/libs/jasmine-1.2.0/jasmine-html.js deleted file mode 100644 index a0b0639..0000000 --- a/support/process/node_modules/yamljs/test/libs/jasmine-1.2.0/jasmine-html.js +++ /dev/null @@ -1,616 +0,0 @@ -jasmine.HtmlReporterHelpers = {}; - -jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) { - var el = document.createElement(type); - - for (var i = 2; i < arguments.length; i++) { - var child = arguments[i]; - - if (typeof child === 'string') { - el.appendChild(document.createTextNode(child)); - } else { - if (child) { - el.appendChild(child); - } - } - } - - for (var attr in attrs) { - if (attr == "className") { - el[attr] = attrs[attr]; - } else { - el.setAttribute(attr, attrs[attr]); - } - } - - return el; -}; - -jasmine.HtmlReporterHelpers.getSpecStatus = function(child) { - var results = child.results(); - var status = results.passed() ? 'passed' : 'failed'; - if (results.skipped) { - status = 'skipped'; - } - - return status; -}; - -jasmine.HtmlReporterHelpers.appendToSummary = function(child, childElement) { - var parentDiv = this.dom.summary; - var parentSuite = (typeof child.parentSuite == 'undefined') ? 'suite' : 'parentSuite'; - var parent = child[parentSuite]; - - if (parent) { - if (typeof this.views.suites[parent.id] == 'undefined') { - this.views.suites[parent.id] = new jasmine.HtmlReporter.SuiteView(parent, this.dom, this.views); - } - parentDiv = this.views.suites[parent.id].element; - } - - parentDiv.appendChild(childElement); -}; - - -jasmine.HtmlReporterHelpers.addHelpers = function(ctor) { - for(var fn in jasmine.HtmlReporterHelpers) { - ctor.prototype[fn] = jasmine.HtmlReporterHelpers[fn]; - } -}; - -jasmine.HtmlReporter = function(_doc) { - var self = this; - var doc = _doc || window.document; - - var reporterView; - - var dom = {}; - - // Jasmine Reporter Public Interface - self.logRunningSpecs = false; - - self.reportRunnerStarting = function(runner) { - var specs = runner.specs() || []; - - if (specs.length == 0) { - return; - } - - createReporterDom(runner.env.versionString()); - doc.body.appendChild(dom.reporter); - - reporterView = new jasmine.HtmlReporter.ReporterView(dom); - reporterView.addSpecs(specs, self.specFilter); - }; - - self.reportRunnerResults = function(runner) { - reporterView && reporterView.complete(); - }; - - self.reportSuiteResults = function(suite) { - reporterView.suiteComplete(suite); - }; - - self.reportSpecStarting = function(spec) { - if (self.logRunningSpecs) { - self.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...'); - } - }; - - self.reportSpecResults = function(spec) { - reporterView.specComplete(spec); - }; - - self.log = function() { - var console = jasmine.getGlobal().console; - if (console && console.log) { - if (console.log.apply) { - console.log.apply(console, arguments); - } else { - console.log(arguments); // ie fix: console.log.apply doesn't exist on ie - } - } - }; - - self.specFilter = function(spec) { - if (!focusedSpecName()) { - return true; - } - - return spec.getFullName().indexOf(focusedSpecName()) === 0; - }; - - return self; - - function focusedSpecName() { - var specName; - - (function memoizeFocusedSpec() { - if (specName) { - return; - } - - var paramMap = []; - var params = doc.location.search.substring(1).split('&'); - - for (var i = 0; i < params.length; i++) { - var p = params[i].split('='); - paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]); - } - - specName = paramMap.spec; - })(); - - return specName; - } - - function createReporterDom(version) { - dom.reporter = self.createDom('div', { id: 'HTMLReporter', className: 'jasmine_reporter' }, - dom.banner = self.createDom('div', { className: 'banner' }, - self.createDom('span', { className: 'title' }, "Jasmine "), - self.createDom('span', { className: 'version' }, version)), - - dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}), - dom.alert = self.createDom('div', {className: 'alert'}), - dom.results = self.createDom('div', {className: 'results'}, - dom.summary = self.createDom('div', { className: 'summary' }), - dom.details = self.createDom('div', { id: 'details' })) - ); - } -}; -jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter);jasmine.HtmlReporter.ReporterView = function(dom) { - this.startedAt = new Date(); - this.runningSpecCount = 0; - this.completeSpecCount = 0; - this.passedCount = 0; - this.failedCount = 0; - this.skippedCount = 0; - - this.createResultsMenu = function() { - this.resultsMenu = this.createDom('span', {className: 'resultsMenu bar'}, - this.summaryMenuItem = this.createDom('a', {className: 'summaryMenuItem', href: "#"}, '0 specs'), - ' | ', - this.detailsMenuItem = this.createDom('a', {className: 'detailsMenuItem', href: "#"}, '0 failing')); - - this.summaryMenuItem.onclick = function() { - dom.reporter.className = dom.reporter.className.replace(/ showDetails/g, ''); - }; - - this.detailsMenuItem.onclick = function() { - showDetails(); - }; - }; - - this.addSpecs = function(specs, specFilter) { - this.totalSpecCount = specs.length; - - this.views = { - specs: {}, - suites: {} - }; - - for (var i = 0; i < specs.length; i++) { - var spec = specs[i]; - this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom, this.views); - if (specFilter(spec)) { - this.runningSpecCount++; - } - } - }; - - this.specComplete = function(spec) { - this.completeSpecCount++; - - if (isUndefined(this.views.specs[spec.id])) { - this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom); - } - - var specView = this.views.specs[spec.id]; - - switch (specView.status()) { - case 'passed': - this.passedCount++; - break; - - case 'failed': - this.failedCount++; - break; - - case 'skipped': - this.skippedCount++; - break; - } - - specView.refresh(); - this.refresh(); - }; - - this.suiteComplete = function(suite) { - var suiteView = this.views.suites[suite.id]; - if (isUndefined(suiteView)) { - return; - } - suiteView.refresh(); - }; - - this.refresh = function() { - - if (isUndefined(this.resultsMenu)) { - this.createResultsMenu(); - } - - // currently running UI - if (isUndefined(this.runningAlert)) { - this.runningAlert = this.createDom('a', {href: "?", className: "runningAlert bar"}); - dom.alert.appendChild(this.runningAlert); - } - this.runningAlert.innerHTML = "Running " + this.completeSpecCount + " of " + specPluralizedFor(this.totalSpecCount); - - // skipped specs UI - if (isUndefined(this.skippedAlert)) { - this.skippedAlert = this.createDom('a', {href: "?", className: "skippedAlert bar"}); - } - - this.skippedAlert.innerHTML = "Skipping " + this.skippedCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all"; - - if (this.skippedCount === 1 && isDefined(dom.alert)) { - dom.alert.appendChild(this.skippedAlert); - } - - // passing specs UI - if (isUndefined(this.passedAlert)) { - this.passedAlert = this.createDom('span', {href: "?", className: "passingAlert bar"}); - } - this.passedAlert.innerHTML = "Passing " + specPluralizedFor(this.passedCount); - - // failing specs UI - if (isUndefined(this.failedAlert)) { - this.failedAlert = this.createDom('span', {href: "?", className: "failingAlert bar"}); - } - this.failedAlert.innerHTML = "Failing " + specPluralizedFor(this.failedCount); - - if (this.failedCount === 1 && isDefined(dom.alert)) { - dom.alert.appendChild(this.failedAlert); - dom.alert.appendChild(this.resultsMenu); - } - - // summary info - this.summaryMenuItem.innerHTML = "" + specPluralizedFor(this.runningSpecCount); - this.detailsMenuItem.innerHTML = "" + this.failedCount + " failing"; - }; - - this.complete = function() { - dom.alert.removeChild(this.runningAlert); - - this.skippedAlert.innerHTML = "Ran " + this.runningSpecCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all"; - - if (this.failedCount === 0) { - dom.alert.appendChild(this.createDom('span', {className: 'passingAlert bar'}, "Passing " + specPluralizedFor(this.passedCount))); - } else { - showDetails(); - } - - dom.banner.appendChild(this.createDom('span', {className: 'duration'}, "finished in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s")); - }; - - return this; - - function showDetails() { - if (dom.reporter.className.search(/showDetails/) === -1) { - dom.reporter.className += " showDetails"; - } - } - - function isUndefined(obj) { - return typeof obj === 'undefined'; - } - - function isDefined(obj) { - return !isUndefined(obj); - } - - function specPluralizedFor(count) { - var str = count + " spec"; - if (count > 1) { - str += "s" - } - return str; - } - -}; - -jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.ReporterView); - - -jasmine.HtmlReporter.SpecView = function(spec, dom, views) { - this.spec = spec; - this.dom = dom; - this.views = views; - - this.symbol = this.createDom('li', { className: 'pending' }); - this.dom.symbolSummary.appendChild(this.symbol); - - this.summary = this.createDom('div', { className: 'specSummary' }, - this.createDom('a', { - className: 'description', - href: '?spec=' + encodeURIComponent(this.spec.getFullName()), - title: this.spec.getFullName() - }, this.spec.description) - ); - - this.detail = this.createDom('div', { className: 'specDetail' }, - this.createDom('a', { - className: 'description', - href: '?spec=' + encodeURIComponent(this.spec.getFullName()), - title: this.spec.getFullName() - }, this.spec.getFullName()) - ); -}; - -jasmine.HtmlReporter.SpecView.prototype.status = function() { - return this.getSpecStatus(this.spec); -}; - -jasmine.HtmlReporter.SpecView.prototype.refresh = function() { - this.symbol.className = this.status(); - - switch (this.status()) { - case 'skipped': - break; - - case 'passed': - this.appendSummaryToSuiteDiv(); - break; - - case 'failed': - this.appendSummaryToSuiteDiv(); - this.appendFailureDetail(); - break; - } -}; - -jasmine.HtmlReporter.SpecView.prototype.appendSummaryToSuiteDiv = function() { - this.summary.className += ' ' + this.status(); - this.appendToSummary(this.spec, this.summary); -}; - -jasmine.HtmlReporter.SpecView.prototype.appendFailureDetail = function() { - this.detail.className += ' ' + this.status(); - - var resultItems = this.spec.results().getItems(); - var messagesDiv = this.createDom('div', { className: 'messages' }); - - for (var i = 0; i < resultItems.length; i++) { - var result = resultItems[i]; - - if (result.type == 'log') { - messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString())); - } else if (result.type == 'expect' && result.passed && !result.passed()) { - messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message)); - - if (result.trace.stack) { - messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack)); - } - } - } - - if (messagesDiv.childNodes.length > 0) { - this.detail.appendChild(messagesDiv); - this.dom.details.appendChild(this.detail); - } -}; - -jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SpecView);jasmine.HtmlReporter.SuiteView = function(suite, dom, views) { - this.suite = suite; - this.dom = dom; - this.views = views; - - this.element = this.createDom('div', { className: 'suite' }, - this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(this.suite.getFullName()) }, this.suite.description) - ); - - this.appendToSummary(this.suite, this.element); -}; - -jasmine.HtmlReporter.SuiteView.prototype.status = function() { - return this.getSpecStatus(this.suite); -}; - -jasmine.HtmlReporter.SuiteView.prototype.refresh = function() { - this.element.className += " " + this.status(); -}; - -jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SuiteView); - -/* @deprecated Use jasmine.HtmlReporter instead - */ -jasmine.TrivialReporter = function(doc) { - this.document = doc || document; - this.suiteDivs = {}; - this.logRunningSpecs = false; -}; - -jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) { - var el = document.createElement(type); - - for (var i = 2; i < arguments.length; i++) { - var child = arguments[i]; - - if (typeof child === 'string') { - el.appendChild(document.createTextNode(child)); - } else { - if (child) { el.appendChild(child); } - } - } - - for (var attr in attrs) { - if (attr == "className") { - el[attr] = attrs[attr]; - } else { - el.setAttribute(attr, attrs[attr]); - } - } - - return el; -}; - -jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) { - var showPassed, showSkipped; - - this.outerDiv = this.createDom('div', { id: 'TrivialReporter', className: 'jasmine_reporter' }, - this.createDom('div', { className: 'banner' }, - this.createDom('div', { className: 'logo' }, - this.createDom('span', { className: 'title' }, "Jasmine"), - this.createDom('span', { className: 'version' }, runner.env.versionString())), - this.createDom('div', { className: 'options' }, - "Show ", - showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }), - this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "), - showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }), - this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped") - ) - ), - - this.runnerDiv = this.createDom('div', { className: 'runner running' }, - this.createDom('a', { className: 'run_spec', href: '?' }, "run all"), - this.runnerMessageSpan = this.createDom('span', {}, "Running..."), - this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, "")) - ); - - this.document.body.appendChild(this.outerDiv); - - var suites = runner.suites(); - for (var i = 0; i < suites.length; i++) { - var suite = suites[i]; - var suiteDiv = this.createDom('div', { className: 'suite' }, - this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"), - this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description)); - this.suiteDivs[suite.id] = suiteDiv; - var parentDiv = this.outerDiv; - if (suite.parentSuite) { - parentDiv = this.suiteDivs[suite.parentSuite.id]; - } - parentDiv.appendChild(suiteDiv); - } - - this.startedAt = new Date(); - - var self = this; - showPassed.onclick = function(evt) { - if (showPassed.checked) { - self.outerDiv.className += ' show-passed'; - } else { - self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, ''); - } - }; - - showSkipped.onclick = function(evt) { - if (showSkipped.checked) { - self.outerDiv.className += ' show-skipped'; - } else { - self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, ''); - } - }; -}; - -jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) { - var results = runner.results(); - var className = (results.failedCount > 0) ? "runner failed" : "runner passed"; - this.runnerDiv.setAttribute("class", className); - //do it twice for IE - this.runnerDiv.setAttribute("className", className); - var specs = runner.specs(); - var specCount = 0; - for (var i = 0; i < specs.length; i++) { - if (this.specFilter(specs[i])) { - specCount++; - } - } - var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s"); - message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s"; - this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild); - - this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString())); -}; - -jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) { - var results = suite.results(); - var status = results.passed() ? 'passed' : 'failed'; - if (results.totalCount === 0) { // todo: change this to check results.skipped - status = 'skipped'; - } - this.suiteDivs[suite.id].className += " " + status; -}; - -jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) { - if (this.logRunningSpecs) { - this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...'); - } -}; - -jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) { - var results = spec.results(); - var status = results.passed() ? 'passed' : 'failed'; - if (results.skipped) { - status = 'skipped'; - } - var specDiv = this.createDom('div', { className: 'spec ' + status }, - this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"), - this.createDom('a', { - className: 'description', - href: '?spec=' + encodeURIComponent(spec.getFullName()), - title: spec.getFullName() - }, spec.description)); - - - var resultItems = results.getItems(); - var messagesDiv = this.createDom('div', { className: 'messages' }); - for (var i = 0; i < resultItems.length; i++) { - var result = resultItems[i]; - - if (result.type == 'log') { - messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString())); - } else if (result.type == 'expect' && result.passed && !result.passed()) { - messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message)); - - if (result.trace.stack) { - messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack)); - } - } - } - - if (messagesDiv.childNodes.length > 0) { - specDiv.appendChild(messagesDiv); - } - - this.suiteDivs[spec.suite.id].appendChild(specDiv); -}; - -jasmine.TrivialReporter.prototype.log = function() { - var console = jasmine.getGlobal().console; - if (console && console.log) { - if (console.log.apply) { - console.log.apply(console, arguments); - } else { - console.log(arguments); // ie fix: console.log.apply doesn't exist on ie - } - } -}; - -jasmine.TrivialReporter.prototype.getLocation = function() { - return this.document.location; -}; - -jasmine.TrivialReporter.prototype.specFilter = function(spec) { - var paramMap = {}; - var params = this.getLocation().search.substring(1).split('&'); - for (var i = 0; i < params.length; i++) { - var p = params[i].split('='); - paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]); - } - - if (!paramMap.spec) { - return true; - } - return spec.getFullName().indexOf(paramMap.spec) === 0; -}; diff --git a/support/process/node_modules/yamljs/test/libs/jasmine-1.2.0/jasmine.css b/support/process/node_modules/yamljs/test/libs/jasmine-1.2.0/jasmine.css deleted file mode 100644 index 826e575..0000000 --- a/support/process/node_modules/yamljs/test/libs/jasmine-1.2.0/jasmine.css +++ /dev/null @@ -1,81 +0,0 @@ -body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; } - -#HTMLReporter { font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; } -#HTMLReporter a { text-decoration: none; } -#HTMLReporter a:hover { text-decoration: underline; } -#HTMLReporter p, #HTMLReporter h1, #HTMLReporter h2, #HTMLReporter h3, #HTMLReporter h4, #HTMLReporter h5, #HTMLReporter h6 { margin: 0; line-height: 14px; } -#HTMLReporter .banner, #HTMLReporter .symbolSummary, #HTMLReporter .summary, #HTMLReporter .resultMessage, #HTMLReporter .specDetail .description, #HTMLReporter .alert .bar, #HTMLReporter .stackTrace { padding-left: 9px; padding-right: 9px; } -#HTMLReporter #jasmine_content { position: fixed; right: 100%; } -#HTMLReporter .version { color: #aaaaaa; } -#HTMLReporter .banner { margin-top: 14px; } -#HTMLReporter .duration { color: #aaaaaa; float: right; } -#HTMLReporter .symbolSummary { overflow: hidden; *zoom: 1; margin: 14px 0; } -#HTMLReporter .symbolSummary li { display: block; float: left; height: 7px; width: 14px; margin-bottom: 7px; font-size: 16px; } -#HTMLReporter .symbolSummary li.passed { font-size: 14px; } -#HTMLReporter .symbolSummary li.passed:before { color: #5e7d00; content: "\02022"; } -#HTMLReporter .symbolSummary li.failed { line-height: 9px; } -#HTMLReporter .symbolSummary li.failed:before { color: #b03911; content: "x"; font-weight: bold; margin-left: -1px; } -#HTMLReporter .symbolSummary li.skipped { font-size: 14px; } -#HTMLReporter .symbolSummary li.skipped:before { color: #bababa; content: "\02022"; } -#HTMLReporter .symbolSummary li.pending { line-height: 11px; } -#HTMLReporter .symbolSummary li.pending:before { color: #aaaaaa; content: "-"; } -#HTMLReporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; } -#HTMLReporter .runningAlert { background-color: #666666; } -#HTMLReporter .skippedAlert { background-color: #aaaaaa; } -#HTMLReporter .skippedAlert:first-child { background-color: #333333; } -#HTMLReporter .skippedAlert:hover { text-decoration: none; color: white; text-decoration: underline; } -#HTMLReporter .passingAlert { background-color: #a6b779; } -#HTMLReporter .passingAlert:first-child { background-color: #5e7d00; } -#HTMLReporter .failingAlert { background-color: #cf867e; } -#HTMLReporter .failingAlert:first-child { background-color: #b03911; } -#HTMLReporter .results { margin-top: 14px; } -#HTMLReporter #details { display: none; } -#HTMLReporter .resultsMenu, #HTMLReporter .resultsMenu a { background-color: #fff; color: #333333; } -#HTMLReporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; } -#HTMLReporter.showDetails .summaryMenuItem:hover { text-decoration: underline; } -#HTMLReporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; } -#HTMLReporter.showDetails .summary { display: none; } -#HTMLReporter.showDetails #details { display: block; } -#HTMLReporter .summaryMenuItem { font-weight: bold; text-decoration: underline; } -#HTMLReporter .summary { margin-top: 14px; } -#HTMLReporter .summary .suite .suite, #HTMLReporter .summary .specSummary { margin-left: 14px; } -#HTMLReporter .summary .specSummary.passed a { color: #5e7d00; } -#HTMLReporter .summary .specSummary.failed a { color: #b03911; } -#HTMLReporter .description + .suite { margin-top: 0; } -#HTMLReporter .suite { margin-top: 14px; } -#HTMLReporter .suite a { color: #333333; } -#HTMLReporter #details .specDetail { margin-bottom: 28px; } -#HTMLReporter #details .specDetail .description { display: block; color: white; background-color: #b03911; } -#HTMLReporter .resultMessage { padding-top: 14px; color: #333333; } -#HTMLReporter .resultMessage span.result { display: block; } -#HTMLReporter .stackTrace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; } - -#TrivialReporter { padding: 8px 13px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow-y: scroll; background-color: white; font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; /*.resultMessage {*/ /*white-space: pre;*/ /*}*/ } -#TrivialReporter a:visited, #TrivialReporter a { color: #303; } -#TrivialReporter a:hover, #TrivialReporter a:active { color: blue; } -#TrivialReporter .run_spec { float: right; padding-right: 5px; font-size: .8em; text-decoration: none; } -#TrivialReporter .banner { color: #303; background-color: #fef; padding: 5px; } -#TrivialReporter .logo { float: left; font-size: 1.1em; padding-left: 5px; } -#TrivialReporter .logo .version { font-size: .6em; padding-left: 1em; } -#TrivialReporter .runner.running { background-color: yellow; } -#TrivialReporter .options { text-align: right; font-size: .8em; } -#TrivialReporter .suite { border: 1px outset gray; margin: 5px 0; padding-left: 1em; } -#TrivialReporter .suite .suite { margin: 5px; } -#TrivialReporter .suite.passed { background-color: #dfd; } -#TrivialReporter .suite.failed { background-color: #fdd; } -#TrivialReporter .spec { margin: 5px; padding-left: 1em; clear: both; } -#TrivialReporter .spec.failed, #TrivialReporter .spec.passed, #TrivialReporter .spec.skipped { padding-bottom: 5px; border: 1px solid gray; } -#TrivialReporter .spec.failed { background-color: #fbb; border-color: red; } -#TrivialReporter .spec.passed { background-color: #bfb; border-color: green; } -#TrivialReporter .spec.skipped { background-color: #bbb; } -#TrivialReporter .messages { border-left: 1px dashed gray; padding-left: 1em; padding-right: 1em; } -#TrivialReporter .passed { background-color: #cfc; display: none; } -#TrivialReporter .failed { background-color: #fbb; } -#TrivialReporter .skipped { color: #777; background-color: #eee; display: none; } -#TrivialReporter .resultMessage span.result { display: block; line-height: 2em; color: black; } -#TrivialReporter .resultMessage .mismatch { color: black; } -#TrivialReporter .stackTrace { white-space: pre; font-size: .8em; margin-left: 10px; max-height: 5em; overflow: auto; border: 1px inset red; padding: 1em; background: #eef; } -#TrivialReporter .finished-at { padding-left: 1em; font-size: .6em; } -#TrivialReporter.show-passed .passed, #TrivialReporter.show-skipped .skipped { display: block; } -#TrivialReporter #jasmine_content { position: fixed; right: 100%; } -#TrivialReporter .runner { border: 1px solid gray; display: block; margin: 5px 0; padding: 2px 0 2px 10px; } diff --git a/support/process/node_modules/yamljs/test/libs/jasmine-1.2.0/jasmine.js b/support/process/node_modules/yamljs/test/libs/jasmine-1.2.0/jasmine.js deleted file mode 100644 index 03bf89a..0000000 --- a/support/process/node_modules/yamljs/test/libs/jasmine-1.2.0/jasmine.js +++ /dev/null @@ -1,2529 +0,0 @@ -var isCommonJS = typeof window == "undefined"; - -/** - * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework. - * - * @namespace - */ -var jasmine = {}; -if (isCommonJS) exports.jasmine = jasmine; -/** - * @private - */ -jasmine.unimplementedMethod_ = function() { - throw new Error("unimplemented method"); -}; - -/** - * Use jasmine.undefined instead of undefined, since undefined is just - * a plain old variable and may be redefined by somebody else. - * - * @private - */ -jasmine.undefined = jasmine.___undefined___; - -/** - * Show diagnostic messages in the console if set to true - * - */ -jasmine.VERBOSE = false; - -/** - * Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed. - * - */ -jasmine.DEFAULT_UPDATE_INTERVAL = 250; - -/** - * Default timeout interval in milliseconds for waitsFor() blocks. - */ -jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000; - -jasmine.getGlobal = function() { - function getGlobal() { - return this; - } - - return getGlobal(); -}; - -/** - * Allows for bound functions to be compared. Internal use only. - * - * @ignore - * @private - * @param base {Object} bound 'this' for the function - * @param name {Function} function to find - */ -jasmine.bindOriginal_ = function(base, name) { - var original = base[name]; - if (original.apply) { - return function() { - return original.apply(base, arguments); - }; - } else { - // IE support - return jasmine.getGlobal()[name]; - } -}; - -jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout'); -jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout'); -jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval'); -jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval'); - -jasmine.MessageResult = function(values) { - this.type = 'log'; - this.values = values; - this.trace = new Error(); // todo: test better -}; - -jasmine.MessageResult.prototype.toString = function() { - var text = ""; - for (var i = 0; i < this.values.length; i++) { - if (i > 0) text += " "; - if (jasmine.isString_(this.values[i])) { - text += this.values[i]; - } else { - text += jasmine.pp(this.values[i]); - } - } - return text; -}; - -jasmine.ExpectationResult = function(params) { - this.type = 'expect'; - this.matcherName = params.matcherName; - this.passed_ = params.passed; - this.expected = params.expected; - this.actual = params.actual; - this.message = this.passed_ ? 'Passed.' : params.message; - - var trace = (params.trace || new Error(this.message)); - this.trace = this.passed_ ? '' : trace; -}; - -jasmine.ExpectationResult.prototype.toString = function () { - return this.message; -}; - -jasmine.ExpectationResult.prototype.passed = function () { - return this.passed_; -}; - -/** - * Getter for the Jasmine environment. Ensures one gets created - */ -jasmine.getEnv = function() { - var env = jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env(); - return env; -}; - -/** - * @ignore - * @private - * @param value - * @returns {Boolean} - */ -jasmine.isArray_ = function(value) { - return jasmine.isA_("Array", value); -}; - -/** - * @ignore - * @private - * @param value - * @returns {Boolean} - */ -jasmine.isString_ = function(value) { - return jasmine.isA_("String", value); -}; - -/** - * @ignore - * @private - * @param value - * @returns {Boolean} - */ -jasmine.isNumber_ = function(value) { - return jasmine.isA_("Number", value); -}; - -/** - * @ignore - * @private - * @param {String} typeName - * @param value - * @returns {Boolean} - */ -jasmine.isA_ = function(typeName, value) { - return Object.prototype.toString.apply(value) === '[object ' + typeName + ']'; -}; - -/** - * Pretty printer for expecations. Takes any object and turns it into a human-readable string. - * - * @param value {Object} an object to be outputted - * @returns {String} - */ -jasmine.pp = function(value) { - var stringPrettyPrinter = new jasmine.StringPrettyPrinter(); - stringPrettyPrinter.format(value); - return stringPrettyPrinter.string; -}; - -/** - * Returns true if the object is a DOM Node. - * - * @param {Object} obj object to check - * @returns {Boolean} - */ -jasmine.isDomNode = function(obj) { - return obj.nodeType > 0; -}; - -/** - * Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter. - * - * @example - * // don't care about which function is passed in, as long as it's a function - * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function)); - * - * @param {Class} clazz - * @returns matchable object of the type clazz - */ -jasmine.any = function(clazz) { - return new jasmine.Matchers.Any(clazz); -}; - -/** - * Returns a matchable subset of a JSON object. For use in expectations when you don't care about all of the - * attributes on the object. - * - * @example - * // don't care about any other attributes than foo. - * expect(mySpy).toHaveBeenCalledWith(jasmine.objectContaining({foo: "bar"}); - * - * @param sample {Object} sample - * @returns matchable object for the sample - */ -jasmine.objectContaining = function (sample) { - return new jasmine.Matchers.ObjectContaining(sample); -}; - -/** - * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks. - * - * Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine - * expectation syntax. Spies can be checked if they were called or not and what the calling params were. - * - * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs). - * - * Spies are torn down at the end of every spec. - * - * Note: Do not call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj. - * - * @example - * // a stub - * var myStub = jasmine.createSpy('myStub'); // can be used anywhere - * - * // spy example - * var foo = { - * not: function(bool) { return !bool; } - * } - * - * // actual foo.not will not be called, execution stops - * spyOn(foo, 'not'); - - // foo.not spied upon, execution will continue to implementation - * spyOn(foo, 'not').andCallThrough(); - * - * // fake example - * var foo = { - * not: function(bool) { return !bool; } - * } - * - * // foo.not(val) will return val - * spyOn(foo, 'not').andCallFake(function(value) {return value;}); - * - * // mock example - * foo.not(7 == 7); - * expect(foo.not).toHaveBeenCalled(); - * expect(foo.not).toHaveBeenCalledWith(true); - * - * @constructor - * @see spyOn, jasmine.createSpy, jasmine.createSpyObj - * @param {String} name - */ -jasmine.Spy = function(name) { - /** - * The name of the spy, if provided. - */ - this.identity = name || 'unknown'; - /** - * Is this Object a spy? - */ - this.isSpy = true; - /** - * The actual function this spy stubs. - */ - this.plan = function() { - }; - /** - * Tracking of the most recent call to the spy. - * @example - * var mySpy = jasmine.createSpy('foo'); - * mySpy(1, 2); - * mySpy.mostRecentCall.args = [1, 2]; - */ - this.mostRecentCall = {}; - - /** - * Holds arguments for each call to the spy, indexed by call count - * @example - * var mySpy = jasmine.createSpy('foo'); - * mySpy(1, 2); - * mySpy(7, 8); - * mySpy.mostRecentCall.args = [7, 8]; - * mySpy.argsForCall[0] = [1, 2]; - * mySpy.argsForCall[1] = [7, 8]; - */ - this.argsForCall = []; - this.calls = []; -}; - -/** - * Tells a spy to call through to the actual implemenatation. - * - * @example - * var foo = { - * bar: function() { // do some stuff } - * } - * - * // defining a spy on an existing property: foo.bar - * spyOn(foo, 'bar').andCallThrough(); - */ -jasmine.Spy.prototype.andCallThrough = function() { - this.plan = this.originalValue; - return this; -}; - -/** - * For setting the return value of a spy. - * - * @example - * // defining a spy from scratch: foo() returns 'baz' - * var foo = jasmine.createSpy('spy on foo').andReturn('baz'); - * - * // defining a spy on an existing property: foo.bar() returns 'baz' - * spyOn(foo, 'bar').andReturn('baz'); - * - * @param {Object} value - */ -jasmine.Spy.prototype.andReturn = function(value) { - this.plan = function() { - return value; - }; - return this; -}; - -/** - * For throwing an exception when a spy is called. - * - * @example - * // defining a spy from scratch: foo() throws an exception w/ message 'ouch' - * var foo = jasmine.createSpy('spy on foo').andThrow('baz'); - * - * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch' - * spyOn(foo, 'bar').andThrow('baz'); - * - * @param {String} exceptionMsg - */ -jasmine.Spy.prototype.andThrow = function(exceptionMsg) { - this.plan = function() { - throw exceptionMsg; - }; - return this; -}; - -/** - * Calls an alternate implementation when a spy is called. - * - * @example - * var baz = function() { - * // do some stuff, return something - * } - * // defining a spy from scratch: foo() calls the function baz - * var foo = jasmine.createSpy('spy on foo').andCall(baz); - * - * // defining a spy on an existing property: foo.bar() calls an anonymnous function - * spyOn(foo, 'bar').andCall(function() { return 'baz';} ); - * - * @param {Function} fakeFunc - */ -jasmine.Spy.prototype.andCallFake = function(fakeFunc) { - this.plan = fakeFunc; - return this; -}; - -/** - * Resets all of a spy's the tracking variables so that it can be used again. - * - * @example - * spyOn(foo, 'bar'); - * - * foo.bar(); - * - * expect(foo.bar.callCount).toEqual(1); - * - * foo.bar.reset(); - * - * expect(foo.bar.callCount).toEqual(0); - */ -jasmine.Spy.prototype.reset = function() { - this.wasCalled = false; - this.callCount = 0; - this.argsForCall = []; - this.calls = []; - this.mostRecentCall = {}; -}; - -jasmine.createSpy = function(name) { - - var spyObj = function() { - spyObj.wasCalled = true; - spyObj.callCount++; - var args = jasmine.util.argsToArray(arguments); - spyObj.mostRecentCall.object = this; - spyObj.mostRecentCall.args = args; - spyObj.argsForCall.push(args); - spyObj.calls.push({object: this, args: args}); - return spyObj.plan.apply(this, arguments); - }; - - var spy = new jasmine.Spy(name); - - for (var prop in spy) { - spyObj[prop] = spy[prop]; - } - - spyObj.reset(); - - return spyObj; -}; - -/** - * Determines whether an object is a spy. - * - * @param {jasmine.Spy|Object} putativeSpy - * @returns {Boolean} - */ -jasmine.isSpy = function(putativeSpy) { - return putativeSpy && putativeSpy.isSpy; -}; - -/** - * Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something - * large in one call. - * - * @param {String} baseName name of spy class - * @param {Array} methodNames array of names of methods to make spies - */ -jasmine.createSpyObj = function(baseName, methodNames) { - if (!jasmine.isArray_(methodNames) || methodNames.length === 0) { - throw new Error('createSpyObj requires a non-empty array of method names to create spies for'); - } - var obj = {}; - for (var i = 0; i < methodNames.length; i++) { - obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]); - } - return obj; -}; - -/** - * All parameters are pretty-printed and concatenated together, then written to the current spec's output. - * - * Be careful not to leave calls to jasmine.log in production code. - */ -jasmine.log = function() { - var spec = jasmine.getEnv().currentSpec; - spec.log.apply(spec, arguments); -}; - -/** - * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy. - * - * @example - * // spy example - * var foo = { - * not: function(bool) { return !bool; } - * } - * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops - * - * @see jasmine.createSpy - * @param obj - * @param methodName - * @returns a Jasmine spy that can be chained with all spy methods - */ -var spyOn = function(obj, methodName) { - return jasmine.getEnv().currentSpec.spyOn(obj, methodName); -}; -if (isCommonJS) exports.spyOn = spyOn; - -/** - * Creates a Jasmine spec that will be added to the current suite. - * - * // TODO: pending tests - * - * @example - * it('should be true', function() { - * expect(true).toEqual(true); - * }); - * - * @param {String} desc description of this specification - * @param {Function} func defines the preconditions and expectations of the spec - */ -var it = function(desc, func) { - return jasmine.getEnv().it(desc, func); -}; -if (isCommonJS) exports.it = it; - -/** - * Creates a disabled Jasmine spec. - * - * A convenience method that allows existing specs to be disabled temporarily during development. - * - * @param {String} desc description of this specification - * @param {Function} func defines the preconditions and expectations of the spec - */ -var xit = function(desc, func) { - return jasmine.getEnv().xit(desc, func); -}; -if (isCommonJS) exports.xit = xit; - -/** - * Starts a chain for a Jasmine expectation. - * - * It is passed an Object that is the actual value and should chain to one of the many - * jasmine.Matchers functions. - * - * @param {Object} actual Actual value to test against and expected value - */ -var expect = function(actual) { - return jasmine.getEnv().currentSpec.expect(actual); -}; -if (isCommonJS) exports.expect = expect; - -/** - * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs. - * - * @param {Function} func Function that defines part of a jasmine spec. - */ -var runs = function(func) { - jasmine.getEnv().currentSpec.runs(func); -}; -if (isCommonJS) exports.runs = runs; - -/** - * Waits a fixed time period before moving to the next block. - * - * @deprecated Use waitsFor() instead - * @param {Number} timeout milliseconds to wait - */ -var waits = function(timeout) { - jasmine.getEnv().currentSpec.waits(timeout); -}; -if (isCommonJS) exports.waits = waits; - -/** - * Waits for the latchFunction to return true before proceeding to the next block. - * - * @param {Function} latchFunction - * @param {String} optional_timeoutMessage - * @param {Number} optional_timeout - */ -var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) { - jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments); -}; -if (isCommonJS) exports.waitsFor = waitsFor; - -/** - * A function that is called before each spec in a suite. - * - * Used for spec setup, including validating assumptions. - * - * @param {Function} beforeEachFunction - */ -var beforeEach = function(beforeEachFunction) { - jasmine.getEnv().beforeEach(beforeEachFunction); -}; -if (isCommonJS) exports.beforeEach = beforeEach; - -/** - * A function that is called after each spec in a suite. - * - * Used for restoring any state that is hijacked during spec execution. - * - * @param {Function} afterEachFunction - */ -var afterEach = function(afterEachFunction) { - jasmine.getEnv().afterEach(afterEachFunction); -}; -if (isCommonJS) exports.afterEach = afterEach; - -/** - * Defines a suite of specifications. - * - * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared - * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization - * of setup in some tests. - * - * @example - * // TODO: a simple suite - * - * // TODO: a simple suite with a nested describe block - * - * @param {String} description A string, usually the class under test. - * @param {Function} specDefinitions function that defines several specs. - */ -var describe = function(description, specDefinitions) { - return jasmine.getEnv().describe(description, specDefinitions); -}; -if (isCommonJS) exports.describe = describe; - -/** - * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development. - * - * @param {String} description A string, usually the class under test. - * @param {Function} specDefinitions function that defines several specs. - */ -var xdescribe = function(description, specDefinitions) { - return jasmine.getEnv().xdescribe(description, specDefinitions); -}; -if (isCommonJS) exports.xdescribe = xdescribe; - - -// Provide the XMLHttpRequest class for IE 5.x-6.x: -jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() { - function tryIt(f) { - try { - return f(); - } catch(e) { - } - return null; - } - - var xhr = tryIt(function() { - return new ActiveXObject("Msxml2.XMLHTTP.6.0"); - }) || - tryIt(function() { - return new ActiveXObject("Msxml2.XMLHTTP.3.0"); - }) || - tryIt(function() { - return new ActiveXObject("Msxml2.XMLHTTP"); - }) || - tryIt(function() { - return new ActiveXObject("Microsoft.XMLHTTP"); - }); - - if (!xhr) throw new Error("This browser does not support XMLHttpRequest."); - - return xhr; -} : XMLHttpRequest; -/** - * @namespace - */ -jasmine.util = {}; - -/** - * Declare that a child class inherit it's prototype from the parent class. - * - * @private - * @param {Function} childClass - * @param {Function} parentClass - */ -jasmine.util.inherit = function(childClass, parentClass) { - /** - * @private - */ - var subclass = function() { - }; - subclass.prototype = parentClass.prototype; - childClass.prototype = new subclass(); -}; - -jasmine.util.formatException = function(e) { - var lineNumber; - if (e.line) { - lineNumber = e.line; - } - else if (e.lineNumber) { - lineNumber = e.lineNumber; - } - - var file; - - if (e.sourceURL) { - file = e.sourceURL; - } - else if (e.fileName) { - file = e.fileName; - } - - var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString(); - - if (file && lineNumber) { - message += ' in ' + file + ' (line ' + lineNumber + ')'; - } - - return message; -}; - -jasmine.util.htmlEscape = function(str) { - if (!str) return str; - return str.replace(/&/g, '&') - .replace(//g, '>'); -}; - -jasmine.util.argsToArray = function(args) { - var arrayOfArgs = []; - for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]); - return arrayOfArgs; -}; - -jasmine.util.extend = function(destination, source) { - for (var property in source) destination[property] = source[property]; - return destination; -}; - -/** - * Environment for Jasmine - * - * @constructor - */ -jasmine.Env = function() { - this.currentSpec = null; - this.currentSuite = null; - this.currentRunner_ = new jasmine.Runner(this); - - this.reporter = new jasmine.MultiReporter(); - - this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL; - this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL; - this.lastUpdate = 0; - this.specFilter = function() { - return true; - }; - - this.nextSpecId_ = 0; - this.nextSuiteId_ = 0; - this.equalityTesters_ = []; - - // wrap matchers - this.matchersClass = function() { - jasmine.Matchers.apply(this, arguments); - }; - jasmine.util.inherit(this.matchersClass, jasmine.Matchers); - - jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass); -}; - - -jasmine.Env.prototype.setTimeout = jasmine.setTimeout; -jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout; -jasmine.Env.prototype.setInterval = jasmine.setInterval; -jasmine.Env.prototype.clearInterval = jasmine.clearInterval; - -/** - * @returns an object containing jasmine version build info, if set. - */ -jasmine.Env.prototype.version = function () { - if (jasmine.version_) { - return jasmine.version_; - } else { - throw new Error('Version not set'); - } -}; - -/** - * @returns string containing jasmine version build info, if set. - */ -jasmine.Env.prototype.versionString = function() { - if (!jasmine.version_) { - return "version unknown"; - } - - var version = this.version(); - var versionString = version.major + "." + version.minor + "." + version.build; - if (version.release_candidate) { - versionString += ".rc" + version.release_candidate; - } - versionString += " revision " + version.revision; - return versionString; -}; - -/** - * @returns a sequential integer starting at 0 - */ -jasmine.Env.prototype.nextSpecId = function () { - return this.nextSpecId_++; -}; - -/** - * @returns a sequential integer starting at 0 - */ -jasmine.Env.prototype.nextSuiteId = function () { - return this.nextSuiteId_++; -}; - -/** - * Register a reporter to receive status updates from Jasmine. - * @param {jasmine.Reporter} reporter An object which will receive status updates. - */ -jasmine.Env.prototype.addReporter = function(reporter) { - this.reporter.addReporter(reporter); -}; - -jasmine.Env.prototype.execute = function() { - this.currentRunner_.execute(); -}; - -jasmine.Env.prototype.describe = function(description, specDefinitions) { - var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite); - - var parentSuite = this.currentSuite; - if (parentSuite) { - parentSuite.add(suite); - } else { - this.currentRunner_.add(suite); - } - - this.currentSuite = suite; - - var declarationError = null; - try { - specDefinitions.call(suite); - } catch(e) { - declarationError = e; - } - - if (declarationError) { - this.it("encountered a declaration exception", function() { - throw declarationError; - }); - } - - this.currentSuite = parentSuite; - - return suite; -}; - -jasmine.Env.prototype.beforeEach = function(beforeEachFunction) { - if (this.currentSuite) { - this.currentSuite.beforeEach(beforeEachFunction); - } else { - this.currentRunner_.beforeEach(beforeEachFunction); - } -}; - -jasmine.Env.prototype.currentRunner = function () { - return this.currentRunner_; -}; - -jasmine.Env.prototype.afterEach = function(afterEachFunction) { - if (this.currentSuite) { - this.currentSuite.afterEach(afterEachFunction); - } else { - this.currentRunner_.afterEach(afterEachFunction); - } - -}; - -jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) { - return { - execute: function() { - } - }; -}; - -jasmine.Env.prototype.it = function(description, func) { - var spec = new jasmine.Spec(this, this.currentSuite, description); - this.currentSuite.add(spec); - this.currentSpec = spec; - - if (func) { - spec.runs(func); - } - - return spec; -}; - -jasmine.Env.prototype.xit = function(desc, func) { - return { - id: this.nextSpecId(), - runs: function() { - } - }; -}; - -jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) { - if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) { - return true; - } - - a.__Jasmine_been_here_before__ = b; - b.__Jasmine_been_here_before__ = a; - - var hasKey = function(obj, keyName) { - return obj !== null && obj[keyName] !== jasmine.undefined; - }; - - for (var property in b) { - if (!hasKey(a, property) && hasKey(b, property)) { - mismatchKeys.push("expected has key '" + property + "', but missing from actual."); - } - } - for (property in a) { - if (!hasKey(b, property) && hasKey(a, property)) { - mismatchKeys.push("expected missing key '" + property + "', but present in actual."); - } - } - for (property in b) { - if (property == '__Jasmine_been_here_before__') continue; - if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) { - mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual."); - } - } - - if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) { - mismatchValues.push("arrays were not the same length"); - } - - delete a.__Jasmine_been_here_before__; - delete b.__Jasmine_been_here_before__; - return (mismatchKeys.length === 0 && mismatchValues.length === 0); -}; - -jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) { - mismatchKeys = mismatchKeys || []; - mismatchValues = mismatchValues || []; - - for (var i = 0; i < this.equalityTesters_.length; i++) { - var equalityTester = this.equalityTesters_[i]; - var result = equalityTester(a, b, this, mismatchKeys, mismatchValues); - if (result !== jasmine.undefined) return result; - } - - if (a === b) return true; - - if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) { - return (a == jasmine.undefined && b == jasmine.undefined); - } - - if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) { - return a === b; - } - - if (a instanceof Date && b instanceof Date) { - return a.getTime() == b.getTime(); - } - - if (a.jasmineMatches) { - return a.jasmineMatches(b); - } - - if (b.jasmineMatches) { - return b.jasmineMatches(a); - } - - if (a instanceof jasmine.Matchers.ObjectContaining) { - return a.matches(b); - } - - if (b instanceof jasmine.Matchers.ObjectContaining) { - return b.matches(a); - } - - if (jasmine.isString_(a) && jasmine.isString_(b)) { - return (a == b); - } - - if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) { - return (a == b); - } - - if (typeof a === "object" && typeof b === "object") { - return this.compareObjects_(a, b, mismatchKeys, mismatchValues); - } - - //Straight check - return (a === b); -}; - -jasmine.Env.prototype.contains_ = function(haystack, needle) { - if (jasmine.isArray_(haystack)) { - for (var i = 0; i < haystack.length; i++) { - if (this.equals_(haystack[i], needle)) return true; - } - return false; - } - return haystack.indexOf(needle) >= 0; -}; - -jasmine.Env.prototype.addEqualityTester = function(equalityTester) { - this.equalityTesters_.push(equalityTester); -}; -/** No-op base class for Jasmine reporters. - * - * @constructor - */ -jasmine.Reporter = function() { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.reportRunnerStarting = function(runner) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.reportRunnerResults = function(runner) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.reportSuiteResults = function(suite) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.reportSpecStarting = function(spec) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.reportSpecResults = function(spec) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.log = function(str) { -}; - -/** - * Blocks are functions with executable code that make up a spec. - * - * @constructor - * @param {jasmine.Env} env - * @param {Function} func - * @param {jasmine.Spec} spec - */ -jasmine.Block = function(env, func, spec) { - this.env = env; - this.func = func; - this.spec = spec; -}; - -jasmine.Block.prototype.execute = function(onComplete) { - try { - this.func.apply(this.spec); - } catch (e) { - this.spec.fail(e); - } - onComplete(); -}; -/** JavaScript API reporter. - * - * @constructor - */ -jasmine.JsApiReporter = function() { - this.started = false; - this.finished = false; - this.suites_ = []; - this.results_ = {}; -}; - -jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) { - this.started = true; - var suites = runner.topLevelSuites(); - for (var i = 0; i < suites.length; i++) { - var suite = suites[i]; - this.suites_.push(this.summarize_(suite)); - } -}; - -jasmine.JsApiReporter.prototype.suites = function() { - return this.suites_; -}; - -jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) { - var isSuite = suiteOrSpec instanceof jasmine.Suite; - var summary = { - id: suiteOrSpec.id, - name: suiteOrSpec.description, - type: isSuite ? 'suite' : 'spec', - children: [] - }; - - if (isSuite) { - var children = suiteOrSpec.children(); - for (var i = 0; i < children.length; i++) { - summary.children.push(this.summarize_(children[i])); - } - } - return summary; -}; - -jasmine.JsApiReporter.prototype.results = function() { - return this.results_; -}; - -jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) { - return this.results_[specId]; -}; - -//noinspection JSUnusedLocalSymbols -jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) { - this.finished = true; -}; - -//noinspection JSUnusedLocalSymbols -jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) { - this.results_[spec.id] = { - messages: spec.results().getItems(), - result: spec.results().failedCount > 0 ? "failed" : "passed" - }; -}; - -//noinspection JSUnusedLocalSymbols -jasmine.JsApiReporter.prototype.log = function(str) { -}; - -jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){ - var results = {}; - for (var i = 0; i < specIds.length; i++) { - var specId = specIds[i]; - results[specId] = this.summarizeResult_(this.results_[specId]); - } - return results; -}; - -jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){ - var summaryMessages = []; - var messagesLength = result.messages.length; - for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) { - var resultMessage = result.messages[messageIndex]; - summaryMessages.push({ - text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined, - passed: resultMessage.passed ? resultMessage.passed() : true, - type: resultMessage.type, - message: resultMessage.message, - trace: { - stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined - } - }); - } - - return { - result : result.result, - messages : summaryMessages - }; -}; - -/** - * @constructor - * @param {jasmine.Env} env - * @param actual - * @param {jasmine.Spec} spec - */ -jasmine.Matchers = function(env, actual, spec, opt_isNot) { - this.env = env; - this.actual = actual; - this.spec = spec; - this.isNot = opt_isNot || false; - this.reportWasCalled_ = false; -}; - -// todo: @deprecated as of Jasmine 0.11, remove soon [xw] -jasmine.Matchers.pp = function(str) { - throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!"); -}; - -// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw] -jasmine.Matchers.prototype.report = function(result, failing_message, details) { - throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs"); -}; - -jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) { - for (var methodName in prototype) { - if (methodName == 'report') continue; - var orig = prototype[methodName]; - matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig); - } -}; - -jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) { - return function() { - var matcherArgs = jasmine.util.argsToArray(arguments); - var result = matcherFunction.apply(this, arguments); - - if (this.isNot) { - result = !result; - } - - if (this.reportWasCalled_) return result; - - var message; - if (!result) { - if (this.message) { - message = this.message.apply(this, arguments); - if (jasmine.isArray_(message)) { - message = message[this.isNot ? 1 : 0]; - } - } else { - var englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); }); - message = "Expected " + jasmine.pp(this.actual) + (this.isNot ? " not " : " ") + englishyPredicate; - if (matcherArgs.length > 0) { - for (var i = 0; i < matcherArgs.length; i++) { - if (i > 0) message += ","; - message += " " + jasmine.pp(matcherArgs[i]); - } - } - message += "."; - } - } - var expectationResult = new jasmine.ExpectationResult({ - matcherName: matcherName, - passed: result, - expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0], - actual: this.actual, - message: message - }); - this.spec.addMatcherResult(expectationResult); - return jasmine.undefined; - }; -}; - - - - -/** - * toBe: compares the actual to the expected using === - * @param expected - */ -jasmine.Matchers.prototype.toBe = function(expected) { - return this.actual === expected; -}; - -/** - * toNotBe: compares the actual to the expected using !== - * @param expected - * @deprecated as of 1.0. Use not.toBe() instead. - */ -jasmine.Matchers.prototype.toNotBe = function(expected) { - return this.actual !== expected; -}; - -/** - * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc. - * - * @param expected - */ -jasmine.Matchers.prototype.toEqual = function(expected) { - return this.env.equals_(this.actual, expected); -}; - -/** - * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual - * @param expected - * @deprecated as of 1.0. Use not.toEqual() instead. - */ -jasmine.Matchers.prototype.toNotEqual = function(expected) { - return !this.env.equals_(this.actual, expected); -}; - -/** - * Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes - * a pattern or a String. - * - * @param expected - */ -jasmine.Matchers.prototype.toMatch = function(expected) { - return new RegExp(expected).test(this.actual); -}; - -/** - * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch - * @param expected - * @deprecated as of 1.0. Use not.toMatch() instead. - */ -jasmine.Matchers.prototype.toNotMatch = function(expected) { - return !(new RegExp(expected).test(this.actual)); -}; - -/** - * Matcher that compares the actual to jasmine.undefined. - */ -jasmine.Matchers.prototype.toBeDefined = function() { - return (this.actual !== jasmine.undefined); -}; - -/** - * Matcher that compares the actual to jasmine.undefined. - */ -jasmine.Matchers.prototype.toBeUndefined = function() { - return (this.actual === jasmine.undefined); -}; - -/** - * Matcher that compares the actual to null. - */ -jasmine.Matchers.prototype.toBeNull = function() { - return (this.actual === null); -}; - -/** - * Matcher that boolean not-nots the actual. - */ -jasmine.Matchers.prototype.toBeTruthy = function() { - return !!this.actual; -}; - - -/** - * Matcher that boolean nots the actual. - */ -jasmine.Matchers.prototype.toBeFalsy = function() { - return !this.actual; -}; - - -/** - * Matcher that checks to see if the actual, a Jasmine spy, was called. - */ -jasmine.Matchers.prototype.toHaveBeenCalled = function() { - if (arguments.length > 0) { - throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith'); - } - - if (!jasmine.isSpy(this.actual)) { - throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); - } - - this.message = function() { - return [ - "Expected spy " + this.actual.identity + " to have been called.", - "Expected spy " + this.actual.identity + " not to have been called." - ]; - }; - - return this.actual.wasCalled; -}; - -/** @deprecated Use expect(xxx).toHaveBeenCalled() instead */ -jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled; - -/** - * Matcher that checks to see if the actual, a Jasmine spy, was not called. - * - * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead - */ -jasmine.Matchers.prototype.wasNotCalled = function() { - if (arguments.length > 0) { - throw new Error('wasNotCalled does not take arguments'); - } - - if (!jasmine.isSpy(this.actual)) { - throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); - } - - this.message = function() { - return [ - "Expected spy " + this.actual.identity + " to not have been called.", - "Expected spy " + this.actual.identity + " to have been called." - ]; - }; - - return !this.actual.wasCalled; -}; - -/** - * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters. - * - * @example - * - */ -jasmine.Matchers.prototype.toHaveBeenCalledWith = function() { - var expectedArgs = jasmine.util.argsToArray(arguments); - if (!jasmine.isSpy(this.actual)) { - throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); - } - this.message = function() { - if (this.actual.callCount === 0) { - // todo: what should the failure message for .not.toHaveBeenCalledWith() be? is this right? test better. [xw] - return [ - "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but it was never called.", - "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but it was." - ]; - } else { - return [ - "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall), - "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall) - ]; - } - }; - - return this.env.contains_(this.actual.argsForCall, expectedArgs); -}; - -/** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */ -jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith; - -/** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */ -jasmine.Matchers.prototype.wasNotCalledWith = function() { - var expectedArgs = jasmine.util.argsToArray(arguments); - if (!jasmine.isSpy(this.actual)) { - throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); - } - - this.message = function() { - return [ - "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was", - "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was" - ]; - }; - - return !this.env.contains_(this.actual.argsForCall, expectedArgs); -}; - -/** - * Matcher that checks that the expected item is an element in the actual Array. - * - * @param {Object} expected - */ -jasmine.Matchers.prototype.toContain = function(expected) { - return this.env.contains_(this.actual, expected); -}; - -/** - * Matcher that checks that the expected item is NOT an element in the actual Array. - * - * @param {Object} expected - * @deprecated as of 1.0. Use not.toContain() instead. - */ -jasmine.Matchers.prototype.toNotContain = function(expected) { - return !this.env.contains_(this.actual, expected); -}; - -jasmine.Matchers.prototype.toBeLessThan = function(expected) { - return this.actual < expected; -}; - -jasmine.Matchers.prototype.toBeGreaterThan = function(expected) { - return this.actual > expected; -}; - -/** - * Matcher that checks that the expected item is equal to the actual item - * up to a given level of decimal precision (default 2). - * - * @param {Number} expected - * @param {Number} precision - */ -jasmine.Matchers.prototype.toBeCloseTo = function(expected, precision) { - if (!(precision === 0)) { - precision = precision || 2; - } - var multiplier = Math.pow(10, precision); - var actual = Math.round(this.actual * multiplier); - expected = Math.round(expected * multiplier); - return expected == actual; -}; - -/** - * Matcher that checks that the expected exception was thrown by the actual. - * - * @param {String} expected - */ -jasmine.Matchers.prototype.toThrow = function(expected) { - var result = false; - var exception; - if (typeof this.actual != 'function') { - throw new Error('Actual is not a function'); - } - try { - this.actual(); - } catch (e) { - exception = e; - } - if (exception) { - result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected)); - } - - var not = this.isNot ? "not " : ""; - - this.message = function() { - if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) { - return ["Expected function " + not + "to throw", expected ? expected.message || expected : "an exception", ", but it threw", exception.message || exception].join(' '); - } else { - return "Expected function to throw an exception."; - } - }; - - return result; -}; - -jasmine.Matchers.Any = function(expectedClass) { - this.expectedClass = expectedClass; -}; - -jasmine.Matchers.Any.prototype.jasmineMatches = function(other) { - if (this.expectedClass == String) { - return typeof other == 'string' || other instanceof String; - } - - if (this.expectedClass == Number) { - return typeof other == 'number' || other instanceof Number; - } - - if (this.expectedClass == Function) { - return typeof other == 'function' || other instanceof Function; - } - - if (this.expectedClass == Object) { - return typeof other == 'object'; - } - - return other instanceof this.expectedClass; -}; - -jasmine.Matchers.Any.prototype.jasmineToString = function() { - return ''; -}; - -jasmine.Matchers.ObjectContaining = function (sample) { - this.sample = sample; -}; - -jasmine.Matchers.ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) { - mismatchKeys = mismatchKeys || []; - mismatchValues = mismatchValues || []; - - var env = jasmine.getEnv(); - - var hasKey = function(obj, keyName) { - return obj != null && obj[keyName] !== jasmine.undefined; - }; - - for (var property in this.sample) { - if (!hasKey(other, property) && hasKey(this.sample, property)) { - mismatchKeys.push("expected has key '" + property + "', but missing from actual."); - } - else if (!env.equals_(this.sample[property], other[property], mismatchKeys, mismatchValues)) { - mismatchValues.push("'" + property + "' was '" + (other[property] ? jasmine.util.htmlEscape(other[property].toString()) : other[property]) + "' in expected, but was '" + (this.sample[property] ? jasmine.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in actual."); - } - } - - return (mismatchKeys.length === 0 && mismatchValues.length === 0); -}; - -jasmine.Matchers.ObjectContaining.prototype.jasmineToString = function () { - return ""; -}; -// Mock setTimeout, clearTimeout -// Contributed by Pivotal Computer Systems, www.pivotalsf.com - -jasmine.FakeTimer = function() { - this.reset(); - - var self = this; - self.setTimeout = function(funcToCall, millis) { - self.timeoutsMade++; - self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false); - return self.timeoutsMade; - }; - - self.setInterval = function(funcToCall, millis) { - self.timeoutsMade++; - self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true); - return self.timeoutsMade; - }; - - self.clearTimeout = function(timeoutKey) { - self.scheduledFunctions[timeoutKey] = jasmine.undefined; - }; - - self.clearInterval = function(timeoutKey) { - self.scheduledFunctions[timeoutKey] = jasmine.undefined; - }; - -}; - -jasmine.FakeTimer.prototype.reset = function() { - this.timeoutsMade = 0; - this.scheduledFunctions = {}; - this.nowMillis = 0; -}; - -jasmine.FakeTimer.prototype.tick = function(millis) { - var oldMillis = this.nowMillis; - var newMillis = oldMillis + millis; - this.runFunctionsWithinRange(oldMillis, newMillis); - this.nowMillis = newMillis; -}; - -jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) { - var scheduledFunc; - var funcsToRun = []; - for (var timeoutKey in this.scheduledFunctions) { - scheduledFunc = this.scheduledFunctions[timeoutKey]; - if (scheduledFunc != jasmine.undefined && - scheduledFunc.runAtMillis >= oldMillis && - scheduledFunc.runAtMillis <= nowMillis) { - funcsToRun.push(scheduledFunc); - this.scheduledFunctions[timeoutKey] = jasmine.undefined; - } - } - - if (funcsToRun.length > 0) { - funcsToRun.sort(function(a, b) { - return a.runAtMillis - b.runAtMillis; - }); - for (var i = 0; i < funcsToRun.length; ++i) { - try { - var funcToRun = funcsToRun[i]; - this.nowMillis = funcToRun.runAtMillis; - funcToRun.funcToCall(); - if (funcToRun.recurring) { - this.scheduleFunction(funcToRun.timeoutKey, - funcToRun.funcToCall, - funcToRun.millis, - true); - } - } catch(e) { - } - } - this.runFunctionsWithinRange(oldMillis, nowMillis); - } -}; - -jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) { - this.scheduledFunctions[timeoutKey] = { - runAtMillis: this.nowMillis + millis, - funcToCall: funcToCall, - recurring: recurring, - timeoutKey: timeoutKey, - millis: millis - }; -}; - -/** - * @namespace - */ -jasmine.Clock = { - defaultFakeTimer: new jasmine.FakeTimer(), - - reset: function() { - jasmine.Clock.assertInstalled(); - jasmine.Clock.defaultFakeTimer.reset(); - }, - - tick: function(millis) { - jasmine.Clock.assertInstalled(); - jasmine.Clock.defaultFakeTimer.tick(millis); - }, - - runFunctionsWithinRange: function(oldMillis, nowMillis) { - jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis); - }, - - scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) { - jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring); - }, - - useMock: function() { - if (!jasmine.Clock.isInstalled()) { - var spec = jasmine.getEnv().currentSpec; - spec.after(jasmine.Clock.uninstallMock); - - jasmine.Clock.installMock(); - } - }, - - installMock: function() { - jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer; - }, - - uninstallMock: function() { - jasmine.Clock.assertInstalled(); - jasmine.Clock.installed = jasmine.Clock.real; - }, - - real: { - setTimeout: jasmine.getGlobal().setTimeout, - clearTimeout: jasmine.getGlobal().clearTimeout, - setInterval: jasmine.getGlobal().setInterval, - clearInterval: jasmine.getGlobal().clearInterval - }, - - assertInstalled: function() { - if (!jasmine.Clock.isInstalled()) { - throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()"); - } - }, - - isInstalled: function() { - return jasmine.Clock.installed == jasmine.Clock.defaultFakeTimer; - }, - - installed: null -}; -jasmine.Clock.installed = jasmine.Clock.real; - -//else for IE support -jasmine.getGlobal().setTimeout = function(funcToCall, millis) { - if (jasmine.Clock.installed.setTimeout.apply) { - return jasmine.Clock.installed.setTimeout.apply(this, arguments); - } else { - return jasmine.Clock.installed.setTimeout(funcToCall, millis); - } -}; - -jasmine.getGlobal().setInterval = function(funcToCall, millis) { - if (jasmine.Clock.installed.setInterval.apply) { - return jasmine.Clock.installed.setInterval.apply(this, arguments); - } else { - return jasmine.Clock.installed.setInterval(funcToCall, millis); - } -}; - -jasmine.getGlobal().clearTimeout = function(timeoutKey) { - if (jasmine.Clock.installed.clearTimeout.apply) { - return jasmine.Clock.installed.clearTimeout.apply(this, arguments); - } else { - return jasmine.Clock.installed.clearTimeout(timeoutKey); - } -}; - -jasmine.getGlobal().clearInterval = function(timeoutKey) { - if (jasmine.Clock.installed.clearTimeout.apply) { - return jasmine.Clock.installed.clearInterval.apply(this, arguments); - } else { - return jasmine.Clock.installed.clearInterval(timeoutKey); - } -}; - -/** - * @constructor - */ -jasmine.MultiReporter = function() { - this.subReporters_ = []; -}; -jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter); - -jasmine.MultiReporter.prototype.addReporter = function(reporter) { - this.subReporters_.push(reporter); -}; - -(function() { - var functionNames = [ - "reportRunnerStarting", - "reportRunnerResults", - "reportSuiteResults", - "reportSpecStarting", - "reportSpecResults", - "log" - ]; - for (var i = 0; i < functionNames.length; i++) { - var functionName = functionNames[i]; - jasmine.MultiReporter.prototype[functionName] = (function(functionName) { - return function() { - for (var j = 0; j < this.subReporters_.length; j++) { - var subReporter = this.subReporters_[j]; - if (subReporter[functionName]) { - subReporter[functionName].apply(subReporter, arguments); - } - } - }; - })(functionName); - } -})(); -/** - * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults - * - * @constructor - */ -jasmine.NestedResults = function() { - /** - * The total count of results - */ - this.totalCount = 0; - /** - * Number of passed results - */ - this.passedCount = 0; - /** - * Number of failed results - */ - this.failedCount = 0; - /** - * Was this suite/spec skipped? - */ - this.skipped = false; - /** - * @ignore - */ - this.items_ = []; -}; - -/** - * Roll up the result counts. - * - * @param result - */ -jasmine.NestedResults.prototype.rollupCounts = function(result) { - this.totalCount += result.totalCount; - this.passedCount += result.passedCount; - this.failedCount += result.failedCount; -}; - -/** - * Adds a log message. - * @param values Array of message parts which will be concatenated later. - */ -jasmine.NestedResults.prototype.log = function(values) { - this.items_.push(new jasmine.MessageResult(values)); -}; - -/** - * Getter for the results: message & results. - */ -jasmine.NestedResults.prototype.getItems = function() { - return this.items_; -}; - -/** - * Adds a result, tracking counts (total, passed, & failed) - * @param {jasmine.ExpectationResult|jasmine.NestedResults} result - */ -jasmine.NestedResults.prototype.addResult = function(result) { - if (result.type != 'log') { - if (result.items_) { - this.rollupCounts(result); - } else { - this.totalCount++; - if (result.passed()) { - this.passedCount++; - } else { - this.failedCount++; - } - } - } - this.items_.push(result); -}; - -/** - * @returns {Boolean} True if everything below passed - */ -jasmine.NestedResults.prototype.passed = function() { - return this.passedCount === this.totalCount; -}; -/** - * Base class for pretty printing for expectation results. - */ -jasmine.PrettyPrinter = function() { - this.ppNestLevel_ = 0; -}; - -/** - * Formats a value in a nice, human-readable string. - * - * @param value - */ -jasmine.PrettyPrinter.prototype.format = function(value) { - if (this.ppNestLevel_ > 40) { - throw new Error('jasmine.PrettyPrinter: format() nested too deeply!'); - } - - this.ppNestLevel_++; - try { - if (value === jasmine.undefined) { - this.emitScalar('undefined'); - } else if (value === null) { - this.emitScalar('null'); - } else if (value === jasmine.getGlobal()) { - this.emitScalar(''); - } else if (value.jasmineToString) { - this.emitScalar(value.jasmineToString()); - } else if (typeof value === 'string') { - this.emitString(value); - } else if (jasmine.isSpy(value)) { - this.emitScalar("spy on " + value.identity); - } else if (value instanceof RegExp) { - this.emitScalar(value.toString()); - } else if (typeof value === 'function') { - this.emitScalar('Function'); - } else if (typeof value.nodeType === 'number') { - this.emitScalar('HTMLNode'); - } else if (value instanceof Date) { - this.emitScalar('Date(' + value + ')'); - } else if (value.__Jasmine_been_here_before__) { - this.emitScalar(''); - } else if (jasmine.isArray_(value) || typeof value == 'object') { - value.__Jasmine_been_here_before__ = true; - if (jasmine.isArray_(value)) { - this.emitArray(value); - } else { - this.emitObject(value); - } - delete value.__Jasmine_been_here_before__; - } else { - this.emitScalar(value.toString()); - } - } finally { - this.ppNestLevel_--; - } -}; - -jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) { - for (var property in obj) { - if (property == '__Jasmine_been_here_before__') continue; - fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && - obj.__lookupGetter__(property) !== null) : false); - } -}; - -jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_; -jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_; -jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_; -jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_; - -jasmine.StringPrettyPrinter = function() { - jasmine.PrettyPrinter.call(this); - - this.string = ''; -}; -jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter); - -jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) { - this.append(value); -}; - -jasmine.StringPrettyPrinter.prototype.emitString = function(value) { - this.append("'" + value + "'"); -}; - -jasmine.StringPrettyPrinter.prototype.emitArray = function(array) { - this.append('[ '); - for (var i = 0; i < array.length; i++) { - if (i > 0) { - this.append(', '); - } - this.format(array[i]); - } - this.append(' ]'); -}; - -jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) { - var self = this; - this.append('{ '); - var first = true; - - this.iterateObject(obj, function(property, isGetter) { - if (first) { - first = false; - } else { - self.append(', '); - } - - self.append(property); - self.append(' : '); - if (isGetter) { - self.append(''); - } else { - self.format(obj[property]); - } - }); - - this.append(' }'); -}; - -jasmine.StringPrettyPrinter.prototype.append = function(value) { - this.string += value; -}; -jasmine.Queue = function(env) { - this.env = env; - this.blocks = []; - this.running = false; - this.index = 0; - this.offset = 0; - this.abort = false; -}; - -jasmine.Queue.prototype.addBefore = function(block) { - this.blocks.unshift(block); -}; - -jasmine.Queue.prototype.add = function(block) { - this.blocks.push(block); -}; - -jasmine.Queue.prototype.insertNext = function(block) { - this.blocks.splice((this.index + this.offset + 1), 0, block); - this.offset++; -}; - -jasmine.Queue.prototype.start = function(onComplete) { - this.running = true; - this.onComplete = onComplete; - this.next_(); -}; - -jasmine.Queue.prototype.isRunning = function() { - return this.running; -}; - -jasmine.Queue.LOOP_DONT_RECURSE = true; - -jasmine.Queue.prototype.next_ = function() { - var self = this; - var goAgain = true; - - while (goAgain) { - goAgain = false; - - if (self.index < self.blocks.length && !this.abort) { - var calledSynchronously = true; - var completedSynchronously = false; - - var onComplete = function () { - if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) { - completedSynchronously = true; - return; - } - - if (self.blocks[self.index].abort) { - self.abort = true; - } - - self.offset = 0; - self.index++; - - var now = new Date().getTime(); - if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) { - self.env.lastUpdate = now; - self.env.setTimeout(function() { - self.next_(); - }, 0); - } else { - if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) { - goAgain = true; - } else { - self.next_(); - } - } - }; - self.blocks[self.index].execute(onComplete); - - calledSynchronously = false; - if (completedSynchronously) { - onComplete(); - } - - } else { - self.running = false; - if (self.onComplete) { - self.onComplete(); - } - } - } -}; - -jasmine.Queue.prototype.results = function() { - var results = new jasmine.NestedResults(); - for (var i = 0; i < this.blocks.length; i++) { - if (this.blocks[i].results) { - results.addResult(this.blocks[i].results()); - } - } - return results; -}; - - -/** - * Runner - * - * @constructor - * @param {jasmine.Env} env - */ -jasmine.Runner = function(env) { - var self = this; - self.env = env; - self.queue = new jasmine.Queue(env); - self.before_ = []; - self.after_ = []; - self.suites_ = []; -}; - -jasmine.Runner.prototype.execute = function() { - var self = this; - if (self.env.reporter.reportRunnerStarting) { - self.env.reporter.reportRunnerStarting(this); - } - self.queue.start(function () { - self.finishCallback(); - }); -}; - -jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) { - beforeEachFunction.typeName = 'beforeEach'; - this.before_.splice(0,0,beforeEachFunction); -}; - -jasmine.Runner.prototype.afterEach = function(afterEachFunction) { - afterEachFunction.typeName = 'afterEach'; - this.after_.splice(0,0,afterEachFunction); -}; - - -jasmine.Runner.prototype.finishCallback = function() { - this.env.reporter.reportRunnerResults(this); -}; - -jasmine.Runner.prototype.addSuite = function(suite) { - this.suites_.push(suite); -}; - -jasmine.Runner.prototype.add = function(block) { - if (block instanceof jasmine.Suite) { - this.addSuite(block); - } - this.queue.add(block); -}; - -jasmine.Runner.prototype.specs = function () { - var suites = this.suites(); - var specs = []; - for (var i = 0; i < suites.length; i++) { - specs = specs.concat(suites[i].specs()); - } - return specs; -}; - -jasmine.Runner.prototype.suites = function() { - return this.suites_; -}; - -jasmine.Runner.prototype.topLevelSuites = function() { - var topLevelSuites = []; - for (var i = 0; i < this.suites_.length; i++) { - if (!this.suites_[i].parentSuite) { - topLevelSuites.push(this.suites_[i]); - } - } - return topLevelSuites; -}; - -jasmine.Runner.prototype.results = function() { - return this.queue.results(); -}; -/** - * Internal representation of a Jasmine specification, or test. - * - * @constructor - * @param {jasmine.Env} env - * @param {jasmine.Suite} suite - * @param {String} description - */ -jasmine.Spec = function(env, suite, description) { - if (!env) { - throw new Error('jasmine.Env() required'); - } - if (!suite) { - throw new Error('jasmine.Suite() required'); - } - var spec = this; - spec.id = env.nextSpecId ? env.nextSpecId() : null; - spec.env = env; - spec.suite = suite; - spec.description = description; - spec.queue = new jasmine.Queue(env); - - spec.afterCallbacks = []; - spec.spies_ = []; - - spec.results_ = new jasmine.NestedResults(); - spec.results_.description = description; - spec.matchersClass = null; -}; - -jasmine.Spec.prototype.getFullName = function() { - return this.suite.getFullName() + ' ' + this.description + '.'; -}; - - -jasmine.Spec.prototype.results = function() { - return this.results_; -}; - -/** - * All parameters are pretty-printed and concatenated together, then written to the spec's output. - * - * Be careful not to leave calls to jasmine.log in production code. - */ -jasmine.Spec.prototype.log = function() { - return this.results_.log(arguments); -}; - -jasmine.Spec.prototype.runs = function (func) { - var block = new jasmine.Block(this.env, func, this); - this.addToQueue(block); - return this; -}; - -jasmine.Spec.prototype.addToQueue = function (block) { - if (this.queue.isRunning()) { - this.queue.insertNext(block); - } else { - this.queue.add(block); - } -}; - -/** - * @param {jasmine.ExpectationResult} result - */ -jasmine.Spec.prototype.addMatcherResult = function(result) { - this.results_.addResult(result); -}; - -jasmine.Spec.prototype.expect = function(actual) { - var positive = new (this.getMatchersClass_())(this.env, actual, this); - positive.not = new (this.getMatchersClass_())(this.env, actual, this, true); - return positive; -}; - -/** - * Waits a fixed time period before moving to the next block. - * - * @deprecated Use waitsFor() instead - * @param {Number} timeout milliseconds to wait - */ -jasmine.Spec.prototype.waits = function(timeout) { - var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this); - this.addToQueue(waitsFunc); - return this; -}; - -/** - * Waits for the latchFunction to return true before proceeding to the next block. - * - * @param {Function} latchFunction - * @param {String} optional_timeoutMessage - * @param {Number} optional_timeout - */ -jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) { - var latchFunction_ = null; - var optional_timeoutMessage_ = null; - var optional_timeout_ = null; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - switch (typeof arg) { - case 'function': - latchFunction_ = arg; - break; - case 'string': - optional_timeoutMessage_ = arg; - break; - case 'number': - optional_timeout_ = arg; - break; - } - } - - var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this); - this.addToQueue(waitsForFunc); - return this; -}; - -jasmine.Spec.prototype.fail = function (e) { - var expectationResult = new jasmine.ExpectationResult({ - passed: false, - message: e ? jasmine.util.formatException(e) : 'Exception', - trace: { stack: e.stack } - }); - this.results_.addResult(expectationResult); -}; - -jasmine.Spec.prototype.getMatchersClass_ = function() { - return this.matchersClass || this.env.matchersClass; -}; - -jasmine.Spec.prototype.addMatchers = function(matchersPrototype) { - var parent = this.getMatchersClass_(); - var newMatchersClass = function() { - parent.apply(this, arguments); - }; - jasmine.util.inherit(newMatchersClass, parent); - jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass); - this.matchersClass = newMatchersClass; -}; - -jasmine.Spec.prototype.finishCallback = function() { - this.env.reporter.reportSpecResults(this); -}; - -jasmine.Spec.prototype.finish = function(onComplete) { - this.removeAllSpies(); - this.finishCallback(); - if (onComplete) { - onComplete(); - } -}; - -jasmine.Spec.prototype.after = function(doAfter) { - if (this.queue.isRunning()) { - this.queue.add(new jasmine.Block(this.env, doAfter, this)); - } else { - this.afterCallbacks.unshift(doAfter); - } -}; - -jasmine.Spec.prototype.execute = function(onComplete) { - var spec = this; - if (!spec.env.specFilter(spec)) { - spec.results_.skipped = true; - spec.finish(onComplete); - return; - } - - this.env.reporter.reportSpecStarting(this); - - spec.env.currentSpec = spec; - - spec.addBeforesAndAftersToQueue(); - - spec.queue.start(function () { - spec.finish(onComplete); - }); -}; - -jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() { - var runner = this.env.currentRunner(); - var i; - - for (var suite = this.suite; suite; suite = suite.parentSuite) { - for (i = 0; i < suite.before_.length; i++) { - this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this)); - } - } - for (i = 0; i < runner.before_.length; i++) { - this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this)); - } - for (i = 0; i < this.afterCallbacks.length; i++) { - this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this)); - } - for (suite = this.suite; suite; suite = suite.parentSuite) { - for (i = 0; i < suite.after_.length; i++) { - this.queue.add(new jasmine.Block(this.env, suite.after_[i], this)); - } - } - for (i = 0; i < runner.after_.length; i++) { - this.queue.add(new jasmine.Block(this.env, runner.after_[i], this)); - } -}; - -jasmine.Spec.prototype.explodes = function() { - throw 'explodes function should not have been called'; -}; - -jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) { - if (obj == jasmine.undefined) { - throw "spyOn could not find an object to spy upon for " + methodName + "()"; - } - - if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) { - throw methodName + '() method does not exist'; - } - - if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) { - throw new Error(methodName + ' has already been spied upon'); - } - - var spyObj = jasmine.createSpy(methodName); - - this.spies_.push(spyObj); - spyObj.baseObj = obj; - spyObj.methodName = methodName; - spyObj.originalValue = obj[methodName]; - - obj[methodName] = spyObj; - - return spyObj; -}; - -jasmine.Spec.prototype.removeAllSpies = function() { - for (var i = 0; i < this.spies_.length; i++) { - var spy = this.spies_[i]; - spy.baseObj[spy.methodName] = spy.originalValue; - } - this.spies_ = []; -}; - -/** - * Internal representation of a Jasmine suite. - * - * @constructor - * @param {jasmine.Env} env - * @param {String} description - * @param {Function} specDefinitions - * @param {jasmine.Suite} parentSuite - */ -jasmine.Suite = function(env, description, specDefinitions, parentSuite) { - var self = this; - self.id = env.nextSuiteId ? env.nextSuiteId() : null; - self.description = description; - self.queue = new jasmine.Queue(env); - self.parentSuite = parentSuite; - self.env = env; - self.before_ = []; - self.after_ = []; - self.children_ = []; - self.suites_ = []; - self.specs_ = []; -}; - -jasmine.Suite.prototype.getFullName = function() { - var fullName = this.description; - for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) { - fullName = parentSuite.description + ' ' + fullName; - } - return fullName; -}; - -jasmine.Suite.prototype.finish = function(onComplete) { - this.env.reporter.reportSuiteResults(this); - this.finished = true; - if (typeof(onComplete) == 'function') { - onComplete(); - } -}; - -jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) { - beforeEachFunction.typeName = 'beforeEach'; - this.before_.unshift(beforeEachFunction); -}; - -jasmine.Suite.prototype.afterEach = function(afterEachFunction) { - afterEachFunction.typeName = 'afterEach'; - this.after_.unshift(afterEachFunction); -}; - -jasmine.Suite.prototype.results = function() { - return this.queue.results(); -}; - -jasmine.Suite.prototype.add = function(suiteOrSpec) { - this.children_.push(suiteOrSpec); - if (suiteOrSpec instanceof jasmine.Suite) { - this.suites_.push(suiteOrSpec); - this.env.currentRunner().addSuite(suiteOrSpec); - } else { - this.specs_.push(suiteOrSpec); - } - this.queue.add(suiteOrSpec); -}; - -jasmine.Suite.prototype.specs = function() { - return this.specs_; -}; - -jasmine.Suite.prototype.suites = function() { - return this.suites_; -}; - -jasmine.Suite.prototype.children = function() { - return this.children_; -}; - -jasmine.Suite.prototype.execute = function(onComplete) { - var self = this; - this.queue.start(function () { - self.finish(onComplete); - }); -}; -jasmine.WaitsBlock = function(env, timeout, spec) { - this.timeout = timeout; - jasmine.Block.call(this, env, null, spec); -}; - -jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block); - -jasmine.WaitsBlock.prototype.execute = function (onComplete) { - if (jasmine.VERBOSE) { - this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...'); - } - this.env.setTimeout(function () { - onComplete(); - }, this.timeout); -}; -/** - * A block which waits for some condition to become true, with timeout. - * - * @constructor - * @extends jasmine.Block - * @param {jasmine.Env} env The Jasmine environment. - * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true. - * @param {Function} latchFunction A function which returns true when the desired condition has been met. - * @param {String} message The message to display if the desired condition hasn't been met within the given time period. - * @param {jasmine.Spec} spec The Jasmine spec. - */ -jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) { - this.timeout = timeout || env.defaultTimeoutInterval; - this.latchFunction = latchFunction; - this.message = message; - this.totalTimeSpentWaitingForLatch = 0; - jasmine.Block.call(this, env, null, spec); -}; -jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block); - -jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10; - -jasmine.WaitsForBlock.prototype.execute = function(onComplete) { - if (jasmine.VERBOSE) { - this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen')); - } - var latchFunctionResult; - try { - latchFunctionResult = this.latchFunction.apply(this.spec); - } catch (e) { - this.spec.fail(e); - onComplete(); - return; - } - - if (latchFunctionResult) { - onComplete(); - } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) { - var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen'); - this.spec.fail({ - name: 'timeout', - message: message - }); - - this.abort = true; - onComplete(); - } else { - this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT; - var self = this; - this.env.setTimeout(function() { - self.execute(onComplete); - }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT); - } -}; - -jasmine.version_= { - "major": 1, - "minor": 2, - "build": 0, - "revision": 1337005947 -}; diff --git a/support/process/node_modules/yamljs/test/test.html b/support/process/node_modules/yamljs/test/test.html deleted file mode 100644 index a0381e8..0000000 --- a/support/process/node_modules/yamljs/test/test.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - Jasmine YAML tests - - - - - - - - - - - - - - - - - - - diff --git a/support/process/package.json b/support/process/package.json deleted file mode 100644 index f050c9e..0000000 --- a/support/process/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "process", - "version": "0.0.0", - "description": "Rename svg files and build YAML config for processing.", - "main": "process.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": "", - "author": "Stephen Hutchings", - "license": "BSD", - "dependencies": { - "yamljs": "~0.1.4" - } -} diff --git a/support/process/process.js b/support/process/process.js deleted file mode 100644 index f56eff6..0000000 --- a/support/process/process.js +++ /dev/null @@ -1,68 +0,0 @@ -var fs = require('fs'); -var YAML = require('yamljs'); - -// RENAME FILES TO REMOVE ILLUSTRATOR NAME PREFIX -var renameSVGFiles = function(callback) { - var svgPath = '../../src/svg'; - var textToRemove = 'typicons_'; - var SVGFiles = []; - - fs.readdir(svgPath, function(err, files){ - if (err) throw err; - - files.forEach(function(file){ - if (file == '.DS_Store') return; - - var newFile = file.replace(textToRemove, ''); - - // Save new file name - SVGFiles.push(newFile); - - fs.rename(svgPath + '/' + file, svgPath + '/' + newFile, function (err) { - if (err) throw err; - }); - }) - - // Return callback with files - callback(SVGFiles); - }) -} - -// GENERATE GLYPHS.YAML -var generateYAML = function() { - var uid = function(hyphen) { - var s4 = function() { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - }; - - var _ = hyphen ? '-' : ''; - - return s4() + s4() + _ + s4() + _ + s4() + _ + - s4() + _ + s4() + s4() + s4(); - } - - renameSVGFiles(function(names){ - var glyphs = names.map(function(name, i){ - return { - css: name.replace('.svg', ''), - code: '0x' + (parseInt('E000',16) + i).toString(16), - search: [], - uid: uid() - } - }) - - var config = YAML.load('meta.yml'); - config.glyphs = glyphs; - - var yaml = YAML.stringify(config, 10); - - fs.writeFile('../../config.yml', yaml, function(e){ - console.log('Processed ' + config.glyphs.length + ' glyphs'); - console.log('Saved ../../config.yml'); - }); - }); -} - -generateYAML(); \ No newline at end of file