license-finder-2.1.2/0000755000175000017500000000000012767430336013442 5ustar pravipravilicense-finder-2.1.2/license_finder.gemspec0000644000175000017500000000364212767430336017765 0ustar pravipravilib = File.expand_path('../lib/', __FILE__) $:.unshift lib unless $:.include?(lib) require 'license_finder/platform' require 'license_finder/version' Gem::Specification.new do |s| s.required_ruby_version = '>= 1.9.3' s.name = "license_finder" s.version = LicenseFinder::VERSION s.authors = [ "Jacob Maine", "Matthew Kane Parker", "Ian Lesperance", "David Edwards", "Paul Meskers", "Brent Wheeldon", "Trevor John", "David Tengdin", "William Ramsey", "David Dening", "Geoff Pleiss", "Mike Chinigo", "Mike Dalessio" ] s.email = ["labs-commoncode@pivotal.io"] s.homepage = "https://github.com/pivotal/LicenseFinder" s.summary = "Audit the OSS licenses of your application's dependencies." s.description = <<-DESCRIPTION LicenseFinder works with your package managers to find dependencies, detect the licenses of the packages in them, compare those licenses against a user-defined whitelist, and give you an actionable exception report. DESCRIPTION s.license = "MIT" s.add_dependency "bundler" s.add_dependency "thor" s.add_dependency "httparty" s.add_dependency "xml-simple" s.add_dependency "rubyzip" s.add_development_dependency "capybara", "~> 2.0.0" s.add_development_dependency "cocoapods", "0.34.0" if LicenseFinder::Platform.darwin? s.add_development_dependency "fakefs", "~> 0.6.7" s.add_development_dependency "pry" s.add_development_dependency "rake" s.add_development_dependency "rspec", "~> 3" s.add_development_dependency "rspec-its" s.add_development_dependency "webmock", "~> 1.13" # temporary to preserve ruby 1.9.3 support. s.add_development_dependency "mime-types", "< 3.0" s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } end license-finder-2.1.2/TODO.md0000644000175000017500000000035512767430336014534 0ustar pravipravi# immediate # architecture # renamings, etc. - classes under `package_managers` should be in a PackageManagers module - `license_names_from_standard_spec` should be the default instance method # docs - specify gradle version >= 1.8 license-finder-2.1.2/CHANGELOG.md0000644000175000017500000002535212767430336015262 0ustar pravipravi# 2.1.2 / 2016-06-10 Bugfixes: * NuGet limits its recursive search for .nupkg packages to the `vendor` subdirectory. (#228) # 2.1.1 / 2016-06-09 Features: * GoWorkspace now detects some non-standard package names with only two path parts. (#226) Bugfixes: * NuGet now appropriately returns a Pathname from #package_path (previously was a String) (#227) * NuGet now correctly chooses a directory with vendored .nupkg packages # 2.1.0 / 2016-04-01 * Features * support a `groups` in reports (#210) (Thanks, Jon Wolski!) * GoVendor and GoWorkspace define a package management tool, so they won't try to run if you don't have `go` installed * PackageManagers are not activated if the underlying package management tool isn't installed * detect GO15VENDOREXPERIMENT as evidence of a go workspace project * provide path-to-dependency in recursive mode (#193) * dedup godep dependencies (#196) * add support for MPL2 detection * detect .envrc in a parent folder (go workspaces) (#199) * miscellaneous nuget support improvements (#200, #201, #202) * miscellaneous go support improvements (#203, #204) * add support for Golang 1.5 vendoring convention (#207) * return the package manager that detected the dependency (#206) * Add support for including maven/gradle GroupIds with `--gradle-include-groups` * Godep dependencies can display the full commit SHA with `--go-full-version` * specific versions of a dependency can be approved (#183, #185). (Thanks, @ipsi!) * improved "go workspace" support by looking at git submodules. (Thanks, @jvshahid and @aminjam!) * added an "install path" field to the report output. (Thanks, @jvshahid and @aminjam!) * Licenses can be blacklisted. Dependencies which only have licenses in the blacklist will not be approved, even if someone tries. * Initial support for the Nuget package manager for .NET projects * Experimental support for `godep` projects * Experimental support for "golang workspace" projects (with .envrc) * Improved support for multi-module `gradle` projects * Gradle 2.x support (experimental) * Experimental support for "composite" projects (multiple git submodules) * Experimental support for "license diffs" between directories * Bugfixes * `rubyzip` is now correctly a runtime dependency * deep npm dependency trees no longer result in some packages having no metadata (#211) * columns fixed in "recursive mode" (#191) * gradle's use of termcaps avoided (#194) # 2.0.4 / 2015-04-16 * Features * Allow project path to be set in a command line option (Thanks, @robertclancy!) # 2.0.3 / 2015-03-18 * Bugfixes * Ignoring subdirectories of a LICENSE directory. (#143) (Thanks, @pmeskers and @yuki24!) # 2.0.2 / 2015-03-14 * Features * Show requires/required-by relationships for pip projects * Expose homepage in CSV reports * Support GPLv3 * Bugfixes * license_finder works with Python 3; #140 * For pip projects, limit output to the distributions mentioned in requirements.txt, or their dependencies, instead of all installed distributions, which may include distributions from other projects. #119 # 2.0.1 / 2015-03-02 * Features * Support for rebar projects # 2.0.0 / 2015-03-02 * Features * Stores every decision that has been made about a project's dependencies, even if a decision was later reverted. These decisions are kept in an append-only YAML file which can be considered an audit log. * Stores timestamps and other optional transactional metadata (who, why) about every kind of decision. * When needed, applies those decisions to the list of packages currently reported by the package managers. * Removed dependencies on sqlite and sequel. * The CLI never writes HTML or CSV reports to the file system, only to STDOUT. So, users have more choice over which reports to generate, when to generate them, and where to put them. See `license_finder report`. If you would like to update reports automatically (e.g., in a rake task or git hook) see this gist: https://gist.github.com/mainej/1a4d61a92234c5cebeab. * The configuration YAML file is no longer required, though it can still be useful. Most of its functionality has been moved into the decisions infrastructure, and the remaining bits can be passed as arguments to the CLI. Most users will not need these arguments. If the file is present, the CLI arguments can be omitted. The CLI no longer updates this file. * Requires pip >= 6.0 * Bugfixes * `license_finder` does not write anything to the file system, #94, #114, #117 # 1.2.1 / unreleased * Features * Can list dependencies that were added manually # 1.2 / 2014-11-10 * Features * Adding support for CocoaPods >= 0.34. (#118) * For dependencies with multiple licenses, the name of each license is listed, and if any are whitelisted, the dependency is whitelisted * Added `--debug` option when scanning, to provide details on packages, dependencies and where each license was discovered. # 1.1.1 / 2014-07-29 * Bugfixes * Process incorrectly-defined dependencies. [Original issue.](https://github.com/pivotal/LicenseFinder/issues/108) * Allow license_finder to process incorrectly-defined dependencies. # 1.0.1 / 2014-05-28 * Features * For dependencies with multiple licenses, the dependency is listed as 'multiple licenses' along with the names of each license * Added 'ignore_dependencies' config option to allow specific dependencies to be excluded from reports. * Bugfixes * Dependency reports generate when license_finder.yml updates * Dependency reports generate when config is changed through the command line # 1.0.0.1 / 2014-05-23 * Bugfixes * LicenseFinder detects its own license # 1.0.0 / 2014-04-03 * Features * When approving a license, can specify who is approving, and why. * Remove `rake license_finder` task from Rails projects. Just include 'license_finder' as a development dependency, and run `license_finder` in the shell. # 0.9.5.1 / 2014-01-30 * Features * Adds homepage for Bower, NPM, and PIP packages # 0.9.5 / 2014-01-30 * Features * Add more aliases for known licenses * Drop support for ruby 1.9.2 * Large refactoring to simply things, and make it easier to add new package managers * Bugfixes * Make node dependency json parsing more robust * Clean up directories created during test runs # 0.9.4 / 2014-01-05 * Features * Add detailed csv report * Add markdown report * Add support for "licenses" => ["license"] (npn) * Add basic bower support * Allow adding/removing multiple licenses from whitelist * Bugfixes * Use all dependencies by default for npm as bundler does # 0.9.3 / 2013-10-01 * Features * New Apache 2.0 license alias * Bugfixes * Fix problem which prevented license finder from running in rails < 3.2 # 0.9.2 / 2013-08-17 * Features * Support for python and node.js projects * Bugfixes * Fix HTML output in firefox # 0.9.1 / 2013-07-30 * Features * Projects now have a title which can be configured from CLI * JRuby officially supported. Test suite works against jruby, removed warnings * Internal clean-up of database behavior * Updated documentation with breakdown of HTML report * Bugfixes * dependencies.db is no longer modified after license_finder runs and finds no changes * Fix more CLI grammar/syntax errors * HTML report now works when served over https (PR #36 - bwalding) * dependencies.txt is now dependencies.csv (It was always a csv in spirit) # 0.9.0 / 2013-07-16 * Features * Clarify CLI options and commands in help output * Can manage whitelisted licenses from command line * Improved New BSD license detection * Bugfixes * Fix CLI grammar errors * Using license_finder in a non-RVM environment now works (Issue #35) # 0.8.2 / 2013-07-09 * Features * Switch to thor for CLI, to support future additions to CLI * Restore ability to manage (add/remove) dependencies that Bundler can't find * Can maintain ignored bundler groups from command line * Bugfixes * Fix bug preventing manual approval of child dependencies (Issue #23) * Fix issue with database URI when the absolute path to the database file contains spaces. * Upgrading from 0.7.2 no longer removes non-gem dependencies (Issue #20) # 0.8.1 / 2013-04-14 * Features * JRuby version of the gem. * Official ruby 2.0 support. * CLI interface for moving dependencies.* files to `doc/`. * Bugfixes * Fix ruby 1.9.2 support. # 0.8.0 / 2013-04-03 * Features * Add spinner to show that the binary is actually doing something. * Add action items to dependencies.html. * Add generation timestamp to dependencies.html. * Default location for dependencies.* files is now `doc/`. * Temporarily remove non-bundler (e.g. JavaScript) dependencies. This will be readded in a more sustainable way soon. * Use sqlite, not YAML, for dependencies. * Officially deprecate rake tasks. * Bugfixes * Don't blow away manually set licenses when dependencies are rescanned. * Ignore empty `readme_files` section in dependencies.yml. * Clean up HTML generation for dependencies.html. * Add an option to silence the binary's spinner so as not to fill up log files. # 0.7.2 / 2013-02-18 * Features * Dependency cleanup. # 0.7.1 / 2013-02-18 * Features * Add variants to detectable licenses. * Remove README files from data persistence. # 0.7.0 / 2012-09-25 * Features * Dependencies can be approved via CLI. * Dependencies licenses can be set via CLI. # 0.6.0 / 2012-09-15 * Features * Create a dependencies.html containing a nicely formatted version of dependencies.txt, with lots of extra information. * All rake tasks, and the binary, run the init task automatically. * Simplify dependencies.txt file since more detail can now go into dependencies.html. * Promote binary to be the default, take first steps to deprecate rake task. * Bugfixes * Fix formatting of `rake license:action_items` output. # 0.5.0 / 2012-09-12 * Features * `rake license:action_items` exits with a non-zero status if there are non-approved dependencies. * New binary, eventual replacement for rake tasks. * Initial implementation of non-gem dependencies. * Support BSD, New BSD, and Simplified BSD licenses. * Improve ruby license detection. * Add dependency's bundler group to dependencies.txt output. * Add description and summary to dependencies.txt output. * Bugfixes * Create `config/` director if it doesn't exist, don't blow up. * Better support for non-US word spellings. # 0.4.5 / 2012-09-09 * Features * Allow dependencies.* files to be written to a custom directory. * Detect LGPL licenses * Detect ISC licenses * Bugfixes * Fix blow up if there's not `ignore_groups` setting in the config file. license-finder-2.1.2/README.md0000644000175000017500000002755612767430336014740 0ustar pravipravi# License Finder [![Build Status](https://secure.travis-ci.org/pivotal/LicenseFinder.png)](http://travis-ci.org/pivotal/LicenseFinder) [![Code Climate](https://codeclimate.com/github/pivotal/LicenseFinder.png)](https://codeclimate.com/github/pivotal/LicenseFinder) LicenseFinder works with your package managers to find dependencies, detect the licenses of the packages in them, compare those licenses against a user-defined whitelist, and give you an actionable exception report. * code: https://github.com/pivotal/LicenseFinder * support: * license-finder@googlegroups.com * https://groups.google.com/forum/#!forum/license-finder * backlog: https://www.pivotaltracker.com/s/projects/234851 ### Supported project types * Ruby Gems (via `bundler`) * Python Eggs (via `pip`) * Node.js (via `npm`) * Bower * Nuget (without license discovery) * Godep * Go workspace (via a `.envrc` file) * Go submodules * Java (via `maven`) * Java (via `gradle`) ### Experimental project types * Erlang (via `rebar`) * Objective-C (+ CocoaPods) ## Installation License Finder requires Ruby 1.9.3 or greater to run. If you have an older version of Ruby installed, you can update via Homebrew: ```sh $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ``` then: ```sh $ brew install ruby ``` The easiest way to use `license_finder` is to install it as a command line tool, like brew, awk, gem or bundler: ```sh $ gem install license_finder ``` Though it's less preferable, if you are using bundler in a Ruby project, you can add `license_finder` to your Gemfile: ```ruby gem 'license_finder', :group => :development ``` This approach helps you remember to install `license_finder`, but can pull in unwanted dependencies, including `bundler`. To mitigate this problem, see [Excluding Dependencies](#excluding-dependencies). ## Usage Make sure your dependencies are installed (with your package manager's install command: `bundle install`, `npm install`, etc.) The first time you run `license_finder` it will list all your project's packages. ```sh $ license_finder ``` Or, if you installed with bundler: ```sh $ bundle exec license_finder ``` The output will report that none of your packages have been approved. Over time you will tell `license_finder` which packages are approved, so when you run this command in the future, it will report current action items; i.e., packages that are new or have never been approved. If you don't wish to see progressive output "dots", use the `--quiet` option. If you'd like to see debugging output, use the `--debug` option. `license_finder` will then output info about packages, their dependencies, and where and how each license was discovered. This can be useful when you need to track down an unexpected package or license. Run `license_finder help` to see other available commands, and `license_finder help [COMMAND]` for detailed help on a specific command. ### Activation `license_finder` will find and include packages for all supported languages, as long as that language has a package definition in the project directory: * `Gemfile` (for `bundler`) * `requirements.txt` (for `pip`) * `package.json` (for `npm`) * `pom.xml` (for `maven`) * `build.gradle` (for `gradle`) * `bower.json` (for `bower`) * `Podfile` (for CocoaPods) * `rebar.config` (for `rebar`) * `packages/` directory (for `Nuget`) ### Continuous Integration `license_finder` will return a non-zero exit status if there are unapproved dependencies. This can be useful for inclusion in a CI environment to alert you if someone adds an unapproved dependency to the project. ## Approving Dependencies `license_finder` will inform you whenever you have an unapproved dependency. If your business decides this is an acceptable risk, the easiest way to approve the dependency is by running `license_finder approval add`. For example, let's assume you've added the `awesome_gpl_gem` to your Gemfile, which `license_finder` reports is unapproved: ```sh $ license_finder Dependencies that need approval: awesome_gpl_gem, 1.0.0, GPL ``` Your business tells you that in this case, it's acceptable to use this gem. You now run: ```sh $ license_finder approval add awesome_gpl_gem ``` If you rerun `license_finder`, you should no longer see `awesome_gpl_gem` in the output. To record who approved the dependency and why: ```sh $ license_finder approval add awesome_gpl_gem --who CTO --why "Go ahead" ``` ### Whitelisting Approving packages one-by-one can be tedious. Usually your business has blanket policies about which packages are approved. To tell `license_finder` that any package with the MIT license should be approved, run: ``` sh $ license_finder whitelist add MIT ``` Any current or future packages with the MIT license will be excluded from the output of `license_finder`. You can also record `--who` and `--why` when changing the whitelist, or making any other decision about your project. ## Output and Artifacts ### Decisions file Any decisions you make about approvals will be recorded in a YAML file named `doc/dependency_decisions.yml`. This file must be committed to version control. Rarely, you will have to manually resolve conflicts in it. In this situation, keep in mind that each decision has an associated timestamp, and the decisions are processed top-to-bottom, with later decisions overwriting or appending to earlier decisions. ### Output from `action_items` You could expect `license_finder`, which is an alias for `license_finder action_items` to output something like the following on a Rails project where MIT had been whitelisted: ``` Dependencies that need approval: highline, 1.6.14, ruby json, 1.7.5, ruby mime-types, 1.19, ruby rails, 3.2.8, unknown rdoc, 3.12, unknown rubyzip, 0.9.9, ruby xml-simple, 1.1.1, unknown ``` You can customize the format of the output in the same way that you customize [output from `report`](#output-from-report). ### Output from `report` The `license_finder report` command will output human-readable reports that you could send to your non-technical business partners, lawyers, etc. You can choose the format of the report (text, csv, html or markdown); see `license_finder --help report` for details. The output is sent to STDOUT, so you can save the reports wherever you want them. You can commit them to version control if you like. The HTML report generated by `license_finder report --format html` summarizes all of your project's dependencies and includes information about which need to be approved. The project name at the top of the report can be set with `license_finder project_name add`. See [CONTRIBUTING.md](https://github.com/pivotal/LicenseFinder/blob/master/CONTRIBUTING.md#adding-reports) for advice about adding and customizing reports. ## Manual Intervention ### Setting Licenses When `license_finder` reports that a dependency's license is 'unknown', you should manually research what the actual license is. When you have established the real license, you can record it with: ```sh $ license_finder licenses add my_unknown_dependency MIT ``` This command would assign the MIT license to the dependency `my_unknown_dependency`. ### Adding Hidden Dependencies `license_finder` can track dependencies that your package managers don't know about (JS libraries that don't appear in your Gemfile/requirements.txt/package.json, etc.) ```sh $ license_finder dependencies add my_js_dep MIT 0.1.2 ``` Run `license_finder dependencies help` for additional documentation about managing these dependencies. `license_finder` cannot automatically detect when one of these dependencies has been removed from your project, so you can use: ```sh $ license_finder dependencies remove my_js_dep ``` ### Excluding Dependencies Sometimes a project will have development or test dependencies which you don't want to track. You can exclude theses dependencies by running `license_finder ignored_groups`. (Currently this only works for packages managed by Bundler, NPM, and Nuget.) On rare occasions a package manager will report an individual dependency that you want to exclude from all reports, even though it is approved. You can exclude an individual dependency by running `license_finder ignored_dependencies`. Think carefully before adding dependencies to this list. A likely item to exclude is `bundler`, since it is a common dependency whose version changes from machine to machine. Adding it to the `ignored_dependencies` would prevent it (and its oscillating versions) from appearing in reports. ### Blacklisting Licenses Some projects will have a list of licenses that cannot be used. You can add these licenses to the blacklist `license_finder blacklist add`. Any dependency that has exclusively blacklisted licenses will always appear in the action items, even if someone attempts to manually approve or whitelist it. However, if a dependency has even one license outside of the blacklist, it can still be manually approved or whitelisted. ## Configuration Be default, `license_finder` expects the decisions file to be stored at `doc/dependency_decisions.yml`. All commands can be passed `--decisions_file` to override this location. ### Of Package Managers If you have a gradle project, you can invoke gradle with a custom script by passing (for example) `--gradle_command gradlew` to `license_finder` or `license_finder report`. Similarly you can invoke a custom rebar script with `--rebar_command rebar2`. If you store rebar dependencies in a custom directory (by setting `deps_dir` in `rebar.config`), set `--rebar_deps_dir`. ### Saving Configuration It may be difficult to remember to pass command line options to every command. In some of these cases you can store default values in a YAML formatted config file. `license_finder` looks for this file in `config/license_finder.yml`. As an example, the file might look like this: ```yaml --- decisions_file: './some_path/decisions.yml' gradle_command: './gradlew' rebar_command: './rebarw' rebar_deps_dir: './rebar_deps' ``` ### Gradle Projects `license_finder` supports both Gradle 1.x and Gradle 2.x. You need to have installed the license-gradle-plugin in your project: [https://github.com/hierynomus/license-gradle-plugin](https://github.com/hierynomus/license-gradle-plugin) By default, `license_finder` will report on Gradle's "runtime" dependencies. If you want to generate a report for some other dependency configuration (e.g. Android projects will sometimes specify their meaningful dependencies in the "compile" group), you can specify it in your project's `build.gradle`: ``` // Must come *after* the 'apply plugin: license' line downloadLicenses { dependencyConfiguration "compile" } ``` ### Maven Projects `license_finder` supports Maven. ## Requirements `license_finder` requires ruby >= 1.9, or jruby. ## Upgrading To upgrade from `license_finder` version 1.2 to 2.0, see [`license_finder_upgrade`](https://github.com/mainej/license_finder_upgrade). To upgrade to 2.0 from a version lower than 1.2, first upgrade to 1.2, and run `license_finder` at least once. This will ensure that the `license_finder` database is in a state which `license_finder_upgrade` understands. ## A Plea to Package Authors and Maintainers Please add a license to your package specs! Most packaging systems allow for the specification of one or more licenses. For example, Ruby Gems can specify a license by name: ```ruby Gem::Specification.new do |s| s.name = "my_great_gem" s.license = "MIT" end ``` And save a `LICENSE` file which contains your license text in your repo. ## Support * Send an email to the list: [license-finder@googlegroups.com](license-finder@googlegroups.com) * View the project backlog at Pivotal Tracker: [https://www.pivotaltracker.com/s/projects/234851](https://www.pivotaltracker.com/s/projects/234851) ## Contributing See [CONTRIBUTING.md](https://github.com/pivotal/LicenseFinder/blob/master/CONTRIBUTING.md). ## License LicenseFinder is released under the MIT License. http://www.opensource.org/licenses/mit-license license-finder-2.1.2/.force-build0000644000175000017500000000000012767430336015624 0ustar pravipravilicense-finder-2.1.2/lib/0000755000175000017500000000000012767430336014210 5ustar pravipravilicense-finder-2.1.2/lib/license_finder.rb0000644000175000017500000000034612767430336017511 0ustar pravipravirequire 'pathname' require 'yaml' module LicenseFinder ROOT_PATH = Pathname.new(__FILE__).dirname.join("license_finder") BIN_PATH = ROOT_PATH.join("../../bin") end require 'license_finder/core' require 'license_finder/cli' license-finder-2.1.2/lib/license_finder/0000755000175000017500000000000012767430336017161 5ustar pravipravilicense-finder-2.1.2/lib/license_finder/cli/0000755000175000017500000000000012767430336017730 5ustar pravipravilicense-finder-2.1.2/lib/license_finder/cli/whitelist.rb0000644000175000017500000000164012767430336022272 0ustar pravipravimodule LicenseFinder module CLI class Whitelist < Base extend Subcommand include MakesDecisions desc "list", "List all the whitelisted licenses" def list say "Whitelisted Licenses:", :blue say_each(decisions.whitelisted) { |license| license.name } end auditable desc "add LICENSE...", "Add one or more licenses to the whitelist" def add(*licenses) assert_some licenses modifying { licenses.each { |l| decisions.whitelist(l, txn) } } say "Added #{licenses.join(", ")} to the license whitelist" end auditable desc "remove LICENSE...", "Remove one or more licenses from the whitelist" def remove(*licenses) assert_some licenses modifying { licenses.each { |l| decisions.unwhitelist(l, txn) } } say "Removed #{licenses.join(", ")} from the license whitelist" end end end end license-finder-2.1.2/lib/license_finder/cli/makes_decisions.rb0000644000175000017500000000135412767430336023420 0ustar pravipravimodule LicenseFinder module CLI module MakesDecisions def self.included(mod) mod.extend(ClassMethods) end module ClassMethods def auditable method_option :who, desc: "The person making this decision" method_option :why, desc: "The reason for making this decision" method_option :version, desc: 'The version that will be approved' end end private def txn @txn ||= { who: options[:who], why: options[:why], versions: options[:version] ? [options[:version]] : [], when: Time.now.getutc } end def modifying(&block) license_finder.modifying(&block) end end end end license-finder-2.1.2/lib/license_finder/cli/project_name.rb0000644000175000017500000000122512767430336022723 0ustar pravipravimodule LicenseFinder module CLI class ProjectName < Base extend Subcommand include MakesDecisions desc "show", "Show the project name" def show say "Project Name:", :blue say decisions.project_name end auditable desc "add NAME", "Set the project name" def add(name) modifying { decisions.name_project(name, txn) } say "Set the project name to #{name}", :green end auditable desc "remove", "Remove the project name" def remove modifying { decisions.unname_project(txn) } say "Removed the project name" end end end end license-finder-2.1.2/lib/license_finder/cli/base.rb0000644000175000017500000000323712767430336021174 0ustar pravipravirequire 'thor' module LicenseFinder module CLI class Base < Thor class_option :project_path, desc: "Path to the project. Defaults to current working directory." class_option :decisions_file, desc: "Where decisions are saved. Defaults to doc/dependency_decisions.yml." no_commands do def decisions license_finder.decisions end end private def license_finder @lf ||= LicenseFinder::Core.new(license_finder_config) fail "Project path '#{@lf.config.project_path}' does not exist!" unless @lf.config.valid_project_path? @lf end def fail(message) say message and exit 1 end def license_finder_config extract_options( :project_path, :decisions_file, :go_full_version, :gradle_command, :gradle_include_groups, :rebar_command, :rebar_deps_dir, :save ).merge( logger: logger_config ) end def logger_config @logger_config ||= extract_options(:quiet, :debug) end def say_each(coll) if coll.any? coll.each do |item| say(block_given? ? yield(item) : item) end else say '(none)' end end def assert_some(things) unless things.any? raise ArgumentError, "wrong number of arguments (0 for 1+)", caller end end def extract_options(*keys) result = {} keys.each do |key| result[key.to_sym] = options[key.to_s] if options.has_key? key.to_s end result end end end end license-finder-2.1.2/lib/license_finder/cli/ignored_groups.rb0000644000175000017500000000133212767430336023302 0ustar pravipravimodule LicenseFinder module CLI class IgnoredGroups < Base extend Subcommand include MakesDecisions desc "list", "List all the ignored groups" def list say "Ignored Groups:", :blue say_each(decisions.ignored_groups) end auditable desc "add GROUP", "Add a group to be ignored" def add(group) modifying { decisions.ignore_group(group, txn) } say "Added #{group} to the ignored groups" end auditable desc "remove GROUP", "Remove a group from the ignored groups" def remove(group) modifying { decisions.heed_group(group, txn) } say "Removed #{group} from the ignored groups" end end end end license-finder-2.1.2/lib/license_finder/cli/licenses.rb0000644000175000017500000000127212767430336022064 0ustar pravipravimodule LicenseFinder module CLI class Licenses < Base extend Subcommand include MakesDecisions auditable desc "add DEPENDENCY LICENSE", "Set a dependency's licenses, overwriting any license_finder has found" def add(name, license) modifying { decisions.license(name, license, txn) } say "The #{name} dependency has been marked as using #{license} license!", :green end auditable desc "remove DEPENDENCY LICENSE", "Remove a manually set license" def remove(dep, lic) modifying { decisions.unlicense(dep, lic, txn) } say "The dependency #{dep} no longer has a manual license" end end end end license-finder-2.1.2/lib/license_finder/cli/ignored_dependencies.rb0000644000175000017500000000136312767430336024415 0ustar pravipravimodule LicenseFinder module CLI class IgnoredDependencies < Base extend Subcommand include MakesDecisions desc "list", "List all the ignored dependencies" def list say "Ignored Dependencies:", :blue say_each(decisions.ignored) end auditable desc "add DEPENDENCY", "Add a dependency to be ignored" def add(dep) modifying { decisions.ignore(dep, txn) } say "Added #{dep} to the ignored dependencies" end auditable desc "remove DEPENDENCY", "Remove a dependency from the ignored dependencies" def remove(dep) modifying { decisions.heed(dep, txn) } say "Removed #{dep} from the ignored dependencies" end end end end license-finder-2.1.2/lib/license_finder/cli/dependencies.rb0000644000175000017500000000242412767430336022705 0ustar pravipravimodule LicenseFinder module CLI class Dependencies < Base extend Subcommand include MakesDecisions method_option :approve, type: :boolean, desc: "Approve the added dependency" auditable desc "add DEPENDENCY LICENSE [VERSION] [--approve]", "Add a dependency that is not managed by a package manager, optionally approving it at the same time" def add(name, license, version = nil) modifying { decisions .add_package(name, version, txn) .license(name, license, txn) decisions.approve(name, txn) if options[:approve] } if options[:approve] say "The #{name} dependency has been added and approved!", :green else say "The #{name} dependency has been added!", :green end end auditable desc "remove DEPENDENCY", "Remove a dependency that is not managed by a package manager" def remove(name) modifying { decisions.remove_package(name, txn) } say "The #{name} dependency has been removed.", :green end desc "list", "List manually added dependencies" def list say "Manually Added Dependencies:", :blue say_each(decisions.packages) { |package| package.name } end end end end license-finder-2.1.2/lib/license_finder/cli/blacklist.rb0000644000175000017500000000164012767430336022226 0ustar pravipravimodule LicenseFinder module CLI class Blacklist < Base extend Subcommand include MakesDecisions desc "list", "List all the blacklisted licenses" def list say "Blacklisted Licenses:", :blue say_each(decisions.blacklisted) { |license| license.name } end auditable desc "add LICENSE...", "Add one or more licenses to the blacklist" def add(*licenses) assert_some licenses modifying { licenses.each { |l| decisions.blacklist(l, txn) } } say "Added #{licenses.join(", ")} to the license blacklist" end auditable desc "remove LICENSE...", "Remove one or more licenses from the blacklist" def remove(*licenses) assert_some licenses modifying { licenses.each { |l| decisions.unblacklist(l, txn) } } say "Removed #{licenses.join(", ")} from the license blacklist" end end end end license-finder-2.1.2/lib/license_finder/cli/main.rb0000644000175000017500000001275712767430336021215 0ustar pravipravirequire 'license_finder/report' require 'license_finder/version' require 'license_finder/diff' require 'license_finder/package_delta' require 'license_finder/license_aggregator' require 'license_finder/project_finder' module LicenseFinder module CLI class Main < Base extend Rootcommand FORMATS = { 'text' => TextReport, 'html' => HtmlReport, 'markdown' => MarkdownReport, 'csv' => CsvReport } class_option :format, desc: "The desired output format.", default: 'text', enum: FORMATS.keys class_option :columns, type: :array, desc: "For CSV reports, which columns to print. Pick from: #{CsvReport::AVAILABLE_COLUMNS}", default: %w[name version licenses] class_option :save, desc: "Save report to a file. Default: 'license_report.csv' in project root.", lazy_default: "license_report" class_option :go_full_version, desc: "Whether dependency version should include full version. Only meaningful if used with a Go project. Defaults to false." class_option :gradle_include_groups, desc: "Whether dependency name should include group id. Only meaningful if used with a Java/gradle project. Defaults to false." class_option :gradle_command, desc: "Command to use when fetching gradle packages. Only meaningful if used with a Java/gradle project. Defaults to 'gradlew' / 'gradlew.bat' if the wrapper is present, otherwise to 'gradle'." class_option :rebar_command, desc: "Command to use when fetching rebar packages. Only meaningful if used with a Erlang/rebar project. Defaults to 'rebar'." class_option :rebar_deps_dir, desc: "Path to rebar dependencies directory. Only meaningful if used with a Erlang/rebar project. Defaults to 'deps'." class_option :subprojects, type: :array, desc: "Generate a single report for multiple sub-projects. Ex: --subprojects='path/to/project1', 'path/to/project2'" class_option :recursive, desc: "Recursively runs License Finder on all sub-projects." method_option :quiet, type: :boolean, desc: "silences progress report" method_option :debug, type: :boolean, desc: "emit detailed info about what LicenseFinder is doing" desc "action_items", "List unapproved dependencies (the default action for `license_finder`)" def action_items unapproved = license_finder.unapproved blacklisted = license_finder.blacklisted # Ensure to start output on a new line even with dot progress indicators. say "\n" if unapproved.empty? say "All dependencies are approved for use", :green else unless blacklisted.empty? say "Blacklisted dependencies:", :red say report_of(blacklisted) end other_unapproved = unapproved - blacklisted unless other_unapproved.empty? say "Dependencies that need approval:", :yellow say report_of(other_unapproved) end exit 1 end end default_task :action_items desc "report", "Print a report of the project's dependencies to stdout" def report logger_config[:quiet] = true subproject_paths = options[:subprojects] if subprojects? subproject_paths = ProjectFinder.new(license_finder.config.project_path).find_projects if recursive? if subproject_paths && !subproject_paths.empty? finder = LicenseAggregator.new(license_finder_config, subproject_paths) report = MergedReport.new(finder.dependencies, options) else report = report_of(license_finder.acknowledged) end save? ? save_report(report, options[:save]) : say(report) end desc "version", "Print the version of LicenseFinder" def version puts LicenseFinder::VERSION end desc "diff OLDFILE NEWFILE", "Command to view the differences between two generated reports (csv)." def diff(file1, file2) f1 = IO.read(file1) f2 = IO.read(file2) report = DiffReport.new(Diff.compare(f1, f2)) save? ? save_report(report, options[:save]) : say(report) end subcommand "dependencies", Dependencies, "Add or remove dependencies that your package managers are not aware of" subcommand "licenses", Licenses, "Set a dependency's licenses, if the licenses found by license_finder are missing or wrong" subcommand "approvals", Approvals, "Manually approve dependencies, even if their licenses are not whitelisted" subcommand "ignored_groups", IgnoredGroups, "Exclude test and development dependencies from action items and reports" subcommand "ignored_dependencies", IgnoredDependencies, "Exclude individual dependencies from action items and reports" subcommand "whitelist", Whitelist, "Automatically approve any dependency that has a whitelisted license" subcommand "blacklist", Blacklist, "Forbid approval of any dependency whose licenses are all blacklisted" subcommand "project_name", ProjectName, "Set the project name, for display in reports" private def save_report(content, file_name) File.open(file_name, 'w') do |f| f.write(content) end end def report_of(content) report = FORMATS[options[:format]] report.of(content, columns: options[:columns], project_name: license_finder.project_name) end def save? !!options[:save] end def recursive? !!options[:recursive] end def subprojects? !!options[:subprojects] end end end end license-finder-2.1.2/lib/license_finder/cli/patched_thor.rb0000644000175000017500000000210212767430336022714 0ustar pravipravimodule LicenseFinder module CLI module Rootcommand # Helper to auto-generate the documentation for a group of commands def subcommand(namespace, klass, namespace_description) description = "#{namespace} [#{(klass.tasks.keys - ["help"]).join("|")}]" desc description, "#{namespace_description} - see `license_finder #{namespace} help` for more information" super namespace, klass end end # Thor fix for `license_finder help ` module Subcommand # Hack to override the help message produced by Thor. # https://github.com/wycats/thor/issues/261#issuecomment-16880836 def banner(command, namespace = nil, subcommand = nil) "#{basename} #{underscore_name(name)} #{command.usage}" end protected def underscore_name(name) underscored = name.split("::").last underscored.gsub!(/([A-Z]+)([A-Z][a-z])/,'\1_\2') underscored.gsub!(/([a-z\d])([A-Z])/,'\1_\2') underscored.tr!("-", "_") underscored.downcase end end end end license-finder-2.1.2/lib/license_finder/cli/approvals.rb0000644000175000017500000000122312767430336022262 0ustar pravipravimodule LicenseFinder module CLI class Approvals < Base extend Subcommand include MakesDecisions auditable desc "add DEPENDENCY...", "Approve one or more dependencies by name" def add(*names) assert_some names modifying { names.each { |name| decisions.approve(name, txn) } } say "The #{names.join(", ")} dependency has been approved!", :green end auditable desc "remove DEPENDENCY", "Unapprove a dependency" def remove(dep) modifying { decisions.unapprove(dep, txn) } say "The dependency #{dep} no longer has a manual approval" end end end end license-finder-2.1.2/lib/license_finder/package_manager.rb0000644000175000017500000000556312767430336022604 0ustar pravipravimodule LicenseFinder # Super-class for the different package managers # (Bundler, NPM, Pip, etc.) # # For guidance on adding a new package manager use the shared behavior # # it_behaves_like "a PackageManager" # # Additional guidelines are: # # - implement #current_packages, to return a list of `Package`s this package manager is tracking # - implement #package_path, a `Pathname` which, if the file exists, indicates the package manager is in use on this project # class PackageManager def self.package_managers [GoDep, GoWorkspace, GoVendor, Bundler, NPM, Pip, Bower, Maven, Gradle, CocoaPods, Rebar, Nuget] end def self.current_packages(options) active_package_managers = package_managers .map { |pm| pm.new(options) } .select(&:active?) active_package_managers.flat_map(&:current_packages_with_relations) end def self.installed?(logger=Core.default_logger) if package_management_command.nil? logger.installed self, "no command defined" # TODO comment me out return true end if command_exists?(package_management_command) logger.installed self, true return true end logger.installed self, false return false end def self.package_management_command nil end def initialize options={} @logger = options[:logger] || Core.default_logger @project_path = options[:project_path] end def active? self.class.installed?(logger) && package_path.exist?.tap { |is_active| logger.active self.class, is_active } end def capture(command) [`#{command}`, $?.success?] end def current_packages_with_relations packages = current_packages packages.each do |parent| parent.children.each do |child_name| child = packages.detect { |child| child.name == child_name } child.parents << parent.name if child end end packages end def self.command_exists? command if LicenseFinder::Platform.windows? `where #{command} 2>NUL` else `which #{command} 2>/dev/null` end status = $? return status.success? end private attr_reader :logger, :project_path end end require 'license_finder/package_managers/bower' require 'license_finder/package_managers/go_workspace' require 'license_finder/package_managers/go_vendor' require 'license_finder/package_managers/go_dep' require 'license_finder/package_managers/bundler' require 'license_finder/package_managers/npm' require 'license_finder/package_managers/pip' require 'license_finder/package_managers/maven' require 'license_finder/package_managers/cocoa_pods' require 'license_finder/package_managers/gradle' require 'license_finder/package_managers/rebar' require 'license_finder/package_managers/nuget' require 'license_finder/package' license-finder-2.1.2/lib/license_finder/report.rb0000644000175000017500000000127512767430336021026 0ustar pravipravimodule LicenseFinder class Report def self.of(dependencies, options) new(dependencies, options).to_s end def initialize(dependencies, options) @dependencies = dependencies @project_name = options[:project_name] end private attr_reader :dependencies, :project_name def sorted_dependencies dependencies.sort end end end require 'license_finder/reports/erb_report' require 'license_finder/reports/csv_report' require 'license_finder/reports/text_report' require 'license_finder/reports/diff_report' require 'license_finder/reports/merged_report' require 'license_finder/reports/html_report' require 'license_finder/reports/markdown_report' license-finder-2.1.2/lib/license_finder/license.rb0000644000175000017500000000275312767430336021137 0ustar pravipravirequire "license_finder/license/text" require "license_finder/license/template" require "license_finder/license/matcher" require "license_finder/license/header_matcher" require "license_finder/license/any_matcher" require "license_finder/license/none_matcher" require "license_finder/license/definitions" module LicenseFinder class License class << self def all @all ||= Definitions.all end def find_by_name(name) name ||= "unknown" all.detect { |l| l.matches_name? name } || Definitions.build_unrecognized(name) end def find_by_text(text) all.detect { |l| l.matches_text? text } end end def initialize(settings) @short_name = settings.fetch(:short_name) @pretty_name = settings.fetch(:pretty_name, short_name) @other_names = settings.fetch(:other_names, []) @url = settings.fetch(:url) @matcher = settings.fetch(:matcher) { Matcher.from_template(Template.named(short_name)) } end attr_reader :url def name pretty_name end def matches_name?(name) names.map(&:downcase).include? name.to_s.downcase end def matches_text?(text) matcher.matches_text?(text) end def eql?(other) name == other.name end def hash name.hash end private attr_reader :short_name, :pretty_name, :other_names attr_reader :matcher def names ([short_name, pretty_name] + other_names).uniq end end end license-finder-2.1.2/lib/license_finder/license_aggregator.rb0000644000175000017500000000134712767430336023337 0ustar pravipravimodule LicenseFinder class LicenseAggregator def initialize(license_finder_config, subprojects) @license_finder_config = license_finder_config @subprojects = subprojects end def dependencies aggregate_packages .group_by { |package| [package.name, package.version] } .map do |_, packages| MergedPackage.new(packages[0].dependency, packages.flat_map(&:subproject_paths)) end end private def aggregate_packages @subprojects.flat_map do |project_path| finder = LicenseFinder::Core.new(@license_finder_config.merge(project_path: project_path)) finder.acknowledged.map { |dep| MergedPackage.new(dep, [project_path]) } end end end end license-finder-2.1.2/lib/license_finder/decision_applier.rb0000644000175000017500000000270112767430336023017 0ustar pravipravimodule LicenseFinder class DecisionApplier def initialize(options) @decisions = options.fetch(:decisions) @acknowledged = apply_decisions(options.fetch(:packages)) end attr_reader :acknowledged def unapproved acknowledged.reject(&:approved?) end def blacklisted acknowledged.select(&:blacklisted?) end private attr_reader :decisions def apply_decisions(system_packages) all_packages = decisions.packages + system_packages all_packages .map { |package| with_decided_licenses(package) } .map { |package| with_approval(package) } .reject { |package| ignored?(package) } end def ignored?(package) decisions.ignored?(package.name) || (package.groups.any? && package.groups.all? { |group| decisions.ignored_group?(group) }) end def with_decided_licenses(package) decisions.licenses_of(package.name).each do |license| package.decide_on_license license end package end def with_approval(package) if package.licenses.all? { |license| decisions.blacklisted?(license) } package.blacklisted! elsif decisions.approved?(package.name, package.version) package.approved_manually!(decisions.approval_of(package.name, package.version)) elsif package.licenses.any? { |license| decisions.whitelisted?(license) } package.whitelisted! end package end end end license-finder-2.1.2/lib/license_finder/packages/0000755000175000017500000000000012767430336020737 5ustar pravipravilicense-finder-2.1.2/lib/license_finder/packages/activation.rb0000644000175000017500000000133112767430336023423 0ustar pravipravimodule LicenseFinder module Activation # An Activation reports that a license has been activated for a package, and # tracks the source of that information Basic = Struct.new(:package, :license) class FromDecision < Basic def sources ["from decision"] end end class FromSpec < Basic def sources ["from spec"] end end class FromFiles < Basic def initialize(package, license, files) super(package, license) @files = files end attr_reader :files def sources files.map { |file| "from file '#{file.path}'" } end end class None < Basic def sources [] end end end end license-finder-2.1.2/lib/license_finder/packages/possible_license_file.rb0000644000175000017500000000047312767430336025611 0ustar pravipravimodule LicenseFinder class PossibleLicenseFile def initialize(path) @path = Pathname(path) end def path @path.to_s end def license License.find_by_text(text) end def text @text ||= (@path.respond_to?(:binread) ? @path.binread : @path.read) end end end license-finder-2.1.2/lib/license_finder/packages/licensing.rb0000644000175000017500000000250212767430336023236 0ustar pravipravirequire 'license_finder/packages/activation' module LicenseFinder Licensing = Struct.new(:package, :decided_licenses, :licenses_from_spec, :license_files) do # Implements the algorithm for choosing the right set of licenses from # among the various sources of licenses we know about. In order of # priority, licenses come from decisions, package specs, or package files. def activations case when activations_from_decisions.any? then activations_from_decisions when activations_from_spec.any? then activations_from_spec when activations_from_files.any? then activations_from_files else [default_activation] end end def activations_from_decisions @afd ||= decided_licenses .map { |license| Activation::FromDecision.new(package, license) } end def activations_from_spec @afs ||= licenses_from_spec .map { |license| Activation::FromSpec.new(package, license) } end def activations_from_files @aff ||= license_files .group_by(&:license) .map { |license, files| Activation::FromFiles.new(package, license, files) } end def default_activation default_license = License.find_by_name nil Activation::None.new(package, default_license) end end end license-finder-2.1.2/lib/license_finder/packages/license_files.rb0000644000175000017500000000173012767430336024071 0ustar pravipravirequire 'license_finder/packages/possible_license_file' module LicenseFinder class LicenseFiles CANDIDATE_FILE_NAMES = %w(LICENSE License Licence COPYING README Readme ReadMe) CANDIDATE_PATH_WILDCARD = "*{#{CANDIDATE_FILE_NAMES.join(',')}}*" def self.find(install_path) new(install_path).find end def initialize(install_path) @install_path = install_path ? Pathname(install_path) : nil end def find paths_of_candidate_files .map { |path| PossibleLicenseFile.new(path) } .reject { |file| file.license.nil? } end private attr_reader :install_path def paths_of_candidate_files candidate_files_and_dirs. flat_map { |path| path.directory? ? path.children : path }. reject { |path| path.directory? }. uniq end def candidate_files_and_dirs return [] if install_path.nil? Pathname.glob(install_path.join('**', CANDIDATE_PATH_WILDCARD)) end end end license-finder-2.1.2/lib/license_finder/packages/manual_package.rb0000644000175000017500000000063012767430336024213 0ustar pravipravimodule LicenseFinder class ManualPackage < Package def ==(other) eql? other end def eql?(other) name == other.name # && version.to_s == other.version.to_s # ignore version end def hash name.hash # ^ version.to_s.hash # ignore version end private def licenses_from_spec Set.new end def licenses_from_files Set.new end end end license-finder-2.1.2/lib/license_finder/decisions.rb0000644000175000017500000001120212767430336021462 0ustar pravipravimodule LicenseFinder class Decisions ###### # READ ###### attr_reader :packages, :whitelisted, :blacklisted, :ignored, :ignored_groups, :project_name def licenses_of(name) @licenses[name] end def approval_of(name, version=nil) if !@approvals.has_key?(name) nil elsif version != nil @approvals[name] if @approvals[name][:safe_versions].empty? || @approvals[name][:safe_versions].include?(version) else @approvals[name] if @approvals[name][:safe_versions].empty? end end def approved?(name, version=nil) if !@approvals.has_key?(name) nil elsif version != nil @approvals.has_key?(name) && @approvals[name][:safe_versions].empty? || @approvals[name][:safe_versions].include?(version) else @approvals.has_key?(name) end end def whitelisted?(lic) @whitelisted.include?(lic) end def blacklisted?(lic) @blacklisted.include?(lic) end def ignored?(name) @ignored.include?(name) end def ignored_group?(name) @ignored_groups.include?(name) end ####### # WRITE ####### TXN = Struct.new(:who, :why, :safe_when, :safe_versions) do def self.from_hash(txn) new(txn[:who], txn[:why], txn[:when], txn[:versions].nil? ? [] : txn[:versions]) end end def initialize @decisions = [] @packages = Set.new @licenses = Hash.new { |h, k| h[k] = Set.new } @approvals = {} @whitelisted = Set.new @blacklisted = Set.new @ignored = Set.new @ignored_groups = Set.new end def add_package(name, version, txn = {}) @decisions << [:add_package, name, version, txn] @packages << ManualPackage.new(name, version) self end def remove_package(name, txn = {}) @decisions << [:remove_package, name, txn] @packages.delete(ManualPackage.new(name)) self end def license(name, lic, txn = {}) @decisions << [:license, name, lic, txn] @licenses[name] << License.find_by_name(lic) self end def unlicense(name, lic, txn= {}) @decisions << [:unlicense, name, lic, txn] @licenses[name].delete(License.find_by_name(lic)) self end def approve(name, txn = {}) @decisions << [:approve, name, txn] versions = [] if @approvals.has_key?(name) versions = @approvals[name][:safe_versions] end @approvals[name] = TXN.from_hash(txn) @approvals[name][:safe_versions].concat(versions) self end def unapprove(name, txn = {}) @decisions << [:unapprove, name, txn] @approvals.delete(name) self end def whitelist(lic, txn = {}) @decisions << [:whitelist, lic, txn] @whitelisted << License.find_by_name(lic) self end def unwhitelist(lic, txn = {}) @decisions << [:unwhitelist, lic, txn] @whitelisted.delete(License.find_by_name(lic)) self end def blacklist(lic, txn = {}) @decisions << [:blacklist, lic, txn] @blacklisted << License.find_by_name(lic) self end def unblacklist(lic, txn = {}) @decisions << [:unblacklist, lic, txn] @blacklisted.delete(License.find_by_name(lic)) self end def ignore(name, txn = {}) @decisions << [:ignore, name, txn] @ignored << name self end def heed(name, txn = {}) @decisions << [:heed, name, txn] @ignored.delete(name) self end def ignore_group(name, txn = {}) @decisions << [:ignore_group, name, txn] @ignored_groups << name self end def heed_group(name, txn = {}) @decisions << [:heed_group, name, txn] @ignored_groups.delete(name) self end def name_project(name, txn = {}) @decisions << [:name_project, name, txn] @project_name = name self end def unname_project(txn = {}) @decisions << [:unname_project, txn] @project_name = nil self end ######### # PERSIST ######### def self.fetch_saved(file) restore(read!(file)) end def save!(file) write!(persist, file) end def self.restore(persisted) result = new return result unless persisted actions = YAML.load(persisted) (actions || []).each do |action, *args| result.send(action, *args) end result end def persist YAML.dump(@decisions) end def self.read!(file) file.read if file.exist? end def write!(value, file) file.dirname.mkpath file.open('w+') do |f| f.print value end end end end license-finder-2.1.2/lib/license_finder/project_finder.rb0000644000175000017500000000270012767430336022502 0ustar pravipravimodule LicenseFinder class ProjectFinder def initialize(main_project_path) @package_managers = LicenseFinder::PackageManager.package_managers @main_project_path = main_project_path end def find_projects project_paths = [] all_paths = find_all_paths until all_paths.empty? project_paths << collect_project_path(all_paths) all_paths.shift end project_paths.compact end def collect_project_path(all_paths) potential_project_path = all_paths.first if active_project?(potential_project_path) remove_nested(potential_project_path, all_paths) return potential_project_path.to_s end end private def find_all_paths Dir.glob("#{@main_project_path}/**/").map { |path| full_path(path) } end def remove_nested(pathname, paths) return if project_root?(pathname) paths.reject! { |path| nested_path?(path, pathname) } end def project_root?(pathname) full_path(@main_project_path).to_s == pathname.to_s end def active_project?(project_path) active_project = @package_managers.map do |pm| pm.new(project_path: project_path).active? end active_project.include?(true) end def full_path(rel_path) Pathname.new(rel_path).expand_path end def nested_path?(path, pathname) (path.to_s).start_with?(pathname.to_s) && path.to_s != pathname.to_s end end end license-finder-2.1.2/lib/license_finder/package_delta.rb0000644000175000017500000000235012767430336022252 0ustar pravipravimodule LicenseFinder class PackageDelta STATUSES = [:added, :removed, :unchanged] def initialize(status, current_package, previous_package) @status = status @current_package = current_package @previous_package = previous_package end def name pick_package.name end def current_version @current_package ? @current_package.version : nil end def previous_version @previous_package ? @previous_package.version : nil end def subproject_paths pick_package.subproject_paths end def status @status end def licenses pick_package.licenses end def merged_package? pick_package.class == MergedPackage end def method_missing(method_name) nil end def self.added(package) new(:added, package, nil) end def self.removed(package) new(:removed, nil, package) end def self.unchanged(current_package, previous_package) new(:unchanged, current_package, previous_package) end def <=>(other) STATUSES.index(status) <=> STATUSES.index(other.status) end private def pick_package @current_package ? @current_package : @previous_package end end end license-finder-2.1.2/lib/license_finder/license/0000755000175000017500000000000012767430336020603 5ustar pravipravilicense-finder-2.1.2/lib/license_finder/license/header_matcher.rb0000644000175000017500000000035112767430336024062 0ustar pravipravimodule LicenseFinder class License HeaderMatcher = Struct.new(:base_matcher) do def matches_text?(text) header = text.split("\n").first || '' base_matcher.matches_text?(header) end end end end license-finder-2.1.2/lib/license_finder/license/any_matcher.rb0000644000175000017500000000036012767430336023421 0ustar pravipravimodule LicenseFinder class License class AnyMatcher def initialize(*matchers) @matchers = matchers end def matches_text?(text) @matchers.any? { |m| m.matches_text? text } end end end end license-finder-2.1.2/lib/license_finder/license/matcher.rb0000644000175000017500000000075512767430336022562 0ustar pravipravimodule LicenseFinder class License Matcher = Struct.new(:regexp) do def self.from_template(template) from_text(template.content) end def self.from_text(text) from_regex(Text.compile_to_regex(text)) end # an alias for Matcher.new, for uniformity of constructors def self.from_regex(regexp) new(regexp) end def matches_text?(text) !!(Text.normalize_punctuation(text) =~ regexp) end end end end license-finder-2.1.2/lib/license_finder/license/templates/0000755000175000017500000000000012767430336022601 5ustar pravipravilicense-finder-2.1.2/lib/license_finder/license/templates/Ruby.txt0000644000175000017500000000437512767430336024274 0ustar pravipravi 1. You may make and give away verbatim copies of the source form of the software without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may modify your copy of the software in any way, provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or by allowing the author to include your modifications in the software. b) use the modified software only within your corporation or organization. c) give non-standard binaries non-standard names, with instructions on where to get the original software distribution. d) make other distribution arrangements with the author. 3. You may distribute the software in object code or binary form, provided that you do at least ONE of the following: a) distribute the binaries and library files of the software, together with instructions (in the manual page or equivalent) on where to get the original distribution. b) accompany the distribution with the machine-readable source of the software. c) give non-standard binaries non-standard names, with instructions on where to get the original software distribution. d) make other distribution arrangements with the author. 4. You may modify and include the part of the software into any other software (possibly commercial). But some files in the distribution are not written by the author, so that they are not under these terms. For the list of those files and their copying conditions, see the file LEGAL. 5. The scripts and library files supplied as input to or produced as output from the software do not automatically fall under the copyright of the software, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this software. 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. license-finder-2.1.2/lib/license_finder/license/templates/Apache2.txt0000644000175000017500000002343712767430336024616 0ustar pravipravi TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS license-finder-2.1.2/lib/license_finder/license/templates/LGPL.txt0000644000175000017500000001674212767430336024112 0ustar pravipravi GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.license-finder-2.1.2/lib/license_finder/license/templates/GPLv3.txt0000644000175000017500000010451212767430336024240 0ustar pravipravi GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read .license-finder-2.1.2/lib/license_finder/license/templates/GPLv2.txt0000644000175000017500000004325312767430336024243 0ustar pravipravi GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.license-finder-2.1.2/lib/license_finder/license/templates/MIT.txt0000644000175000017500000000106112767430336023771 0ustar pravipraviPermission 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. license-finder-2.1.2/lib/license_finder/license/templates/SimplifiedBSD.txt0000644000175000017500000000266112767430336025765 0ustar pravipraviRedistribution 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project. license-finder-2.1.2/lib/license_finder/license/templates/NewBSD.txt0000644000175000017500000000264012767430336024426 0ustar pravipraviRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 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. license-finder-2.1.2/lib/license_finder/license/templates/ISC.txt0000644000175000017500000000032212767430336023755 0ustar pravipraviPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. license-finder-2.1.2/lib/license_finder/license/templates/BSD.txt0000644000175000017500000000305512767430336023755 0ustar pravipraviRedistribution 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. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by . 4. Neither the name of nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY ''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 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. license-finder-2.1.2/lib/license_finder/license/templates/Python.txt0000644000175000017500000000460312767430336024626 0ustar pravipraviPYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 -------------------------------------------- 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation. 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python. 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement.license-finder-2.1.2/lib/license_finder/license/templates/MPL2.txt0000644000175000017500000004052612767430336024063 0ustar pravipraviMozilla Public License Version 2.0 ================================== 1. Definitions -------------- 1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. 1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution. 1.3. "Contribution" means Covered Software of a particular Contributor. 1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. 1.5. "Incompatible With Secondary Licenses" means (a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or (b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License. 1.6. "Executable Form" means any form of the work other than Source Code Form. 1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. 1.8. "License" means this document. 1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License. 1.10. "Modifications" means any of the following: (a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or (b) any new file in Source Code Form that contains any Covered Software. 1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version. 1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. 1.13. "Source Code Form" means the form of the work preferred for making modifications. 1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. License Grants and Conditions -------------------------------- 2.1. Grants Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: (a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and (b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version. 2.2. Effective Date The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution. 2.3. Limitations on Grant Scope The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: (a) for any code that a Contributor has removed from Covered Software; or (b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or (c) under Patent Claims infringed by Covered Software in the absence of its Contributions. This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4). 2.4. Subsequent Licenses No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3). 2.5. Representation Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License. 2.6. Fair Use This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents. 2.7. Conditions Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. 3. Responsibilities ------------------- 3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form. 3.2. Distribution of Executable Form If You distribute Covered Software in Executable Form then: (a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and (b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License. 3.3. Distribution of a Larger Work You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s). 3.4. Notices You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies. 3.5. Application of Additional Terms You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction. 4. Inability to Comply Due to Statute or Regulation --------------------------------------------------- If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Termination -------------- 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice. 5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate. 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination. ************************************************************************ * * * 6. Disclaimer of Warranty * * ------------------------- * * * * Covered Software is provided under this License on an "as is" * * basis, without warranty of any kind, either expressed, implied, or * * statutory, including, without limitation, warranties that the * * Covered Software is free of defects, merchantable, fit for a * * particular purpose or non-infringing. The entire risk as to the * * quality and performance of the Covered Software is with You. * * Should any Covered Software prove defective in any respect, You * * (not any Contributor) assume the cost of any necessary servicing, * * repair, or correction. This disclaimer of warranty constitutes an * * essential part of this License. No use of any Covered Software is * * authorized under this License except under this disclaimer. * * * ************************************************************************ ************************************************************************ * * * 7. Limitation of Liability * * -------------------------- * * * * Under no circumstances and under no legal theory, whether tort * * (including negligence), contract, or otherwise, shall any * * Contributor, or anyone who distributes Covered Software as * * permitted above, be liable to You for any direct, indirect, * * special, incidental, or consequential damages of any character * * including, without limitation, damages for lost profits, loss of * * goodwill, work stoppage, computer failure or malfunction, or any * * and all other commercial damages or losses, even if such party * * shall have been informed of the possibility of such damages. This * * limitation of liability shall not apply to liability for death or * * personal injury resulting from such party's negligence to the * * extent applicable law prohibits such limitation. Some * * jurisdictions do not allow the exclusion or limitation of * * incidental or consequential damages, so this exclusion and * * limitation may not apply to You. * * * ************************************************************************ 8. Litigation ------------- Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims. 9. Miscellaneous ---------------- This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor. 10. Versions of the License --------------------------- 10.1. New Versions Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number. 10.2. Effect of New Versions You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward. 10.3. Modified Versions If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License). 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached. Exhibit A - Source Code Form License Notice ------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership. Exhibit B - "Incompatible With Secondary Licenses" Notice --------------------------------------------------------- This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. license-finder-2.1.2/lib/license_finder/license/none_matcher.rb0000644000175000017500000000020312767430336023565 0ustar pravipravimodule LicenseFinder class License class NoneMatcher def matches_text?(text) false end end end end license-finder-2.1.2/lib/license_finder/license/text.rb0000644000175000017500000000062412767430336022116 0ustar pravipravimodule LicenseFinder class License module Text SPACES = /\s+/ QUOTES = /['`"]{1,2}/ PLACEHOLDERS = /<[^<>]+>/ def self.normalize_punctuation(text) text.gsub(SPACES, ' ') .gsub(QUOTES, '"') .strip end def self.compile_to_regex(text) Regexp.new(Regexp.escape(text).gsub(PLACEHOLDERS, '(.*)')) end end end end license-finder-2.1.2/lib/license_finder/license/definitions.rb0000644000175000017500000001241612767430336023447 0ustar pravipravimodule LicenseFinder class License module Definitions extend self def all [ apache2, bsd, gplv2, gplv3, isc, lgpl, mit, mpl2, newbsd, python, ruby, simplifiedbsd ] end def build_unrecognized(name) License.new( short_name: name, url: nil, matcher: NoneMatcher.new ) end private def apache2 License.new( short_name: "Apache2", pretty_name: "Apache 2.0", other_names: [ "Apache-2.0", "Apache Software License", "Apache License 2.0", "Apache License Version 2.0", "Apache Public License 2.0", "The Apache Software License, Version 2.0", "Apache 2", "Apache License", "Apache License, Version 2.0" ], url: "http://www.apache.org/licenses/LICENSE-2.0.txt" ) end def bsd License.new( short_name: "BSD", other_names: ["BSD4", "bsd-old", "4-clause BSD", "BSD-4-Clause", "BSD License"], url: "http://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_.28original_.22BSD_License.22.29" ) end def gplv2 License.new( short_name: "GPLv2", other_names: ["GPL V2", "gpl-v2", "GNU GENERAL PUBLIC LICENSE Version 2"], url: "http://www.gnu.org/licenses/gpl-2.0.txt" ) end def gplv3 License.new( short_name: "GPLv3", other_names: ["GPL V3", "gpl-v3", "GNU GENERAL PUBLIC LICENSE Version 3"], url: "http://www.gnu.org/licenses/gpl-3.0.txt" ) end def isc License.new( short_name: "ISC", url: "http://en.wikipedia.org/wiki/ISC_license" ) end def lgpl License.new( short_name: "LGPL", other_names: ["LGPL-3", "LGPLv3", "LGPL-3.0"], url: "http://www.gnu.org/licenses/lgpl.txt" ) end def mit url_regexp = %r{MIT Licen[sc]e.*http://(?:www\.)?opensource\.org/licenses/mit-license} header_regexp = /The MIT Licen[sc]e/ one_liner_regexp = /is released under the MIT licen[sc]e/ matcher = AnyMatcher.new( Matcher.from_template(Template.named("MIT")), Matcher.from_regex(url_regexp), HeaderMatcher.new(Matcher.from_regex(header_regexp)), Matcher.from_regex(one_liner_regexp) ) License.new( short_name: "MIT", other_names: ["Expat", "MIT license", "MIT License"], url: "http://opensource.org/licenses/mit-license", matcher: matcher ) end def mpl2 header_regexp = /Mozilla Public Licen[sc]e, version 2.0/ matcher = AnyMatcher.new( Matcher.from_template(Template.named("MPL2")), HeaderMatcher.new(Matcher.from_regex(header_regexp)) ) License.new( short_name: "MPL2", pretty_name: "Mozilla Public License 2.0", other_names: [ "MPL-2.0", "Mozilla Public License, Version 2.0" ], url: "https://www.mozilla.org/media/MPL/2.0/index.815ca599c9df.txt", matcher: matcher ) end def newbsd template = Template.named("NewBSD") alternate_content = template.content.gsub( "Neither the name of nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.", "The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission." ) matcher = AnyMatcher.new( Matcher.from_template(template), Matcher.from_text(alternate_content) ) License.new( short_name: "NewBSD", pretty_name: "New BSD", other_names: ["Modified BSD", "BSD3", "BSD-3", "3-clause BSD", "BSD-3-Clause"], url: "http://opensource.org/licenses/BSD-3-Clause", matcher: matcher ) end def python License.new( short_name: "Python", pretty_name: "Python Software Foundation License", other_names: ["PSF"], url: "http://hg.python.org/cpython/raw-file/89ce323357db/LICENSE" ) end def ruby url = "http://www.ruby-lang.org/en/LICENSE.txt" matcher = AnyMatcher.new( Matcher.from_template(Template.named("Ruby")), Matcher.from_text(url) ) License.new( short_name: "Ruby", pretty_name: "ruby", url: url, matcher: matcher ) end def simplifiedbsd License.new( short_name: "SimplifiedBSD", pretty_name: "Simplified BSD", other_names: ["FreeBSD", "2-clause BSD", "BSD-2-Clause", "BSD 2-Clause"], url: "http://opensource.org/licenses/bsd-license" ) end end end end license-finder-2.1.2/lib/license_finder/license/template.rb0000644000175000017500000000054412767430336022746 0ustar pravipravimodule LicenseFinder class License class Template TEMPLATE_PATH = ROOT_PATH.join("license", "templates") def self.named(name) new TEMPLATE_PATH.join("#{name}.txt").read end attr_reader :content def initialize(raw_content) @content = Text.normalize_punctuation(raw_content) end end end end license-finder-2.1.2/lib/license_finder/cli.rb0000644000175000017500000000103012767430336020247 0ustar pravipravimodule LicenseFinder module CLI end end require 'license_finder/cli/patched_thor' require 'license_finder/cli/base' require 'license_finder/cli/makes_decisions' require 'license_finder/cli/whitelist' require 'license_finder/cli/blacklist' require 'license_finder/cli/dependencies' require 'license_finder/cli/licenses' require 'license_finder/cli/approvals' require 'license_finder/cli/ignored_groups' require 'license_finder/cli/ignored_dependencies' require 'license_finder/cli/project_name' require 'license_finder/cli/main' license-finder-2.1.2/lib/license_finder/configuration.rb0000644000175000017500000000333612767430336022362 0ustar pravipravirequire_relative 'platform' module LicenseFinder class Configuration def self.with_optional_saved_config(primary_config) project_path = Pathname(primary_config.fetch(:project_path, Pathname.pwd)).expand_path config_file = project_path.join('config', 'license_finder.yml') saved_config = config_file.exist? ? YAML.load(config_file.read) : {} new(primary_config, saved_config) end def initialize(primary_config, saved_config) @primary_config = primary_config @saved_config = saved_config end def valid_project_path? if get(:project_path) return project_path.exist? end true end def gradle_command get(:gradle_command) || ( if Platform.windows? wrapper = 'gradlew.bat' gradle = 'gradle.bat' else wrapper = 'gradlew' gradle = 'gradle' end executable = File.exist?(wrapper) ? wrapper : gradle "#{executable} --console plain" ) end def go_full_version get(:go_full_version) end def gradle_include_groups get(:gradle_include_groups) end def rebar_command get(:rebar_command) || 'rebar' end def rebar_deps_dir path = get(:rebar_deps_dir) || 'deps' project_path.join(path).expand_path end def decisions_file_path path = get(:decisions_file) || 'doc/dependency_decisions.yml' project_path.join(path).expand_path end def project_path Pathname(path_prefix).expand_path end private attr_reader :saved_config def get(key) @primary_config[key.to_sym] || @saved_config[key.to_s] end def path_prefix get(:project_path) || '' end end end license-finder-2.1.2/lib/license_finder/logger.rb0000644000175000017500000000441212767430336020766 0ustar pravipravimodule LicenseFinder module Logger def self.new options={} klass = if options[:quiet] Quiet elsif options[:debug] Verbose else Progress end klass.new end class Base def installed package_manager, is_installed if String === is_installed log package_manager, is_installed elsif is_installed log package_manager, Logger.green("is installed") else log package_manager, Logger.red("is not installed") end end def active package_manager, is_active if is_active log package_manager, Logger.green("is active") else log package_manager, "is not active" end end def package package_manager, package dependencies = package.children if dependencies.empty? log package_manager, sprintf("package '%s' has no dependencies", package.name) else log package_manager, sprintf("package '%s' has dependencies:", package.name) dependencies.each do |dep| log package_manager, sprintf("- %s", dep) end end end def activation activation preamble = sprintf("package %s:", activation.package.name) if activation.sources.empty? log activation.package.class, sprintf("%s no licenses found", preamble) else activation.sources.each do |source| log activation.package.class, sprintf("%s found license '%s' %s", preamble, activation.license.name, source) end end end def log prefix, string raise NotImplementedError, "#log must be implemented" end end def self.green string colorize 32, string end def self.red string colorize 31, string end def self.colorize color_code, string "\e[#{color_code}m#{string}\e[0m" end class Quiet < Base def log prefix, string end end class Progress < Base def log prefix, string print(".") && $stdout.flush end end class Verbose < Base def log prefix, string printf("%s: %s\n", prefix, string) end end Default = Quiet end end license-finder-2.1.2/lib/license_finder/version.rb0000644000175000017500000000005512767430336021173 0ustar pravipravimodule LicenseFinder VERSION = "2.1.2" end license-finder-2.1.2/lib/license_finder/diff.rb0000644000175000017500000000253212767430336020420 0ustar pravipravimodule LicenseFinder class Diff def self.compare(f1, f2) p1 = Set.new(build_packages(f1)) p2 = Set.new(build_packages(f2)) added = p2.difference(p1).to_a removed = p1.difference(p2).to_a unchanged = p1.intersection(p2).to_a [].tap do |packages| unchanged.each do |package| package_previous = package_with_name(p1, package) package_current = package_with_name(p2, package) if package_current.licenses == package_previous.licenses packages << PackageDelta.unchanged(package_current, package_previous) else packages << PackageDelta.removed(package_previous) packages << PackageDelta.added(package_current) end end added.each { |package| packages << PackageDelta.added(package) } removed.each { |package| packages << PackageDelta.removed(package) } end end private def self.build_packages(content) CSV.parse(content).map do |row| row.map!(&:strip) package = Package.new(row[0], row[1], spec_licenses: [row[2]]) if row.count == 4 MergedPackage.new(package, row[3].split(',')) else package end end end def self.package_with_name(set, package) set.find { |p| p.name == package.name } end end end license-finder-2.1.2/lib/license_finder/package.rb0000644000175000017500000001045112767430336021102 0ustar pravipravirequire 'license_finder/packages/licensing' require 'license_finder/packages/license_files' module LicenseFinder # Super-class that adapts data from different package management # systems (gems, npm, pip, etc.) to a common interface. # # Guidance on adding a new system # # - subclass Package, and initialize based on the data you receive from the # package manager # - if the package specs will report license names, pass :spec_licenses in the # constructor options # - if the package's files can be searched for licenses pass :install_path in # the constructor options # - otherwise, override #licenses_from_spec or #license_files class Package attr_reader :logger def self.license_names_from_standard_spec(spec) licenses = spec["licenses"] || [spec["license"]].compact licenses = [licenses] unless licenses.is_a?(Array) licenses.map do |license| if license.is_a? Hash license["type"] else license end end end def initialize(name, version = nil, options={}) @logger = options[:logger] || Core.default_logger ## DESCRIPTION @name = name @version = version @authors = options[:authors] || "" @summary = options[:summary] || "" @description = options[:description] || "" @homepage = options[:homepage] || "" @children = options[:children] || [] @parents = Set.new # will be figured out later by package manager @groups = options[:groups] || [] ## APPROVAL @whitelisted = false @blacklisted = false @manual_approval = nil ## LICENSING @license_names_from_spec = options[:spec_licenses] || [] @install_path = options[:install_path] @missing = options[:missing] || false @decided_licenses = Set.new end ## DESCRIPTION attr_reader :name, :version, :authors, :summary, :description, :homepage, :children, :parents, :groups ## APPROVAL def approved_manually!(approval) @manual_approval = approval end def approved_manually? !@manual_approval.nil? end def approved? # Question: is `!blacklisted?` redundant? # DecisionApplier does not call `whitelisted!` or `approved_manually!` # if a Package has been blacklisted. (approved_manually? || whitelisted?) && !blacklisted? end def whitelisted! @whitelisted = true end def whitelisted? @whitelisted end def blacklisted! @blacklisted = true end def blacklisted? @blacklisted end attr_reader :manual_approval ## EQUALITY def <=>(other) name <=> other.name end def eql?(other) name == other.name end def hash [name].hash end ## LICENSING attr_reader :license_names_from_spec # stubbed in tests, otherwise private attr_reader :install_path # checked in tests, otherwise private def licenses @licenses ||= activations.map(&:license).to_set end def activations licensing.activations.tap do |activations| activations.each { |activation| logger.activation(activation) } end end def licensing Licensing.new(self, @decided_licenses, licenses_from_spec, license_files) end def decide_on_license(license) @decided_licenses << license end def licenses_from_spec license_names_from_spec .map { |name| License.find_by_name(name) } .to_set end def license_files LicenseFiles.find(install_path) end def package_manager "unknown" end def missing? @missing end end end require 'license_finder/packages/manual_package' require 'license_finder/package_managers/bower_package' require 'license_finder/package_managers/go_package' require 'license_finder/package_managers/bundler_package' require 'license_finder/package_managers/pip_package' require 'license_finder/package_managers/npm_package' require 'license_finder/package_managers/maven_package' require 'license_finder/package_managers/gradle_package' require 'license_finder/package_managers/cocoa_pods_package' require 'license_finder/package_managers/rebar_package' require 'license_finder/package_managers/merged_package' require 'license_finder/package_managers/nuget_package' license-finder-2.1.2/lib/license_finder/core.rb0000644000175000017500000000375312767430336020446 0ustar pravipravirequire 'license_finder/logger' require 'license_finder/license' require 'license_finder/configuration' require 'license_finder/package_manager' require 'license_finder/decisions' require 'license_finder/decision_applier' require 'forwardable' module LicenseFinder # Coordinates setup class Core attr_reader :config def self.default_logger Logger::Default.new end # Default +options+: # { # project_path: Pathname.pwd # logger: {}, # can include quiet: true or debug: true # decisions_file: "doc/dependency_decisions.yml", # gradle_command: "gradle", # rebar_command: "rebar", # rebar_deps_dir: "deps", # } def initialize(options = {}) @logger = Logger.new(options.fetch(:logger, {})) @config = Configuration.with_optional_saved_config(options) end def modifying yield decisions.save!(config.decisions_file_path) end extend Forwardable def_delegators :decision_applier, :acknowledged, :unapproved, :blacklisted def project_name decisions.project_name || config.project_path.basename.to_s end def decisions @decisions ||= Decisions.fetch_saved(config.decisions_file_path) end private attr_reader :logger # The core of the system. The saved decisions are applied to the current # packages. def decision_applier # lazy, do not move to `initialize` @applier ||= DecisionApplier.new(decisions: decisions, packages: current_packages) end def current_packages # lazy, do not move to `initialize` PackageManager.current_packages( logger: logger, project_path: config.project_path, ignore_groups: decisions.ignored_groups, go_full_version: config.go_full_version, gradle_command: config.gradle_command, gradle_include_groups: config.gradle_include_groups, rebar_command: config.rebar_command, rebar_deps_dir: config.rebar_deps_dir, ) end end end license-finder-2.1.2/lib/license_finder/package_managers/0000755000175000017500000000000012767430336022431 5ustar pravipravilicense-finder-2.1.2/lib/license_finder/package_managers/go_dep.rb0000644000175000017500000000171112767430336024213 0ustar pravipravirequire 'json' module LicenseFinder class GoDep < PackageManager def initialize(options={}) super @full_version = options[:go_full_version] end def current_packages json = JSON.parse(package_path.read) # godep includes subpackages as a seperate dependency, we can de-dup that deps = json['Deps'].each do |d| next unless d['ImportPath'].include?('github.com') d['ImportPath'] = d['ImportPath'].split('/')[0..2].join('/') end deps.uniq.map { |dep| GoPackage.from_dependency(dep, install_prefix, @full_version) } end def package_path project_path.join('Godeps/Godeps.json') end def self.package_management_command "godep" end private def install_prefix go_path = workspace_dir.exist? ? workspace_dir : Pathname(ENV['GOPATH']) go_path.join('src') end def workspace_dir project_path.join('Godeps/_workspace') end end end license-finder-2.1.2/lib/license_finder/package_managers/npm_package.rb0000644000175000017500000000101012767430336025213 0ustar pravipravimodule LicenseFinder class NpmPackage < Package def initialize(spec, options={}) super( spec["name"], spec["version"], options.merge( description: spec["description"], homepage: spec["homepage"], spec_licenses: Package.license_names_from_standard_spec(spec), install_path: spec["path"], children: spec.fetch("dependencies", {}).map { |_, d| d["name"] } ) ) end def package_manager 'Npm' end end end license-finder-2.1.2/lib/license_finder/package_managers/rebar_package.rb0000644000175000017500000000015412767430336025524 0ustar pravipravimodule LicenseFinder class RebarPackage < Package def package_manager 'Rebar' end end end license-finder-2.1.2/lib/license_finder/package_managers/rebar.rb0000644000175000017500000000200612767430336024047 0ustar pravipravimodule LicenseFinder class Rebar < PackageManager def initialize(options={}) super @command = options[:rebar_command] || "rebar" @deps_path = Pathname(options[:rebar_deps_dir] || "deps") end def current_packages rebar_ouput.map do |name, version_type, version_value, homepage| RebarPackage.new( name, "#{version_type}: #{version_value}", install_path: @deps_path.join(name), homepage: homepage, logger: logger ) end end def self.package_management_command "rebar" end private def rebar_ouput command = "#{@command} list-deps" output, success = Dir.chdir(project_path) { capture(command) } raise "Command '#{command}' failed to execute: #{output}" unless success output .each_line .reject { |line| line.start_with?("=") } .map { |line| line.split(" ") } end def package_path project_path.join('rebar.config') end end end license-finder-2.1.2/lib/license_finder/package_managers/nuget.rb0000644000175000017500000000353712767430336024110 0ustar pravipravirequire "rexml/document" require 'zip' module LicenseFinder class Nuget < PackageManager def package_path path = project_path.join("vendor/*.nupkg") nuget_dir = Dir[path].map{|pkg| File.dirname(pkg)}.uniq if nuget_dir.length == 0 project_path.join(".nuget") else Pathname(nuget_dir.first) end end def assemblies Dir.glob(project_path.join("**", "packages.config"), File::FNM_DOTMATCH).map do |d| path = Pathname.new(d).dirname name = path.basename.to_s Assembly.new path, name end end def current_packages dependencies.reduce({}) do |memo, dep| licenses = license_urls(dep) memo[dep.name] ||= NugetPackage.new(dep.name, dep.version, spec_licenses: licenses) memo[dep.name].groups << dep.assembly if !memo[dep.name].groups.include? dep.assembly memo end.values end def license_urls dep files = Dir["**/#{dep.name}.#{dep.version}.nupkg"] return nil if files.empty? file = files.first Zip::File.open file do |zipfile| content = zipfile.read(dep.name + ".nuspec") xml = REXML::Document.new(content) REXML::XPath.match(xml,"//metadata//licenseUrl").map(&:get_text) end end def dependencies assemblies.flat_map(&:dependencies) end class Assembly attr_reader :name, :path def initialize(path, name) @path = path @name = name end def dependencies xml = REXML::Document.new(File.read(path.join("packages.config"))) packages = REXML::XPath.match(xml, "//package") packages.map do |p| attrs = p.attributes Dependency.new(attrs["id"], attrs["version"], self.name) end end end class Dependency < Struct.new(:name, :version, :assembly) end end end license-finder-2.1.2/lib/license_finder/package_managers/nuget_package.rb0000644000175000017500000000015412767430336025553 0ustar pravipravimodule LicenseFinder class NugetPackage < Package def package_manager 'Nuget' end end end license-finder-2.1.2/lib/license_finder/package_managers/go_package.rb0000644000175000017500000000102512767430336025034 0ustar pravipravimodule LicenseFinder class GoPackage < Package def self.from_dependency(hash, prefix, full_version) name = hash['ImportPath'] install_path = hash['InstallPath'] install_path ||= install_path(prefix.join(name)) version = full_version ? hash['Rev'] : hash['Rev'][0..6] self.new(name, version, {install_path: install_path, package_manager: "Go" }) end def package_manager "Go" end private def self.install_path(path) Pathname(path).cleanpath.to_s end end end license-finder-2.1.2/lib/license_finder/package_managers/bower_package.rb0000644000175000017500000000146612767430336025556 0ustar pravipravimodule LicenseFinder class BowerPackage < Package def initialize(bower_module, options={}) spec = bower_module.fetch("pkgMeta", Hash.new) if spec.empty? endpoint = bower_module.fetch("endpoint", Hash.new) name = endpoint["name"] version = endpoint["target"] else name = spec["name"] version = spec["version"] end super( name, version, options.merge( summary: spec["description"], description: spec["readme"], homepage: spec["homepage"], spec_licenses: Package.license_names_from_standard_spec(spec), install_path: bower_module["canonicalDir"], missing: bower_module["missing"] ) ) end def package_manager 'Bower' end end end license-finder-2.1.2/lib/license_finder/package_managers/bundler.rb0000644000175000017500000000260512767430336024414 0ustar pravipravirequire "bundler" module LicenseFinder class Bundler < PackageManager def initialize options={} super @ignore_groups = options[:ignore_groups] @definition = options[:definition] # dependency injection for tests end def current_packages logger.log self.class, "including groups #{included_groups.inspect}" details.map do |gem_detail, bundle_detail| BundlerPackage.new(gem_detail, bundle_detail, logger: logger).tap do |package| logger.package self.class, package end end end def self.package_management_command "bundler" end private attr_reader :ignore_groups def definition # DI @definition ||= ::Bundler::Definition.build(package_path, lockfile_path, nil) end def details gem_details.map do |gem_detail| bundle_detail = bundler_details.detect { |bundle_detail| bundle_detail.name == gem_detail.name } [gem_detail, bundle_detail] end end def gem_details @gem_details ||= definition.specs_for(included_groups) end def bundler_details @bundler_details ||= definition.dependencies end def included_groups definition.groups - ignore_groups.map(&:to_sym) end def package_path project_path.join("Gemfile") end def lockfile_path project_path.join('Gemfile.lock') end end end license-finder-2.1.2/lib/license_finder/package_managers/go_vendor.rb0000644000175000017500000000402412767430336024740 0ustar pravipravirequire 'json' module LicenseFinder class GoVendor < PackageManager def initialize(options={}) super @full_version = options[:go_full_version] end def active? return false unless self.class.installed?(@logger) (has_go_files? && package_path.exist?).tap do |is_active| logger.active self.class, is_active end end def has_go_files? !Dir[project_path.join("**/*.go")].empty? end def package_path project_path.join("vendor") end def project_sha @project_sha ||= Dir.chdir(project_path) do val = capture('git rev-list --max-count 1 HEAD') raise 'git rev-list failed' unless val.last val.first.strip end end def current_packages deps = go_list vendored_deps = deps.select { |dep| package_path.join(dep).exist? } vendored_deps.map do |dep| GoPackage.from_dependency({ 'ImportPath' => dep, 'InstallPath' => package_path.join(dep), 'Rev' => 'vendored-' + project_sha }, nil, true) end end def self.package_management_command 'go' end def go_list Dir.chdir(project_path) do # avoid checking canonical import path. some projects uses # non-canonical import path and rely on the fact that the deps are # checked in. Canonical paths are only checked by `go get'. We # discovered that `go list' will print a warning and unfortunately exit # with status code 1. Setting GOPATH to nil removes those warnings. ENV['GOPATH'] = nil val = capture('go list -f \'{{join .Deps "\n"}}\' ./...') return [] unless val.last # Select non-standard packages. Standard packages tend to be short # and have less than two slashes val.first.lines.map(&:strip).select { |l| l.split("/").length > 2 }.map { |l| l.split("/")[0..2].join("/") }.uniq end end end end license-finder-2.1.2/lib/license_finder/package_managers/gradle_dependency_finder.rb0000644000175000017500000000041612767430336027742 0ustar pravipravimodule LicenseFinder class GradleDependencyFinder def initialize(project_path) @project_path = project_path end def dependencies Pathname .glob(@project_path.join('**', 'dependency-license.xml')) .map(&:read) end end end license-finder-2.1.2/lib/license_finder/package_managers/pip_package.rb0000644000175000017500000000153612767430336025226 0ustar pravipravimodule LicenseFinder class PipPackage < Package LICENSE_FORMAT = /^License.*::\s*(.*)$/ INVALID_LICENSES = ["", "UNKNOWN"].to_set def self.license_names_from_spec(spec) license = spec["license"].to_s.strip return [license] unless INVALID_LICENSES.include?(license) spec .fetch("classifiers", []) .select { |c| c =~ LICENSE_FORMAT } .map { |c| c.gsub(LICENSE_FORMAT, '\1') } end def initialize(name, version, spec, options={}) super( name, version, options.merge( authors: spec["author"], summary: spec["summary"], description: spec["description"], homepage: spec["home_page"], spec_licenses: self.class.license_names_from_spec(spec) ) ) end def package_manager 'Pip' end end end license-finder-2.1.2/lib/license_finder/package_managers/gradle_package.rb0000644000175000017500000000107512767430336025672 0ustar pravipravimodule LicenseFinder class GradlePackage < Package def initialize(spec, options={}) name = spec["name"] if name.scan(":").size >= 1 group, name, version = name.split(":") else version = "unknown" end name = options[:include_groups] ? "#{group}:#{name}" : name licenses = Array(spec["license"]) .map { |l| l["name"] } .reject { |name| name == "No license found" } super(name, version, options.merge(spec_licenses: licenses)) end def package_manager 'Gradle' end end end license-finder-2.1.2/lib/license_finder/package_managers/pip.rb0000644000175000017500000000177112767430336023554 0ustar pravipravirequire 'json' require 'httparty' module LicenseFinder class Pip < PackageManager def current_packages pip_output.map do |name, version, children, location| PipPackage.new( name, version, pypi_def(name, version), logger: logger, children: children, install_path: Pathname(location).join(name), ) end end def self.package_management_command "pip" end private def package_path project_path.join('requirements.txt') end def pip_output output = `#{LicenseFinder::BIN_PATH.join("license_finder_pip.py")}` JSON(output).map do |package| package.values_at(*%w[name version dependencies location]) end end def pypi_def(name, version) response = HTTParty.get("https://pypi.python.org/pypi/#{name}/#{version}/json") if response.code == 200 JSON.parse(response.body).fetch("info", {}) else {} end end end end license-finder-2.1.2/lib/license_finder/package_managers/cocoa_pods.rb0000644000175000017500000000254512767430336025075 0ustar pravipravirequire "json" module LicenseFinder class CocoaPods < PackageManager def current_packages podfile = YAML.load_file(lockfile_path) podfile["PODS"].map do |pod| pod = pod.keys.first if pod.is_a?(Hash) name, version = pod.scan(/(.*)\s\((.*)\)/).flatten CocoaPodsPackage.new( name, version, license_texts[name], logger: logger ) end end def self.package_management_command LicenseFinder::Platform.darwin? ? "pod" : nil end private def package_path project_path.join("Podfile") end def lockfile_path project_path.join("Podfile.lock") end def license_texts # package name => license text @license_texts ||= read_plist(acknowledgements_path)["PreferenceSpecifiers"] .each_with_object({}) { |hash, memo| memo[hash["Title"]] = hash["FooterText"] } end def acknowledgements_path filename = 'Pods-acknowledgements.plist' directories = [ 'Pods', # cocoapods < 0.34 'Pods/Target Support Files/Pods' # cocoapods >= 0.34 ] directories .map { |dir| project_path.join(dir, filename) } .find(&:exist?) end def read_plist pathname JSON.parse(`plutil -convert json -o - '#{pathname.expand_path}'`) end end end license-finder-2.1.2/lib/license_finder/package_managers/cocoa_pods_package.rb0000644000175000017500000000052312767430336026542 0ustar pravipravimodule LicenseFinder class CocoaPodsPackage < Package def initialize(name, version, license_text, options={}) super(name, version, options) @license = License.find_by_text(license_text.to_s) end def licenses_from_spec [@license].compact end def package_manager 'CocoaPods' end end end license-finder-2.1.2/lib/license_finder/package_managers/bundler_package.rb0000644000175000017500000000125612767430336026070 0ustar pravipravimodule LicenseFinder class BundlerPackage < Package def initialize(spec, bundler_def, options={}) children = spec.dependencies.map(&:name) groups = Array(bundler_def && bundler_def.groups).map(&:to_s) super( spec.name, spec.version.to_s, options.merge( authors: Array(spec.authors).join(', '), summary: spec.summary, description: spec.description, homepage: spec.homepage, children: children, groups: groups, spec_licenses: spec.licenses, install_path: spec.full_gem_path ) ) end def package_manager 'Bundler' end end end license-finder-2.1.2/lib/license_finder/package_managers/maven_package.rb0000644000175000017500000000051412767430336025537 0ustar pravipravimodule LicenseFinder class MavenPackage < Package def initialize(spec, options={}) super( spec["artifactId"], spec["version"], options.merge( spec_licenses: Array(spec["licenses"]).map { |l| l["name"] } ) ) end def package_manager 'Maven' end end end license-finder-2.1.2/lib/license_finder/package_managers/npm.rb0000644000175000017500000000473612767430336023562 0ustar pravipravirequire 'json' module LicenseFinder class NPM < PackageManager DEPENDENCY_GROUPS = ["dependencies", "devDependencies"] def current_packages packages = {} direct_dependencies.each do |dep| group_name = dep[:group] walk_dependency_tree(dep[:name]) do |dependency| package_id = dependency["name"] if packages[package_id] && packages[package_id].version.nil? && dependency["version"] old_package = packages[package_id] packages[package_id] = NpmPackage.new(dependency, logger: logger, groups: old_package.groups) else packages[package_id] ||= NpmPackage.new(dependency, logger: logger) end packages[package_id].groups << group_name unless packages[package_id].groups.include?(group_name) end end packages.values end def self.package_management_command "npm" end private def direct_dependencies package_json = JSON.parse(File.read(package_path)) DEPENDENCY_GROUPS.map do |group| package_json.fetch(group, {}).keys.map do |dependency| { group: group, name: dependency } end end.flatten end def walk_dependency_tree(dependency, &block) @json ||= npm_json deps = @json.fetch("dependencies", {}).reject { |_,d| d.is_a?(String) } current_dep = deps[dependency] block.call(current_dep) if current_dep recursive_dependencies(current_dep) do |d| block.call(d) end end def npm_json command = 'npm list --json --long' output, success = Dir.chdir(project_path) { capture(command) } if success json = JSON(output) else json = begin JSON(output) rescue JSON::ParserError nil end if json $stderr.puts "Command '#{command}' returned an error but parsing succeeded." else raise "Command '#{command}' failed to execute: #{output}" end end json end def package_path project_path.join('package.json') end def recursive_dependencies(node_module, &block) return unless node_module # node_module can be empty hash if it is included elsewhere block.call(node_module) node_module.fetch('dependencies', {}).each do |dep_key, data| data['name'] ||= dep_key recursive_dependencies(data, &block) end end end end license-finder-2.1.2/lib/license_finder/package_managers/gradle.rb0000644000175000017500000000213012767430336024210 0ustar pravipravirequire 'xmlsimple' require_relative 'gradle_dependency_finder' module LicenseFinder class Gradle < PackageManager def initialize(options={}) super @command = options[:gradle_command] || 'gradle --console plain' @include_groups = options[:gradle_include_groups] end def current_packages command = "#{@command} downloadLicenses" output, success = Dir.chdir(project_path) { capture(command) } raise "Command '#{command}' failed to execute: #{output}" unless success dependencies = GradleDependencyFinder.new(project_path).dependencies packages = dependencies.flat_map do |xml_file| options = {'GroupTags' => {'dependencies' => 'dependency'}} contents = XmlSimple.xml_in(xml_file, options).fetch('dependency', []) contents.map do |dep| GradlePackage.new(dep, logger: logger, include_groups: @include_groups) end end packages.uniq end def self.package_management_command "gradle" end private def package_path project_path.join('build.gradle') end end end license-finder-2.1.2/lib/license_finder/package_managers/maven.rb0000644000175000017500000000160512767430336024066 0ustar pravipravirequire "xmlsimple" module LicenseFinder class Maven < PackageManager def current_packages command = 'mvn license:download-licenses' output, success = Dir.chdir(project_path) { capture(command) } raise "Command '#{command}' failed to execute: #{output}" unless success xml = license_report.read options = { 'GroupTags' => { 'licenses' => 'license', 'dependencies' => 'dependency' }, 'ForceArray' => ['license', 'dependency'] } dependencies = XmlSimple.xml_in(xml, options)["dependencies"] dependencies.map do |dep| MavenPackage.new(dep, logger: logger) end end def self.package_management_command "mvn" end private def license_report project_path.join('target/generated-resources/licenses.xml') end def package_path project_path.join('pom.xml') end end end license-finder-2.1.2/lib/license_finder/package_managers/merged_package.rb0000644000175000017500000000137712767430336025704 0ustar pravipravimodule LicenseFinder class MergedPackage attr_reader :dependency def initialize(dependency, subproject_paths) @dependency = dependency @subproject_paths = subproject_paths.map { |p| Pathname(p) } end def name dependency.name end def version dependency.version end def licenses dependency.licenses end def install_path dependency.install_path end def subproject_paths @subproject_paths.map { |p| p.expand_path.to_s } end def <=>(other) dependency <=> other.dependency end def eql?(other) dependency.eql?(other.dependency) end def hash dependency.hash end def method_missing(method_name) nil end end end license-finder-2.1.2/lib/license_finder/package_managers/bower.rb0000644000175000017500000000120612767430336024073 0ustar pravipravirequire 'json' module LicenseFinder class Bower < PackageManager def current_packages bower_output.map do |package| BowerPackage.new(package, logger: logger) end end def self.package_management_command "bower" end private def bower_output command = 'bower list --json -l action' output, success = Dir.chdir(project_path) { capture(command) } raise "Command '#{command}' failed to execute: #{output}" unless success JSON(output) .fetch("dependencies", {}) .values end def package_path project_path.join('bower.json') end end end license-finder-2.1.2/lib/license_finder/package_managers/go_workspace.rb0000644000175000017500000000610712767430336025445 0ustar pravipravirequire 'json' module LicenseFinder class GoWorkspace < PackageManager Submodule = Struct.new :install_path, :revision ENVRC_REGEXP = /GOPATH|GO15VENDOREXPERIMENT/ def initialize(options={}) super @full_version = options[:go_full_version] end def current_packages go_list_packages = go_list git_modules.map do |submodule| # We are filtering the non-standard packages because the word "net" # seems to be common that can give false positive when filtering the git submodules import_path = go_list_packages.select { |gp| submodule.install_path =~ /#{repo_name(gp)}$/ }.first if import_path then GoPackage.from_dependency({ 'ImportPath' => repo_name(import_path), 'InstallPath' => submodule.install_path, 'Rev' => submodule.revision }, nil, @full_version) end end.compact end def package_path envrc_path.dirname end def active? return false unless self.class.installed?(logger) godep = LicenseFinder::GoDep.new({project_path: Pathname(project_path)}) # go workspace is only active if GoDep wasn't. There are some projects # that will use the .envrc and have a Godep folder as well. active = !! (!godep.active? && envrc_path && ENVRC_REGEXP.match(IO.read(envrc_path))) active.tap { |is_active| logger.active self.class, is_active } end private def repo_name import_path import_path.split("/")[0..2].join("/") end def project_src project_path.join('src') end def envrc_path p = Pathname.new project_path 4.times.reduce([p]) { |memo, _| memo << memo.last.parent }.map { |p| p.join('.envrc') }.select(&:exist?).first end def self.package_management_command 'go' end def go_list Dir.chdir(project_path) do # avoid checking canonical import path. some projects uses # non-canonical import path and rely on the fact that the deps are # checked in. Canonical paths are only checked by `go get'. We # discovered that `go list' will print a warning and unfortunately exit # with status code 1. Setting GOPATH to nil removes those warnings. ENV['GOPATH'] = nil val = capture('go list -f \'{{join .Deps "\n"}}\' ./...') raise 'go list failed' unless val.last # Select non-standard packages. Non-standard packages typically # have a period somewhere in the namespace (github.com, gopkg.in, # etc.). # val.first.lines.map(&:strip).select { |l| l =~ /.+\..+\// } end end def git_modules Dir.chdir(package_path) do |d| result = capture('git submodule status') raise 'git submodule status failed' unless result[1] result.first.lines.map do |l| columns = l.split.map(&:strip) Submodule.new File.join(package_path, columns[1]), columns[0] end end end end end license-finder-2.1.2/lib/license_finder/platform.rb0000644000175000017500000000027112767430336021332 0ustar pravipravimodule LicenseFinder module Platform def self.darwin? RUBY_PLATFORM =~ /darwin/ end def self.windows? RUBY_PLATFORM =~ /mswin|cygwin|mingw/ end end end license-finder-2.1.2/lib/license_finder/reports/0000755000175000017500000000000012767430336020657 5ustar pravipravilicense-finder-2.1.2/lib/license_finder/reports/diff_report.rb0000644000175000017500000000147212767430336023513 0ustar pravipravimodule LicenseFinder class DiffReport < CsvReport AVAILABLE_COLUMNS = AVAILABLE_COLUMNS + %w[status current_version previous_version project_paths] def initialize(dependencies, options={}) super(dependencies, options.merge(columns: build_columns(dependencies))) end def format_status(dep) dep.status end def format_current_version(dep) dep.current_version end def format_previous_version(dep) dep.previous_version end def format_project_paths(dep) dep.subproject_paths.join(self.class::COMMA_SEP) end private def build_columns(dependencies) columns = %w[status name current_version previous_version licenses] columns << 'project_paths' if dependencies.all? { |delta| delta.merged_package? } columns end end end license-finder-2.1.2/lib/license_finder/reports/html_report.rb0000644000175000017500000000030712767430336023543 0ustar pravipravimodule LicenseFinder class HtmlReport < ErbReport private def template_name "html_report" end def bootstrap TEMPLATE_PATH.join("bootstrap.css").read end end end license-finder-2.1.2/lib/license_finder/reports/markdown_report.rb0000644000175000017500000000020512767430336024416 0ustar pravipravimodule LicenseFinder class MarkdownReport < ErbReport private def template_name "markdown_report" end end end license-finder-2.1.2/lib/license_finder/reports/csv_report.rb0000644000175000017500000000310612767430336023372 0ustar pravipravirequire 'csv' module LicenseFinder class CsvReport < Report COMMA_SEP = "," AVAILABLE_COLUMNS = %w[name version authors licenses approved summary description homepage install_path package_manager groups] MISSING_DEPENDENCY_TEXT = "This package is not installed. Please install to determine licenses." def initialize(dependencies, options) super @columns = Array(options[:columns]) & self.class::AVAILABLE_COLUMNS end def to_s CSV.generate(col_sep: self.class::COMMA_SEP) do |csv| sorted_dependencies.each do |s| csv << format_dependency(s) end end end private def format_dependency(dep) @columns.map do |column| send("format_#{column}", dep) end end def format_name(dep) dep.name end def format_version(dep) dep.version end def format_authors(dep) dep.authors.to_s.strip end def format_homepage(dep) dep.homepage end def format_licenses(dep) if dep.missing? MISSING_DEPENDENCY_TEXT else dep.licenses.map(&:name).join(self.class::COMMA_SEP) end end def format_approved(dep) dep.approved? ? "Approved" : "Not approved" end def format_summary(dep) dep.summary.to_s.strip end def format_description(dep) dep.description.to_s.strip end def format_install_path(dep) dep.install_path end def format_package_manager(dep) dep.package_manager end def format_groups(dep) dep.groups.join(",") end end end license-finder-2.1.2/lib/license_finder/reports/merged_report.rb0000644000175000017500000000062612767430336024046 0ustar pravipravimodule LicenseFinder class MergedReport < CsvReport AVAILABLE_COLUMNS = AVAILABLE_COLUMNS + ['subproject_paths'] def initialize(dependencies, options = {}) options[:columns] ||= %w(name version licenses subproject_paths) super(dependencies, options) end def format_subproject_paths(merged_dep) merged_dep.subproject_paths.join(self.class::COMMA_SEP) end end end license-finder-2.1.2/lib/license_finder/reports/templates/0000755000175000017500000000000012767430336022655 5ustar pravipravilicense-finder-2.1.2/lib/license_finder/reports/templates/bootstrap.css0000644000175000017500000027772312767430336025426 0ustar pravipravi/*! * Bootstrap v2.1.1 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}.text-warning{color:#c09853}.text-error{color:#b94a48}.text-info{color:#3a87ad}.text-success{color:#468847}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:1;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1{font-size:36px;line-height:40px}h2{font-size:30px;line-height:40px}h3{font-size:24px;line-height:40px}h4{font-size:18px;line-height:20px}h5{font-size:14px;line-height:20px}h6{font-size:12px;line-height:20px}h1 small{font-size:24px}h2 small{font-size:18px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:25px}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:9px;font-size:14px;line-height:20px;color:#555;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal;cursor:pointer}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:18px;padding-left:18px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"]{float:left}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info>label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;font-size:14px;vertical-align:top;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append .add-on,.input-append .btn{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child,.table-bordered tfoot:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child,.table-bordered tfoot:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topleft:4px}.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5}table [class*=span],.row-fluid table [class*=span]{display:table-cell;float:none;margin-left:0}.table .span1{float:none;width:44px;margin-left:0}.table .span2{float:none;width:124px;margin-left:0}.table .span3{float:none;width:204px;margin-left:0}.table .span4{float:none;width:284px;margin-left:0}.table .span5{float:none;width:364px;margin-left:0}.table .span6{float:none;width:444px;margin-left:0}.table .span7{float:none;width:524px;margin-left:0}.table .span8{float:none;width:604px;margin-left:0}.table .span9{float:none;width:684px;margin-left:0}.table .span10{float:none;width:764px;margin-left:0}.table .span11{float:none;width:844px;margin-left:0}.table .span12{float:none;width:924px;margin-left:0}.table .span13{float:none;width:1004px;margin-left:0}.table .span14{float:none;width:1084px;margin-left:0}.table .span15{float:none;width:1164px;margin-left:0}.table .span16{float:none;width:1244px;margin-left:0}.table .span17{float:none;width:1324px;margin-left:0}.table .span18{float:none;width:1404px;margin-left:0}.table .span19{float:none;width:1484px;margin-left:0}.table .span20{float:none;width:1564px;margin-left:0}.table .span21{float:none;width:1644px;margin-left:0}.table .span22{float:none;width:1724px;margin-left:0}.table .span23{float:none;width:1804px;margin-left:0}.table .span24{float:none;width:1884px;margin-left:0}.table tbody tr.success td{background-color:#dff0d8}.table tbody tr.error td{background-color:#f2dede}.table tbody tr.warning td{background-color:#fcf8e3}.table tbody tr.info td{background-color:#d9edf7}.table-hover tbody tr.success:hover td{background-color:#d0e9c6}.table-hover tbody tr.error:hover td{background-color:#ebcccc}.table-hover tbody tr.warning:hover td{background-color:#faf2cc}.table-hover tbody tr.info:hover td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-tabs>.active>a>[class^="icon-"],.nav-tabs>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:linear-gradient(to bottom,#08c,#0077b3);background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 14px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;*line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #bbb;*border:0;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#a2a2a2;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover{color:#333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.btn-large [class^="icon-"]{margin-top:2px}.btn-small{padding:3px 9px;font-size:12px;line-height:18px}.btn-small [class^="icon-"]{margin-top:0}.btn-mini{padding:2px 6px;font-size:11px;line-height:17px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn{border-color:#c5c5c5;border-color:rgba(0,0,0,0.15) rgba(0,0,0,0.15) rgba(0,0,0,0.25)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-image:-moz-linear-gradient(top,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-image:-moz-linear-gradient(top,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-image:-moz-linear-gradient(top,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{position:relative;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1}.btn-toolbar .btn+.btn,.btn-toolbar .btn-group+.btn,.btn-toolbar .btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu{font-size:14px}.btn-group>.btn-mini{font-size:11px}.btn-group>.btn-small{font-size:12px}.btn-group>.btn-large{font-size:16px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-mini .caret,.btn-small .caret,.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.dropup .btn-large .caret{border-top:0;border-bottom:5px solid #000}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical .btn{display:block;float:none;width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical .btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical .btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical .btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical .btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical .btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;color:#c09853;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible;color:#777}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px}.navbar-link{color:#777}.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;width:100%;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse{color:#999}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-image:-moz-linear-gradient(top,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb .divider{padding:0 5px;color:#ccc}.breadcrumb .active{color:#999}.pagination{height:40px;margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:0 14px;line-height:38px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager a,.pager span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next a,.pager .next span{float:right}.pager .previous a{float:left}.pager .disabled a,.pager .disabled a:hover,.pager .disabled span{color:#999;cursor:default;background-color:#fff}.modal-open .modal .dropdown-menu{z-index:2050}.modal-open .modal .dropdown.open{*z-index:2050}.modal-open .modal .popover{z-index:2060}.modal-open .modal .tooltip{z-index:2080}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:50%;left:50%;z-index:1050;width:560px;margin:-250px 0 0 -280px;overflow:auto;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:50%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.tooltip{position:absolute;z-index:1030;display:block;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px}.tooltip.right{margin-left:3px}.tooltip.bottom{margin-top:3px}.tooltip.left{margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;width:236px;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-bottom:10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-right:10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0}.popover .arrow,.popover .arrow:after{position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow:after{z-index:-1;content:""}.popover.top .arrow{bottom:-10px;left:50%;margin-left:-10px;border-top-color:#fff;border-width:10px 10px 0}.popover.top .arrow:after{bottom:-1px;left:-11px;border-top-color:rgba(0,0,0,0.25);border-width:11px 11px 0}.popover.right .arrow{top:50%;left:-10px;margin-top:-10px;border-right-color:#fff;border-width:10px 10px 10px 0}.popover.right .arrow:after{bottom:-11px;left:-1px;border-right-color:rgba(0,0,0,0.25);border-width:11px 11px 11px 0}.popover.bottom .arrow{top:-10px;left:50%;margin-left:-10px;border-bottom-color:#fff;border-width:0 10px 10px}.popover.bottom .arrow:after{top:-1px;left:-11px;border-bottom-color:rgba(0,0,0,0.25);border-width:0 11px 11px}.popover.left .arrow{top:50%;right:-10px;margin-top:-10px;border-left-color:#fff;border-width:10px 0 10px 10px}.popover.left .arrow:after{right:-1px;bottom:-11px;border-left-color:rgba(0,0,0,0.25);border-width:11px 0 11px 11px}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.label,.badge{font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}a.label:hover,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel .item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel .item>img{display:block;line-height:1}.carousel .active,.carousel .next,.carousel .prev{display:block}.carousel .active{left:0}.carousel .next,.carousel .prev{position:absolute;top:0;width:100%}.carousel .next{left:100%}.carousel .prev{left:-100%}.carousel .next.left,.carousel .prev.right{left:0}.carousel .active.left{left:-100%}.carousel .active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit p{font-size:18px;font-weight:200;line-height:30px;color:inherit}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} license-finder-2.1.2/lib/license_finder/reports/templates/html_report.erb0000644000175000017500000000640712767430336025715 0ustar pravipravi

<%= project_name %>

Dependencies

As of <%= Time.now.strftime("%B %e, %Y %l:%M%P") %>

<%= dependencies.size %> total

    <% grouped_dependencies.each do |license_name, group| -%>
  • <%= group.size %> <%= license_name %>
  • <% end -%>
<% if unapproved_dependencies.any? -%>

Action Items

<%= unapproved_dependencies.size %> unapproved

    <% unapproved_dependencies.each do |dependency| -%>
  • <%= link_to dependency.name %> (<%= license_names(dependency) %>)
  • <% end -%>
<% end -%>
<% sorted_dependencies.each do |dependency| -%>
">
<% if dependency.approved_manually? -%>

<%= license_links(dependency) %> manually approved

<%= dependency.manual_approval.why %>

<% if dependency.manual_approval.who -%> <%= dependency.manual_approval.who %>, <% end -%> <% elsif dependency.whitelisted? -%>

<%= license_links(dependency) %> whitelisted

<% else -%>

<%= license_links(dependency) %> unapproved

<% end -%>

<%= link_to_dependency(dependency) %> <%= version_groups(dependency) %>

<%= dependency.summary %>

<%= dependency.description %>

<% if dependency.parents.any? -%>
<%=dependency.name%> is required by:
<%= dependency.parents.to_a.join(", ") -%>
<% end -%> <% if dependency.children.any? -%>
<%=dependency.name%> relies on:
<%= dependency.children.join(", ") -%>
<% end -%>
<% end -%>
license-finder-2.1.2/lib/license_finder/reports/templates/markdown_report.erb0000644000175000017500000000220012767430336026556 0ustar pravipravi# <%= project_name %> As of <%= Time.now.strftime("%B %e, %Y %l:%M%P") %>. <%= dependencies.size %> total ## Summary <% grouped_dependencies.each do |license_name, group| -%> * <%= group.size %> <%= license_name %> <% end %> <% if unapproved_dependencies.any? -%> ## Action <%= unapproved_dependencies.size %> *unapproved* <% unapproved_dependencies.each do |dependency| -%> * <%= link_to dependency.name %> (<%= license_names(dependency) %>) <% end %> <% end -%> ## Items <% sorted_dependencies.each do |dependency| -%> ### <%= link_to_dependency(dependency) %> <%= version_groups(dependency) %> #### <%= dependency.summary %> <% if dependency.approved_manually? -%> <%= license_links(dependency) %> manually approved ><%= dependency.manual_approval.why %> > <%= dependency.manual_approval.who %> <%= dependency.manual_approval.safe_when.to_date %> <% elsif dependency.whitelisted? -%> <%= license_links(dependency) %> whitelisted <% else -%> <%= license_links(dependency) %> _**unapproved**_ <% end -%> <% if dependency.description -%> <%= dependency.description %> <% end -%> <% end -%> license-finder-2.1.2/lib/license_finder/reports/erb_report.rb0000644000175000017500000000250512767430336023351 0ustar pravipravirequire 'erb' module LicenseFinder class ErbReport < Report TEMPLATE_PATH = ROOT_PATH.join('reports', 'templates') def to_s(filename = TEMPLATE_PATH.join("#{template_name}.erb")) template = ERB.new(filename.read, nil, '-') template.result(binding) end private def unapproved_dependencies dependencies.reject(&:approved?) end def grouped_dependencies dependencies .group_by { |dep| license_names(dep) } .sort_by { |_, group| -group.size } end def link_to_license(license) link_to_maybe license.name, license.url end def link_to_dependency(dependency) link_to_maybe dependency.name, dependency.homepage end def link_to_maybe(text, link) if link && !link.empty? link_to(text, link) else text end end def link_to(text, link = "##{text}") %{#{text}} end def license_names(dependency) dependency.licenses.map(&:name).sort.join ', ' end def license_links(dependency) dependency.licenses.map { |l| link_to_license(l) }.join(', ') end def version_groups(dependency) result = "v#{dependency.version}" if dependency.groups.any? result << " (#{dependency.groups.join(", ")})" end result end end end license-finder-2.1.2/lib/license_finder/reports/text_report.rb0000644000175000017500000000032712767430336023565 0ustar pravipravimodule LicenseFinder class TextReport < CsvReport COMMA_SEP = ", " def initialize(dependencies, options={}) super(dependencies, options.merge(columns: %w[name version licenses])) end end end license-finder-2.1.2/.travis.yml0000644000175000017500000000116612767430336015557 0ustar pravipravisudo: false rvm: - 1.9.3 - 2.0 - 2.1 - 2.2 - 2.3.0 - jruby-1.7.23 - jruby-9.0.4.0 matrix: allow_failures: - rvm: jruby-1.7.23 env: - PATH=$PATH:$HOME/gradle/bin:$HOME/rebar:$HOME/go/bin GOPATH=$HOME/go notifications: email: - licensefinder@pivotallabs.com webhooks: urls: - http://pulse.pivotallabs.com/projects/657d35b7-b896-4bf3-8837-9d558e2ab651/status on_start: true before_install: - gem update bundler - .travis/install_gradle.sh - .travis/install_rebar.sh - .travis/install_bower.sh - .travis/install_godep.sh script: - rake install - rake spec - rake features license-finder-2.1.2/.travis/0000755000175000017500000000000012767430336015030 5ustar pravipravilicense-finder-2.1.2/.travis/install_godep.sh0000755000175000017500000000010512767430336020207 0ustar pravipravi#!/bin/sh set -e set -x mkdir -p ~/go go get github.com/tools/godep license-finder-2.1.2/.travis/install_rebar.sh0000755000175000017500000000025112767430336020206 0ustar pravipravi#!/bin/bash set -e set -x pushd ~ git clone --depth 1 git://github.com/rebar/rebar.git cd rebar ./bootstrap erl -version PATH=$HOME/rebar:$PATH rebar --version popd license-finder-2.1.2/.travis/install_bower.sh0000755000175000017500000000006012767430336020227 0ustar pravipravi#!/bin/bash set -e set -x npm install -g bower license-finder-2.1.2/.travis/install_gradle.sh0000755000175000017500000000024212767430336020351 0ustar pravipravi#!/bin/bash set -e set -x pushd /tmp wget http://services.gradle.org/distributions/gradle-2.4-all.zip unzip -q gradle* rm gradle*.zip mv gradle* ~/gradle popd license-finder-2.1.2/CONTRIBUTING.md0000644000175000017500000000454212767430336015700 0ustar pravipravi# Contributing ## TL;DR * Fork the project from https://github.com/pivotal/LicenseFinder * Create a feature branch. * Make your feature addition or bug fix. Please make sure there is appropriate test coverage. * Rebase on top of master. * Send a pull request. ## Adding Package Managers There are a few steps to adding a new package manager. [Here](https://github.com/pivotal/LicenseFinder/compare/v2.0.0...v2.0.1) is how support was added for `rebar`, an `erlang` package manager. ## Adding Licenses Add new licenses to `lib/license_finder/license/definitions.rb`. There are existing tools for matching licenses; see, for example, the MIT license, which can be detected in many different ways. ## Adding Reports If you need `license_finder` to output additional package data, consider submitting a pull request which adds new columns to `lib/license_finder/reports/csv_report.rb`. It is also possible to generate a custom report from an ERB template. Use this [example](https://gist.github.com/mainej/b190d2f138c2b9e2e20a) as a starting point. These reports will have access to the helpers in [`LicenseFinder::ErbReport`](https://github.com/pivotal/LicenseFinder/blob/master/lib/license_finder/reports/erb_report.rb). If you need a report with more detailed data or in a different format, we recommend writing a custom ruby script. This [example](https://gist.github.com/mainej/48ac616844505d50f510) will get you started. If you come up with something useful, consider posting it to the Google Group [license-finder@googlegroups.com](license-finder@googlegroups.com). ## Development Dependencies To successfully run the test suite, you will need npm, maven, pip, gradle and bower installed. If you run `rake check_dependencies`, you'll see exactly what you're missing. ### Python For the python dependency tests you will want to have virtualenv installed, to allow pip to work without sudo. For more details, see this [post on virtualenv][]. [post on virtualenv]: http://hackercodex.com/guide/python-development-environment-on-mac-osx/#virtualenv You'll need a pip version >= 6.0. ### JRuby If you're running the test suite with jruby, you're probably going to want to set up some environment variables: ``` JAVA_OPTS='-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1' JRUBY_OPTS='-J-Djruby.launch.inproc=true' ``` ### Gradle You'll need a gradle version >= 1.8. license-finder-2.1.2/.gitignore0000644000175000017500000000010212767430336015423 0ustar pravipravi.bundle .gradle/ .idea/* .pairs .rvmrc Gemfile.lock pkg/* tmp/ *~ license-finder-2.1.2/LICENSE0000644000175000017500000000206212767430336014447 0ustar pravipraviThe MIT License Copyright (c) 2012 Pivotal Labs 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. license-finder-2.1.2/Rakefile0000644000175000017500000000205712767430336015113 0ustar pravipravirequire 'bundler' Bundler::GemHelper.install_tasks require './lib/license_finder/platform' require 'rspec/core/rake_task' desc "Run all specs in spec/" task :spec do RSpec::Core::RakeTask.new(:spec) do |t| t.fail_on_error = true t.pattern = "./spec/**/*_spec.rb" t.rspec_opts = %w[--color] end end desc "Run all specs in features/" task :features do RSpec::Core::RakeTask.new(:features) do |t| t.fail_on_error = true t.pattern = "./features/**/*_spec.rb" opts = %w[--color --format d] opts += LicenseFinder::Platform.darwin? ? [] : %w[--tag ~ios] t.rspec_opts = opts end end desc "Check for non-Ruby development dependencies." task :check_dependencies do require './lib/license_finder' satisfied = true LicenseFinder::PackageManager.package_managers.each do |package_manager| satisfied = false unless package_manager.installed?(LicenseFinder::Logger.new(debug:true)) end exit 1 unless satisfied end task :spec => :check_dependencies task :features => :check_dependencies task :default => [:spec, :features] license-finder-2.1.2/Gemfile0000644000175000017500000000004712767430336014736 0ustar pravipravisource "https://rubygems.org" gemspec license-finder-2.1.2/.rspec0000644000175000017500000000001012767430336014546 0ustar pravipravi--color license-finder-2.1.2/spec/0000755000175000017500000000000012767430336014374 5ustar pravipravilicense-finder-2.1.2/spec/spec_helper.rb0000644000175000017500000000102112767430336017204 0ustar pravipravirequire 'rubygems' require 'bundler/setup' require 'license_finder' require 'pry' require 'rspec' require 'webmock/rspec' require 'rspec/its' Dir[File.join(File.dirname(__FILE__), 'support', '**', '*.rb')].each do |file| require file end RSpec.configure do |config| config.mock_with :rspec end RSpec.configure do |config| config.after(:suite) do ["./doc"].each do |tmp_dir| tmp_dir = Pathname(tmp_dir) tmp_dir.rmtree if tmp_dir.directory? end end config.include LicenseFinder::TestFixtures end license-finder-2.1.2/spec/lib/0000755000175000017500000000000012767430336015142 5ustar pravipravilicense-finder-2.1.2/spec/lib/license_finder/0000755000175000017500000000000012767430336020113 5ustar pravipravilicense-finder-2.1.2/spec/lib/license_finder/cli/0000755000175000017500000000000012767430336020662 5ustar pravipravilicense-finder-2.1.2/spec/lib/license_finder/cli/licenses_spec.rb0000644000175000017500000000332712767430336024033 0ustar pravipravirequire "spec_helper" module LicenseFinder module CLI describe Licenses do let(:decisions) { Decisions.new } before do allow(Decisions).to receive(:fetch_saved) { decisions } end describe "add" do it "updates the license on the requested gem" do silence_stdout do subject.add 'foo_gem', 'foo_license' end expect(subject.decisions.licenses_of("foo_gem").first.name).to eq "foo_license" end it "allows multiple licenses" do silence_stdout do subject.add 'foo_gem', 'one' subject.add 'foo_gem', 'two' end licenses = subject.decisions.licenses_of("foo_gem") expect(licenses.map(&:name)).to match_array %w[one two] end end describe "remove" do it "removes the license from the dependency" do silence_stdout do subject.add("test", "lic") subject.remove("test", "lic") end expect(subject.decisions.licenses_of("test")).to be_empty end it "removes just one license from the dependency" do silence_stdout do subject.add("test", "one") subject.add("test", "two") subject.remove("test", "one") end licenses = subject.decisions.licenses_of("test") expect(licenses.map(&:name)).to eq ["two"] end it "is cumulative" do silence_stdout do subject.add("test", "lic") subject.remove("test", "lic") subject.add("test", "lic") end expect(subject.decisions.licenses_of("test").first.name).to eq "lic" end end end end end license-finder-2.1.2/spec/lib/license_finder/cli/ignored_groups_spec.rb0000644000175000017500000000200312767430336025242 0ustar pravipravirequire "spec_helper" module LicenseFinder module CLI describe IgnoredGroups do let(:decisions) { Decisions.new } before do allow(Decisions).to receive(:fetch_saved) { decisions } end describe "list" do it "shows the ignored groups in the standard output" do decisions.ignore_group("development") expect(capture_stdout { subject.list }).to match /development/ end end describe "add" do it "adds the specified group to the ignored groups list" do silence_stdout do subject.add("test") end expect(subject.decisions.ignored_groups).to eq ["test"].to_set end end describe "remove" do it "removes the specified group from the ignored groups list" do silence_stdout do subject.add("test") subject.remove("test") end expect(subject.decisions.ignored_groups).to be_empty end end end end end license-finder-2.1.2/spec/lib/license_finder/cli/dependencies_spec.rb0000644000175000017500000000454412767430336024656 0ustar pravipravirequire "spec_helper" module LicenseFinder module CLI describe Dependencies do let(:decisions) { Decisions.new } before do allow(Decisions).to receive(:fetch_saved) { decisions } end describe "add" do it "adds a dependency" do silence_stdout do subject.add("js_dep", "MIT", "1.2.3") end expect(subject.decisions.packages.size).to eq 1 package = subject.decisions.packages.first expect(package.name).to eq "js_dep" expect(package.version).to eq "1.2.3" expect(subject.decisions.licenses_of("js_dep")).to eq [License.find_by_name("MIT")].to_set end it "does not require a version" do silence_stdout do subject.add("js_dep", "MIT") end package = subject.decisions.packages.first expect(package.version).to be_nil end it "has an --approve option to approve the added dependency" do subject.options = { approve: true, who: "Julian", why: "We really need this" } silence_stdout do subject.add("js_dep", "MIT") end approval = subject.decisions.approval_of("js_dep") expect(approval.who).to eq "Julian" expect(approval.why).to eq "We really need this" end it 'has an --approve option to approve the added dependency & version combination' do subject.options = { approve: true, who: "Julian", why: "We really need this", version: '1.0.0.RELEASE' } silence_stdout do subject.add("js_dep", "MIT") end approval = subject.decisions.approval_of("js_dep", '1.0.0.RELEASE') expect(approval.who).to eq "Julian" expect(approval.why).to eq "We really need this" expect(approval.safe_versions).to eq ['1.0.0.RELEASE'] end end describe "remove" do it "removes a dependency" do silence_stdout do subject.add("js_dep", "MIT") subject.remove("js_dep") end expect(subject.decisions.packages).to be_empty end end describe "list" do it "lists manually added dependencies" do decisions.add_package("custom", nil) expect(capture_stdout { subject.list }).to match /custom/ end end end end end license-finder-2.1.2/spec/lib/license_finder/cli/blacklist_spec.rb0000644000175000017500000000302312767430336024167 0ustar pravipravirequire "spec_helper" module LicenseFinder module CLI describe Blacklist do let(:decisions) { Decisions.new } before do allow(Decisions).to receive(:fetch_saved) { decisions } end describe "list" do it "shows the blacklist of licenses" do decisions.blacklist("MIT") expect(capture_stdout { subject.list }).to match /MIT/ end end describe "add" do it "adds the specified license to the blacklist" do silence_stdout do subject.add("test") end expect(subject.decisions.blacklisted).to eq [License.find_by_name("test")].to_set end it "adds multiple licenses to the blacklist" do silence_stdout do subject.add("test", "rest") end expect(subject.decisions.blacklisted).to eq [ License.find_by_name("test"), License.find_by_name("rest") ].to_set end end describe "remove" do it "removes the specified license from the blacklist" do silence_stdout do subject.add("test") subject.remove("test") end expect(subject.decisions.blacklisted).to be_empty end it "removes multiple licenses from the blacklist" do silence_stdout do subject.add("test", "rest") subject.remove("test", "rest") end expect(subject.decisions.blacklisted).to be_empty end end end end end license-finder-2.1.2/spec/lib/license_finder/cli/ignored_dependencies_spec.rb0000644000175000017500000000236312767430336026362 0ustar pravipravirequire "spec_helper" module LicenseFinder module CLI describe IgnoredDependencies do let(:decisions) { Decisions.new } before do allow(Decisions).to receive(:fetch_saved) { decisions } end describe "list" do context "when there is at least one ignored dependency" do it "shows the ignored dependencies" do decisions.ignore("bundler") expect(capture_stdout { subject.list }).to match /bundler/ end end context "when there are no ignored dependencies" do it "prints '(none)'" do expect(capture_stdout { subject.list }).to match /\(none\)/ end end end describe "add" do it "adds the specified group to the ignored groups list" do silence_stdout do subject.add("test") end expect(subject.decisions.ignored).to eq ["test"].to_set end end describe "remove" do it "removes the specified group from the ignored groups list" do silence_stdout do subject.add("test") subject.remove("test") end expect(subject.decisions.ignored).to be_empty end end end end end license-finder-2.1.2/spec/lib/license_finder/cli/approvals_spec.rb0000644000175000017500000000364012767430336024233 0ustar pravipravirequire "spec_helper" module LicenseFinder module CLI describe Approvals do let(:decisions) { Decisions.new } before do allow(Decisions).to receive(:fetch_saved) { decisions } end describe "#add" do it "approves the requested gem" do silence_stdout do subject.add 'foo' end expect(subject.decisions).to be_approved "foo" end it "approves multiple dependencies" do silence_stdout do subject.add 'foo', 'bar' end expect(subject.decisions).to be_approved "foo" expect(subject.decisions).to be_approved "bar" end it "raises a warning if no dependency was specified" do silence_stdout do expect { subject.add }.to raise_error(ArgumentError) end end it "sets approver, approval message, and approval version" do subject.options = { who: "Julian", why: "We really need this", version: '1.0.0.RELEASE' } silence_stdout do subject.add("foo") end approval = subject.decisions.approval_of("foo", '1.0.0.RELEASE') expect(approval.who).to eq "Julian" expect(approval.why).to eq "We really need this" expect(approval.safe_versions).to eq ['1.0.0.RELEASE'] end end describe "remove" do it "unapproves the specified dependency" do silence_stdout do subject.add("test") subject.remove("test") end expect(subject.decisions).not_to be_approved "test" end it "is cumulative" do silence_stdout do subject.add("test") subject.remove("test") subject.add("test") end expect(subject.decisions).to be_approved "test" end end end end end license-finder-2.1.2/spec/lib/license_finder/cli/whitelist_spec.rb0000644000175000017500000000302412767430336024234 0ustar pravipravirequire "spec_helper" module LicenseFinder module CLI describe Whitelist do let(:decisions) { Decisions.new } before do allow(Decisions).to receive(:fetch_saved) { decisions } end describe "list" do it "shows the whitelist of licenses" do decisions.whitelist("MIT") expect(capture_stdout { subject.list }).to match /MIT/ end end describe "add" do it "adds the specified license to the whitelist" do silence_stdout do subject.add("test") end expect(subject.decisions.whitelisted).to eq [License.find_by_name("test")].to_set end it "adds multiple licenses to the whitelist" do silence_stdout do subject.add("test", "rest") end expect(subject.decisions.whitelisted).to eq [ License.find_by_name("test"), License.find_by_name("rest") ].to_set end end describe "remove" do it "removes the specified license from the whitelist" do silence_stdout do subject.add("test") subject.remove("test") end expect(subject.decisions.whitelisted).to be_empty end it "removes multiple licenses from the whitelist" do silence_stdout do subject.add("test", "rest") subject.remove("test", "rest") end expect(subject.decisions.whitelisted).to be_empty end end end end end license-finder-2.1.2/spec/lib/license_finder/cli/main_spec.rb0000644000175000017500000001726112767430336023154 0ustar pravipravirequire "spec_helper" module LicenseFinder module CLI describe Main do let(:decisions) { Decisions.new } let(:packages) { [] } let!(:decision_applier) do DecisionApplier.new( decisions: decisions, packages: packages ) end let(:configuration) { double(:configuration, valid_project_path?: true) } let(:license_finder_instance) { double(:license_finder, unapproved: [unapproved_dependency], blacklisted: [], project_name: 'taco stand', config: configuration) } let(:license) { double(:license, name: "thing") } let(:unapproved_dependency) { double(:dependency, name: "a dependency", version: "2.4.1", missing?: false, licenses: [license]) } before do allow(Decisions).to receive(:fetch_saved) { decisions } allow(DecisionApplier).to receive(:new) { decision_applier } end describe "default" do it "checks for action items" do decisions.add_package("a dependency", nil) expect_any_instance_of(LicenseFinder::Core).to receive(:unapproved).and_return([unapproved_dependency]) silence_stdout do expect { described_class.start(["--quiet"]) }.to raise_error(SystemExit) end end end describe "cli options" do let(:config_options) { [ "--decisions_file=whatever.yml", "--project_path=../other_project", "--gradle_command=do_things", "--rebar_command=do_other_things", "--rebar_deps_dir=rebar_dir", "--save" ] } let(:logger_options) { [ '--quiet', '--debug' ] } let(:parsed_config) { { decisions_file: 'whatever.yml', project_path: '../other_project', gradle_command: 'do_things', rebar_command: 'do_other_things', rebar_deps_dir: 'rebar_dir', save: 'license_report', logger: {} } } it "passes the config options to the new LicenseFinder::Core instance" do expect(LicenseFinder::Core).to receive(:new).with(parsed_config).and_return(license_finder_instance) silence_stdout do expect { described_class.start(config_options) }.to raise_error(SystemExit) end end it "passes the logger options to the new LicenseFinder::Core instance" do expect(LicenseFinder::Core).to receive(:new).with({logger: {debug: true, quiet: true}}).and_return(license_finder_instance) silence_stdout do expect { described_class.start(logger_options) }.to raise_error(SystemExit) end end end describe "#report" do let(:packages) { [Package.new('one dependency', "1.1")] } def report capture_stdout { subject.report } end it "reports acknowleged dependencies" do expect(report).to eq "\"one dependency\", 1.1, unknown\n" end it "will output a specific format" do subject.options = {format: 'markdown'} expect(report).to include "## Action" end it "will output a custom csv" do subject.options = {format: 'csv', columns: ['name', 'version']} expect(report).to eq "one dependency,1.1\n" end context 'when the package is a nuget package' do let(:packages) { [NugetPackage.new('one dependency', "1.1")] } it "will includes package_manager for csv report" do subject.options = {format: 'csv', columns: ['name', 'version', 'package_manager']} expect(report).to eq "one dependency,1.1,Nuget\n" end end context "in html reports" do before do subject.options = {format: 'html'} end context "when the project has a name" do before { decisions.name_project("given project name") } it "should show the project name" do expect(report).to include "given project name" end end context "when the project has no name" do before { allow_any_instance_of(Pathname).to receive(:basename).and_return("a_project") } it "should default to the directory name" do expect(report).to include "a_project" end end end context "when the --save option is passed" do it "calls report method and calls save_report" do subject.options = {save: "license_report", format: 'text'} expect(subject).to receive(:report).and_call_original expect(subject).to receive(:save_report) subject.report end context "when file name is not specified (--save)" do it "creates report that is called the default file name" do provided_by_thor_as_default_name = "license_report" #####FIX ME subject.options = {save: provided_by_thor_as_default_name, format: 'text'} expect(subject).to receive(:report).and_call_original expect(subject).to receive(:save_report).with(instance_of(String), "license_report") subject.report end it "saves the output report to default file ('license_report.txt') in project root" do mock_file = double(:file) expect(File).to receive(:open).with("license_report.txt", "w").and_yield(mock_file) expect(mock_file).to receive(:write).with("content of file") subject.send(:save_report, "content of file", "license_report.txt") end end context "when file name is specified (--save='FILENAME')" do it "saves with a specified file name" do subject.options = {save: 'my_report' , format: 'text'} expect(subject).to receive(:report).and_call_original expect(subject).to receive(:save_report).with(instance_of(String), "my_report") subject.report end end end context "when the --save option is not passed" do it "calls report method and does not call save_report" do subject.options = {format: 'text'} expect(subject).to receive(:report).and_call_original expect(subject).not_to receive(:save_report) expect(subject).to receive(:report_of) report end end end describe "#action_items" do def action_items subject.options = {quiet: true, format: 'text'} subject.action_items end context "with unapproved dependencies" do let(:packages) { [Package.new('one dependency')] } it "reports unapproved dependencies" do result = capture_stdout do expect { action_items }.to raise_error(SystemExit) end expect(result).to match /dependencies/i expect(result).to match /one dependency/ end end context "with blacklisted dependencies" do let(:decisions) { Decisions.new.blacklist('GPLv3')} let(:packages) { [Package.new('blacklisted', '1.0', spec_licenses: ['GPLv3'])] } it "reports blacklisted dependencies" do result = capture_stdout do expect { action_items }.to raise_error(SystemExit) end expect(result).to include "Blacklisted dependencies:\nblacklisted, 1.0, GPLv3" end end it "reports that all dependencies are approved" do result = capture_stdout do expect { action_items }.not_to raise_error end expect(result).to match /approved/i end end end end end license-finder-2.1.2/spec/lib/license_finder/cli/project_name_spec.rb0000644000175000017500000000162012767430336024666 0ustar pravipravirequire "spec_helper" module LicenseFinder module CLI describe ProjectName do let(:decisions) { Decisions.new } before do allow(Decisions).to receive(:fetch_saved) { decisions } end describe "show" do it "shows the configured project name" do decisions.name_project("test") expect(capture_stdout { subject.show }).to match /test/ end end describe "add" do it "sets the project name" do silence_stdout do subject.add("test") end expect(subject.decisions.project_name).to eq "test" end end describe "remove" do it "removes the project name" do silence_stdout do subject.add("test") subject.remove end expect(subject.decisions.project_name).to be_nil end end end end end license-finder-2.1.2/spec/lib/license_finder/package_delta_spec.rb0000644000175000017500000000066312767430336024223 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe PackageDelta do describe '#<=>' do let(:foo) { Package.new('foo') } let(:bar) { Package.new('bar') } it 'sorts by status (added, removed, unchanged)' do p1 = PackageDelta.added(foo) p2 = PackageDelta.removed(bar) p3 = PackageDelta.unchanged(foo, bar) expect([p3, p2, p1].sort).to eq([p1, p2, p3]) end end end endlicense-finder-2.1.2/spec/lib/license_finder/package_manager_spec.rb0000644000175000017500000000400412767430336024535 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe PackageManager do describe "#current_packages_with_relations" do it "sets packages' parents" do grandparent = Package.new("grandparent", nil, children: ["parent"]) parent = Package.new("parent", nil, children: ["child"]) child = Package.new("child") pm = described_class.new allow(pm).to receive(:current_packages) { [grandparent, parent, child] } expect(pm.current_packages_with_relations.map(&:parents)).to eq([ [].to_set, ["grandparent"].to_set, ["parent"].to_set ]) end end describe "#package_management_command" do it "defaults to nil" do expect(LicenseFinder::PackageManager.package_management_command).to be_nil end end describe ".installed?" do context "package_management_command is nil" do before do allow(LicenseFinder::PackageManager).to receive(:package_management_command).and_return(nil) end it "returns true" do expect(LicenseFinder::PackageManager.installed?).to be_truthy end end context "package_management_command exists" do before do allow(LicenseFinder::PackageManager).to receive(:package_management_command).and_return("foobar") allow(LicenseFinder::PackageManager).to receive(:command_exists?).with("foobar").and_return(true) end it "returns true" do expect(LicenseFinder::PackageManager.installed?).to be_truthy end end context "package_management_command does not exist" do before do allow(LicenseFinder::PackageManager).to receive(:package_management_command).and_return("foobar") allow(LicenseFinder::PackageManager).to receive(:command_exists?).with("foobar").and_return(false) end it "returns false" do expect(LicenseFinder::PackageManager.installed?).to be_falsey end end end end end license-finder-2.1.2/spec/lib/license_finder/decisions_spec.rb0000644000175000017500000002624112767430336023437 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe Decisions do describe ".add_package" do it "adds to list of packages" do packages = subject.add_package("dep", nil).packages expect(packages.map(&:name)).to eq ["dep"] end it "includes optional version" do packages = subject.add_package("dep", "0.2.0").packages expect(packages.first.version).to eq "0.2.0" end end describe ".remove_package" do it "drops a package" do packages = subject .add_package("dep", nil) .remove_package("dep") .packages expect(packages.size).to eq 0 end it "does nothing if package was never added" do packages = subject .remove_package("dep") .packages expect(packages.size).to eq 0 end end describe ".license" do it "will report license for a dependency" do license = subject .license("dep", "MIT") .licenses_of("dep") .first expect(license).to eq License.find_by_name("MIT") end it "will report multiple licenses" do licenses = subject .license("dep", "MIT") .license("dep", "GPL") .licenses_of("dep") expect(licenses).to eq [ License.find_by_name("MIT"), License.find_by_name("GPL"), ].to_set end it "adapts names" do license = subject .license("dep", "Expat") .licenses_of("dep") .first expect(license).to eq License.find_by_name("MIT") end end describe ".unlicense" do it "will not report the given dependency as licensed" do licenses = subject .license("dep", "MIT") .unlicense("dep", "MIT") .licenses_of("dep") expect(licenses).to be_empty end it "will only remove the specified license" do licenses = subject .license("dep", "MIT") .license("dep", "GPL") .unlicense("dep", "MIT") .licenses_of("dep") expect(licenses).to eq [License.find_by_name("GPL")].to_set end it "is cumulative" do license = subject .license("dep", "MIT") .unlicense("dep", "MIT") .license("dep", "MIT") .licenses_of("dep") .first expect(license).to eq License.find_by_name("MIT") end end describe ".approve" do it "will report a dependency as approved" do decisions = subject.approve("dep") expect(decisions).to be_approved("dep") end it "will not report a dependency as approved by default" do expect(subject).not_to be_approved("dep") end end describe ".unapprove" do it "will not report the given dependency as approved" do decisions = subject .approve("dep") .unapprove("dep") expect(subject).not_to be_approved("dep") end it "is cumulative" do decisions = subject .approve("dep") .unapprove("dep") .approve("dep") expect(subject).to be_approved("dep") end end describe ".whitelist" do it "will report the given license as approved" do decisions = subject.whitelist("MIT") expect(decisions).to be_whitelisted(License.find_by_name("MIT")) end it "adapts names" do decisions = subject.whitelist("Expat") expect(decisions).to be_whitelisted(License.find_by_name("MIT")) end it "adds to list" do decisions = subject.whitelist("MIT") expect(decisions.whitelisted).to eq(Set.new([License.find_by_name("MIT")])) end end describe ".unwhitelist" do it "will not report the given license as approved" do decisions = subject .whitelist("MIT") .unwhitelist("MIT") expect(decisions).not_to be_whitelisted(License.find_by_name("MIT")) end it "is cumulative" do decisions = subject .whitelist("MIT") .unwhitelist("MIT") .whitelist("MIT") expect(decisions).to be_whitelisted(License.find_by_name("MIT")) end it "adapts names" do decisions = subject .whitelist("MIT") .unwhitelist("Expat") expect(decisions).not_to be_whitelisted(License.find_by_name("MIT")) end end describe ".blacklist" do it "will report the given license as blacklisted" do decisions = subject.blacklist("MIT") expect(decisions).to be_blacklisted(License.find_by_name("MIT")) end it "adapts names" do decisions = subject.blacklist("Expat") expect(decisions).to be_blacklisted(License.find_by_name("MIT")) end it "adds to list" do decisions = subject.blacklist("MIT") expect(decisions.blacklisted).to eq(Set.new([License.find_by_name("MIT")])) end end describe ".unblacklist" do it "will not report the given license as blacklisted" do decisions = subject .blacklist("MIT") .unblacklist("MIT") expect(decisions).not_to be_blacklisted(License.find_by_name("MIT")) end it "is cumulative" do decisions = subject .blacklist("MIT") .unblacklist("MIT") .blacklist("MIT") expect(decisions).to be_blacklisted(License.find_by_name("MIT")) end it "adapts names" do decisions = subject .blacklist("MIT") .unblacklist("Expat") expect(decisions).not_to be_blacklisted(License.find_by_name("MIT")) end end describe ".ignore" do it "will report ignored dependencies" do decisions = subject.ignore("dep") expect(decisions).to be_ignored("dep") end end describe ".heed" do it "will not report heeded dependencies" do decisions = subject .ignore("dep") .heed("dep") expect(decisions).not_to be_ignored("dep") end it "is cumulative" do decisions = subject .ignore("dep") .heed("dep") .ignore("dep") expect(decisions).to be_ignored("dep") end end describe ".ignore_group" do it "will report ignored groups" do decisions = subject.ignore_group("development") expect(decisions).to be_ignored_group("development") end end describe ".heed_group" do it "will not report heeded groups" do decisions = subject .ignore_group("development") .heed_group("development") expect(decisions).not_to be_ignored_group("development") end it "is cumulative" do decisions = subject .ignore_group("development") .heed_group("development") .ignore_group("development") expect(decisions).to be_ignored_group("development") end end describe ".name_project" do it "reports project name" do decisions = subject.name_project("proj") expect(decisions.project_name).to eq "proj" end end describe ".unname_project" do it "reports project name" do decisions = subject .name_project("proj") .unname_project expect(decisions.project_name).to be_nil end end describe "persistence" do def roundtrip(decisions) described_class.restore(decisions.persist) end it "can restore added packages" do decisions = roundtrip( subject.add_package("dep", "0.2.0") ) packages = decisions.packages expect(packages.map(&:name)).to eq ["dep"] end it "can restore removed packages" do decisions = roundtrip( subject .add_package("dep", nil) .remove_package("dep") ) expect(decisions.packages.size).to eq 0 end it "can restore licenses" do license = roundtrip( subject.license("dep", "MIT") ).licenses_of("dep").first expect(license).to eq License.find_by_name("MIT") end it "can restore unlicenses" do licenses = roundtrip( subject .license("dep", "MIT") .license("dep", "GPL") .unlicense("dep", "MIT") ).licenses_of("dep") expect(licenses).to eq [License.find_by_name("GPL")].to_set end it "can restore approvals" do time = Time.now.getutc decisions = roundtrip(subject.approve("dep", who: "Somebody", why: "Some reason", when: time)) expect(decisions).to be_approved("dep") approval = decisions.approval_of("dep") expect(approval.who).to eq "Somebody" expect(approval.why).to eq "Some reason" expect(approval.safe_when).to eq time end it "can restore unapprovals" do decisions = roundtrip( subject .approve("dep") .unapprove("dep") ) expect(decisions).not_to be_approved("dep") end it "can restore whitelists" do decisions = roundtrip( subject.whitelist("MIT") ) expect(decisions).to be_whitelisted(License.find_by_name("MIT")) end it "can restore un-whitelists" do decisions = roundtrip( subject .whitelist("MIT") .unwhitelist("MIT") ) expect(decisions).not_to be_whitelisted(License.find_by_name("MIT")) end it "can restore blacklists" do decisions = roundtrip( subject.blacklist("MIT") ) expect(decisions).to be_blacklisted(License.find_by_name("MIT")) end it "can restore un-blacklists" do decisions = roundtrip( subject .blacklist("MIT") .unblacklist("MIT") ) expect(decisions).not_to be_blacklisted(License.find_by_name("MIT")) end it "can restore ignorals" do decisions = roundtrip(subject.ignore("dep")) expect(decisions).to be_ignored("dep") end it "can restore heeds" do decisions = roundtrip( subject .ignore("dep") .heed("dep") ) expect(decisions).not_to be_ignored("dep") end it "can restore ignored groups" do decisions = roundtrip( subject.ignore_group("development") ) expect(decisions).to be_ignored_group("development") end it "can restore heeded groups" do decisions = roundtrip( subject .ignore_group("development") .heed_group("development") ) expect(decisions).not_to be_ignored_group("development") end it "can restore project names" do decisions = roundtrip( subject.name_project("an-app") ) expect(decisions.project_name).to eq "an-app" end it "can restore project unnames" do decisions = roundtrip( subject .name_project("an-app") .unname_project ) expect(decisions.project_name).to be_nil end it "ignores empty or missing persisted decisions" do described_class.restore('') described_class.restore(nil) end end end end license-finder-2.1.2/spec/lib/license_finder/packages/0000755000175000017500000000000012767430336021671 5ustar pravipravilicense-finder-2.1.2/spec/lib/license_finder/packages/license_files_spec.rb0000644000175000017500000000235412767430336026040 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe LicenseFiles do describe "#find" do def files_in(fixture) root_path = fixture_path(fixture) subject = described_class.find(root_path.to_s) subject.map do |f| Pathname(f.path).relative_path_from(root_path).to_s end end it "is empty if passed a nil install path" do subject = described_class.new nil expect(subject.find).to eq([]) end it "is empty if there aren't any license files" do expect(files_in('not/a/dir')).to eq([]) end it "includes files with names like LICENSE, README or COPYING" do expect(files_in('license_names')).to match_array( %w[COPYING.txt LICENSE Mit-License README.rdoc Licence.rdoc] ) end it "includes files deep in the hierarchy" do expect(files_in('nested_gem')).to eq(['vendor/LICENSE']) end it "includes files nested inside LICENSE directory" do expect(files_in('license_directory')).to match_array(%w[ COPYING LICENSE/MIT.txt ]) end it "handles non UTF8 encodings" do expect { files_in('utf8_gem') }.not_to raise_error end end end end license-finder-2.1.2/spec/lib/license_finder/packages/possible_license_file_spec.rb0000644000175000017500000000200012767430336027541 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe PossibleLicenseFile do context "file parsing" do subject { described_class.new('root/nested/path') } context "ignoring text" do before do allow(subject).to receive(:text).and_return('file text') end its(:text) { should == 'file text' } # this is a terrible test, considering the stubbing its(:path) { should == 'root/nested/path' } end end subject { described_class.new('gem/license/path') } context "with a known license" do before do allow(subject).to receive(:text).and_return('a known license') allow(License).to receive(:find_by_text).with('a known license').and_return(License.find_by_name("MIT")) end its(:license) { should == License.find_by_name("MIT") } end context "with an unknown license" do before do allow(subject).to receive(:text).and_return('') end its(:license) { should be_nil } end end end license-finder-2.1.2/spec/lib/license_finder/packages/activation_spec.rb0000644000175000017500000000232712767430336025375 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe Activation do let(:package) { Package.new("p", nil) } let(:license) { License.find_by_name("l") } let(:activation) { described_class.new(package, license) } it "reports that a license has been activated for a package" do subject = Activation::Basic.new(package, license) expect(subject.package).to eq package expect(subject.license).to eq license end describe Activation::FromDecision do it "reports that it came from a decision" do expect(activation.sources).to eq ["from decision"] end end describe Activation::FromSpec do it "reports that it came from a spec" do expect(activation.sources).to eq ["from spec"] end end describe Activation::FromFiles do it "reports that it came from some files" do files = [double(:file, path: "x"), double(:file, path: "y")] activation = described_class.new(package, license, files) expect(activation.sources).to eq ["from file 'x'", "from file 'y'"] end end describe Activation::None do it "reports that has no source" do expect(activation.sources).to eq [] end end end end license-finder-2.1.2/spec/lib/license_finder/packages/licensing_spec.rb0000644000175000017500000000003612767430336025202 0ustar pravipravi# tested via Package#licenses license-finder-2.1.2/spec/lib/license_finder/core_spec.rb0000644000175000017500000000310712767430336022403 0ustar pravipravirequire "spec_helper" module LicenseFinder describe Core do let(:options) { {} } let(:license_finder) { described_class.new(options) } let(:logger) { Logger.new(options[:logger]) } let(:configuration) { LicenseFinder::Configuration.new(options, {})} let(:pathname) { Pathname.pwd + Pathname(options[:project_path]) } before do allow(Logger).to receive(:new).and_return(logger) end describe "#unapproved" do let(:options) { { logger: {}, project_path: 'other_directory', gradle_command: 'just_do_it', rebar_command: 'do_it', rebar_deps_dir: 'nowhere/deps' } } let(:package_options) { { logger: logger, project_path: configuration.project_path, ignore_groups: Set.new, go_full_version: nil, gradle_command: configuration.gradle_command, gradle_include_groups: nil, rebar_command: configuration.rebar_command, rebar_deps_dir: configuration.rebar_deps_dir } } it "delegates to the decision_applier" do decision_applier = double(:decision_applier) allow(license_finder).to receive(:decision_applier).and_return(decision_applier) expect(decision_applier).to receive(:unapproved) license_finder.unapproved end it "passes through options when fetching current packages" do expect(PackageManager).to receive(:current_packages).with(package_options).and_return([]) license_finder.unapproved end end end end license-finder-2.1.2/spec/lib/license_finder/license_spec.rb0000644000175000017500000000666412767430336023110 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe License do describe ".find_by_name" do it "should find a registered license" do license = License.find_by_name("Expat") expect(license.name).to eq "MIT" end it "should make an unrecognized license" do license = License.find_by_name("not a known license") expect(license.name).to eq "not a known license" end context "making the default license" do it "sets the name to 'unknown'" do expect(License.find_by_name(nil).name).to eq("unknown") end it "does not equal other uses of the default license" do expect(License.find_by_name(nil)).not_to eq(License.find_by_name(nil)) end end end describe ".find_by_text" do it "should find a registered license" do license = License.find_by_text('This gem is released under the MIT license') expect(license.name).to eq "MIT" end it "returns nil if not found" do license = License.find_by_text("foo") expect(license).to be_nil end end def make_license(settings = {}) defaults = { short_name: "Default Short Name", url: "http://example.com/license", matcher: License::Matcher.from_text('Default Matcher') } License.new(defaults.merge(settings)) end describe "#matches_name?" do it "should match on short_name" do expect(make_license(short_name: "Foo")).to be_matches_name "Foo" end it "should match on pretty name" do expect(make_license(pretty_name: "Foo")).to be_matches_name "Foo" end it "should match on alternative names" do license = make_license(other_names: ["Foo", "Bar"]) expect(license).to be_matches_name "Foo" expect(license).to be_matches_name "Bar" end it "should ignore case" do expect(make_license(pretty_name: "Foo")).to be_matches_name "foo" expect(make_license(pretty_name: "foo")).to be_matches_name "Foo" end it "should not fail if pretty_name or other_names are omitted" do expect(make_license).to be_matches_name "Default Short Name" end end describe ".matches_text?" do it "should match on text" do license = make_license(matcher: License::Matcher.from_regex(/The license text/)) expect(license).to be_matches_text "The license text" expect(license).not_to be_matches_text "Some other text" end it "should match regardless of placeholder names, whitespace, or quotes" do license_text = <<-LICENSE The "company" of shall not be held `responsible` for 'anything'. LICENSE license = make_license(matcher: License::Matcher.from_text(License::Text.normalize_punctuation(license_text))) expect(license).to be_matches_text <<-FILE The ''company'' of foo bar *%*%*%*% shall not be held "responsible" for `anything`. FILE end it "should match even if whitespace at beginning and end don't match" do template = License::Template.new("\nThe license text") license = make_license(matcher: License::Matcher.from_template(template)) expect(license).to be_matches_text "The license text\n" end end it "should default pretty_name to short_name" do expect(make_license.name).to eq("Default Short Name") end end end license-finder-2.1.2/spec/lib/license_finder/license/0000755000175000017500000000000012767430336021535 5ustar pravipravilicense-finder-2.1.2/spec/lib/license_finder/license/definitions_spec.rb0000644000175000017500000001572412767430336025420 0ustar pravipravirequire 'spec_helper' describe LicenseFinder::License::Definitions do it "should create unrecognized licenses" do license = described_class.build_unrecognized("foo") expect(license.name).to eq("foo") expect(license.url).to be_nil expect(license).to be_matches_name("foo") expect(license).not_to be_matches_text("foo") end end describe LicenseFinder::License, "Apache2" do it "should be recognized" do |e| expect(described_class.find_by_name("Apache2").url).to be end end describe LicenseFinder::License, "BSD" do it "should be recognized" do |e| expect(described_class.find_by_name("BSD").url).to be end end describe LicenseFinder::License, "GPLv2" do it "should be recognized" do expect(described_class.find_by_name("GPLv2").url).to be end end describe LicenseFinder::License, "GPLv3" do it "should be recognized" do expect(described_class.find_by_name("GPLv3").url).to be end end describe LicenseFinder::License, "ISC" do it "should be recognized" do expect(described_class.find_by_name("ISC").url).to be end end describe LicenseFinder::License, "LGPL" do it "should be recognized" do expect(described_class.find_by_name("LGPL").url).to be end end describe LicenseFinder::License, "MIT" do subject { described_class.find_by_name "MIT" } describe "#matches_text?" do it "should return true if the text contains the MIT url" do expect(subject).to be_matches_text "MIT License is awesome http://opensource.org/licenses/mit-license" expect(subject).to be_matches_text "MIT Licence is awesome http://www.opensource.org/licenses/mit-license" expect(subject).not_to be_matches_text "MIT Licence is awesome http://www!opensource!org/licenses/mit-license" end it "should return true if the text begins with 'The MIT License'" do expect(subject).to be_matches_text "The MIT License" expect(subject).to be_matches_text "The MIT Licence" expect(subject).not_to be_matches_text "Something else\nThe MIT License" end it "should return true if the text contains 'is released under the MIT license'" do expect(subject).to be_matches_text "is released under the MIT license" expect(subject).to be_matches_text "is released under the MIT licence" end end end describe LicenseFinder::License, "MPL2" do subject { described_class.find_by_name "MPL2" } describe "#matches_text?" do it "should return true if the text begins with 'The Mozilla Public License, version 2.0'" do expect(subject).to be_matches_text "Mozilla Public License, version 2.0" expect(subject).not_to be_matches_text "Something else\nMozilla Public License, version 2.0" end end end describe LicenseFinder::License, "NewBSD" do subject { described_class.find_by_name "NewBSD" } it "should match regardless of organization or copyright holder names" do license = <<-LICENSE Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Johnny %$#!.43298432, Guitar INC! nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Johnny %$#!.43298432, Guitar 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. LICENSE expect(subject).to be_matches_text license end it "should match with the alternate wording of third clause" do license = <<-LICENSE Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Johnny %$#!.43298432, Guitar 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. LICENSE expect(subject).to be_matches_text license end end describe LicenseFinder::License, "Python" do it "should be recognized" do expect(described_class.find_by_name("Python").url).to be end end describe LicenseFinder::License, "Ruby" do subject { described_class.find_by_name "Ruby" } describe "#matches?" do it "should return true when the Ruby license URL is present" do expect(subject).to be_matches_text "This gem is available under the following license:\nhttp://www.ruby-lang.org/en/LICENSE.txt\nOkay?" end it "should return false when the Ruby License URL is not present" do expect(subject).not_to be_matches_text "This gem is available under the following license:\nhttp://www.example.com\nOkay?" end it "should return false for pathological licenses" do expect(subject).not_to be_matches_text "This gem is available under the following license:\nhttp://wwwzruby-langzorg/en/LICENSEztxt\nOkay?" end end end describe LicenseFinder::License, "SimplifiedBSD" do it "should be recognized" do expect(described_class.find_by_name("SimplifiedBSD").url).to be end end license-finder-2.1.2/spec/lib/license_finder/package_spec.rb0000644000175000017500000001346412767430336023055 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe Package do subject do described_class.new( "a package", "1.3.1", authors: "the authors", summary: "a summary", description: "a description", homepage: "a homepage", groups: %w[dev test], children: %w[child-1 child2], install_path: "some/package/path", spec_licenses: %w[MIT GPL] ) end its(:name) { should == "a package" } its(:version) { should == "1.3.1" } its(:authors) { should == 'the authors' } its(:summary) { should == "a summary" } its(:description) { should == "a description" } its(:homepage) { should == "a homepage" } its(:groups) { should == %w[dev test] } its(:children) { should == %w[child-1 child2] } its(:install_path) { should eq "some/package/path" } it 'has defaults' do subject = described_class.new(nil, nil) expect(subject.name).to be_nil expect(subject.version).to be_nil expect(subject.authors).to eq "" expect(subject.summary).to eq "" expect(subject.description).to eq "" expect(subject.homepage).to eq "" expect(subject.groups).to eq [] expect(subject.children).to eq [] expect(subject.install_path).to be_nil expect(subject.license_names_from_spec).to eq [] expect(subject.licenses.map(&:name)).to eq ['unknown'] end describe '#licenses' do def stub_license_files(*license_names) license_files = license_names.map do |license_name| double(:file, license: License.find_by_name(license_name), path: "some/path") end allow(LicenseFiles).to receive(:find).with("some/package/path") .and_return(license_files) end it "are not required" do subject = described_class.new(nil, nil) expect(subject.licenses.map(&:name)).to eq ['unknown'] end describe "decided by user" do it "returns all decided licenses" do subject = described_class.new(nil, nil) subject.decide_on_license(License.find_by_name("MIT")) subject.decide_on_license(License.find_by_name("GPL")) expect(subject.licenses.map(&:name)).to match_array ["MIT", "GPL"] end it "de-duplicates across license aliases" do subject = described_class.new(nil, nil) subject.decide_on_license(License.find_by_name("MIT")) subject.decide_on_license(License.find_by_name("Expat")) expect(subject.licenses.map(&:name)).to eq ["MIT"] end it "trumps licenses from the spec" do subject = described_class.new(nil, nil, spec_licenses: ["GPL"]) subject.decide_on_license(License.find_by_name("MIT")) expect(subject.licenses.map(&:name)).to eq ["MIT"] end it "trumps licenses from the install path" do stub_license_files 'Detected License' subject = described_class.new(nil, nil, install_path: "some/package/path") subject.decide_on_license(License.find_by_name("MIT")) expect(subject.licenses.map(&:name)).to eq ["MIT"] end end describe "from the spec" do it "converts the names to licenses" do subject = described_class.new(nil, nil, spec_licenses: ["MIT", "GPL"]) expect(subject.licenses.map(&:name)).to match_array ["MIT", "GPL"] end it "de-duplicates across license aliases" do subject = described_class.new(nil, nil, spec_licenses: ["MIT", "Expat"]) expect(subject.licenses.map(&:name)).to eq ["MIT"] end it "trumps licenses from the install path" do stub_license_files 'Detected License' subject = described_class.new(nil, nil, spec_licenses: ["MIT"], install_path: "some/package/path") expect(subject.licenses.map(&:name)).to eq ["MIT"] end end describe "from the install path" do it "uses the licenses reported by files in the install path" do stub_license_files 'MIT', 'GPL' subject = described_class.new(nil, nil, install_path: "some/package/path") expect(subject.licenses.map(&:name)).to eq ["MIT", "GPL"] end it "de-duplicates across license aliases" do stub_license_files 'MIT', 'Expat' subject = described_class.new(nil, nil, install_path: "some/package/path") expect(subject.licenses.map(&:name)).to eq ["MIT"] end end end describe '#blacklisted?' do it 'defaults to false' do expect(subject.blacklisted?).to eq(false) end it 'can be set by blacklisted!' do subject.blacklisted! expect(subject.blacklisted?).to eq(true) end end describe '#approved?' do it 'returns false by default' do expect(subject.approved?).to eq(false) end it 'returns true when approved manually' do subject.approved_manually!('I approve of this dependency') expect(subject.approved?).to eq(true) end it 'returns true when whitelisted' do subject.whitelisted! expect(subject.approved?).to eq(true) end it 'returns false when blacklisted' do subject.blacklisted! expect(subject.approved?).to eq(false) end end describe '#eql?' do it 'returns true if package name matches' do p1 = Package.new('package', '0.0.1') p2 = Package.new('package', '0.0.2') p3 = Package.new('foo', 'foo') expect(p1.eql?(p2)).to be true expect(p1.eql?(p3)).to be false expect(p1.hash).to eq p2.hash end end describe '#<=>' do it 'sorts by name' do p1 = Package.new('bob') p2 = Package.new('jim') p3 = Package.new('dan') expect([p2, p1, p3].sort).to eq([p1, p3, p2]) end end end end license-finder-2.1.2/spec/lib/license_finder/license_aggregator_spec.rb0000644000175000017500000000515712767430336025306 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe LicenseAggregator do describe '#dependencies' do let(:hammer) { Package.new('hammer', '1.0.0') } let(:helmet) { Package.new('helmet', '3.0.0') } let(:license_finder_1) { double(:license_finder, acknowledged: [hammer]) } let(:license_finder_2) { double(:license_finder, acknowledged: [helmet]) } before do allow(Core).to receive(:new).and_return(license_finder_1, license_finder_2) end it 'returns an array of MergedPackage objects' do aggregator = LicenseAggregator.new({}, ['path/to/subproject-1', 'path/to/subproject-2']) results = aggregator.dependencies expect(results.first).to be_a(MergedPackage) expect(results.map(&:name)).to match_array ['hammer', 'helmet'] end context 'when there are duplicates' do let(:license_finder_2) { double(:license_finder, acknowledged: [helmet, hammer])} it 'aggregates duplicate packages by package name' do aggregator = LicenseAggregator.new({}, ['path/to/subproject-1', 'path/to/subproject-2']) results = aggregator.dependencies expect(results.count).to eq(2) expect(results[1].name).to eq('helmet') expect(results[1].subproject_paths[0]).to end_with('path/to/subproject-2') expect(results[0].name).to eq('hammer') expect(results[0].subproject_paths[0]).to end_with('path/to/subproject-1') expect(results[0].subproject_paths[1]).to end_with('path/to/subproject-2') end end context 'when there are duplicate packages with different versions' do let(:hammer_new) { Package.new('hammer', '2.0.0') } let(:license_finder_2) { double(:license_finder, acknowledged: [helmet, hammer_new])} it 'does not aggregate packages with different versions' do aggregator = LicenseAggregator.new({}, ['path/to/subproject-1', 'path/to/subproject-2']) results = aggregator.dependencies expect(results.count).to eq(3) expect(results.map(&:name)).to match_array ['hammer', 'helmet', 'hammer'] expect(find_package(results, 'hammer', '1.0.0').subproject_paths[0]).to end_with('path/to/subproject-1') expect(find_package(results, 'hammer', '2.0.0').subproject_paths[0]).to end_with('path/to/subproject-2') expect(find_package(results, 'helmet', '3.0.0').subproject_paths[0]).to end_with('path/to/subproject-2') end end def find_package(packages, name, version) packages.find { |dep| dep.name == name && dep.version == version } end end end endlicense-finder-2.1.2/spec/lib/license_finder/configuration_spec.rb0000644000175000017500000001005512767430336024322 0ustar pravipravirequire "spec_helper" module LicenseFinder describe Configuration do describe ".with_optional_saved_config" do it "should init and use saved config" do subject = described_class.with_optional_saved_config({project_path: fixture_path(".")}) expect(subject.gradle_command).to eq('gradlew') end it "prepends the project_path to the config file path" do subject = described_class.with_optional_saved_config({project_path: "other_directory"}) expect(subject.send(:saved_config)).to eq({}) end end describe "#valid_project_path?" do it "returns false when the path does not exist" do subject = described_class.with_optional_saved_config({project_path: '/path/that/does/not/exist'}) expect(subject.valid_project_path?).to be(false) end it "returns true when the path exists" do subject = described_class.with_optional_saved_config({project_path: '/'}) expect(subject.valid_project_path?).to be(true) end it "returns true if the path is not provided" do subject = described_class.with_optional_saved_config({}) expect(subject.valid_project_path?).to be(true) end end describe "gradle_command" do it "prefers primary value" do subject = described_class.new( {gradle_command: "primary"}, {"gradle_command" => "secondary"} ) expect(subject.gradle_command).to eq "primary" end it "accepts saved value" do subject = described_class.new( {gradle_command: nil}, {"gradle_command" => "secondary"} ) expect(subject.gradle_command).to eq "secondary" end it "has default" do subject = described_class.new( {gradle_command: nil}, {"gradle_command" => nil} ) expect(subject.gradle_command).to eq "gradle --console plain" end end describe "decisions_file" do it "prefers primary value" do subject = described_class.new( {decisions_file: "primary"}, {"decisions_file" => "secondary"} ) expect(subject.decisions_file_path.to_s).to end_with "primary" end it "accepts saved value" do subject = described_class.new( {decisions_file: nil}, {"decisions_file" => "secondary"} ) expect(subject.decisions_file_path.to_s).to end_with "secondary" end it "has default" do subject = described_class.new( {decisions_file: nil}, {"decisions_file" => nil} ) expect(subject.decisions_file_path.to_s).to end_with "doc/dependency_decisions.yml" end it "prepends project path to default path if project_path option is set" do subject = described_class.new({project_path: "magic_path"}, {}) expect(subject.decisions_file_path.to_s).to end_with "magic_path/doc/dependency_decisions.yml" end it "prepends project path to provided value" do subject = described_class.new({decisions_file: "primary", project_path: "magic_path"}, {"decisions_file" => "secondary"} ) expect(subject.decisions_file_path.to_s).to end_with "magic_path/primary" end end describe "rebar_deps_dir" do it "has default" do subject = described_class.new( {rebar_deps_dir: nil}, {"rebar_deps_dir" => nil} ) expect(subject.rebar_deps_dir.to_s).to end_with "deps" end it "prepends project path to default path if project_path option is set" do subject = described_class.new({project_path: "magic_path"}, {}) expect(subject.rebar_deps_dir.to_s).to end_with "magic_path/deps" end it "prepends project path to provided value" do subject = described_class.new( {rebar_deps_dir: "primary", project_path: "magic_path"}, {"rebar_deps_dir" => "secondary"} ) expect(subject.rebar_deps_dir.to_s).to end_with "magic_path/primary" end end end end license-finder-2.1.2/spec/lib/license_finder/decision_applier_spec.rb0000644000175000017500000002066212767430336024771 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe DecisionApplier do describe "#acknowledged" do it "combines manual and system packages" do decision_applier = described_class.new( decisions: Decisions.new.add_package("manual", nil), packages: [Package.new("system")] ) expect(decision_applier.acknowledged.map(&:name)).to match_array ["manual", "system"] end it "applies decided licenses" do decisions = Decisions.new .add_package("manual", nil) .license("manual", "MIT") decision_applier = described_class.new(decisions: decisions, packages: []) expect(decision_applier.acknowledged.last.licenses).to eq Set.new([License.find_by_name("MIT")]) end it "ignores specific packages" do decisions = Decisions.new .add_package("manual", nil) .ignore("manual") decision_applier = described_class.new(decisions: decisions, packages: []) expect(decision_applier.acknowledged).to be_empty end it "ignores packages in certain groups" do decisions = Decisions.new .ignore_group("development") dev_dep = Package.new("dep", nil, groups: ["development"]) decision_applier = described_class.new( decisions: decisions, packages: [dev_dep] ) expect(decision_applier.acknowledged).to be_empty end it "does not ignore packages if some of their groups are not ignored" do decisions = Decisions.new .ignore_group("development") dev_and_prod_dep = Package.new("dev_and_prod_dep", nil, groups: ["development", "production"]) decision_applier = described_class.new( decisions: decisions, packages: [dev_and_prod_dep] ) expect(decision_applier.acknowledged).to eq [dev_and_prod_dep] end it "does not ignore packages if they have no groups" do decisions = Decisions.new .ignore_group("development") dep_with_no_group = Package.new("dep_with_no_group", nil, groups: []) decision_applier = described_class.new( decisions: decisions, packages: [dep_with_no_group] ) expect(decision_applier.acknowledged).to eq [dep_with_no_group] end it "adds manual approvals to packages" do decisions = Decisions.new .add_package("manual", nil) .approve("manual", who: "Approver", why: "Because") decision_applier = described_class.new(decisions: decisions, packages: []) dep = decision_applier.acknowledged.last expect(dep).to be_approved expect(dep).to be_approved_manually expect(dep.manual_approval.who).to eq "Approver" expect(dep.manual_approval.why).to eq "Because" end it "adds whitelist approvals to packages" do decisions = Decisions.new .add_package("manual", nil) .license("manual", "MIT") .whitelist("MIT") decision_applier = described_class.new(decisions: decisions, packages: []) dep = decision_applier.acknowledged.last expect(dep).to be_approved expect(dep).to be_whitelisted end it "forbids approval of packages with only blacklisted license" do decisions = Decisions.new .add_package("manual", nil) .license("manual", "ABC") .whitelist("ABC") .approve("manual") .blacklist("ABC") decision_applier = described_class.new(decisions: decisions, packages: []) dep = decision_applier.acknowledged.last expect(dep).not_to be_approved end it "allows approval of packages if not all licenses are blacklisted" do decisions = Decisions.new .add_package("manual", nil) .license("manual", "ABC") .license("manual", "DEF") .whitelist("ABC") .blacklist("DEF") decision_applier = described_class.new(decisions: decisions, packages: []) dep = decision_applier.acknowledged.last expect(dep).to be_approved expect(dep).to be_whitelisted decisions = Decisions.new .add_package("manual", nil) .license("manual", "ABC") .license("manual", "DEF") .approve("manual") .blacklist("DEF") decision_applier = described_class.new(decisions: decisions, packages: []) dep = decision_applier.acknowledged.last expect(dep).to be_approved expect(dep).to be_approved_manually end it 'does not return an approval for a package without a version if all approvals have an explicit version' do decisions = Decisions.new .add_package('spring-boot', nil) .approve('spring-boot', versions: ['1.3.0.RELEASE'], who: 'Approver', why: 'Because') decision_applier = described_class.new(decisions: decisions, packages: []) dep = decision_applier.acknowledged.last expect(dep).to_not be_approved end it 'does not return an approval if the package has the wrong version' do decisions = Decisions.new .add_package('spring-boot', '1.3.1.RELEASE') .approve('spring-boot', versions: ['1.3.0.RELEASE'], who: 'Approver', why: 'Because') decision_applier = described_class.new(decisions: decisions, packages: []) dep = decision_applier.acknowledged.last expect(dep).to_not be_approved end it 'returns an approval if the requested package has an approved version' do decisions = Decisions.new .add_package('spring-boot', '1.3.0.RELEASE') .approve('spring-boot', versions: ['1.3.0.RELEASE'], who: 'Approver', why: 'Because') decision_applier = described_class.new(decisions: decisions, packages: []) dep = decision_applier.acknowledged.last expect(dep).to be_approved expect(dep).to be_approved_manually end it 'returns an approval if the requested package has been approved, but no version was specified' do decisions = Decisions.new .add_package('spring-boot', '1.3.0.RELEASE') .approve('spring-boot', versions: [], who: 'Approver', why: 'Because') decision_applier = described_class.new(decisions: decisions, packages: []) dep = decision_applier.acknowledged.last expect(dep).to be_approved expect(dep).to be_approved_manually end it 'does not return an approval if no dependencies have been approved' do decisions = Decisions.new .add_package('spring-boot', '1.3.0.RELEASE') decision_applier = described_class.new(decisions: decisions, packages: []) dep = decision_applier.acknowledged.last expect(dep).to_not be_approved end end describe '#unapproved' do it 'returns all acknowledged packages that are not approved' do packages = [ Package.new('foo', '0.0.1', spec_licenses: ['whitelist']), Package.new('bar', '0.0.1', spec_licenses: ['blacklist']) ] decisions = Decisions.new .add_package('baz', '0.0.1') .whitelist('whitelist') .blacklist('blacklist') decision_applier = described_class.new(decisions: decisions, packages: packages) expect(decision_applier.unapproved.map(&:name)).to include('baz') expect(decision_applier.unapproved.map(&:name)).to include('bar') expect(decision_applier.unapproved.map(&:name)).not_to include('foo') end end describe '#blacklisted' do it 'returns all packages that have blacklisted licenses' do decision_applier = described_class.new( decisions: Decisions.new.blacklist('GPLv3'), packages: [Package.new('foo', '1.0', spec_licenses: ['GPLv3'])] ) expect(decision_applier.blacklisted.map(&:name)).to eq(['foo']) end it 'does not report ignored packages' do dev_dep = Package.new("dev_dep", nil, spec_licenses: ['GPLv3'], groups: ["development"]) decisions = Decisions.new .ignore_group("development") .add_package("manual", nil) .ignore("manual") .blacklist('GPLv3') decision_applier = described_class.new(decisions: decisions, packages: [dev_dep]) expect(decision_applier.blacklisted).to be_empty end end end end license-finder-2.1.2/spec/lib/license_finder/project_finder_spec.rb0000644000175000017500000000226012767430336024447 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe ProjectFinder do describe '#find_projects' do it 'returns absolute paths for projects with active package managers' do finder = ProjectFinder.new('spec/fixtures/composite') active_projects = finder.find_projects expect(has_project_path?(active_projects, 'composite')).to be true expect(has_project_path?(active_projects, 'composite/project1')).to be true expect(has_project_path?(active_projects, 'composite/project2')).to be true expect(has_project_path?(active_projects, 'composite/not_a_project')).to be false end it 'searches for projects in project_path' do expect(Dir).to receive(:glob).with('/path/to/projects/**/').and_return([]) ProjectFinder.new('/path/to/projects').find_projects end it 'rejects nested dependencies' do finder = ProjectFinder.new('spec/fixtures/composite') active_projects = finder.find_projects expect(has_project_path?(active_projects, 'pivotal/foo')).to be false end end def has_project_path?(projects, path) projects.any? { |p| p.end_with?(path) } end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/0000755000175000017500000000000012767430336023363 5ustar pravipravilicense-finder-2.1.2/spec/lib/license_finder/package_managers/bundler_package_spec.rb0000644000175000017500000000211512767430336030027 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe BundlerPackage do subject { described_class.new(gemspec, bundler_dependency) } let(:gemspec) do Gem::Specification.new do |s| s.name = 'spec_name' s.version = '2.1.3' s.authors = ['first', 'second'] s.summary = 'summary' s.description = 'description' s.homepage = 'homepage' s.licenses = ['MIT', 'GPL'] s.add_dependency 'foo' end end let(:bundler_dependency) { double(:dependency, groups: [:staging, :assets]) } its(:name) { should == 'spec_name' } its(:version) { should == '2.1.3' } its(:authors) { should == 'first, second' } its(:summary) { should == "summary" } its(:description) { should == "description" } its(:homepage) { should == "homepage" } its(:groups) { should == %w[staging assets] } its(:children) { should == ['foo'] } its(:license_names_from_spec) { should eq ['MIT', 'GPL'] } its(:install_path) { should =~ /spec_name-2\.1\.3\z/ } its(:package_manager) { should == "Bundler" } end end license-finder-2.1.2/spec/lib/license_finder/package_managers/bower_package_spec.rb0000644000175000017500000000451412767430336027517 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe BowerPackage do subject do described_class.new( "canonicalDir" => "/path/to/thing", "pkgMeta" => { "name" => "dependency-library", "description" => "description", "version" => "1.3.3.7", "readme" => "some readme stuff", "homepage" => "homepage" } ) end its(:name) { should == "dependency-library" } its(:version) { should == "1.3.3.7" } its(:summary) { should == "description" } its(:description) { should == "some readme stuff" } its(:homepage) { should == "homepage" } its(:groups) { should == [] } # TODO: does `bower list` output devDependencies? If so, put them in 'dev' group? its(:children) { should == [] } # TODO: get dependencies from dependencies and devDependencies, like NPM its(:install_path) { should eq "/path/to/thing" } its(:package_manager) { should eq 'Bower' } context "when package is NOT installed" do subject do described_class.new( "missing" => true, "endpoint" => { "name" => "some_package_that_is_not_installed", "target" => ">=3.0" } ) end it "shows the name and version from the endpoint block" do expect(subject.name).to eq("some_package_that_is_not_installed") expect(subject.version).to eq(">=3.0") end it 'reports itself as missing' do expect(subject).to be_missing end end describe '#license_names_from_spec' do let(:package1) { { "pkgMeta" => {"license" => "MIT"} } } let(:package2) { { "pkgMeta" => {"licenses" => [{"type" => "BSD"}]} } } let(:package3) { { "pkgMeta" => {"license" => {"type" => "PSF"}} } } let(:package4) { { "pkgMeta" => {"licenses" => ["MIT"]} } } it 'finds the license for all license structures' do package = BowerPackage.new(package1) expect(package.license_names_from_spec).to eq ["MIT"] package = BowerPackage.new(package2) expect(package.license_names_from_spec).to eq ["BSD"] package = BowerPackage.new(package3) expect(package.license_names_from_spec).to eq ["PSF"] package = BowerPackage.new(package4) expect(package.license_names_from_spec).to eq ["MIT"] end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/bower_spec.rb0000644000175000017500000000221212767430336026035 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe Bower do subject { Bower.new(project_path: Pathname('/fake/path')) } it_behaves_like 'a PackageManager' describe '.current_packages' do it 'lists all the current packages' do json = <<-JSON { "dependencies": { "dependency-library": { "canonicalDir": "/path/to/thing", "pkgMeta": { "name": "dependency-library" } }, "another-dependency": { "canonicalDir": "/path/to/thing2", "pkgMeta": { "name": "another-dependency" } } } } JSON allow(Dir).to receive(:chdir).with(Pathname('/fake/path')) { |&block| block.call } allow(subject).to receive(:capture).with('bower list --json -l action').and_return([json, true]) expect(subject.current_packages.map { |p| [p.name, p.install_path] }).to eq [ %w(dependency-library /path/to/thing), %w(another-dependency /path/to/thing2) ] end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/go_vendor_spec.rb0000644000175000017500000000723712767430336026715 0ustar pravipravirequire 'spec_helper' require 'fakefs/spec_helpers' module LicenseFinder describe GoVendor do include FakeFS::SpecHelpers let(:logger) { double(:logger, active: nil) } subject { GoVendor.new(options.merge(project_path: Pathname(project_path), logger: logger)) } before do allow(logger).to receive(:installed) allow(logger).to receive(:active) end context 'package manager' do before do FileUtils.mkdir_p File.join(fixture_path('all_pms'), 'vendor') end it_behaves_like "a PackageManager" it 'installed? should be true if go exists on the path' do allow(PackageManager).to receive(:command_exists?).with('go').and_return true expect(described_class.installed?).to eq(true) end it 'installed? should be false if go does not exists on the path' do allow(PackageManager).to receive(:command_exists?).with('go').and_return false expect(described_class.installed?).to eq(false) end end let(:project_path) { '/app' } let(:options) { {} } context 'when there are go files' do before do FileUtils.mkdir_p project_path FileUtils.touch File.join(project_path, 'main.go') FileUtils.mkdir_p File.join(project_path, 'vendor', 'github.com', 'foo', 'bar') end it 'detects the project as go vendor project' do expect(subject.active?).to be true end describe '#current_packages' do let(:go_deps) { ["github.com/foo/bar", true] } before do allow(subject).to receive(:capture).with(%q[go list -f '{{join .Deps "\n"}}' ./...]).and_return(go_deps) allow(subject).to receive(:capture).with(%q[git rev-list --max-count 1 HEAD]).and_return(["e0ff7ae205f\n", true]) end RSpec.shared_examples 'current_packages' do |parameter| it 'only returns the parent package' do packages = subject.current_packages expect(packages.count).to eq(1) expect(packages.first.name).to eq('github.com/foo/bar') end end include_examples 'current_packages' it 'uses the sha of the parent project as the dependency version' do packages = subject.current_packages expect(packages.first.version).to eq('vendored-e0ff7ae205f') end context 'when sub packages are being used' do let(:go_deps) { ["github.com/foo/bar\ngithub.com/foo/bar/baz", true] } include_examples 'current_packages' end context 'when only sub packages are being used' do let(:go_deps) { ["github.com/foo/bar/baz", true] } include_examples 'current_packages' end context 'when unvendored packages are being used' do let(:go_deps) { ["github.com/foo/bar\ntext/template/parse", true] } include_examples 'current_packages' end end end context 'when there are go files in subdirectories' do before do FileUtils.mkdir_p project_path FileUtils.mkdir_p File.join(project_path, 'vendor', 'github.com', 'foo', 'bar') FileUtils.touch File.join(project_path, 'vendor', 'github.com', 'foo', 'bar', 'main.go') end it 'detects the project as go vendor project' do expect(subject.active?).to be true end end context 'if no go files exist' do let(:project_path) { '/ruby_app' } before do FileUtils.mkdir_p File.join(project_path, 'vendor') end it 'should not mark the project active' do expect(subject.active?).to be false end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/pip_package_spec.rb0000644000175000017500000000565512767430336027200 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe PipPackage do subject do make_package({ "summary" => "summary", "description" => "description", "home_page" => "homepage" }) end def make_package(pypi_def) described_class.new('jasmine', '1.3.1', pypi_def, install_path: "jasmine/install/path", children: ["achild"]) end its(:name) { should == "jasmine" } its(:version) { should == "1.3.1" } its(:authors) { should == "" } its(:summary) { should == "summary" } its(:description) { should == "description" } its(:homepage) { should == "homepage" } its(:groups) { should == [] } # TODO: any way to extract install_requires and tests_require from `pip list` or `pip show`? its(:children) { should == ["achild"] } its(:install_path) { should eq "jasmine/install/path" } its(:package_manager) { should eq 'Pip' } describe '#license_names_from_spec' do describe "with no pypi info" do it "is empty" do subject = make_package({}) expect(subject.license_names_from_spec).to be_empty end end describe "with valid pypi license" do it "returns the license from 'license' preferentially" do data = { "license" => "MIT", "classifiers" => [ 'License :: OSI Approved :: Apache 2.0 License' ] } subject = make_package(data) expect(subject.license_names_from_spec).to eq ['MIT'] end context "when there's no explicit license" do it "returns the license from the 'classifiers' if there is only one" do data = { "classifiers" => [ 'License :: OSI Approved :: Apache 2.0 License' ] } subject = make_package(data) expect(subject.license_names_from_spec).to eq ['Apache 2.0 License'] end it "returns multiple licenses if there are many in 'classifiers'" do data = { "classifiers" => [ 'License :: OSI Approved :: Apache 2.0 License', 'License :: OSI Approved :: GPL' ] } subject = make_package(data) expect(subject.license_names_from_spec).to eq ['Apache 2.0 License', 'GPL'] end end context "with blank license" do it "returns the license from the classifier if it exists" do data = { "license" => "", "classifiers" => [ 'License :: OSI Approved :: Apache 2.0 License' ] } subject = make_package(data) expect(subject.license_names_from_spec).to eq ['Apache 2.0 License'] end end context "with UNKNOWN license" do it "returns the license from the classifier if it exists" do data = { "license" => "UNKNOWN", "classifiers" => [ 'License :: OSI Approved :: Apache 2.0 License' ] } subject = make_package(data) expect(subject.license_names_from_spec).to eq ['Apache 2.0 License'] end end end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/gradle_spec.rb0000644000175000017500000001024512767430336026162 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe Gradle do let(:options) { {} } subject { Gradle.new(options.merge(project_path: Pathname('/fake/path'))) } let(:content) { [] } it_behaves_like 'a PackageManager' describe '#current_packages' do before do allow(Dir).to receive(:chdir).with(Pathname('/fake/path')).and_return(['', true]) dependencies = double(:subject_dependency_file, dependencies: content) expect(GradleDependencyFinder).to receive(:new).and_return(dependencies) end it 'uses custom subject command, if provided' do subject = Gradle.new(gradle_command: 'subjectfoo', project_path: Pathname('/fake/path')) expect(Dir).to receive(:chdir).with(Pathname('/fake/path')) { |&block| block.call } expect(subject).to receive(:capture).with('subjectfoo downloadLicenses').and_return(['', true]) subject.current_packages end it 'sets the working directory to project_path, if provided' do subject = Gradle.new(project_path: Pathname('/Users/foo/bar')) expect(Dir).to receive(:chdir).with(Pathname('/Users/foo/bar')) { |&block| block.call } expect(subject).to receive(:capture).with('gradle --console plain downloadLicenses').and_return(['', true]) subject.current_packages end context 'when dependencies are found' do let(:content) do [ " " ] end it 'lists all dependencies' do expect(subject.current_packages.map(&:name)).to eq ['spring-aop', 'spring-core'] end context 'when gradle group ids option is enabled' do let(:options) { { gradle_include_groups: true } } it 'lists the dependencies with the group id' do expect(subject.current_packages.map(&:name)).to eq ['org.springframework:spring-aop', 'org.springframework:spring-core'] end end end context 'when multiple licenses exist' do let(:content) do [ " " ] end it 'lists all dependencies' do expect(subject.current_packages.first.licenses.map(&:name)).to eq ['License 1', 'License 2'] end end context 'when no licenses exist' do let(:content) do [ " " ] end it 'returns unknown' do expect(subject.current_packages.first.licenses.map(&:name)).to eq ['unknown'] end end context 'when multiple license files exist' do let(:content) do [ " ", " " ] end it 'lists all dependencies' do expect(subject.current_packages.map(&:name)).to eq ['junit', 'mockito-core'] end context 'and there are duplicate dependencies' do let(:content) do [ " ", " ", " " ] end it 'removes duplicates' do expect(subject.current_packages.map(&:name)).to eq ['junit', 'mockito-core'] end end end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/pip_spec.rb0000644000175000017500000000336712767430336025523 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe Pip do let(:pip) { Pip.new } it_behaves_like "a PackageManager" describe '.current_packages' do def stub_pip(stdout) allow(pip).to receive("`").with(/license_finder_pip.py/).and_return(stdout) end def stub_pypi(name, version, response) stub_request(:get, "https://pypi.python.org/pypi/#{name}/#{version}/json") .to_return(response) end it 'fetches data from pip' do stub_pip [ {"name" => "jasmine", "version" => "1.3.1", "location" => "jasmine/path", "dependencies" => ["jasmine-core"]}, {"name" => "jasmine-core", "version" => "1.3.1", "location" => "jasmine-core/path"} ].to_json stub_pypi("jasmine", "1.3.1", status: 200, body: '{}') stub_pypi("jasmine-core", "1.3.1", status: 200, body: '{}') expect(pip.current_packages.map { |p| [p.name, p.version, p.install_path.to_s, p.children] }).to eq [ ["jasmine", "1.3.1", "jasmine/path/jasmine", ["jasmine-core"]], ["jasmine-core", "1.3.1", "jasmine-core/path/jasmine-core", []] ] end it "fetches data from pypi" do stub_pip [{"name" => "jasmine", "version" => "1.3.1", "location" => "jasmine/path"}].to_json stub_pypi("jasmine", "1.3.1", status: 200, body: JSON.generate(info: {summary: "A summary"})) expect(pip.current_packages.first.summary).to eq "A summary" end it "ignores pypi if it can't find useful info" do stub_pip [{"name" => "jasmine", "version" => "1.3.1", "location" => "jasmine/path"}].to_json stub_pypi("jasmine", "1.3.1", status: 404, body: '') expect(pip.current_packages.first.summary).to eq "" end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/bundler_spec.rb0000644000175000017500000000256412767430336026364 0ustar pravipravirequire "spec_helper" module LicenseFinder describe Bundler do it_behaves_like "a PackageManager" let(:definition) do double('definition', { :dependencies => [], :groups => [:dev, :production], :specs_for => [ build_gemspec('gem1', '1.2.3'), build_gemspec('gem2', '0.4.2') ] }) end def build_gemspec(name, version, dependency=nil) Gem::Specification.new do |s| s.name = name s.version = version s.summary = 'summary' s.description = 'description' if dependency s.add_dependency dependency end end end describe '.current_packages' do subject do Bundler.new(ignore_groups: ['dev', 'test'], definition: definition).current_packages end it "should have 2 dependencies" do expect(subject.size).to eq(2) end context "when initialized with a parent and child gem" do before do allow(definition).to receive(:specs_for).with([:production]).and_return([ build_gemspec('gem1', '1.2.3', 'gem2'), build_gemspec('gem2', '0.4.2', 'gem3') ]) end it "should update the child dependency with its parent data" do gem1 = subject.first expect(gem1.children).to eq(["gem2"]) end end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/merged_package_spec.rb0000644000175000017500000000371612767430336027647 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe MergedPackage do let(:package) { Package.new('foo', '1.0.0', spec_licenses: ['MIT'], install_path: '/tmp/foo') } let(:subproject_paths) { 'path/to/project/with/foo' } subject { MergedPackage.new(package, [subproject_paths]) } it 'returns the package name' do expect(subject.name).to eq(package.name) end it 'returns the package version' do expect(subject.version).to eq(package.version) end it 'returns the package licenses' do expect(subject.licenses).to eq(package.licenses) end it 'returns the project path' do expect(subject.subproject_paths.length).to eq(1) expect(subject.subproject_paths[0]).to end_with(subproject_paths) end it 'returns the install path' do expect(subject.install_path).to eq('/tmp/foo') end describe '#eql?' do it 'returns true when the package names are equal' do p1 = MergedPackage.new(Package.new('foo', '1.0.0'), ['/path/to/package1']) p2 = MergedPackage.new(Package.new('foo', '2.0.0'), ['/path/to/package2']) p3 = MergedPackage.new(Package.new('bar', '1.0.0'), ['/path/to/package3']) expect(p1.eql?(p2)).to eq(true) expect(p1.eql?(p3)).not_to eq(true) end it 'can handle merged packages that contain other merged packages' do p1 = MergedPackage.new(Package.new('foo', '1.0.0'), ['/path/to/package1']) p2 = MergedPackage.new(Package.new('foo', '2.0.0'), ['/path/to/package2']) p3 = MergedPackage.new(p2, ['/path/to/package3', '/path/to/package2']) expect(p1.eql?(p3)).to eq(true) end end describe 'hash' do it 'returns equal hash codes for packages that are equal' do p1 = MergedPackage.new(Package.new('foo', '1.0.0'), ['/path/to/package1']) p2 = MergedPackage.new(Package.new('foo', '2.0.0'), ['/path/to/package2']) expect(p1.hash).to eq(p2.hash) end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/rebar_package_spec.rb0000644000175000017500000000122412767430336027467 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe RebarPackage do subject do described_class.new( "uuid", "TAG: v1.3.2", install_path: "deps/uuid", homepage: "git://github.com/okeuday/uuid.git" ) end its(:name) { should == "uuid" } its(:version) { should == "TAG: v1.3.2" } its(:summary) { should eq "" } its(:description) { should == "" } its(:homepage) { should == "git://github.com/okeuday/uuid.git" } its(:groups) { should == [] } its(:children) { should == [] } its(:install_path) { should eq "deps/uuid" } its(:package_manager) { should eq 'Rebar' } end end license-finder-2.1.2/spec/lib/license_finder/package_managers/gradle_package_spec.rb0000644000175000017500000000451312767430336027636 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe GradlePackage do subject do described_class.new( "name" => "ch.qos.logback:logback-classic:1.1.1", "license" => [ { "name" => "MIT" } ] ) end its(:name) { should == "logback-classic" } its(:version) { should == "1.1.1" } its(:authors) { should == "" } its(:summary) { should == "" } its(:description) { should == "" } its(:homepage) { should == "" } its(:groups) { should == [] } # no way to get groups from gradle? its(:children) { should == [] } # no way to get children from gradle? its(:install_path) { should be_nil } its(:package_manager) { should eq 'Gradle' } describe "when file name has a funny format, possibly because it is a jar saved in the project" do it "uses a reasonable name and default version" do subject = described_class.new("name" => "data.json-0.2.3.jar") expect(subject.name).to eq "data.json-0.2.3.jar" expect(subject.version).to eq "unknown" end end describe "#license_names_from_spec" do it "returns the license" do expect(subject.license_names_from_spec).to eq ["MIT"] end context "when there are no licenses" do subject { described_class.new("name" => "a:b:c") } it "is empty" do expect(subject.license_names_from_spec).to be_empty end end context 'when include_groups is set to true' do subject { described_class.new({"name" => "a:b:c"}, include_groups: true) } it 'includes the group id in the name' do expect(subject.name).to eq("a:b") end end context "when there are no real licenses" do subject do described_class.new( "name" => "a:b:c", "license" => [ { "name" => "No license found"} ] ) end it "is empty" do expect(subject.license_names_from_spec).to be_empty end end context "when there are multiple licenses" do subject do described_class.new( "name" => "a:b:c", "license" => [ { "name" => "1" }, { "name" => "2" } ] ) end it "returns multiple licenses" do expect(subject.license_names_from_spec).to eq ['1', '2'] end end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/rebar_spec.rb0000644000175000017500000000350112767430336026014 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe Rebar do subject { Rebar.new(project_path: Pathname('/fake/path')) } it_behaves_like "a PackageManager" output = <<-CMDOUTPUT == Sample comment uuid TAG v1.3.2 git://github.com/okeuday/uuid.git jiffy TAG 0.9.0 https://github.com/davisp/jiffy.git CMDOUTPUT describe '.current_packages' do before do allow(Dir).to receive(:chdir).with(Pathname('/fake/path')) { |&block| block.call } end it 'lists all the current packages' do allow(subject).to receive(:capture).with('rebar list-deps').and_return([output, true]) current_packages = subject.current_packages expect(current_packages.map(&:name)).to eq(["uuid", "jiffy"]) expect(current_packages.map(&:install_path)).to eq([Pathname("deps/uuid"), Pathname("deps/jiffy")]) end it "fails when command fails" do allow(subject).to receive(:capture).with(/rebar/).and_return(['Some error', false]).once expect { subject.current_packages }.to raise_error(RuntimeError) end it "uses custom rebar command, if provided" do rebar = Rebar.new(rebar_command: "rebarfoo", project_path: Pathname('/fake/path')) allow(rebar).to receive(:capture).with(/rebarfoo/).and_return([output, true]) current_packages = rebar.current_packages expect(current_packages.map(&:name)).to eq(["uuid", "jiffy"]) end it "uses custom rebar_deps_dir, if provided" do rebar = Rebar.new(rebar_deps_dir: "foo", project_path: Pathname('/fake/path')) allow(rebar).to receive(:capture).with(/rebar/).and_return([output, true]) current_packages = rebar.current_packages expect(current_packages.map(&:install_path)).to eq([Pathname("foo/uuid"), Pathname("foo/jiffy")]) end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/maven_spec.rb0000644000175000017500000000403212767430336026027 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe Maven do subject { Maven.new(project_path: Pathname('/fake/path')) } it_behaves_like "a PackageManager" def license_xml(xml) <<-resp #{xml} resp end describe '.current_packages' do before do allow(Dir).to receive(:chdir).with(Pathname('/fake/path')) { |&block| block.call } allow(subject).to receive(:capture).with('mvn license:download-licenses').and_return(['', true]) end def stub_license_report(deps) fake_file = double(:license_report, read: license_xml(deps)) allow(subject).to receive(:license_report).and_return(fake_file) end it 'lists all the current packages' do stub_license_report(" junit 4.11 hamcrest-core 1.3 ") expect(subject.current_packages.map { |p| [p.name, p.version] }).to eq [ ["junit", "4.11"], ["hamcrest-core", "1.3"] ] end it "handles multiple licenses" do stub_license_report(" License 1 License 2 ") expect(subject.current_packages.first.licenses.map(&:name)).to eq ['License 1', 'License 2'] end it "handles no licenses" do stub_license_report(" ") expect(subject.current_packages.first.licenses.map(&:name)).to eq ['unknown'] end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/cocoa_pods_package_spec.rb0000644000175000017500000000271412767430336030512 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe CocoaPodsPackage do subject do described_class.new("Name", "1.0.0", license_text) end let(:license_text) { nil } its(:name) { should == "Name" } its(:version) { should == "1.0.0" } its(:summary) { should eq "" } its(:description) { should eq "" } its(:homepage) { should eq "" } its(:groups) { should == [] } its(:children) { should == [] } its(:package_manager) { should eq 'CocoaPods' } describe '#licenses' do context "when there's a license" do let(:license_text) { "LicenseText" } it "returns the name of the license if the license is found be text" do license = double(:license, name: "LicenseName") allow(License).to receive(:find_by_text).with(license_text).and_return(license) expect(subject.licenses.map(&:name)).to eq ["LicenseName"] end it "returns unknown if the license can't be found by text" do allow(License).to receive(:find_by_text).with(license_text).and_return(nil) expect(subject.licenses.map(&:name)).to eq ["unknown"] end end it "returns unknown when there's no license" do expect(subject.licenses.map(&:name)).to eq ["unknown"] end it "respects license decisions" do subject.decide_on_license(License.find_by_name("A")) expect(subject.licenses.map(&:name)).to eq ["A"] end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/go_dep_spec.rb0000644000175000017500000000730112767430336026160 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe GoDep do let(:options) { {} } subject { GoDep.new(options.merge(project_path: Pathname('/fake/path'))) } it_behaves_like 'a PackageManager' describe '#current_packages' do let(:content) do '{ "ImportPath": "github.com/pivotal/foo", "GoVersion": "go1.4.2", "Deps": [ { "ImportPath": "github.com/pivotal/foo", "Rev": "61164e49940b423ba1f12ddbdf01632ac793e5e9" }, { "ImportPath": "github.com/pivotal/bar", "Rev": "3245708abcdef234589450649872346783298736" } ] }' end before do allow(IO).to receive(:read).with('/fake/path/Godeps/Godeps.json').and_return(content.to_s) end context 'when dependencies are vendored' do before do allow(FileTest).to receive(:exist?).with('/fake/path/Godeps/_workspace').and_return(true) end it 'should return an array of packages' do packages = subject.current_packages expect(packages.map(&:name)).to include('github.com/pivotal/foo', 'github.com/pivotal/bar') expect(packages.map(&:version)).to include('61164e4', '3245708') end it 'should set the install_path to the vendored directory' do packages = subject.current_packages expect(packages[0].install_path).to eq('/fake/path/Godeps/_workspace/src/github.com/pivotal/foo') expect(packages[1].install_path).to eq('/fake/path/Godeps/_workspace/src/github.com/pivotal/bar') end context 'when requesting the full version' do let(:options) { { go_full_version:true } } it 'list the dependencies with full version' do expect(subject.current_packages.map(&:version)).to eq [ "61164e49940b423ba1f12ddbdf01632ac793e5e9", "3245708abcdef234589450649872346783298736"] end end end context 'when there are duplicate dependencies' do let(:content) do '{ "ImportPath": "github.com/foo/bar", "GoVersion": "go1.3", "Deps": [ { "ImportPath": "github.com/foo/baz/sub1", "Rev": "28838aae6e8158e3695cf90e2f0ed2498b68ee1d" }, { "ImportPath": "github.com/foo/baz/sub2", "Rev": "28838aae6e8158e3695cf90e2f0ed2498b68ee1d" }, { "ImportPath": "github.com/foo/baz/sub3", "Rev": "28838aae6e8158e3695cf90e2f0ed2498b68ee1d" } ] }' end it 'should return one dependency only' do packages = subject.current_packages expect(packages.map(&:name)).to eq(['github.com/foo/baz']) expect(packages.map(&:version)).to eq(['28838aa']) end end context 'when dependencies are not vendored' do before do ENV['GOPATH'] = '/fake/go/path' end after do ENV['GOPATH'] = nil end it 'should return an array of packages' do packages = subject.current_packages expect(packages.map(&:name)).to include('github.com/pivotal/foo', 'github.com/pivotal/bar') expect(packages.map(&:version)).to include('61164e4', '3245708') end it 'should set the install_path to the GOPATH' do packages = subject.current_packages expect(packages[0].install_path).to eq('/fake/go/path/src/github.com/pivotal/foo') expect(packages[1].install_path).to eq('/fake/go/path/src/github.com/pivotal/bar') end end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/maven_package_spec.rb0000644000175000017500000000252312767430336027505 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe MavenPackage do subject do described_class.new( "artifactId" => "hamcrest-core", "version" => "4.11", "licenses" => [{ "name" => "MIT" }] ) end its(:name) { should == "hamcrest-core" } its(:version) { should == "4.11" } its(:summary) { should == "" } its(:description) { should == "" } its(:homepage) { should == "" } its(:groups) { should == [] } # no way to get groups from maven? its(:children) { should == [] } # no way to get children from maven? its(:install_path) { should be_nil } its(:package_manager) { should eq 'Maven' } describe "#license_names_from_spec" do it "returns the license" do expect(subject.license_names_from_spec).to eq ["MIT"] end context "when there are no licenses" do subject { described_class.new({}) } it "is empty" do expect(subject.license_names_from_spec).to be_empty end end context "when there are multiple licenses" do subject do described_class.new( "licenses" => [{ "name" => "1" }, { "name" => "2" }] ) end it "returns multiple licenses" do expect(subject.license_names_from_spec).to eq ['1', '2'] end end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/npm_spec.rb0000644000175000017500000001257712767430336025530 0ustar pravipravirequire 'spec_helper' require 'fakefs/spec_helpers' module LicenseFinder describe NPM do let(:root) { "/fake-node-project" } let(:npm) { NPM.new project_path: Pathname.new(root) } it_behaves_like "a PackageManager" let(:package_json) do { dependencies: { "dependency.js" => "1.3.3.7", "dependency2.js" => "4.2" }, devDependencies: { "dependency3.js" => "4.2" } }.to_json end let(:dependency_json) do <<-JSON { "dependencies": { "dependency.js": { "name": "dependency.js", "version": "1.3.3.7", "description": "description", "readme": "readme", "path": "/path/to/thing", "dependencies": { "dependency1-1.js": { "name": "dependency1-1.js" } } }, "dependency2.js": { "name": "dependency2.js", "version": "4.2", "description": "description2", "readme": "readme2", "path": "/path/to/thing2", "dependencies": { "dependency2-1.js": { "name": "dependency2-1.js", "dependencies": { "dependency1-1.js": { "name": "dependency1-1.js" } } } } }, "dependency3.js": { "name": "dependency3.js", "version": "4.2", "description": "description3", "readme": "readme3", "path": "/path/to/thing3", "dependencies": { "dependency1-1.js": { "name": "dependency1-1.js" }, "dependency3-1.js": { "name": "dependency3-1.js" } } } }, "notADependency": { "dependency6.js": { "name": "dep6js", "version": "4.2", "description": "description6", "readme": "readme6", "path": "/path/to/thing6" } } } JSON end describe '.current_packages' do include FakeFS::SpecHelpers before do NPM.instance_variable_set(:@modules, nil) FileUtils.mkdir_p(root) File.write(File.join(root, "package.json"), package_json) allow(npm).to receive(:capture).with(/npm/).and_return([dependency_json, true]) end it 'fetches data from npm' do current_packages = npm.current_packages expect(current_packages.map(&:name)).to eq(["dependency.js", "dependency1-1.js", "dependency2.js", "dependency2-1.js", "dependency3.js", "dependency3-1.js"]) end it "finds the groups for dependencies" do current_packages = npm.current_packages expect(current_packages.find { |p| p.name == "dependency.js" }.groups).to eq(["dependencies"]) expect(current_packages.find { |p| p.name == "dependency1-1.js" }.groups).to eq(["dependencies", "devDependencies"]) expect(current_packages.find { |p| p.name == "dependency2.js" }.groups).to eq(["dependencies"]) expect(current_packages.find { |p| p.name == "dependency2-1.js" }.groups).to eq(["dependencies"]) expect(current_packages.find { |p| p.name == "dependency3.js" }.groups).to eq(["devDependencies"]) expect(current_packages.find { |p| p.name == "dependency3-1.js" }.groups).to eq(["devDependencies"]) end it "does not support name version string" do json = <<-JSON { "devDependencies": { "foo": "4.2" } } JSON allow(Dir).to receive(:chdir).with(Pathname('/fake-node-project')) { |&block| block.call } allow(npm).to receive(:capture).with('npm list --json --long').and_return([json, true]) current_packages = npm.current_packages expect(current_packages.map(&:name)).to eq([]) end it "fails when command fails" do allow(npm).to receive(:capture).with(/npm/).and_return('Some error', false).once expect { npm.current_packages }.to raise_error(RuntimeError) end it "does not fail when command fails but produces output" do allow(npm).to receive(:capture).with(/npm/).and_return('{"foo":"bar"}', false).once silence_stderr { npm.current_packages } end context "npm recursive dependency edge case - GH#211" do let(:package_json) do FakeFS.without do File.read fixture_path "npm-recursive-dependencies/package.json" end end let(:dependency_json) do FakeFS.without do File.read fixture_path "npm-recursive-dependencies/npm-list.json" end end describe ".current_packages" do it "correctly navigates the dependencies tree and pulls out valid information" do expect(npm.current_packages.find { |p| p.name == "pui-react-alerts" }.version).to eq("3.0.0-alpha.2") expect(npm.current_packages.find { |p| p.name == "pui-react-media" }.version).to eq("3.0.0-alpha.2") end end end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/npm_package_spec.rb0000644000175000017500000000357512767430336027201 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe NpmPackage do subject do described_class.new( "name" => "jasmine-node", "version" => "1.3.1", "description" => "a description", "readme" => "a readme", "path" => "some/node/package/path", "homepage" => "a homepage", "dependencies" => { "coffee-script" => { "name" => "coffee-script", } } ) end its(:name) { should == "jasmine-node" } its(:version) { should == "1.3.1" } its(:summary) { should eq "" } its(:description) { should == "a description" } its(:homepage) { should == "a homepage" } its(:groups) { should == [] } # TODO: put devDependencies in 'dev' group? its(:children) { should == ["coffee-script"] } its(:install_path) { should eq "some/node/package/path" } its(:package_manager) { should eq 'Npm' } describe '#license_names_from_spec' do let(:node_module1) { {"license" => "MIT"} } let(:node_module2) { {"licenses" => [{"type" => "BSD"}]} } let(:node_module3) { {"license" => {"type" => "PSF"}} } let(:node_module4) { {"licenses" => ["MIT"]} } let(:misdeclared_node_module) { {"licenses" => {"type" => "MIT"}} } it 'finds the license for both license structures' do package = NpmPackage.new(node_module1) expect(package.license_names_from_spec).to eq ["MIT"] package = NpmPackage.new(node_module2) expect(package.license_names_from_spec).to eq ["BSD"] package = NpmPackage.new(node_module3) expect(package.license_names_from_spec).to eq ["PSF"] package = NpmPackage.new(node_module4) expect(package.license_names_from_spec).to eq ["MIT"] package = NpmPackage.new(misdeclared_node_module) expect(package.license_names_from_spec).to eq ["MIT"] end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/nuget_package_spec.rb0000644000175000017500000000026612767430336027523 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe NugetPackage do subject { described_class.new 'nuget_package' } its(:package_manager) { should == 'Nuget' } end end license-finder-2.1.2/spec/lib/license_finder/package_managers/nuget_spec.rb0000644000175000017500000001245612767430336026054 0ustar pravipravirequire 'spec_helper' require 'fakefs/spec_helpers' require 'zip' module LicenseFinder def self.broken_fakefs? RUBY_PLATFORM =~ /java/ || RUBY_VERSION =~ /^(1\.9|2\.0)/ end describe Nuget do it_behaves_like "a PackageManager" describe "#assemblies" do include FakeFS::SpecHelpers before do FileUtils.mkdir_p "app/packages" FileUtils.mkdir_p "app/Assembly1/" FileUtils.mkdir_p "app/Assembly1.Tests/" FileUtils.mkdir_p "app/Assembly2/" FileUtils.touch "app/Assembly1/packages.config" FileUtils.touch "app/Assembly1.Tests/packages.config" FileUtils.touch "app/Assembly2/packages.config" end it "finds dependencies all subdirectories containing a packages.config" do nuget = Nuget.new project_path: Pathname.new("app") expect(nuget.assemblies.map(&:name)).to match_array ['Assembly1', 'Assembly1.Tests', 'Assembly2'] end context 'when packages.config is in .nuget directory' do before do FileUtils.mkdir_p 'app/.nuget' FileUtils.touch 'app/.nuget/packages.config' end it "finds dependencies all subdirectories containing a packages.config" do nuget = Nuget.new project_path: Pathname.new("app") expect(nuget.assemblies.map(&:name)).to include('.nuget') end end end describe "#package_path" do include FakeFS::SpecHelpers context 'when .nupkg files exist, but are not in .nuget directory' do before do FileUtils.mkdir_p 'app/submodule/vendor' FileUtils.touch 'app/submodule/vendor/package.nupkg' FileUtils.mkdir_p 'app/vendor' FileUtils.touch 'app/vendor/package.nupkg' end it "returns vendored director" do nuget = Nuget.new project_path: Pathname.new("app") expect(nuget.package_path).to eq Pathname('/app/vendor') end end end describe "#current_packages" do include FakeFS::SpecHelpers before do FileUtils.mkdir_p "app/packages" FileUtils.mkdir_p "app/Assembly1/" FileUtils.mkdir_p "app/Assembly1.Tests/" FileUtils.mkdir_p "app/Assembly2/" FileUtils.touch "app/Assembly1/packages.config" FileUtils.touch "app/Assembly1.Tests/packages.config" FileUtils.touch "app/Assembly2/packages.config" end before do assembly_1_packages = <<-ONE ONE assembly_1_tests_packages = <<-ONE ONE assembly_2_packages = <<-ONE ONE File.write("app/Assembly1/packages.config", assembly_1_packages) File.write("app/Assembly1.Tests/packages.config", assembly_1_tests_packages) File.write("app/Assembly2/packages.config", assembly_2_packages) end it "lists all the packages used in an assembly" do nuget = Nuget.new project_path: Pathname.new("app") deps = %w(GoToDependency ObscureDependency OtherObscureDependency TestFramework CoolNewDependency) expect(nuget.current_packages.map(&:name).uniq).to match_array(deps) end # cannot run on JRuby due to https://github.com/fakefs/fakefs/issues/303 context 'when there is a .nupkg file', :skip => LicenseFinder.broken_fakefs? do before do obscure_dependency_nuspec = <<-EOXML ObscureDependency 1.3.15 http://www.opensource.org/licenses/mit-license.php EOXML File.write("app/packages/ObscureDependency.nuspec", obscure_dependency_nuspec) Dir.chdir 'app/packages' do Zip::File.open('ObscureDependency.1.3.15.nupkg', Zip::File::CREATE) do |zipfile| zipfile.add('ObscureDependency.nuspec', 'ObscureDependency.nuspec') end end end it "include the licenseUrl from the nuspec file" do nuget = Nuget.new project_path: Pathname.new("app") obscure_dep = nuget.current_packages.select { |dep| dep.name == 'ObscureDependency' }.first expect(obscure_dep.license_names_from_spec).to eq(['http://www.opensource.org/licenses/mit-license.php']) end end end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/go_workspace_spec.rb0000644000175000017500000002317212767430336027412 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe GoWorkspace do let(:options) { {} } let(:logger) { double(:logger, active: nil) } let(:project_path) { '/Users/pivotal/workspace/loggregator'} subject { GoWorkspace.new(options.merge(project_path: Pathname(project_path), logger: logger)) } before do allow(logger).to receive(:installed) allow(logger).to receive(:active) end context 'package manager' do before do allow_any_instance_of(GoDep).to receive(:active?).and_return(false) end it_behaves_like "a PackageManager" it 'installed? should be true if go exists on the path' do allow(PackageManager).to receive(:command_exists?).with('go').and_return true expect(described_class.installed?).to eq(true) end it 'installed? should be false if go does not exists on the path' do allow(PackageManager).to receive(:command_exists?).with('go').and_return false expect(described_class.installed?).to eq(false) end end describe '#go_list' do let(:go_list_output) { < 'github.com/pivotal/spec_name', 'Rev' => '4326c3435332d06b410a2672d28d1343c4059fae', } } let(:full_version) { true } subject { described_class.from_dependency(options, Pathname.new('/Go/src'), full_version) } its(:name) { should == 'github.com/pivotal/spec_name' } its(:version) { should == '4326c3435332d06b410a2672d28d1343c4059fae' } its(:install_path) { should == '/Go/src/github.com/pivotal/spec_name' } its(:package_manager) { should == "Go" } context 'when full version is set to false' do let(:full_version) { false } its(:version) { should == '4326c34' } end context 'when the install path is set in the options' do let(:options) { super().merge('InstallPath' => '/Go/vendor/src/github.com/pivotal/spec_name' ) } its(:install_path) { should == '/Go/vendor/src/github.com/pivotal/spec_name' } end end end license-finder-2.1.2/spec/lib/license_finder/package_managers/cocoa_pods_spec.rb0000644000175000017500000000315712767430336027041 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe CocoaPods do let(:project_path) { fixture_path("all_pms") } let(:cocoa_pods) { CocoaPods.new(project_path: project_path) } it_behaves_like "a PackageManager" def stub_acknowledgments(hash = {}) plist = { "PreferenceSpecifiers" => [ { "FooterText" => hash[:license], "Title" => hash[:name] } ] } expect(cocoa_pods).to receive(:read_plist).and_return(plist) end def stub_lockfile(pods) allow(YAML).to receive(:load_file) .with(project_path.join("Podfile.lock")) .and_return("PODS" => pods) end describe '.current_packages' do it 'lists all the current packages' do stub_lockfile([ { "ABTest (0.0.5)" => ["OpenUDID"] }, "JSONKit (1.5pre)", "OpenUDID (1.0.0)" ]) stub_acknowledgments expect(cocoa_pods.current_packages.map { |p| [p.name, p.version ] }).to eq [ ["ABTest", "0.0.5"], ["JSONKit", "1.5pre"], ["OpenUDID", "1.0.0"] ] end it "passes the license text to the package" do stub_lockfile(["Dependency Name (1.0)"]) stub_acknowledgments({name: "Dependency Name", license: "The MIT License"}) expect(cocoa_pods.current_packages.first.licenses.map(&:name)).to eq ['MIT'] end it "handles no licenses" do stub_lockfile(["Dependency Name (1.0)"]) stub_acknowledgments expect(cocoa_pods.current_packages.first.licenses.map(&:name)).to eq ['unknown'] end end end end license-finder-2.1.2/spec/lib/license_finder/diff_spec.rb0000644000175000017500000000752512767430336022373 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe Diff do subject { Diff } let(:diff) { subject.compare(file1_content, file2_content) } def find_package(name) diff.find { |d| d.name == name } end describe '#compare' do context 'when a dependency is added' do let(:file1_content) { "nokogiri,1.6.6.2,MIT" } let(:file2_content) { "nokogiri,1.6.6.2,MIT\nrspec,3.2.0,MIT" } it 'should create and set packages with added diff state' do rspec = find_package('rspec') expect(rspec.status).to eq :added end end context 'when a dependency is removed' do let(:file1_content) { "nokogiri,1.6.6.2,MIT\nrspec,3.2.0,MIT" } let(:file2_content) { "nokogiri,1.6.6.2,MIT" } it 'should create and set packages with removed diff state' do rspec = find_package('rspec') expect(rspec.status).to eq :removed end end context 'when a dependency is unchanged' do let(:file1_content) { "nokogiri,1.6.6.2,MIT" } let(:file2_content) { "nokogiri,1.6.6.2,MIT" } it 'should create and set packages with unchanged diff state' do nokogiri = find_package('nokogiri') expect(nokogiri.status).to eq :unchanged end end context 'when there are all types of changes' do let(:file1_content) { "rspec,3.2.0,MIT\nnokogiri,1.6.6.2,MIT\nfakefs,0.6.7,MIT" } let(:file2_content) { "nokogiri,1.6.6.2,MIT\nminitest,5.7.0,MIT\nfakefs,0.6.7,BSD" } it 'should create and set packages diff states' do expect(find_package('minitest').status).to eq :added expect(find_package('rspec').status).to eq :removed expect(find_package('nokogiri').status).to eq :unchanged end end context 'when the version changes' do let(:file1_content) { "rspec,3.2.0,MIT" } let(:file2_content) { "rspec,3.3.0,MIT" } it 'should set the state to unchanged and record the version change' do rspec = find_package('rspec') expect(rspec.status).to eq(:unchanged) expect(rspec.current_version).to eq('3.3.0') expect(rspec.previous_version).to eq('3.2.0') end end context 'when the license changes' do let(:file1_content) { "rspec,3.2.0,MIT" } let(:file2_content) { "rspec,3.3.0,GPLv2" } it 'should set the state to unchanged and record the version change' do rspec_old = diff.find {|p| p.previous_version == '3.2.0'} rspec_new = diff.find {|p| p.current_version == '3.3.0'} expect(rspec_old.status).to eq(:removed) expect(rspec_old.current_version).to eq(nil) expect(rspec_old.previous_version).to eq('3.2.0') expect(rspec_new.status).to eq(:added) expect(rspec_new.current_version).to eq('3.3.0') expect(rspec_new.previous_version).to eq(nil) end end context 'when the files are merged reports' do let(:file1_content) { "rspec,3.2.0,MIT,\"/path/to/project1,/path/to/project2\"" } let(:file2_content) { "rspec,3.2.0,MIT,\"/path/to/project1,/path/to/project2\"\nrails,4.2.0,MIT,/path/to/project1" } it 'should show the diff of the reports' do rspec = find_package('rspec') expect(rspec.status).to eq(:unchanged) expect(rspec.current_version).to eq('3.2.0') expect(rspec.previous_version).to eq('3.2.0') expect(rspec.subproject_paths).to match_array(['/path/to/project1', '/path/to/project2']) rails = find_package('rails') expect(rails.status).to eq(:added) expect(rails.current_version).to eq('4.2.0') expect(rails.previous_version).to eq(nil) expect(rails.subproject_paths).to match_array(['/path/to/project1']) end end end end end license-finder-2.1.2/spec/lib/license_finder/reports/0000755000175000017500000000000012767430336021611 5ustar pravipravilicense-finder-2.1.2/spec/lib/license_finder/reports/html_report_spec.rb0000644000175000017500000000647012767430336025516 0ustar pravipravirequire "spec_helper" require "capybara" module LicenseFinder describe HtmlReport do describe "#to_s" do let(:dependency) do dep = Package.new("the-dep") dep.decide_on_license License.find_by_name("MIT") dep end let(:dependencies) { [dependency] } subject { Capybara.string(HtmlReport.new(dependencies, project_name: "project name").to_s) } it "should show the project name" do title = subject.find "h1" expect(title).to have_text "project name" end context "when the dependency is manually approved" do before { dependency.approved_manually!(Decisions::TXN.new("the-approver", "the-approval-note", Time.now.utc)) } it "should show approved dependencies without action items" do is_expected.to have_selector ".approved" is_expected.not_to have_selector ".action-items" end it "shows the license, approver and approval notes" do deps = subject.find ".dependencies" expect(deps).to have_content "MIT" expect(deps).to have_content "the-approver" expect(deps).to have_content "the-approval-note" expect(deps).to have_selector "time" end end context "when the dependency is whitelisted" do before { dependency.whitelisted! } it "should show approved dependencies without action items" do is_expected.to have_selector ".approved" is_expected.not_to have_selector ".action-items" end it "shows the license" do deps = subject.find ".dependencies" expect(deps).to have_content "MIT" end end context "when the dependency is not approved" do it "should show unapproved dependencies with action items" do is_expected.to have_selector ".unapproved" is_expected.to have_selector ".action-items li" end end context "when the gem has a group" do let(:dependency) do Package.new(nil, nil, groups: ["foo group"]) end it "should show the group" do is_expected.to have_text "(foo group)" end end context "when the gem does not have a group" do it "should not show the group" do is_expected.not_to have_text "()" end end context "when the gem has many relationships" do let(:dependencies) do grandparent = Package.new("foo grandparent", nil, children: ["foo parent"]) parent = Package.new("foo parent", nil, children: ["foo child"]) child = Package.new("foo child") pm = PackageManager.new allow(pm).to receive(:current_packages) { [grandparent, parent, child] } pm.current_packages_with_relations end it "should show the relationships" do is_expected.to have_text "foo parent is required by:" is_expected.to have_text "foo grandparent" is_expected.to have_text "foo parent relies on:" is_expected.to have_text "foo child" end end context "when the gem has no relationships" do it "should not show any relationships" do is_expected.not_to have_text "is required by:" is_expected.not_to have_text "relies on:" end end end end end license-finder-2.1.2/spec/lib/license_finder/reports/text_report_spec.rb0000644000175000017500000000231312767430336025526 0ustar pravipravirequire "spec_helper" module LicenseFinder describe TextReport do describe '#to_s' do let(:dep1) do result = Package.new('gem_a', '1.0') result.decide_on_license(License.find_by_name('MIT')) result end let(:dep2) do result = Package.new('gem_b', '1.0') result.decide_on_license(License.find_by_name('MIT')) result end let(:dep3) do result = Package.new('gem_c', '2.0') result.decide_on_license(License.find_by_name('MIT')) result.decide_on_license(License.find_by_name('BSD')) result end subject { described_class.new([dep3, dep2, dep1]).to_s } it 'should generate a text report with the name, version and license of each dependency, sorted by name' do is_expected.to eq("gem_a, 1.0, MIT\ngem_b, 1.0, MIT\ngem_c, 2.0, \"MIT, BSD\"\n") end it 'prints a warning message for packages that have not been installed' do dep = Package.new('gem_d', '2.0', missing: true) report = described_class.new([dep]).to_s expect(report).to eq("gem_d, 2.0, \"This package is not installed. Please install to determine licenses.\"\n") end end end end license-finder-2.1.2/spec/lib/license_finder/reports/markdown_report_spec.rb0000644000175000017500000000231112767430336026362 0ustar pravipravirequire "spec_helper" module LicenseFinder describe MarkdownReport do describe '#to_s' do let(:dep1) do Package.new('gem_a', '1.0') end let(:dep2) do result = Package.new('gem_b', '2.3') result.decide_on_license(License.find_by_name('BSD')) result.approved_manually!(double(:approval).as_null_object) result end subject { MarkdownReport.new([dep2, dep1], project_name: "new_project_name").to_s } it 'should have the correct header' do is_expected.to match "# new_project_name" end it 'should list the total, and unapproved counts' do is_expected.to match "2 total" is_expected.to match /1 \*unapproved\*/ end it "should list the unapproved dependency" do is_expected.to match 'href="#gem_a"' end it "should display a summary" do is_expected.to match "## Summary" is_expected.to match /\s+\* 1 unknown/ is_expected.to match /\s+\* 1 BSD/ end it "should list both gems" do is_expected.to match "## Items" is_expected.to match "### gem_a v1.0" is_expected.to match "### gem_b v2.3" end end end end license-finder-2.1.2/spec/lib/license_finder/reports/diff_report_spec.rb0000644000175000017500000000445512767430336025463 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe DiffReport do describe '#to_s' do context 'reports from a single project' do it 'should generate a diff report' do foo = Package.new('foo', '1.0.0', spec_licenses: ['MIT']) bar = Package.new('bar', '1.1.0', spec_licenses: ['GPLv2']) foo_change = PackageDelta.added(foo) bar_change = PackageDelta.removed(bar) report = DiffReport.new([foo_change, bar_change]) expect(report.to_s).to include('removed,bar,,1.1.0,GPLv2') expect(report.to_s).to include('added,foo,1.0.0,,MIT') end it 'should generate a diff report displaying version changes' do foo_old = Package.new('foo', '1.0.0', spec_licenses: ['MIT']) foo_new = Package.new('foo', '1.1.0', spec_licenses: ['MIT']) foo = PackageDelta.unchanged(foo_new, foo_old) report = DiffReport.new([foo]) expect(report.to_s).to include('unchanged,foo,1.1.0,1.0.0,MIT') end end context 'reports from subprojects' do it 'should generate a diff report displaying source path' do project1_foo_old = Package.new('foo', '1.0.0', spec_licenses: ['MIT']) project1_foo_new = Package.new('foo', '1.1.0', spec_licenses: ['MIT']) project1_bar_new = Package.new('bar', '1.1.0', spec_licenses: ['MIT']) merged_foo_old = MergedPackage.new(project1_foo_old, ['path/to/project1']) merged_foo_new = MergedPackage.new(project1_foo_new, ['path/to/project1']) merged_bar_new = MergedPackage.new(project1_bar_new, ['path/to/project1', 'path/to/project2']) foo = PackageDelta.unchanged(merged_foo_new, merged_foo_old) bar = PackageDelta.added(merged_bar_new) expanded_foo_path = File.expand_path(merged_foo_old.subproject_paths[0]) expanded_bar_path1 = File.expand_path(merged_bar_new.subproject_paths[0]) expanded_bar_path2 = File.expand_path(merged_bar_new.subproject_paths[1]) report = DiffReport.new([foo, bar]) expect(report.to_s).to include("unchanged,foo,1.1.0,1.0.0,MIT,#{expanded_foo_path}") expect(report.to_s).to include("added,bar,1.1.0,,MIT,\"#{expanded_bar_path1},#{expanded_bar_path2}\"") end end end end end license-finder-2.1.2/spec/lib/license_finder/reports/csv_report_spec.rb0000644000175000017500000000464312767430336025345 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe CsvReport do it "accepts a custom list of columns" do dep = Package.new('gem_a', '1.0') subject = described_class.new([dep], columns: %w[name version]) expect(subject.to_s).to eq("gem_a,1.0\n") end it "understands many columns" do dep = Package.new('gem_a', '1.0', authors: "the authors", description: "A description", summary: "A summary", homepage: "http://homepage.example.com") dep.decide_on_license(License.find_by_name("MIT")) dep.decide_on_license(License.find_by_name("GPL")) dep.whitelisted! subject = described_class.new([dep], columns: %w[name version authors licenses approved summary description homepage]) expect(subject.to_s).to eq("gem_a,1.0,the authors,\"MIT,GPL\",Approved,A summary,A description,http://homepage.example.com\n") end it "ignores unknown columns" do dep = Package.new('gem_a', '1.0') subject = described_class.new([dep], columns: %w[unknown]) expect(subject.to_s).to eq("\n") end it 'supports install_path column' do dep = Package.new('gem_a', '1.0', install_path: '/tmp/gems/gem_a-1.0') subject = described_class.new([dep], columns: %w[name version install_path]) expect(subject.to_s).to eq("gem_a,1.0,/tmp/gems/gem_a-1.0\n") end it 'supports package_manager column' do dep = NugetPackage.new('gem_a', '1.0') subject = described_class.new([dep], columns: %w[name version package_manager]) expect(subject.to_s).to eq("gem_a,1.0,Nuget\n") end it "does not include columns that should only be in merged reports" do dep = Package.new('gem_a', '1.0') subject = described_class.new([dep], columns: %w[subproject_paths]) expect(subject.to_s).to eq("\n") end context "when no groups are specified" do let( :dep ) { Package.new('gem_a', '1.0') } subject { described_class.new([dep], columns: %w[name version groups]) } it 'supports a groups column' do expect(subject.to_s).to eq("gem_a,1.0,\"\"\n") end end context "when some groups are specified" do let( :dep ) { Package.new('gem_a', '1.0', groups: %w[development production]) } subject { described_class.new([dep], columns: %w[name version groups]) } it 'supports a groups column' do expect(subject.to_s).to eq("gem_a,1.0,\"development,production\"\n") end end end end license-finder-2.1.2/spec/lib/license_finder/reports/merged_report_spec.rb0000644000175000017500000000144112767430336026006 0ustar pravipravirequire 'spec_helper' module LicenseFinder describe MergedReport do describe '#to_s' do it 'displays the path to the dependency' do foo = Package.new('foo', '1.0.0', spec_licenses: ['MIT']) bar = Package.new('bar', '2.0.0', spec_licenses: ['GPLv2']) merged_foo = MergedPackage.new(foo, ['path/to/foo']) merged_bar = MergedPackage.new(bar, ['path/to/bar']) expanded_foo_path = File.expand_path(merged_foo.subproject_paths[0]) expanded_bar_path = File.expand_path(merged_bar.subproject_paths[0]) report = MergedReport.new([merged_foo, merged_bar]) expect(report.to_s).to include("foo,1.0.0,MIT,#{expanded_foo_path}") expect(report.to_s).to include("bar,2.0.0,GPLv2,#{expanded_bar_path}") end end end end license-finder-2.1.2/spec/dummy_app/0000755000175000017500000000000012767430336016367 5ustar pravipravilicense-finder-2.1.2/spec/dummy_app/Gemfile0000644000175000017500000000011212767430336017654 0ustar pravipravisource 'https://rubygems.org' ruby '2.1.5' gem 'bundler' gem 'httparty' license-finder-2.1.2/spec/support/0000755000175000017500000000000012767430336016110 5ustar pravipravilicense-finder-2.1.2/spec/support/test_fixtures.rb0000644000175000017500000000025012767430336021342 0ustar pravipravimodule LicenseFinder module TestFixtures def fixture_path(fixture) LicenseFinder::ROOT_PATH.join("..", "..", "spec", "fixtures", fixture) end end end license-finder-2.1.2/spec/support/stdout_helpers.rb0000644000175000017500000000070312767430336021501 0ustar pravipravimodule StdoutHelpers def capture_stderr orig_stderr = $stderr $stderr = StringIO.new yield $stderr.string ensure $stderr = orig_stderr end alias silence_stderr capture_stderr def capture_stdout orig_stdout = $stdout $stdout = StringIO.new yield $stdout.string ensure $stdout = orig_stdout end alias silence_stdout capture_stdout end RSpec.configure do |c| c.include(StdoutHelpers) end license-finder-2.1.2/spec/support/shared_examples_for_package_manager.rb0000644000175000017500000000327012767430336025616 0ustar pravipravimodule LicenseFinder shared_examples "a PackageManager" do let(:all_pms) { fixture_path("all_pms") } it { expect(described_class.ancestors).to include PackageManager } it { expect(PackageManager.package_managers).to include described_class } context "logging" do it "logs when it checks for active-ness" do logger = double(:logger) expect(logger).to receive(:installed) expect(logger).to receive(:active) subject = described_class.new logger: logger, project_path: all_pms subject.active? end end describe '.active?' do context 'package manager is installed' do before do allow(described_class).to receive(:installed?).and_return(true) allow_any_instance_of(described_class).to receive(:has_go_files?).and_return(true) end it 'is true when package manager file exists' do expect(described_class.new(project_path: all_pms)).to be_active end it 'is false without a package manager file' do no_pms = fixture_path("not/a/path") expect(described_class.new(project_path: no_pms)).to_not be_active end end context 'package manager is not installed' do before do allow(described_class).to receive(:installed?).and_return(false) end it 'is false when package manager file exists' do expect(described_class.new(project_path: all_pms)).to_not be_active end it 'is false without a package manager file' do no_pms = fixture_path("not/a/path") expect(described_class.new(project_path: no_pms)).to_not be_active end end end end end license-finder-2.1.2/spec/fixtures/0000755000175000017500000000000012767430336016245 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/nested_gem/0000755000175000017500000000000012767430336020357 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/nested_gem/vendor/0000755000175000017500000000000012767430336021654 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/nested_gem/vendor/LICENSE0000644000175000017500000000002012767430336022651 0ustar pravipraviThe MIT License license-finder-2.1.2/spec/fixtures/config/0000755000175000017500000000000012767430336017512 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/config/license_finder.yml0000644000175000017500000000016312767430336023206 0ustar pravipravi--- decisions_file: './some_path/' gradle_command: 'gradlew' rebar_command: 'rebar_new' rebar_deps_dir: 'some_dir' license-finder-2.1.2/spec/fixtures/utf8_gem/0000755000175000017500000000000012767430336017763 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/utf8_gem/README0000644000175000017500000001523512767430336020651 0ustar pravipravi= Project: Builder == Goal Provide a simple way to create XML markup and data structures. == Classes Builder::XmlMarkup:: Generate XML markup notiation Builder::XmlEvents:: Generate XML events (i.e. SAX-like) Notes:: * An Builder::XmlTree class to generate XML tree (i.e. DOM-like) structures is also planned, but not yet implemented. Also, the events builder is currently lagging the markup builder in features. == Usage require 'rubygems' require_gem 'builder', '~> 2.0' builder = Builder::XmlMarkup.new xml = builder.person { |b| b.name("Jim"); b.phone("555-1234") } xml #=> Jim555-1234 or require 'rubygems' require_gem 'builder' builder = Builder::XmlMarkup.new(:target=>STDOUT, :indent=>2) builder.person { |b| b.name("Jim"); b.phone("555-1234") } # # Prints: # # Jim # 555-1234 # == Compatibility === Version 2.0.0 Compatibility Changes Version 2.0.0 introduces automatically escaped attribute values for the first time. Versions prior to 2.0.0 did not insert escape characters into attribute values in the XML markup. This allowed attribute values to explicitly reference entities, which was occasionally used by a small number of developers. Since strings could always be explicitly escaped by hand, this was not a major restriction in functionality. However, it did suprise most users of builder. Since the body text is normally escaped, everybody expected the attribute values to be escaped as well. Escaped attribute values were the number one support request on the 1.x Builder series. Starting with Builder version 2.0.0, all attribute values expressed as strings will be processed and the appropriate characters will be escaped (e.g. "&" will be tranlated to "&"). Attribute values that are expressed as Symbol values will not be processed for escaped characters and will be unchanged in output. (Yes, this probably counts as Symbol abuse, but the convention is convenient and flexible). Example: xml = Builder::XmlMarkup.new xml.sample(:escaped=>"This&That", :unescaped=>:"Here&There") xml.target! => === Version 1.0.0 Compatibility Changes Version 1.0.0 introduces some changes that are not backwards compatible with earlier releases of builder. The main areas of incompatibility are: * Keyword based arguments to +new+ (rather than positional based). It was found that a developer would often like to specify indentation without providing an explicit target, or specify a target without indentation. Keyword based arguments handle this situation nicely. * Builder must now be an explicit target for markup tags. Instead of writing xml_markup = Builder::XmlMarkup.new xml_markup.div { strong("text") } you need to write xml_markup = Builder::XmlMarkup.new xml_markup.div { xml_markup.strong("text") } * The builder object is passed as a parameter to all nested markup blocks. This allows you to create a short alias for the builder object that can be used within the block. For example, the previous example can be written as: xml_markup = Builder::XmlMarkup.new xml_markup.div { |xml| xml.strong("text") } * If you have both a pre-1.0 and a post-1.0 gem of builder installed, you can choose which version to use through the RubyGems +require_gem+ facility. require_gem 'builder', "~> 0.0" # Gets the old version require_gem 'builder', "~> 1.0" # Gets the new version == Features * XML Comments are supported ... xml_markup.comment! "This is a comment" #=> * XML processing instructions are supported ... xml_markup.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8" #=> If the processing instruction is omitted, it defaults to "xml". When the processing instruction is "xml", the defaults attributes are: version:: 1.0 encoding:: "UTF-8" * XML entity declarations are now supported to a small degree. xml_markup.declare! :DOCTYPE, :chapter, :SYSTEM, "../dtds/chapter.dtd" #=> The parameters to a declare! method must be either symbols or strings. Symbols are inserted without quotes, and strings are inserted with double quotes. Attribute-like arguments in hashes are not allowed. If you need to have an argument to declare! be inserted without quotes, but the arguement does not conform to the typical Ruby syntax for symbols, then use the :"string" form to specify a symbol. For example: xml_markup.declare! :ELEMENT, :chapter, :"(title,para+)" #=> Nested entity declarations are allowed. For example: @xml_markup.declare! :DOCTYPE, :chapter do |x| x.declare! :ELEMENT, :chapter, :"(title,para+)" x.declare! :ELEMENT, :title, :"(#PCDATA)" x.declare! :ELEMENT, :para, :"(#PCDATA)" end #=> ]> * Some support for XML namespaces is now available. If the first argument to a tag call is a symbol, it will be joined to the tag to produce a namespace:tag combination. It is easier to show this than describe it. xml.SOAP :Envelope do ... end Just put a space before the colon in a namespace to produce the right form for builder (e.g. "SOAP:Envelope" => "xml.SOAP :Envelope") * String attribute values are now escaped by default by Builder (NOTE: this is _new_ behavior as of version 2.0). However, occasionally you need to use entities in attribute values. Using a symbols (rather than a string) for an attribute value will cause Builder to not run its quoting/escaping algorithm on that particular value. (Note: The +escape_attrs+ option for builder is now obsolete). Example: xml = Builder::XmlMarkup.new xml.sample(:escaped=>"This&That", :unescaped=>:"Here&There") xml.target! => * UTF-8 Support Builder correctly translates UTF-8 characters into valid XML. (New in version 2.0.0). Thanks to Sam Ruby for the translation code. Example: xml = Builder::Markup.new xml.sample("Itrntinl") xml.target! => "Iñtërnâtiônàl" == Contact Author:: Jim Weirich Email:: jim@weirichhouse.org Home Page:: http://onestepback.org License:: MIT Licence (http://www.opensource.org/licenses/mit-license.html) license-finder-2.1.2/spec/fixtures/license_directory/0000755000175000017500000000000012767430336021753 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/license_directory/LICENSE/0000755000175000017500000000000012767430336023035 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/license_directory/LICENSE/MIT.txt0000644000175000017500000000002012767430336024217 0ustar pravipraviThe MIT License license-finder-2.1.2/spec/fixtures/license_directory/LICENSE/lib/0000755000175000017500000000000012767430336023603 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/license_directory/LICENSE/lib/unrelated.txt0000644000175000017500000000012012767430336026320 0ustar pravipravi* DO NOT DELETE THIS FILE * This is not a license, just some random nested lib. license-finder-2.1.2/spec/fixtures/license_directory/COPYING0000644000175000017500000000002012767430336022776 0ustar pravipraviThe MIT License license-finder-2.1.2/spec/fixtures/all_pms/0000755000175000017500000000000012767430336017674 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/Godeps/0000755000175000017500000000000012767430336021115 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/Godeps/Godeps.json0000644000175000017500000000000012767430336023217 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/build.gradle0000644000175000017500000000000012767430336022141 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/vendor/0000755000175000017500000000000012767430336021171 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/vendor/.gitkeep0000644000175000017500000000000012767430336022610 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/requirements.txt0000644000175000017500000000000012767430336023146 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/rebar.config0000644000175000017500000000000012767430336022144 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/.envrc0000644000175000017500000000001412767430336021005 0ustar pravipraviGOPATH=$PWD license-finder-2.1.2/spec/fixtures/all_pms/Podfile0000644000175000017500000000000012767430336021167 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/pom.xml0000644000175000017500000000000012767430336021177 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/Gemfile0000644000175000017500000000000012767430336021155 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/.nuget/0000755000175000017500000000000012767430336021074 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/.nuget/.keep0000644000175000017500000000000012767430336022007 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/bower.json0000644000175000017500000000000012767430336021673 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/all_pms/package.json0000644000175000017500000000000012767430336022150 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/0000755000175000017500000000000012767430336020247 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/project1/0000755000175000017500000000000012767430336021776 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/project1/Gemfile0000644000175000017500000000000012767430336023257 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/project2/0000755000175000017500000000000012767430336021777 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/project2/package.json0000644000175000017500000000000012767430336024253 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/nested_project/0000755000175000017500000000000012767430336023257 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/nested_project/src/0000755000175000017500000000000012767430336024046 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/nested_project/src/github.com/0000755000175000017500000000000012767430336026105 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/nested_project/src/github.com/pivotal/0000755000175000017500000000000012767430336027563 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/nested_project/src/github.com/pivotal/foo/0000755000175000017500000000000012767430336030346 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/nested_project/src/github.com/pivotal/foo/Godeps/0000755000175000017500000000000012767430336031567 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/nested_project/src/github.com/pivotal/foo/Godeps/Readme0000644000175000017500000000021012767430336032700 0ustar pravipraviThis directory tree is generated automatically by godep. Please do not edit. See https://github.com/tools/godep for more information. ././@LongLink0000644000000000000000000000015200000000000011601 Lustar rootrootlicense-finder-2.1.2/spec/fixtures/composite/nested_project/src/github.com/pivotal/foo/Godeps/Godeps.jsonlicense-finder-2.1.2/spec/fixtures/composite/nested_project/src/github.com/pivotal/foo/Godeps/Godeps0000644000175000017500000000055212767430336032735 0ustar pravipravi{ "ImportPath": "github.com/pivotal/foo", "GoVersion": "go1.4.2", "Deps": [ { "ImportPath": "github.com/onsi/ginkgo", "Comment": "v1.2.0-6-gd981d36", "Rev": "d981d36e9884231afa909627b9c275e4ba678f90" }, { "ImportPath": "github.com/onsi/gomega", "Comment": "v1.0-50-gd6c945f", "Rev": "d6c945f9fdbf6cad99e85b0feff591caa268e0db" } ] } license-finder-2.1.2/spec/fixtures/composite/nested_project/src/github.com/pivotal/foo/foo.go0000644000175000017500000000012212767430336031453 0ustar pravipravipackage foo import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) license-finder-2.1.2/spec/fixtures/composite/nested_project/.envrc0000644000175000017500000000025312767430336024375 0ustar pravipraviproject_go_root="$(dirname ${BASH_SOURCE[0]})/../../../../" cd $project_go_root if [ $(basename $PWD) == "cf-release" ] then export GOPATH=$GOPATH:$PWD fi cd - license-finder-2.1.2/spec/fixtures/composite/not_a_project/0000755000175000017500000000000012767430336023075 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/not_a_project/DONTREADME.md0000644000175000017500000000000012767430336025027 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/composite/Gemfile0000644000175000017500000000000012767430336021530 0ustar pravipravilicense-finder-2.1.2/spec/fixtures/license_names/0000755000175000017500000000000012767430336021052 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/license_names/Mit-License0000644000175000017500000000002012767430336023076 0ustar pravipraviThe MIT License license-finder-2.1.2/spec/fixtures/license_names/README.rdoc0000644000175000017500000000002012767430336022650 0ustar pravipraviThe MIT License license-finder-2.1.2/spec/fixtures/license_names/LICENSE0000644000175000017500000000002012767430336022047 0ustar pravipraviThe MIT License license-finder-2.1.2/spec/fixtures/license_names/COPYING.txt0000644000175000017500000000002012767430336022713 0ustar pravipraviThe MIT License license-finder-2.1.2/spec/fixtures/license_names/Licence.rdoc0000644000175000017500000000002012767430336023255 0ustar pravipraviThe MIT License license-finder-2.1.2/spec/fixtures/npm-recursive-dependencies/0000755000175000017500000000000012767430336023470 5ustar pravipravilicense-finder-2.1.2/spec/fixtures/npm-recursive-dependencies/npm-list.json0000644000175000017500000312014112767430336026130 0ustar pravipravi{ "name": "asdf", "version": "0.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "BSD-2-Clause", "dependencies": { "pui-react-alerts": { "name": "pui-react-alerts", "version": "3.0.0-alpha.2", "description": "React components to display flash messages to the user", "main": "alerts.js", "repository": { "type": "git", "url": "https://github.com/pivotal-cf/pivotal-ui.git" }, "keywords": [ "bootstrap", "react", "pivotal ui", "pivotal ui modularized" ], "author": { "name": "Pivotal Software, Inc" }, "license": "MIT", "bugs": { "url": "https://github.com/pivotal-cf/pivotal-ui/issues" }, "homepage": "http://styleguide.pivotal.io/", "peerDependencies": { "react": "^0.14.0" }, "dependencies": { "babel-runtime": { "name": "babel-runtime", "version": "5.8.35", "description": "babel selfContained runtime", "license": "MIT", "repository": { "type": "git", "url": "git://github.com/babel/babel" }, "author": { "name": "Sebastian McKenzie", "email": "sebmck@gmail.com" }, "dependencies": { "core-js": { "name": "core-js", "description": "Standard library", "version": "1.2.6", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git" }, "main": "index.js", "devDependencies": { "webpack": "1.12.x", "LiveScript": "1.3.x", "grunt": "0.4.x", "grunt-cli": "0.1.x", "grunt-livescript": "0.5.x", "grunt-contrib-uglify": "0.10.x", "grunt-contrib-watch": "0.6.x", "grunt-contrib-clean": "0.6.x", "grunt-contrib-copy": "0.8.x", "grunt-karma": "0.12.x", "karma": "0.13.x", "karma-qunit": "0.1.x", "karma-chrome-launcher": "0.2.x", "karma-ie-launcher": "0.2.x", "karma-firefox-launcher": "0.1.x", "karma-phantomjs-launcher": "0.2.x", "promises-aplus-tests": "2.1.x", "eslint": "1.9.x" }, "scripts": { "grunt": "grunt", "lint": "eslint es5 es6 es7 js web core fn modules", "promises-tests": "promises-aplus-tests tests/promises-aplus/adapter", "test": "npm run lint && npm run grunt livescript client karma:continuous library karma:continuous-library && npm run promises-tests && lsc tests/commonjs" }, "license": "MIT", "keywords": [ "ES5", "ECMAScript 5", "ES6", "ECMAScript 6", "ES7", "ECMAScript 7", "Harmony", "Strawman", "Map", "Set", "WeakMap", "WeakSet", "Promise", "Symbol", "Array generics", "setImmediate", "Dict", "partial application" ], "readme": "# core-js\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![version](https://img.shields.io/npm/v/core-js.svg)](https://www.npmjs.com/package/core-js) [![npm downloads](https://img.shields.io/npm/dm/core-js.svg)](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18&to=2114-11-18) [![Build Status](https://travis-ci.org/zloirock/core-js.png)](https://travis-ci.org/zloirock/core-js) [![devDependency Status](https://david-dm.org/zloirock/core-js/dev-status.svg)](https://david-dm.org/zloirock/core-js#info=devDependencies)\n\nModular compact standard library for JavaScript. Includes polyfills for [ECMAScript 5](#ecmascript-5), [ECMAScript 6](#ecmascript-6): [symbols](#ecmascript-6-symbol), [collections](#ecmascript-6-collections), [iterators](#ecmascript-6-iterators), [promises](#ecmascript-6-promise), [ECMAScript 7 proposals](#ecmascript-7); [setImmediate](#setimmediate), [array generics](#mozilla-javascript-array-generics). Some additional features such as [dictionaries](#dict) or [extended partial application](#partial-application). You can require only standardized features polyfills, use features without global namespace pollution or create a custom build.\n\n[Example](http://goo.gl/mfHYm2):\n```javascript\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\n'*'.repeat(10); // => '**********'\nPromise.resolve(32).then(log); // => 32\nsetImmediate(log, 42); // => 42\n```\n\n[Without global namespace pollution](http://goo.gl/WBhs43):\n```javascript\nvar core = require('core-js/library'); // With a modular system, otherwise use global `core`\ncore.Array.from(new core.Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\ncore.String.repeat('*', 10); // => '**********'\ncore.Promise.resolve(32).then(core.log); // => 32\ncore.setImmediate(core.log, 42); // => 42\n```\n\n- [Usage](#usage)\n - [Basic](#basic)\n - [CommonJS](#commonjs)\n - [Custom build](#custom-build)\n- [Features](#features)\n - [ECMAScript 5](#ecmascript-5)\n - [ECMAScript 6](#ecmascript-6)\n - [ECMAScript 6: Object](#ecmascript-6-object)\n - [ECMAScript 6: Function](#ecmascript-6-function)\n - [ECMAScript 6: Array](#ecmascript-6-array)\n - [ECMAScript 6: String](#ecmascript-6-string)\n - [ECMAScript 6: RegExp](#ecmascript-6-regexp)\n - [ECMAScript 6: Number](#ecmascript-6-number)\n - [ECMAScript 6: Math](#ecmascript-6-math)\n - [ECMAScript 6: Symbol](#ecmascript-6-symbol)\n - [ECMAScript 6: Collections](#ecmascript-6-collections)\n - [ECMAScript 6: Iterators](#ecmascript-6-iterators)\n - [ECMAScript 6: Promise](#ecmascript-6-promise)\n - [ECMAScript 6: Reflect](#ecmascript-6-reflect)\n - [ECMAScript 7](#ecmascript-7)\n - [Mozilla JavaScript: Array generics](#mozilla-javascript-array-generics)\n - [Web standards](#web-standards)\n - [setTimeout / setInterval](#settimeout--setinterval)\n - [setImmediate](#setimmediate)\n - [Non-standard](#non-standard)\n - [Object](#object)\n - [Dict](#dict)\n - [Partial application](#partial-application)\n - [Number Iterator](#number-iterator)\n - [Escaping HTML](#escaping-html)\n - [delay](#delay)\n - [console](#console)\n- [Missing polyfills](#missing-polyfills)\n- [Changelog](./CHANGELOG.md)\n\n## Usage\n### Basic\n```\nnpm i core-js\nbower install core.js\n```\n\n```javascript\n// Default\nrequire('core-js');\n// Without global namespace pollution\nvar core = require('core-js/library');\n// Shim only\nrequire('core-js/shim');\n```\nIf you need complete build for browser, use builds from `core-js/client` path: [default](https://raw.githack.com/zloirock/core-js/master/client/core.min.js), [without global namespace pollution](https://raw.githack.com/zloirock/core-js/master/client/library.min.js), [shim only](https://raw.githack.com/zloirock/core-js/master/client/shim.min.js).\n\nWarning: if you uses `core-js` with the extension of native objects, require all needed `core-js` modules at the beginning of entry point of your application, otherwise maybe conflicts.\n\n### CommonJS\nYou can require only needed modules.\n\n```js\nrequire('core-js/es5'); // if you need support IE8-\nrequire('core-js/fn/set');\nrequire('core-js/fn/array/from');\nrequire('core-js/fn/array/find-index');\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\n[1, 2, NaN, 3, 4].findIndex(isNaN); // => 2\n\n// or, w/o global namespace pollution:\n\nvar core = require('core-js/library/es5'); // if you need support IE8-\nvar Set = require('core-js/library/fn/set');\nvar from = require('core-js/library/fn/array/from');\nvar findIndex = require('core-js/library/fn/array/find-index');\nfrom(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\nfindIndex([1, 2, NaN, 3, 4], isNaN); // => 2\n```\nAvailable entry points for methods / constructors, as above examples, excluding features from [`es5`](#ecmascript-5) module (this module requires completely in ES3 environment before all other modules).\n\nAvailable namespaces: for example, `core-js/es6/array` (`core-js/library/es6/array`) contains all [ES6 `Array` features](#ecmascript-6-array), `core-js/es6` (`core-js/library/es6`) contains all ES6 features.\n\n### Custom build\n```\nnpm i core-js && cd node_modules/core-js && npm i\nnpm run grunt build:core.dict,es6 -- --blacklist=es6.promise,es6.math --library=on --path=custom uglify\n```\nWhere `core.dict` and `es6` are modules (namespaces) names, which will be added to the build, `es6.promise` and `es6.math` are modules (namespaces) names, which will be excluded from the build, `--library=on` is flag for build without global namespace pollution and `custom` is target file name.\n\nAvailable namespaces: for example, `es6.array` contains [ES6 `Array` features](#ecmascript-6-array), `es6` contains all modules whose names start with `es6`.\n\nAvailable custom build from js code (required `webpack`):\n```js\nrequire('core-js/build')({\n modules: ['es6', 'core.dict'], // modules / namespaces\n blacklist: ['es6.reflect'], // blacklist of modules / namespaces\n library: false, // flag for build without global namespace pollution\n}, function(err, code){ // callback\n // ...\n});\n```\n## Features:\n### ECMAScript 5\nModule [`es5`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es5.js), nothing new - without examples.\n```javascript\nObject\n .create(proto | null, descriptors?) -> object\n .getPrototypeOf(object) -> proto | null\n .defineProperty(target, key, desc) -> target, cap for ie8-\n .defineProperties(target, descriptors) -> target, cap for ie8-\n .getOwnPropertyDescriptor(object, key) -> desc\n .getOwnPropertyNames(object) -> array\n .keys(object) -> array\nArray\n .isArray(var) -> bool\n #slice(start?, end?) -> array, fix for ie7-\n #join(string = ',') -> string, fix for ie7-\n #indexOf(var, from?) -> int\n #lastIndexOf(var, from?) -> int\n #every(fn(val, index, @), that) -> bool\n #some(fn(val, index, @), that) -> bool\n #forEach(fn(val, index, @), that) -> void\n #map(fn(val, index, @), that) -> array\n #filter(fn(val, index, @), that) -> array\n #reduce(fn(memo, val, index, @), memo?) -> var\n #reduceRight(fn(memo, val, index, @), memo?) -> var\nFunction\n #bind(object, ...args) -> boundFn(...args)\nDate\n .now() -> int\n #toISOString() -> string\n```\nSome features moved to [another modules / namespaces](#ecmascript-6), but available as part of `es5` namespace too:\n```js\nObject\n .seal(object) -> object, cap for ie8-\n .freeze(object) -> object, cap for ie8-\n .preventExtensions(object) -> object, cap for ie8-\n .isSealed(object) -> bool, cap for ie8-\n .isFrozen(object) -> bool, cap for ie8-\n .isExtensible(object) -> bool, cap for ie8-\nString\n #trim() -> str\n```\n\n### ECMAScript 6\n#### ECMAScript 6: Object\nModules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.to-string.js).\n```javascript\nObject\n .assign(target, ...src) -> target\n .is(a, b) -> bool\n .setPrototypeOf(target, proto | null) -> target (required __proto__ - IE11+)\n #toString() -> string, ES6 fix: @@toStringTag support\n```\n[Example](http://goo.gl/VzmY3j):\n```javascript\nvar foo = {q: 1, w: 2}\n , bar = {e: 3, r: 4}\n , baz = {t: 5, y: 6};\nObject.assign(foo, bar, baz); // => foo = {q: 1, w: 2, e: 3, r: 4, t: 5, y: 6}\n\nObject.is(NaN, NaN); // => true\nObject.is(0, -0); // => false\nObject.is(42, 42); // => true\nObject.is(42, '42'); // => false\n\nfunction Parent(){}\nfunction Child(){}\nObject.setPrototypeOf(Child.prototype, Parent.prototype);\nnew Child instanceof Child; // => true\nnew Child instanceof Parent; // => true\n\nvar O = {};\nO[Symbol.toStringTag] = 'Foo';\n'' + O; // => '[object Foo]'\n```\nIn ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.keys.js), [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-own-property-names.js).\n```javascript\nObject\n .freeze(var) -> var\n .seal(var) -> var\n .preventExtensions(var) -> var\n .isFrozen(var) -> bool\n .isSealed(var) -> bool\n .isExtensible(var) -> bool\n .getOwnPropertyDescriptor(var, key) -> desc | undefined\n .getPrototypeOf(var) -> object | null\n .keys(var) -> array\n .getOwnPropertyNames(var) -> array\n```\n[Example](http://goo.gl/35lPSi):\n```javascript\nObject.keys('qwe'); // => ['0', '1', '2']\nObject.getPrototypeOf('qwe') === String.prototype; // => true\n```\n#### ECMAScript 6: Function\nModules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.function.name.js) and [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.function.has-instance.js).\n```javascript\nFunction\n #name -> string (IE9+)\n #@@hasInstance(var) -> bool\n```\n[Example](http://goo.gl/zqu3Wp):\n```javascript\n(function foo(){}).name // => 'foo'\n```\n#### ECMAScript 6: Array\nModules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.find.js) and [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.find-index.js).\n```javascript\nArray\n .from(iterable | array-like, mapFn(val, index)?, that) -> array\n .of(...args) -> array\n #copyWithin(target = 0, start = 0, end = @length) -> @\n #fill(val, start = 0, end = @length) -> @\n #find(fn(val, index, @), that) -> val\n #findIndex(fn(val, index, @), that) -> index\n #@@unscopables -> object (cap)\n```\n[Example](http://goo.gl/nxmJTe):\n```javascript\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\nArray.from({0: 1, 1: 2, 2: 3, length: 3}); // => [1, 2, 3]\nArray.from('123', Number); // => [1, 2, 3]\nArray.from('123', function(it){\n return it * it;\n}); // => [1, 4, 9]\n\nArray.of(1); // => [1]\nArray.of(1, 2, 3); // => [1, 2, 3]\n\nfunction isOdd(val){\n return val % 2;\n}\n[4, 8, 15, 16, 23, 42].find(isOdd); // => 15\n[4, 8, 15, 16, 23, 42].findIndex(isOdd); // => 2\n[4, 8, 15, 16, 23, 42].find(isNaN); // => undefined\n[4, 8, 15, 16, 23, 42].findIndex(isNaN); // => -1\n\nArray(5).fill(42); // => [42, 42, 42, 42, 42]\n\n[1, 2, 3, 4, 5].copyWithin(0, 3); // => [4, 5, 3, 4, 5]\n```\n#### ECMAScript 6: String\nModules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.raw.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.trim.js).\n```javascript\nString\n .fromCodePoint(...codePoints) -> str\n .raw({raw}, ...substitutions) -> str\n #includes(str, from?) -> bool\n #startsWith(str, from?) -> bool\n #endsWith(str, from?) -> bool\n #repeat(num) -> str\n #codePointAt(pos) -> uint\n #trim() -> str, ES6 fix\n```\n[Examples](http://goo.gl/RMyFBo):\n```javascript\n'foobarbaz'.includes('bar'); // => true\n'foobarbaz'.includes('bar', 4); // => false\n'foobarbaz'.startsWith('foo'); // => true\n'foobarbaz'.startsWith('bar', 3); // => true\n'foobarbaz'.endsWith('baz'); // => true\n'foobarbaz'.endsWith('bar', 6); // => true\n\n'string'.repeat(3); // => 'stringstringstring'\n\n'𠮷'.codePointAt(0); // => 134071\nString.fromCodePoint(97, 134071, 98); // => 'a𠮷b'\n\nvar name = 'Bob';\nString.raw`Hi\\n${name}!`; // => 'Hi\\\\nBob!' (ES6 template string syntax)\nString.raw({raw: 'test'}, 0, 1, 2); // => 't0e1s2t'\n```\n#### ECMAScript 6: RegExp\nModules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.flags.js).\n\nSupport well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.split.js).\n```\nString\n #match(tpl) -> var, ES6 fix for support @@match\n #replace(tpl, replacer) -> var, ES6 fix for support @@replace\n #search(tpl) -> var, ES6 fix for support @@search\n #split(tpl, limit) -> var, ES6 fix for support @@split\n[new] RegExp(pattern, flags?) -> regexp, ES6 fix: can alter flags (IE9+)\n #flags -> str (IE9+)\n #@@match(str) -> array | null\n #@@replace(str, replacer) -> string\n #@@search(str) -> index\n #@@split(str, limit) -> array\n```\n[Examples](http://goo.gl/vLV603):\n```javascript\nRegExp(/./g, 'm'); // => /./m\n\n/foo/.flags; // => ''\n/foo/gim.flags; // => 'gim'\n\n'foo'.match({[Symbol.match]: _ => 1}); // => 1\n'foo'.replace({[Symbol.replace]: _ => 2}); // => 2\n'foo'.search({[Symbol.search]: _ => 3}); // => 3\n'foo'.split({[Symbol.split]: _ => 4}); // => 4\n```\n#### ECMAScript 6: Number\nModule [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [example](http://goo.gl/jRd6b3):\n```javascript\nNumber('0b1010101'); // => 85\nNumber('0o7654321'); // => 2054353\n```\n`Number`: modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.parse-int.js).\n```javascript\n[new] Number(var) -> number | number object\n .EPSILON -> num\n .isFinite(num) -> bool\n .isInteger(num) -> bool\n .isNaN(num) -> bool\n .isSafeInteger(num) -> bool\n .MAX_SAFE_INTEGER -> int\n .MIN_SAFE_INTEGER -> int\n .parseFloat(str) -> num\n .parseInt(str) -> int\n```\n#### ECMAScript 6: Math\n`Math`: modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.trunc.js).\n```javascript\nMath\n .acosh(num) -> num\n .asinh(num) -> num\n .atanh(num) -> num\n .cbrt(num) -> num\n .clz32(num) -> uint\n .cosh(num) -> num\n .expm1(num) -> num\n .fround(num) -> num\n .hypot(...args) -> num\n .imul(num, num) -> int\n .log1p(num) -> num\n .log10(num) -> num\n .log2(num) -> num\n .sign(num) -> 1 | -1 | 0 | -0 | NaN\n .sinh(num) -> num\n .tanh(num) -> num\n .trunc(num) -> num\n```\n\n#### ECMAScript 6: Symbol\nModule [`es6.symbol`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.symbol.js).\n```javascript\nSymbol(description?) -> symbol\n .hasInstance -> @@hasInstance\n .isConcatSpreadable -> @@isConcatSpreadable\n .iterator -> @@iterator\n .match -> @@match\n .replace -> @@replace\n .search -> @@search\n .species -> @@species\n .split -> @@split\n .toPrimitive -> @@toPrimitive\n .toStringTag -> @@toStringTag\n .unscopables -> @@unscopables\n .for(key) -> symbol\n .keyFor(symbol) -> key\n .useSimple() -> void\n .useSetter() -> void\nObject\n .getOwnPropertySymbols(object) -> array\n```\nAlso wrapped some methods for correct work with `Symbol` polyfill.\n```js\nObject\n .create(proto | null, descriptors?) -> object\n .defineProperty(target, key, desc) -> target\n .defineProperties(target, descriptors) -> target\n .getOwnPropertyDescriptor(var, key) -> desc | undefined\n .getOwnPropertyNames(var) -> array\n #propertyIsEnumerable(key) -> bool\nJSON\n .stringify(target, replacer?, space?) -> string | undefined\n```\n[Basic example](http://goo.gl/BbvWFc):\n```javascript\nvar Person = (function(){\n var NAME = Symbol('name');\n function Person(name){\n this[NAME] = name;\n }\n Person.prototype.getName = function(){\n return this[NAME];\n };\n return Person;\n})();\n\nvar person = new Person('Vasya');\nlog(person.getName()); // => 'Vasya'\nlog(person['name']); // => undefined\nlog(person[Symbol('name')]); // => undefined, symbols are uniq\nfor(var key in person)log(key); // => only 'getName', symbols are not enumerable\n```\n`Symbol.for` & `Symbol.keyFor` [example](http://goo.gl/0pdJjX):\n```javascript\nvar symbol = Symbol.for('key');\nsymbol === Symbol.for('key'); // true\nSymbol.keyFor(symbol); // 'key'\n```\n[Example](http://goo.gl/mKVOQJ) with methods for getting own object keys:\n```javascript\nvar O = {a: 1};\nObject.defineProperty(O, 'b', {value: 2});\nO[Symbol('c')] = 3;\nObject.keys(O); // => ['a']\nObject.getOwnPropertyNames(O); // => ['a', 'b']\nObject.getOwnPropertySymbols(O); // => [Symbol(c)]\nReflect.ownKeys(O); // => ['a', 'b', Symbol(c)]\n```\n#### Caveats when using `Symbol` polyfill:\n\n* We can't add new primitive type, `Symbol` returns object.\n* `Symbol.for` and `Symbol.keyFor` can't be shimmed cross-realm.\n* By default, to hide the keys, `Symbol` polyfill defines setter in `Object.prototype`. For this reason, uncontrolled creation of symbols can cause memory leak and the `in` operator is not working correctly with `Symbol` polyfill: `Symbol() in {} // => true`.\n\nYou can disable defining setters in `Object.prototype`. [Example](http://goo.gl/N5UD7J):\n```javascript\nSymbol.useSimple();\nvar s1 = Symbol('s1')\n , o1 = {};\no1[s1] = true;\nfor(var key in o1)log(key); // => 'Symbol(s1)_t.qamkg9f3q', w/o native Symbol\n\nSymbol.useSetter();\nvar s2 = Symbol('s2')\n , o2 = {};\no2[s2] = true;\nfor(var key in o2)log(key); // nothing\n```\n* Currently, `core-js` not adds setters to `Object.prototype` for well-known symbols for correct work something like `Symbol.iterator in foo`. It can cause problems with their enumerability.\n\n#### ECMAScript 6: Collections\n`core-js` uses native collections in most case, just fixes methods / constructor, if it's required, and in old environment uses fast polyfill (O(1) lookup).\n#### Map\nModule [`es6.map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.map.js). About iterators from this module [here](#ecmascript-6-iterators).\n```javascript\nnew Map(iterable (entries) ?) -> map\n #clear() -> void\n #delete(key) -> bool\n #forEach(fn(val, key, @), that) -> void\n #get(key) -> val\n #has(key) -> bool\n #set(key, val) -> @\n #size -> uint\n```\n[Example](http://goo.gl/RDbROF):\n```javascript\nvar a = [1];\n\nvar map = new Map([['a', 1], [42, 2]]);\nmap.set(a, 3).set(true, 4);\n\nlog(map.size); // => 4\nlog(map.has(a)); // => true\nlog(map.has([1])); // => false\nlog(map.get(a)); // => 3\nmap.forEach(function(val, key){\n log(val); // => 1, 2, 3, 4\n log(key); // => 'a', 42, [1], true\n});\nmap.delete(a);\nlog(map.size); // => 3\nlog(map.get(a)); // => undefined\nlog(Array.from(map)); // => [['a', 1], [42, 2], [true, 4]]\n```\n#### Set\nModule [`es6.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.set.js). About iterators from this module [here](#ecmascript-6-iterators).\n```javascript\nnew Set(iterable?) -> set\n #add(key) -> @\n #clear() -> void\n #delete(key) -> bool\n #forEach(fn(el, el, @), that) -> void\n #has(key) -> bool\n #size -> uint\n```\n[Example](http://goo.gl/7XYya3):\n```javascript\nvar set = new Set(['a', 'b', 'a', 'c']);\nset.add('d').add('b').add('e');\nlog(set.size); // => 5\nlog(set.has('b')); // => true\nset.forEach(function(it){\n log(it); // => 'a', 'b', 'c', 'd', 'e'\n});\nset.delete('b');\nlog(set.size); // => 4\nlog(set.has('b')); // => false\nlog(Array.from(set)); // => ['a', 'c', 'd', 'e']\n```\n#### WeakMap\nModule [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.weak-map.js).\n```javascript\nnew WeakMap(iterable (entries) ?) -> weakmap\n #delete(key) -> bool\n #get(key) -> val\n #has(key) -> bool\n #set(key, val) -> @\n```\n[Example](http://goo.gl/SILXyw):\n```javascript\nvar a = [1]\n , b = [2]\n , c = [3];\n\nvar wmap = new WeakMap([[a, 1], [b, 2]]);\nwmap.set(c, 3).set(b, 4);\nlog(wmap.has(a)); // => true\nlog(wmap.has([1])); // => false\nlog(wmap.get(a)); // => 1\nwmap.delete(a);\nlog(wmap.get(a)); // => undefined\n\n// Private properties store:\nvar Person = (function(){\n var names = new WeakMap;\n function Person(name){\n names.set(this, name);\n }\n Person.prototype.getName = function(){\n return names.get(this);\n };\n return Person;\n})();\n\nvar person = new Person('Vasya');\nlog(person.getName()); // => 'Vasya'\nfor(var key in person)log(key); // => only 'getName'\n```\n#### WeakSet\nModule [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.weak-set.js).\n```javascript\nnew WeakSet(iterable?) -> weakset\n #add(key) -> @\n #delete(key) -> bool\n #has(key) -> bool\n```\n[Example](http://goo.gl/TdFbEx):\n```javascript\nvar a = [1]\n , b = [2]\n , c = [3];\n\nvar wset = new WeakSet([a, b, a]);\nwset.add(c).add(b).add(c);\nlog(wset.has(b)); // => true\nlog(wset.has([2])); // => false\nwset.delete(b);\nlog(wset.has(b)); // => false\n```\n#### Caveats when using collections polyfill:\n\n* Frozen objects as collection keys are supported, but not recomended - it's slow (O(n) instead of O(1)) and, for weak-collections, leak.\n* Weak-collections polyfill stores values as hidden properties of keys. It works correct and not leak in most cases. However, it is desirable to store a collection longer than its keys.\n\n#### ECMAScript 6: Iterators\nModules [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.iterator.js) and [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.iterator.js):\n```javascript\nString\n #@@iterator() -> iterator\nArray\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator\nArguments\n #@@iterator() -> iterator (available only in core-js methods)\n```\nModules [`es6.map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.map.js) and [`es6.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.set.js):\n```javascript\nMap\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator (entries)\nSet\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator\n```\nModule [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.dom.iterable.js):\n```javascript\nNodeList\n #@@iterator() -> iterator\n```\n[Example](http://goo.gl/nzHVQF):\n```javascript\nvar string = 'a𠮷b';\n\nfor(var val of string)log(val); // => 'a', '𠮷', 'b'\n\nvar array = ['a', 'b', 'c'];\n\nfor(var val of array)log(val); // => 'a', 'b', 'c'\nfor(var val of array.values())log(val); // => 'a', 'b', 'c'\nfor(var key of array.keys())log(key); // => 0, 1, 2\nfor(var [key, val] of array.entries()){\n log(key); // => 0, 1, 2\n log(val); // => 'a', 'b', 'c'\n}\n\nvar map = new Map([['a', 1], ['b', 2], ['c', 3]]);\n\nfor(var [key, val] of map){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\nfor(var val of map.values())log(val); // => 1, 2, 3\nfor(var key of map.keys())log(key); // => 'a', 'b', 'c'\nfor(var [key, val] of map.entries()){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\n\nvar set = new Set([1, 2, 3, 2, 1]);\n\nfor(var val of set)log(val); // => 1, 2, 3\nfor(var val of set.values())log(val); // => 1, 2, 3\nfor(var key of set.keys())log(key); // => 1, 2, 3\nfor(var [key, val] of set.entries()){\n log(key); // => 1, 2, 3\n log(val); // => 1, 2, 3\n}\n\nfor(var x of document.querySelectorAll('*')){\n log(x.id);\n}\n```\nModules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.get-iterator-method.js) - helpers for check iterable / get iterator in `library` version or, for example, for `arguments` object:\n```javascript\ncore\n .isIterable(var) -> bool\n .getIterator(iterable) -> iterator\n .getIteratorMethod(var) -> function | undefined\n```\n[Example](http://goo.gl/SXsM6D):\n```js\nvar list = (function(){\n return arguments;\n})(1, 2, 3);\n\nlog(core.isIterable(list)); // true;\n\nvar iter = core.getIterator(list);\nlog(iter.next().value); // 1\nlog(iter.next().value); // 2\nlog(iter.next().value); // 3\nlog(iter.next().value); // undefined\n\ncore.getIterator({}); // TypeError: [object Object] is not iterable!\n\nvar iterFn = core.getIteratorMethod(list);\nlog(typeof iterFn); // 'function'\nvar iter = iterFn.call(list);\nlog(iter.next().value); // 1\nlog(iter.next().value); // 2\nlog(iter.next().value); // 3\nlog(iter.next().value); // undefined\n\nlog(core.getIteratorMethod({})); // undefined\n```\n#### ECMAScript 6: Promise\nModule [`es6.promise`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.promise.js).\n```javascript\nnew Promise(executor(resolve(var), reject(var))) -> promise\n #then(resolved(var), rejected(var)) -> promise\n #catch(rejected(var)) -> promise\n .resolve(var || promise) -> promise\n .reject(var) -> promise\n .all(iterable) -> promise\n .race(iterable) -> promise\n```\nBasic [example](http://goo.gl/vGrtUC):\n```javascript\nfunction sleepRandom(time){\n return new Promise(function(resolve, reject){\n setTimeout(resolve, time * 1e3, 0 | Math.random() * 1e3);\n });\n}\n\nlog('Run'); // => Run\nsleepRandom(5).then(function(result){\n log(result); // => 869, after 5 sec.\n return sleepRandom(10);\n}).then(function(result){\n log(result); // => 202, after 10 sec.\n}).then(function(){\n log('immediately after'); // => immediately after\n throw Error('Irror!');\n}).then(function(){\n log('will not be displayed');\n}).catch(log); // => => Error: Irror!\n```\n`Promise.resolve` and `Promise.reject` [example](http://goo.gl/vr8TN3):\n```javascript\nPromise.resolve(42).then(log); // => 42\nPromise.reject(42).catch(log); // => 42\n\nPromise.resolve($.getJSON('/data.json')); // => ES6 promise\n```\n`Promise.all` [example](http://goo.gl/RdoDBZ):\n```javascript\nPromise.all([\n 'foo',\n sleepRandom(5),\n sleepRandom(15),\n sleepRandom(10) // after 15 sec:\n]).then(log); // => ['foo', 956, 85, 382]\n```\n`Promise.race` [example](http://goo.gl/L8ovkJ):\n```javascript\nfunction timeLimit(promise, time){\n return Promise.race([promise, new Promise(function(resolve, reject){\n setTimeout(reject, time * 1e3, Error('Await > ' + time + ' sec'));\n })]);\n}\n\ntimeLimit(sleepRandom(5), 10).then(log); // => 853, after 5 sec.\ntimeLimit(sleepRandom(15), 10).catch(log); // Error: Await > 10 sec\n```\nECMAScript 7 [async functions](https://tc39.github.io/ecmascript-asyncawait) [example](http://goo.gl/wnQS4j):\n```javascript\nvar delay = time => new Promise(resolve => setTimeout(resolve, time))\n\nasync function sleepRandom(time){\n await delay(time * 1e3);\n return 0 | Math.random() * 1e3;\n};\nasync function sleepError(time, msg){\n await delay(time * 1e3);\n throw Error(msg);\n};\n\n(async () => {\n try {\n log('Run'); // => Run\n log(await sleepRandom(5)); // => 936, after 5 sec.\n var [a, b, c] = await Promise.all([\n sleepRandom(5),\n sleepRandom(15),\n sleepRandom(10)\n ]);\n log(a, b, c); // => 210 445 71, after 15 sec.\n await sleepError(5, 'Irror!');\n log('Will not be displayed');\n } catch(e){\n log(e); // => Error: 'Irror!', after 5 sec.\n }\n})();\n```\n\n##### Unhandled rejection tracking\n\n`core-js` `Promise` supports (but not adds to native implementations) unhandled rejection tracking.\n\n[Node.js](https://gist.github.com/benjamingr/0237932cee84712951a2):\n```js\nprocess.on('unhandledRejection', (reason, promise) => console.log(reason, promise));\nPromise.reject(42);\n// 42 [object Promise]\n\n```\nIn a browser, by default, you will see notify in the console, or you can add a custom handler, [example](http://goo.gl/izTr2I):\n```js\nwindow.onunhandledrejection = e => log(e.reason, e.promise);\nPromise.reject(42);\n// 42 [object Promise]\n```\n**Warning**: The problem here - we can't add it to native `Promise` implementations, but by idea `core-js` should use enough correct native implementation if it's available. Currently, most native implementations are buggy and `core-js` uses polyfill, but the situation will be changed. If someone wanna use this hook everywhere - he should delete `window.Promise` before inclusion `core-js`.\n\n\n#### ECMAScript 6: Reflect\nModules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.set-prototype-of.js).\n```javascript\nReflect\n .apply(target, thisArgument, argumentsList) -> var\n .construct(target, argumentsList, newTarget?) -> object\n .defineProperty(target, propertyKey, attributes) -> bool\n .deleteProperty(target, propertyKey) -> bool\n .enumerate(target) -> iterator\n .get(target, propertyKey, receiver?) -> var\n .getOwnPropertyDescriptor(target, propertyKey) -> desc\n .getPrototypeOf(target) -> object | null\n .has(target, propertyKey) -> bool\n .isExtensible(target) -> bool\n .ownKeys(target) -> array\n .preventExtensions(target) -> bool\n .set(target, propertyKey, V, receiver?) -> bool\n .setPrototypeOf(target, proto) -> bool (required __proto__ - IE11+)\n```\n[Example](http://goo.gl/gVT0cH):\n```javascript\nvar O = {a: 1};\nObject.defineProperty(O, 'b', {value: 2});\nO[Symbol('c')] = 3;\nReflect.ownKeys(O); // => ['a', 'b', Symbol(c)]\n\nfunction C(a, b){\n this.c = a + b;\n}\n\nvar instance = Reflect.construct(C, [20, 22]);\ninstance.c; // => 42\n```\n### ECMAScript 7\n* `Array#includes` [proposal](https://github.com/domenic/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.array.includes.js)\n* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.at.js)\n* `String#padLeft`, `String#padRight` [proposal](https://github.com/ljharb/proposal-string-pad-left-right) - modules [`es7.string.pad-left`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.pad-left.js), [`es7.string.pad-right`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.pad-right.js)\n* `String#trimLeft`, `String#trimRight` [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim) - modules [`es7.string.trim-left`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.trim-right.js)\n* `Object.values`, `Object.entries` [proposal](https://github.com/ljharb/proposal-object-values-entries) - modules [`es7.object.values`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.entries.js)\n* `Object.getOwnPropertyDescriptors` [proposal](https://gist.github.com/WebReflection/9353781) - module [`es7.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.get-own-property-descriptors.js)\n* `RegExp.escape` [proposal](https://github.com/benjamingr/RexExp.escape) - module [`es7.regexp.escape`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.regexp.escape.js)\n* `Map#toJSON`, `Set#toJSON` [proposal](https://github.com/DavidBruant/Map-Set.prototype.toJSON) - modules [`es7.map.to-json`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.set.to-json.js)\n\n```javascript\nArray\n #includes(var, from?) -> bool\nString\n #at(index) -> string\n #padLeft(length, fillStr = ' ') -> string\n #padRight(length, fillStr = ' ') -> string\n #trimLeft() -> string\n #trimRight() -> string\nObject\n .values(object) -> array\n .entries(object) -> array\n .getOwnPropertyDescriptors(object) -> object\nRegExp\n .escape(str) -> str\nMap\n #toJSON() -> array\nSet\n #toJSON() -> array\n```\n[Examples](http://goo.gl/aUZQRH):\n```javascript\n[1, 2, 3].includes(2); // => true\n[1, 2, 3].includes(4); // => false\n[1, 2, 3].includes(2, 2); // => false\n\n[NaN].indexOf(NaN); // => -1\n[NaN].includes(NaN); // => true\nArray(1).indexOf(undefined); // => -1\nArray(1).includes(undefined); // => true\n\n'a𠮷b'.at(1); // => '𠮷'\n'a𠮷b'.at(1).length; // => 2\n\n'hello'.padLeft(10); // => ' hello'\n'hello'.padLeft(10, '1234'); // => '41234hello'\n'hello'.padRight(10); // => 'hello '\n'hello'.padRight(10, '1234'); // => 'hello12341'\n\n' hello '.trimLeft(); // => 'hello '\n' hello '.trimRight(); // => ' hello'\n\nObject.values({a: 1, b: 2, c: 3}); // => [1, 2, 3]\nObject.entries({a: 1, b: 2, c: 3}); // => [['a', 1], ['b', 2], ['c', 3]]\n\n// Shallow object cloning with prototype and descriptors:\nvar copy = Object.create(Object.getPrototypeOf(O), Object.getOwnPropertyDescriptors(O));\n// Mixin:\nObject.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n\nRegExp.escape('Hello, []{}()*+?.\\\\^$|!'); // => 'Hello, \\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|!'\n\nJSON.stringify(new Map([['a', 'b'], ['c', 'd']])); // => '[[\"a\",\"b\"],[\"c\",\"d\"]]'\nJSON.stringify(new Set([1, 2, 3, 2, 1])); // => '[1,2,3]'\n```\n### Mozilla JavaScript: Array generics\nModule [`js.array.statics`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/js.array.statics.js).\n```javascript\nArray\n .{...ArrayPrototype methods}\n```\n\n```javascript\nArray.slice(arguments, 1);\n\nArray.join('abcdef', '+'); // => 'a+b+c+d+e+f'\n\nvar form = document.getElementsByClassName('form__input');\nArray.reduce(form, function(memo, it){\n memo[it.name] = it.value;\n return memo;\n}, {}); // => {name: 'Vasya', age: '42', sex: 'yes, please'}\n```\n### Web standards\n#### setTimeout / setInterval\nModule [`web.timers`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.timers.js). Additional arguments fix for IE9-.\n```javascript\nsetTimeout(fn(...args), time, ...args) -> id\nsetInterval(fn(...args), time, ...args) -> id\n```\n```javascript\n// Before:\nsetTimeout(log.bind(null, 42), 1000);\n// After:\nsetTimeout(log, 1000, 42);\n```\n#### setImmediate\nModule [`web.immediate`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill.\n```javascript\nsetImmediate(fn(...args), ...args) -> id\nclearImmediate(id) -> void\n```\n[Example](http://goo.gl/6nXGrx):\n```javascript\nsetImmediate(function(arg1, arg2){\n log(arg1, arg2); // => Message will be displayed with minimum delay\n}, 'Message will be displayed', 'with minimum delay');\n\nclearImmediate(setImmediate(function(){\n log('Message will not be displayed');\n}));\n```\n### Non-standard\n#### Object\nModules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.make.js).\n```javascript\nObject\n .isObject(var) -> bool\n .classof(var) -> string \n .define(target, mixin) -> target\n .make(proto | null, mixin?) -> object\n```\nObject classify [examples](http://goo.gl/YZQmGo):\n```javascript\nObject.isObject({}); // => true\nObject.isObject(isNaN); // => true\nObject.isObject(null); // => false\n\nvar classof = Object.classof;\n\nclassof(null); // => 'Null'\nclassof(undefined); // => 'Undefined'\nclassof(1); // => 'Number'\nclassof(true); // => 'Boolean'\nclassof('string'); // => 'String'\nclassof(Symbol()); // => 'Symbol'\n\nclassof(new Number(1)); // => 'Number'\nclassof(new Boolean(true)); // => 'Boolean'\nclassof(new String('string')); // => 'String'\n\nvar fn = function(){}\n , list = (function(){return arguments})(1, 2, 3);\n\nclassof({}); // => 'Object'\nclassof(fn); // => 'Function'\nclassof([]); // => 'Array'\nclassof(list); // => 'Arguments'\nclassof(/./); // => 'RegExp'\nclassof(new TypeError); // => 'Error'\n\nclassof(new Set); // => 'Set'\nclassof(new Map); // => 'Map'\nclassof(new WeakSet); // => 'WeakSet'\nclassof(new WeakMap); // => 'WeakMap'\nclassof(new Promise(fn)); // => 'Promise'\n\nclassof([].values()); // => 'Array Iterator'\nclassof(new Set().values()); // => 'Set Iterator'\nclassof(new Map().values()); // => 'Map Iterator'\n\nclassof(Math); // => 'Math'\nclassof(JSON); // => 'JSON'\n\nfunction Example(){}\nExample.prototype[Symbol.toStringTag] = 'Example';\n\nclassof(new Example); // => 'Example'\n```\n`Object.define` and `Object.make` [examples](http://goo.gl/rtpD5Z):\n```javascript\n// Before:\nObject.defineProperty(target, 'c', {\n enumerable: true,\n configurable: true,\n get: function(){\n return this.a + this.b;\n }\n});\n\n// After:\nObject.define(target, {\n get c(){\n return this.a + this.b;\n }\n});\n\n// Shallow object cloning with prototype and descriptors:\nvar copy = Object.make(Object.getPrototypeOf(src), src);\n\n// Simple inheritance:\nfunction Vector2D(x, y){\n this.x = x;\n this.y = y;\n}\nObject.define(Vector2D.prototype, {\n get xy(){\n return Math.hypot(this.x, this.y);\n }\n});\nfunction Vector3D(x, y, z){\n Vector2D.apply(this, arguments);\n this.z = z;\n}\nVector3D.prototype = Object.make(Vector2D.prototype, {\n constructor: Vector3D,\n get xyz(){\n return Math.hypot(this.x, this.y, this.z);\n }\n});\n\nvar vector = new Vector3D(9, 12, 20);\nlog(vector.xy); // => 15\nlog(vector.xyz); // => 25\nvector.y++;\nlog(vector.xy); // => 15.811388300841896\nlog(vector.xyz); // => 25.495097567963924\n```\n#### Dict\nModule [`core.dict`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.dict.js). Based on [TC39 discuss](https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-11/nov-29.md#collection-apis-review) / [strawman](http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard#dictionaries).\n```javascript\n[new] Dict(iterable (entries) | object ?) -> dict\n .isDict(var) -> bool\n .values(object) -> iterator\n .keys(object) -> iterator\n .entries(object) -> iterator (entries)\n .has(object, key) -> bool\n .get(object, key) -> val\n .set(object, key, value) -> object\n .forEach(object, fn(val, key, @), that) -> void\n .map(object, fn(val, key, @), that) -> new @\n .mapPairs(object, fn(val, key, @), that) -> new @\n .filter(object, fn(val, key, @), that) -> new @\n .some(object, fn(val, key, @), that) -> bool\n .every(object, fn(val, key, @), that) -> bool\n .find(object, fn(val, key, @), that) -> val\n .findKey(object, fn(val, key, @), that) -> key\n .keyOf(object, var) -> key\n .includes(object, var) -> bool\n .reduce(object, fn(memo, val, key, @), memo?) -> var\n```\n`Dict` create object without prototype from iterable or simple object. [Example](http://goo.gl/pnp8Vr):\n```javascript\nvar map = new Map([['a', 1], ['b', 2], ['c', 3]]);\n\nDict(); // => {__proto__: null}\nDict({a: 1, b: 2, c: 3}); // => {__proto__: null, a: 1, b: 2, c: 3}\nDict(map); // => {__proto__: null, a: 1, b: 2, c: 3}\nDict([1, 2, 3].entries()); // => {__proto__: null, 0: 1, 1: 2, 2: 3}\n\nvar dict = Dict({a: 42});\ndict instanceof Object; // => false\ndict.a; // => 42\ndict.toString; // => undefined\n'a' in dict; // => true\n'hasOwnProperty' in dict; // => false\n\nDict.isDict({}); // => false\nDict.isDict(Dict()); // => true\n```\n`Dict.keys`, `Dict.values` and `Dict.entries` returns iterators for objects, [examples](http://goo.gl/xAvECH):\n```javascript\nvar dict = {a: 1, b: 2, c: 3};\n\nfor(var key of Dict.keys(dict))log(key); // => 'a', 'b', 'c'\n\nfor(var val of Dict.values(dict))log(val); // => 1, 2, 3\n\nfor(var [key, val] of Dict.entries(dict)){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\n\nnew Map(Dict.entries(dict)); // => Map {a: 1, b: 2, c: 3}\n```\nBasic dict operations for objects with prototype [example](http://goo.gl/B28UnG):\n```js\n'q' in {q: 1}; // => true\n'toString' in {}; // => true\n\nDict.has({q: 1}, 'q'); // => true\nDict.has({}, 'toString'); // => false\n\n({q: 1})['q']; // => 1\n({}).toString; // => function toString(){ [native code] }\n\nDict.get({q: 1}, 'q'); // => 1\nDict.get({}, 'toString'); // => undefined\n\nvar O = {};\nO['q'] = 1;\nO['q']; // => 1\nO['__proto__'] = {w: 2};\nO['__proto__']; // => {w: 2}\nO['w']; // => 2\n\nvar O = {};\nDict.set(O, 'q', 1);\nO['q']; // => 1\nDict.set(O, '__proto__', {w: 2});\nO['__proto__']; // => {w: 2}\nO['w']; // => undefined\n```\nOther methods of `Dict` module are static equialents of `Array.prototype` methods for dictionaries, [examples](http://goo.gl/xFi1RH):\n```javascript\nvar dict = {a: 1, b: 2, c: 3};\n\nDict.forEach(dict, console.log, console);\n// => 1, 'a', {a: 1, b: 2, c: 3}\n// => 2, 'b', {a: 1, b: 2, c: 3}\n// => 3, 'c', {a: 1, b: 2, c: 3}\n\nDict.map(dict, function(it){\n return it * it;\n}); // => {a: 1, b: 4, c: 9}\n\nDict.mapPairs(dict, function(val, key){\n if(key != 'b')return [key + key, val * val];\n}); // => {aa: 1, cc: 9}\n\nDict.filter(dict, function(it){\n return it % 2;\n}); // => {a: 1, c: 3}\n\nDict.some(dict, function(it){\n return it === 2;\n}); // => true\n\nDict.every(dict, function(it){\n return it === 2;\n}); // => false\n\nDict.find(dict, function(it){\n return it > 2;\n}); // => 3\nDict.find(dict, function(it){\n return it > 4;\n}); // => undefined\n\nDict.findKey(dict, function(it){\n return it > 2;\n}); // => 'c'\nDict.findKey(dict, function(it){\n return it > 4;\n}); // => undefined\n\nDict.keyOf(dict, 2); // => 'b'\nDict.keyOf(dict, 4); // => undefined\n\nDict.includes(dict, 2); // => true\nDict.includes(dict, 4); // => false\n\nDict.reduce(dict, function(memo, it){\n return memo + it;\n}); // => 6\nDict.reduce(dict, function(memo, it){\n return memo + it;\n}, ''); // => '123'\n```\n#### Partial application\nModule [`core.function.part`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.function.part.js).\n```javascript\nFunction\n #part(...args | _) -> fn(...args)\n```\n`Function#part` partial apply function without `this` binding. Uses global variable `_` (`core._` for builds without global namespace pollution) as placeholder and not conflict with `Underscore` / `LoDash`. [Examples](http://goo.gl/p9ZJ8K):\n```javascript\nvar fn1 = log.part(1, 2);\nfn1(3, 4); // => 1, 2, 3, 4\n\nvar fn2 = log.part(_, 2, _, 4);\nfn2(1, 3); // => 1, 2, 3, 4\n\nvar fn3 = log.part(1, _, _, 4);\nfn3(2, 3); // => 1, 2, 3, 4\n\nfn2(1, 3, 5); // => 1, 2, 3, 4, 5\nfn2(1); // => 1, 2, undefined, 4\n```\n#### Number Iterator\nModules [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.number.iterator.js).\n```javascript\nNumber\n #@@iterator() -> iterator\n```\n[Examples](http://goo.gl/o45pCN):\n```javascript\nfor(var i of 3)log(i); // => 0, 1, 2\n\n[...10]; // => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\nArray.from(10, Math.random); // => [0.9817775336559862, 0.02720663254149258, ...]\n\nArray.from(10, function(it){\n return this + it * it;\n}, .42); // => [0.42, 1.42, 4.42, 9.42, 16.42, 25.42, 36.42, 49.42, 64.42, 81.42]\n```\n#### Escaping HTML\nModules [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.string.unescape-html.js).\n```javascript\nString\n #escapeHTML() -> str\n #unescapeHTML() -> str\n```\n[Examples](http://goo.gl/6bOvsQ):\n```javascript\n''.escapeHTML(); // => '<script>doSomething();</script>'\n'<script>doSomething();</script>'.unescapeHTML(); // => ''\n```\n#### delay\nModule [`core.delay`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function). [Example](http://goo.gl/lbucba):\n```javascript\ndelay(1e3).then(() => log('after 1 sec'));\n\n(async () => {\n await delay(3e3);\n log('after 3 sec');\n \n while(await delay(3e3))log('each 3 sec');\n})();\n```\n#### Console\nModule [`core.log`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.log.js). Console cap for old browsers and some additional functionality. In IE, Node.js / IO.js and Firebug `console` methods not require call from `console` object, but in Chromium and V8 this throws error. For some reason, we can't replace `console` methods by their bound versions. Add `log` object with bound console methods. Some more sugar: `log` is shortcut for `log.log`, we can disable output.\n```javascript\nlog ==== log.log\n .{...console API}\n .enable() -> void\n .disable() -> void\n```\n```javascript\n// Before:\nif(window.console && console.warn)console.warn(42);\n// After:\nlog.warn(42);\n\n// Before:\nsetTimeout(console.warn.bind(console, 42), 1000);\n[1, 2, 3].forEach(console.warn, console);\n// After:\nsetTimeout(log.warn, 1000, 42);\n[1, 2, 3].forEach(log.warn);\n\n// log is shortcut for log.log\nsetImmediate(log, 42); // => 42\n\nlog.disable();\nlog.warn('Console is disabled, you will not see this message.');\nlog.enable();\nlog.warn('Console is enabled again.');\n```\n\n## Missing polyfills\n- ES5 `JSON` is missing now only in IE7- and never it will be added to `core-js`, if you need it in these old browsers available many implementations, for example, [json3](https://github.com/bestiejs/json3).\n- ES6 Typed Arrays can be polyfilled without serious problems, but it will be slow - getter / setter for each element and they are missing completely only in IE9-. You can use [this polyfill](https://github.com/inexorabletash/polyfill/blob/master/typedarray.js). *Possible*, it will be added to `core-js` in the future, completely or only missing methods of existing arrays. \n- ES6 `String#normalize` is not very usefull feature, but this polyfill will be very large. If you need it, you can use [unorm](https://github.com/walling/unorm/).\n- ES6 `Proxy` can't be polyfilled, but for Node.js / Chromium with additional flags you can try [harmony-reflect](https://github.com/tvcutsem/harmony-reflect) for adapt old style `Proxy` API to final ES6 version.\n- ES6 logic for `@@isConcatSpreadable` and `@@species` (in most places) can be polyfilled without problems, but it will cause serious slowdown in popular cases in some engines. It will be polyfilled when it will be implemented in modern engines.\n- ES7 `Object.observe` can be polyfilled with many limitations, but it will be very slow - dirty checking on each tick. In nearest future it will not be added to `core-js` - it will cause serious slowdown in applications which uses `Object.observe` and fallback if it's missing. *Possible* it will be added as optional feature then most actual browsers will have this feature. Now you can use [this polyfill](https://github.com/MaxArt2501/object-observe).\n- ES7 `SIMD`. `core-js` doesn't adds polyfill of this feature because of large size and some other reasons. You can use [this polyfill](https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd.js).\n- `window.fetch` is not crossplatform feature, in some environments it make no sense. For this reason I don't think it should be in `core-js`. Looking at the large number of requests it *maybe* added in the future. Now you can use, for example, [this polyfill](https://github.com/github/fetch).", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/zloirock/core-js/issues" }, "_id": "core-js@1.2.6", "_from": "core-js@^1.0.0", "realName": "core-js", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/babel-runtime/node_modules/core-js", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/babel-runtime/node_modules/core-js", "parent": "[Circular]", "depth": 3, "peerDependencies": {} } }, "devDependencies": { "babel-plugin-runtime": "^1.0.7", "regenerator": "^0.8.34" }, "readme": "# babel-runtime\n\nBabel self-contained runtime\n\nFor more information please look at [babel](https://github.com/babel/babel).\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/babel/babel/issues" }, "_id": "babel-runtime@5.8.35", "_from": "babel-runtime@^5.8.3", "realName": "babel-runtime", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/babel-runtime", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/babel-runtime", "parent": "[Circular]", "depth": 2, "peerDependencies": {}, "extraneous": false }, "react-bootstrap": { "name": "react-bootstrap", "version": "0.27.1", "description": "Bootstrap 3 components built with React", "repository": { "type": "git", "url": "git://github.com/react-bootstrap/react-bootstrap" }, "homepage": "http://react-bootstrap.github.io/", "scripts": { "build": "babel-node tools/build-cli.js", "test-watch": "karma start", "test-coverage": "COVERAGE=true karma start --single-run", "test": "npm run lint && npm run tests-set && npm run build", "tests-set": "karma start --single-run && _mocha --compilers js:babel-core/register test/server/*Spec.js", "lint": "eslint ./", "release": "release", "docs-build": "babel-node tools/build-cli.js --docs-only", "docs": "babel-node docs/dev-run", "docs-prod": "npm run docs-build && NODE_ENV=production babel-node docs/server.js", "docs-prod-unoptimized": "npm run docs-build -- --dev && NODE_ENV=production babel-node docs/server.js", "minor": "node ./tools/release minor", "patch": "node ./tools/release patch" }, "main": "lib/index.js", "directories": { "lib": "lib/" }, "files": [ "LICENSE", "README.md", "CHANGELOG.md", "lib", "dist" ], "keywords": [ "react", "ecosystem-react", "react-component", "bootstrap" ], "author": { "name": "Stephen J. Collings", "email": "stevoland@gmail.com" }, "license": "MIT", "peerDependencies": { "react": ">=0.14.0", "react-dom": ">=0.14.0" }, "devDependencies": { "babel": "^5.8.23", "babel-core": "^5.8.24", "babel-eslint": "^4.0.5", "babel-loader": "^5.3.2", "bootstrap": "^3.3.5", "brfs": "^1.4.0", "chai": "^3.2.0", "child-process-promise": "^1.1.0", "codemirror": "^5.5.0", "colors": "^1.1.2", "css-loader": "^0.19.0", "es5-shim": "^4.1.10", "eslint": "^1.5.1", "eslint-config-airbnb": "^0.1.0", "eslint-plugin-babel": "^2.0.0", "eslint-plugin-lodash": "^0.1.3", "eslint-plugin-mocha": "^1.0.0", "eslint-plugin-react": "^3.4.2", "express": "^4.13.1", "extract-text-webpack-plugin": "^0.8.2", "file-loader": "^0.8.4", "fs-extra": "^0.23.0", "fs-promise": "^0.3.1", "glob": "^5.0.14", "history": "^1.9.0", "http-proxy": "^1.11.1", "ip": "^1.0.1", "isparta-loader": "^1.0.0", "json-loader": "^0.5.2", "karma": "~0.13.3", "karma-chrome-launcher": "~0.2.0", "karma-cli": "0.1.1", "karma-coverage": "^0.5.0", "karma-coveralls": "^1.1.2", "karma-firefox-launcher": "~0.1.6", "karma-mocha": "~0.2.0", "karma-mocha-reporter": "^1.0.4", "karma-phantomjs-launcher": "^0.2.0", "karma-sinon-chai": "^1.0.0", "karma-sourcemap-loader": "^0.3.5", "karma-webpack": "^1.7.0", "less": "^2.5.1", "less-loader": "^2.2.0", "lodash": "^3.10.1", "marked": "^0.3.5", "mocha": "^2.2.5", "mt-changelog": "^0.6.1", "node-libs-browser": "^0.5.2", "nodemon": "^1.4.0", "output-file-sync": "^1.1.1", "phantomjs": "^1.9.17", "portfinder": "^0.4.0", "react": "^0.14.0", "react-component-metadata": "^1.3.0", "react-dom": "^0.14.0", "react-hot-loader": "^1.2.8", "react-router": "^1.0.0-rc1", "release-script": "^0.5.0", "rimraf": "^2.4.2", "semver": "^5.0.1", "sinon": "^1.15.4", "sinon-chai": "^2.8.0", "style-loader": "^0.12.3", "transform-loader": "^0.2.2", "webpack": "^1.10.5", "webpack-dev-server": "^1.10.1", "yargs": "^3.16.1" }, "dependencies": { "babel-runtime": { "dependencies": {} }, "classnames": { "name": "classnames", "version": "2.2.3", "description": "A simple utility for conditionally joining classNames together", "main": "index.js", "author": { "name": "Jed Watson" }, "license": "MIT", "repository": { "type": "git", "url": "https://github.com/JedWatson/classnames.git" }, "scripts": { "benchmarks": "node ./benchmarks/run", "unit": "mocha tests/*.js", "test": "npm run unit" }, "keywords": [ "react", "css", "classes", "classname", "classnames", "util", "utility" ], "devDependencies": { "benchmark": "^1.0.0", "mocha": "^2.1.0" }, "readme": "Classnames\n===========\n\n[![Version](http://img.shields.io/npm/v/classnames.svg)](https://www.npmjs.org/package/classnames)\n[![Build Status](https://travis-ci.org/JedWatson/classnames.svg?branch=master)](https://travis-ci.org/JedWatson/classnames)\n\nA simple javascript utility for conditionally joining classNames together.\n\nInstall with npm or Bower.\n\n```sh\nnpm install classnames\n```\n\nUse with node.js, browserify or webpack:\n\n```js\nvar classNames = require('classnames');\nclassNames('foo', 'bar'); // => 'foo bar'\n```\n\nAlternatively, you can simply include `index.js` on your page with a standalone `'.escapeHTML(); // => '<script>doSomething();</script>'\n'<script>doSomething();</script>'.unescapeHTML(); // => ''\n```\n#### delay\nModule [`core.delay`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function). [Example](http://goo.gl/lbucba):\n```javascript\ndelay(1e3).then(() => log('after 1 sec'));\n\n(async () => {\n await delay(3e3);\n log('after 3 sec');\n \n while(await delay(3e3))log('each 3 sec');\n})();\n```\n#### Console\nModule [`core.log`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.log.js). Console cap for old browsers and some additional functionality. In IE, Node.js / IO.js and Firebug `console` methods not require call from `console` object, but in Chromium and V8 this throws error. For some reason, we can't replace `console` methods by their bound versions. Add `log` object with bound console methods. Some more sugar: `log` is shortcut for `log.log`, we can disable output.\n```javascript\nlog ==== log.log\n .{...console API}\n .enable() -> void\n .disable() -> void\n```\n```javascript\n// Before:\nif(window.console && console.warn)console.warn(42);\n// After:\nlog.warn(42);\n\n// Before:\nsetTimeout(console.warn.bind(console, 42), 1000);\n[1, 2, 3].forEach(console.warn, console);\n// After:\nsetTimeout(log.warn, 1000, 42);\n[1, 2, 3].forEach(log.warn);\n\n// log is shortcut for log.log\nsetImmediate(log, 42); // => 42\n\nlog.disable();\nlog.warn('Console is disabled, you will not see this message.');\nlog.enable();\nlog.warn('Console is enabled again.');\n```\n\n## Missing polyfills\n- ES5 `JSON` is missing now only in IE7- and never it will be added to `core-js`, if you need it in these old browsers available many implementations, for example, [json3](https://github.com/bestiejs/json3).\n- ES6 Typed Arrays can be polyfilled without serious problems, but it will be slow - getter / setter for each element and they are missing completely only in IE9-. You can use [this polyfill](https://github.com/inexorabletash/polyfill/blob/master/typedarray.js). *Possible*, it will be added to `core-js` in the future, completely or only missing methods of existing arrays. \n- ES6 `String#normalize` is not very usefull feature, but this polyfill will be very large. If you need it, you can use [unorm](https://github.com/walling/unorm/).\n- ES6 `Proxy` can't be polyfilled, but for Node.js / Chromium with additional flags you can try [harmony-reflect](https://github.com/tvcutsem/harmony-reflect) for adapt old style `Proxy` API to final ES6 version.\n- ES6 logic for `@@isConcatSpreadable` and `@@species` (in most places) can be polyfilled without problems, but it will cause serious slowdown in popular cases in some engines. It will be polyfilled when it will be implemented in modern engines.\n- ES7 `Object.observe` can be polyfilled with many limitations, but it will be very slow - dirty checking on each tick. In nearest future it will not be added to `core-js` - it will cause serious slowdown in applications which uses `Object.observe` and fallback if it's missing. *Possible* it will be added as optional feature then most actual browsers will have this feature. Now you can use [this polyfill](https://github.com/MaxArt2501/object-observe).\n- ES7 `SIMD`. `core-js` doesn't adds polyfill of this feature because of large size and some other reasons. You can use [this polyfill](https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd.js).\n- `window.fetch` is not crossplatform feature, in some environments it make no sense. For this reason I don't think it should be in `core-js`. Looking at the large number of requests it *maybe* added in the future. Now you can use, for example, [this polyfill](https://github.com/github/fetch).", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/zloirock/core-js/issues" }, "_id": "core-js@1.2.6", "_from": "core-js@^1.0.0", "realName": "core-js", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/core-js", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/core-js", "parent": "[Circular]", "depth": 5, "peerDependencies": {} }, "loose-envify": { "name": "loose-envify", "version": "1.1.0", "description": "Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST", "keywords": [ "environment", "variables", "browserify", "browserify-transform", "transform", "source", "configuration" ], "homepage": "https://github.com/zertosh/loose-envify", "license": "MIT", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "repository": { "type": "git", "url": "git://github.com/zertosh/loose-envify.git" }, "scripts": { "test": "tap test/*.js" }, "dependencies": { "js-tokens": { "name": "js-tokens", "version": "1.0.2", "author": { "name": "Simon Lydell" }, "license": "MIT", "description": "A regex that tokenizes JavaScript.", "keywords": [ "JavaScript", "js", "token", "tokenize", "regex" ], "files": [ "index.js" ], "repository": { "type": "git", "url": "git://github.com/lydell/js-tokens" }, "scripts": { "test": "mocha --ui tdd", "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js", "build": "node generate-index.js", "dev": "npm run build && npm test" }, "devDependencies": { "coffee-script": "~1.9.3", "esprima": "^2.3.0", "everything.js": "^1.0.3", "mocha": "^2.2.5" }, "readme": "Overview [![Build Status](https://travis-ci.org/lydell/js-tokens.png?branch=master)](https://travis-ci.org/lydell/js-tokens)\n========\n\nA regex that tokenizes JavaScript.\n\n```js\nvar jsTokens = require(\"js-tokens\")\n\nvar jsString = \"var foo=opts.foo;\\n...\"\n\njsString.match(jsTokens)\n// [\"var\", \" \", \"foo\", \"=\", \"opts\", \".\", \"foo\", \";\", \"\\n\", ...]\n```\n\n\nInstallation\n============\n\n- `npm install js-tokens`\n\n```js\nvar jsTokens = require(\"js-tokens\")\n```\n\n\nUsage\n=====\n\n### `jsTokens` ###\n\nA regex with the `g` flag that matches JavaScript tokens.\n\nThe regex _always_ matches, even invalid JavaScript and the empty string.\n\nThe next match is always directly after the previous.\n\n### `var token = jsTokens.matchToToken(match)` ###\n\nTakes a `match` returned by `jsTokens.exec(string)`, and returns a `{type:\nString, value: String}` object. The following types are available:\n\n- string\n- comment\n- regex\n- number\n- name\n- punctuator\n- whitespace\n- invalid\n\nMulti-line comments and strings also have a `closed` property indicating if the\ntoken was closed or not (see below).\n\nComments and strings both come in several flavors. To distinguish them, check if\nthe token starts with `//`, `/*`, `'`, `\"` or `` ` ``.\n\nNames are ECMAScript IdentifierNames, that is, including both identifiers and\nkeywords. You may use [is-keyword-js] to tell them apart.\n\nWhitespace includes both line terminators and other whitespace.\n\nFor example usage, please see this [gist].\n\n[is-keyword-js]: https://github.com/crissdev/is-keyword-js\n[gist]: https://gist.github.com/lydell/be49dbf80c382c473004\n\n\nInvalid code handling\n=====================\n\nUnterminated strings are still matched as strings. JavaScript strings cannot\ncontain (unescaped) newlines, so unterminated strings simply end at the end of\nthe line. Unterminated template strings can contain unescaped newlines, though,\nso they go on to the end of input.\n\nUnterminated multi-line comments are also still matched as comments. They\nsimply go on to the end of the input.\n\nUnterminated regex literals are likely matched as division and whatever is\ninside the regex.\n\nInvalid ASCII characters have their own capturing group.\n\nInvalid non-ASCII characters are treated as names, to simplify the matching of\nnames (except unicode spaces which are treated as whitespace).\n\nRegex literals may contain invalid regex syntax. They are still matched as\nregex literals. They may also contain repeated regex flags, to keep the regex\nsimple.\n\nStrings may contain invalid escape sequences.\n\n\nLimitations\n===========\n\nTokenizing JavaScript using regexes—in fact, _one single regex_—won’t be\nperfect. But that’s not the point either.\n\nYou may compare jsTokens with [esprima] by using `esprima-compare.js`.\nSee `npm run esprima-compare`!\n\n[esprima]: http://esprima.org/\n\n### Template string interpolation ###\n\nTemplate strings are matched as single tokens, from the starting `` ` `` to the\nending `` ` ``, including interpolations (whose tokens are not matched\nindividually).\n\nMatching template string interpolations requires recursive balancing of `{` and\n`}`—something that JavaScript regexes cannot do. Only one level of nesting is\nsupported.\n\n### Division and regex literals collision ###\n\nConsider this example:\n\n```js\nvar g = 9.82\nvar number = bar / 2/g\n\nvar regex = / 2/g\n```\n\nA human can easily understand that in the `number` line we’re dealing with\ndivision, and in the `regex` line we’re dealing with a regex literal. How come?\nBecause humans can look at the whole code to put the `/` characters in context.\nA JavaScript regex cannot. It only sees forwards.\n\nWhen the `jsTokens` regex scans throught the above, it will see the following\nat the end of both the `number` and `regex` rows:\n\n```js\n/ 2/g\n```\n\nIt is then impossible to know if that is a regex literal, or part of an\nexpression dealing with division.\n\nHere is a similar case:\n\n```js\nfoo /= 2/g\nfoo(/= 2/g)\n```\n\nThe first line divides the `foo` variable with `2/g`. The second line calls the\n`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only\nsees forwards, it cannot tell the two cases apart.\n\nThere are some cases where we _can_ tell division and regex literals apart,\nthough.\n\nFirst off, we have the simple cases where there’s only one slash in the line:\n\n```js\nvar foo = 2/g\nfoo /= 2\n```\n\nRegex literals cannot contain newlines, so the above cases are correctly\nidentified as division. Things are only problematic when there are more than\none non-comment slash in a single line.\n\nSecondly, not every character is a valid regex flag.\n\n```js\nvar number = bar / 2/e\n```\n\nThe above example is also correctly identified as division, because `e` is not a\nvalid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*`\n(any letter) as flags, but it is not worth it since it increases the amount of\nambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are\nallowed. This means that the above example will be identified as division as\nlong as you don’t rename the `e` variable to some permutation of `gmiyu` 1 to 5\ncharacters long.\n\nLastly, we can look _forward_ for information.\n\n- If the token following what looks like a regex literal is not valid after a\n regex literal, but is valid in a division expression, then the regex literal\n is treated as division instead. For example, a flagless regex cannot be\n followed by a string, number or name, but all of those three can be the\n denominator of a division.\n- Generally, if what looks like a regex literal is followed by an operator, the\n regex literal is treated as division instead. This is because regexes are\n seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division\n could likely be part of such an expression.\n\nPlease consult the regex source and the test cases for precise information on\nwhen regex or division is matched (should you need to know). In short, you\ncould sum it up as:\n\nIf the end of a statement looks like a regex literal (even if it isn’t), it\nwill be treated as one. Otherwise it should work as expected (if you write sane\ncode).\n\n\nLicense\n=======\n\n[The X11 (“MIT”) License](LICENSE).\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/lydell/js-tokens/issues" }, "_id": "js-tokens@1.0.2", "_from": "js-tokens@^1.0.1", "realName": "js-tokens", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/loose-envify/node_modules/js-tokens", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/loose-envify/node_modules/js-tokens", "parent": "[Circular]", "depth": 6, "peerDependencies": {} } }, "devDependencies": { "browserify": "^11.0.1", "envify": "^3.4.0", "tap": "^1.4.0" }, "readme": "# loose-envify\n\n[![Build Status](https://travis-ci.org/zertosh/loose-envify.svg?branch=master)](https://travis-ci.org/zertosh/loose-envify)\n\nFast (and loose) selective `process.env` replacer using [js-tokens](https://github.com/lydell/js-tokens) instead of an AST. Works just like [envify](https://github.com/hughsk/envify) but much faster.\n\n## Gotchas\n\n* Doesn't handle broken syntax.\n* Doesn't look inside embedded expressions in template strings.\n - **this won't work:**\n ```js\n console.log(`the current env is ${process.env.NODE_ENV}`);\n ```\n* Doesn't replace oddly-spaced or oddly-commented expressions.\n - **this won't work:**\n ```js\n console.log(process./*won't*/env./*work*/NODE_ENV);\n ```\n\n## Usage/Options\n\nloose-envify has the exact same interface as [envify](https://github.com/hughsk/envify).\n\n## Benchmark\n\n```\nenvify:\n\n $ for i in {1..5}; do node bench/bench.js 'envify'; done\n 708ms\n 727ms\n 791ms\n 719ms\n 720ms\n\nloose-envify:\n\n $ for i in {1..5}; do node bench/bench.js '../'; done\n 51ms\n 52ms\n 52ms\n 52ms\n 52ms\n```\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/zertosh/loose-envify/issues" }, "_id": "loose-envify@1.1.0", "_from": "loose-envify@^1.0.0", "realName": "loose-envify", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/loose-envify", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/loose-envify", "parent": "[Circular]", "depth": 5, "peerDependencies": {} }, "promise": { "name": "promise", "version": "7.1.1", "description": "Bare bones Promises/A+ implementation", "main": "index.js", "scripts": { "prepublish": "node build", "pretest": "node build", "pretest-resolve": "node build", "pretest-extensions": "node build", "pretest-memory-leak": "node build", "test": "mocha --bail --timeout 200 --slow 99999 -R dot && npm run test-memory-leak", "test-resolve": "mocha test/resolver-tests.js --timeout 200 --slow 999999", "test-extensions": "mocha test/extensions-tests.js --timeout 200 --slow 999999", "test-memory-leak": "node --expose-gc test/memory-leak.js", "coverage": "istanbul cover node_modules/mocha/bin/_mocha -- --bail --timeout 200 --slow 99999 -R dot" }, "repository": { "type": "git", "url": "https://github.com/then/promise.git" }, "author": { "name": "ForbesLindesay" }, "license": "MIT", "devDependencies": { "acorn": "^1.0.1", "better-assert": "*", "istanbul": "^0.3.13", "mocha": "*", "promises-aplus-tests": "*", "rimraf": "^2.3.2" }, "dependencies": { "asap": { "name": "asap", "version": "2.0.3", "description": "High-priority task queue for Node.js and browsers", "keywords": [ "event", "task", "queue" ], "license": { "type": "MIT", "url": "https://github.com/kriskowal/asap/raw/master/LICENSE.md" }, "repository": { "type": "git", "url": "https://github.com/kriskowal/asap.git" }, "main": "./asap.js", "browser": { "./asap.js": "./browser-asap.js", "./raw.js": "./browser-raw.js", "./test/domain.js": "./test/browser-domain.js" }, "files": [ "raw.js", "asap.js", "browser-raw.js", "browser-asap.js" ], "scripts": { "test": "npm run lint && npm run test-node", "test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker", "test-node": "node test/asap-test.js", "test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy", "test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener", "test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json", "test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json", "test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json", "test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json", "lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)" }, "devDependencies": { "events": "^1.0.1", "jshint": "^2.5.1", "knox": "^0.8.10", "mr": "^2.0.5", "opener": "^1.3.0", "q": "^2.0.3", "q-io": "^2.0.3", "saucelabs": "^0.1.1", "wd": "^0.2.21", "weak-map": "^1.0.5" }, "readme": "# ASAP\n\n[![Build Status](https://travis-ci.org/kriskowal/asap.png?branch=master)](https://travis-ci.org/kriskowal/asap)\n\nPromise and asynchronous observer libraries, as well as hand-rolled callback\nprograms and libraries, often need a mechanism to postpone the execution of a\ncallback until the next available event.\n(See [Designing API’s for Asynchrony][Zalgo].)\nThe `asap` function executes a task **as soon as possible** but not before it\nreturns, waiting only for the completion of the current event and previously\nscheduled tasks.\n\n```javascript\nasap(function () {\n // ...\n});\n```\n\n[Zalgo]: http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony\n\nThis CommonJS package provides an `asap` module that exports a function that\nexecutes a task function *as soon as possible*.\n\nASAP strives to schedule events to occur before yielding for IO, reflow,\nor redrawing.\nEach event receives an independent stack, with only platform code in parent\nframes and the events run in the order they are scheduled.\n\nASAP provides a fast event queue that will execute tasks until it is\nempty before yielding to the JavaScript engine's underlying event-loop.\nWhen a task gets added to a previously empty event queue, ASAP schedules a flush\nevent, preferring for that event to occur before the JavaScript engine has an\nopportunity to perform IO tasks or rendering, thus making the first task and\nsubsequent tasks semantically indistinguishable.\nASAP uses a variety of techniques to preserve this invariant on different\nversions of browsers and Node.js.\n\nBy design, ASAP prevents input events from being handled until the task\nqueue is empty.\nIf the process is busy enough, this may cause incoming connection requests to be\ndropped, and may cause existing connections to inform the sender to reduce the\ntransmission rate or stall.\nASAP allows this on the theory that, if there is enough work to do, there is no\nsense in looking for trouble.\nAs a consequence, ASAP can interfere with smooth animation.\nIf your task should be tied to the rendering loop, consider using\n`requestAnimationFrame` instead.\nA long sequence of tasks can also effect the long running script dialog.\nIf this is a problem, you may be able to use ASAP’s cousin `setImmediate` to\nbreak long processes into shorter intervals and periodically allow the browser\nto breathe.\n`setImmediate` will yield for IO, reflow, and repaint events.\nIt also returns a handler and can be canceled.\nFor a `setImmediate` shim, consider [YuzuJS setImmediate][setImmediate].\n\n[setImmediate]: https://github.com/YuzuJS/setImmediate\n\nTake care.\nASAP can sustain infinite recursive calls without warning.\nIt will not halt from a stack overflow, and it will not consume unbounded\nmemory.\nThis is behaviorally equivalent to an infinite loop.\nJust as with infinite loops, you can monitor a Node.js process for this behavior\nwith a heart-beat signal.\nAs with infinite loops, a very small amount of caution goes a long way to\navoiding problems.\n\n```javascript\nfunction loop() {\n asap(loop);\n}\nloop();\n```\n\nIn browsers, if a task throws an exception, it will not interrupt the flushing\nof high-priority tasks.\nThe exception will be postponed to a later, low-priority event to avoid\nslow-downs.\nIn Node.js, if a task throws an exception, ASAP will resume flushing only if—and\nonly after—the error is handled by `domain.on(\"error\")` or\n`process.on(\"uncaughtException\")`.\n\n## Raw ASAP\n\nChecking for exceptions comes at a cost.\nThe package also provides an `asap/raw` module that exports the underlying\nimplementation which is faster but stalls if a task throws an exception.\nThis internal version of the ASAP function does not check for errors.\nIf a task does throw an error, it will stall the event queue unless you manually\ncall `rawAsap.requestFlush()` before throwing the error, or any time after.\n\nIn Node.js, `asap/raw` also runs all tasks outside any domain.\nIf you need a task to be bound to your domain, you will have to do it manually.\n\n```js\nif (process.domain) {\n task = process.domain.bind(task);\n}\nrawAsap(task);\n```\n\n## Tasks\n\nA task may be any object that implements `call()`.\nA function will suffice, but closures tend not to be reusable and can cause\ngarbage collector churn.\nBoth `asap` and `rawAsap` accept task objects to give you the option of\nrecycling task objects or using higher callable object abstractions.\nSee the `asap` source for an illustration.\n\n\n## Compatibility\n\nASAP is tested on Node.js v0.10 and in a broad spectrum of web browsers.\nThe following charts capture the browser test results for the most recent\nrelease.\nThe first chart shows test results for ASAP running in the main window context.\nThe second chart shows test results for ASAP running in a web worker context.\nTest results are inconclusive (grey) on browsers that do not support web\nworkers.\nThese data are captured automatically by [Continuous\nIntegration][].\n\n[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md\n\n![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg)\n\n![Compatibility in Web Workers](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-worker-results-matrix.svg)\n\n## Caveats\n\nWhen a task is added to an empty event queue, it is not always possible to\nguarantee that the task queue will begin flushing immediately after the current\nevent.\nHowever, once the task queue begins flushing, it will not yield until the queue\nis empty, even if the queue grows while executing tasks.\n\nThe following browsers allow the use of [DOM mutation observers][] to access\nthe HTML [microtask queue][], and thus begin flushing ASAP's task queue\nimmediately at the end of the current event loop turn, before any rendering or\nIO:\n\n[microtask queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#microtask-queue\n[DOM mutation observers]: http://dom.spec.whatwg.org/#mutation-observers\n\n- Android 4–4.3\n- Chrome 26–34\n- Firefox 14–29\n- Internet Explorer 11\n- iPad Safari 6–7.1\n- iPhone Safari 7–7.1\n- Safari 6–7\n\nIn the absense of mutation observers, there are a few browsers, and situations\nlike web workers in some of the above browsers, where [message channels][]\nwould be a useful way to avoid falling back to timers.\nMessage channels give direct access to the HTML [task queue][], so the ASAP\ntask queue would flush after any already queued rendering and IO tasks, but\nwithout having the minimum delay imposed by timers.\nHowever, among these browsers, Internet Explorer 10 and Safari do not reliably\ndispatch messages, so they are not worth the trouble to implement.\n\n[message channels]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#message-channels\n[task queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#concept-task\n\n- Internet Explorer 10\n- Safair 5.0-1\n- Opera 11-12\n\nIn the absense of mutation observers, these browsers and the following browsers\nall fall back to using `setTimeout` and `setInterval` to ensure that a `flush`\noccurs.\nThe implementation uses both and cancels whatever handler loses the race, since\n`setTimeout` tends to occasionally skip tasks in unisolated circumstances.\nTimers generally delay the flushing of ASAP's task queue for four milliseconds.\n\n- Firefox 3–13\n- Internet Explorer 6–10\n- iPad Safari 4.3\n- Lynx 2.8.7\n\n\n## Heritage\n\nASAP has been factored out of the [Q][] asynchronous promise library.\nIt originally had a naïve implementation in terms of `setTimeout`, but\n[Malte Ubl][NonBlocking] provided an insight that `postMessage` might be\nuseful for creating a high-priority, no-delay event dispatch hack.\nSince then, Internet Explorer proposed and implemented `setImmediate`.\nRobert Katić began contributing to Q by measuring the performance of\nthe internal implementation of `asap`, paying particular attention to\nerror recovery.\nDomenic, Robert, and Kris Kowal collectively settled on the current strategy of\nunrolling the high-priority event queue internally regardless of what strategy\nwe used to dispatch the potentially lower-priority flush event.\nDomenic went on to make ASAP cooperate with Node.js domains.\n\n[Q]: https://github.com/kriskowal/q\n[NonBlocking]: http://www.nonblocking.io/2011/06/windownexttick.html\n\nFor further reading, Nicholas Zakas provided a thorough article on [The\nCase for setImmediate][NCZ].\n\n[NCZ]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/\n\nEmber’s RSVP promise implementation later [adopted][RSVP ASAP] the name ASAP but\nfurther developed the implentation.\nParticularly, The `MessagePort` implementation was abandoned due to interaction\n[problems with Mobile Internet Explorer][IE Problems] in favor of an\nimplementation backed on the newer and more reliable DOM `MutationObserver`\ninterface.\nThese changes were back-ported into this library.\n\n[IE Problems]: https://github.com/cujojs/when/issues/197\n[RSVP ASAP]: https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\nIn addition, ASAP factored into `asap` and `asap/raw`, such that `asap` remained\nexception-safe, but `asap/raw` provided a tight kernel that could be used for\ntasks that guaranteed that they would not throw exceptions.\nThis core is useful for promise implementations that capture thrown errors in\nrejected promises and do not need a second safety net.\nAt the same time, the exception handling in `asap` was factored into separate\nimplementations for Node.js and browsers, using the the [Browserify][Browser\nConfig] `browser` property in `package.json` to instruct browser module loaders\nand bundlers, including [Browserify][], [Mr][], and [Mop][], to use the\nbrowser-only implementation.\n\n[Browser Config]: https://gist.github.com/defunctzombie/4339901\n[Browserify]: https://github.com/substack/node-browserify\n[Mr]: https://github.com/montagejs/mr\n[Mop]: https://github.com/montagejs/mop\n\n## License\n\nCopyright 2009-2014 by Contributors\nMIT License (enclosed)\n\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/kriskowal/asap/issues" }, "_id": "asap@2.0.3", "_from": "asap@~2.0.3", "realName": "asap", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/promise/node_modules/asap", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/promise/node_modules/asap", "parent": "[Circular]", "depth": 6, "peerDependencies": {} } }, "readme": "\n# promise\n\nThis is a simple implementation of Promises. It is a super set of ES6 Promises designed to have readable, performant code and to provide just the extensions that are absolutely necessary for using promises today.\n\nFor detailed tutorials on its use, see www.promisejs.org\n\n**N.B.** This promise exposes internals via underscore (`_`) prefixed properties. If you use these, your code will break with each new release.\n\n[![travis][travis-image]][travis-url]\n[![dep][dep-image]][dep-url]\n[![npm][npm-image]][npm-url]\n[![downloads][downloads-image]][downloads-url]\n\n[travis-image]: https://img.shields.io/travis/then/promise.svg?style=flat\n[travis-url]: https://travis-ci.org/then/promise\n[dep-image]: https://img.shields.io/gemnasium/then/promise.svg?style=flat\n[dep-url]: https://gemnasium.com/then/promise\n[npm-image]: https://img.shields.io/npm/v/promise.svg?style=flat\n[npm-url]: https://npmjs.org/package/promise\n[downloads-image]: https://img.shields.io/npm/dm/promise.svg?style=flat\n[downloads-url]: https://npmjs.org/package/promise\n\n## Installation\n\n**Server:**\n\n $ npm install promise\n\n**Client:**\n\nYou can use browserify on the client, or use the pre-compiled script that acts as a polyfill.\n\n```html\n\n```\n\nNote that the [es5-shim](https://github.com/es-shims/es5-shim) must be loaded before this library to support browsers pre IE9.\n\n```html\n\n```\n\n## Usage\n\nThe example below shows how you can load the promise library (in a way that works on both client and server using node or browserify). It then demonstrates creating a promise from scratch. You simply call `new Promise(fn)`. There is a complete specification for what is returned by this method in [Promises/A+](http://promises-aplus.github.com/promises-spec/).\n\n```javascript\nvar Promise = require('promise');\n\nvar promise = new Promise(function (resolve, reject) {\n get('http://www.google.com', function (err, res) {\n if (err) reject(err);\n else resolve(res);\n });\n});\n```\n\nIf you need [domains](https://iojs.org/api/domain.html) support, you should instead use:\n\n```js\nvar Promise = require('promise/domains');\n```\n\nIf you are in an environment that implements `setImmediate` and don't want the optimisations provided by asap, you can use:\n\n```js\nvar Promise = require('promise/setimmediate');\n```\n\nIf you only want part of the features, e.g. just a pure ES6 polyfill:\n\n```js\nvar Promise = require('promise/lib/es6-extensions');\n// or require('promise/domains/es6-extensions');\n// or require('promise/setimmediate/es6-extensions');\n```\n\n## Unhandled Rejections\n\nBy default, promises silence any unhandled rejections.\n\nYou can enable logging of unhandled ReferenceErrors and TypeErrors via:\n\n```js\nrequire('promise/lib/rejection-tracking').enable();\n```\n\nDue to the performance cost, you should only do this during development.\n\nYou can enable logging of all unhandled rejections if you need to debug an exception you think is being swallowed by promises:\n\n```js\nrequire('promise/lib/rejection-tracking').enable(\n {allRejections: true}\n);\n```\n\nDue to the high probability of false positives, I only recommend using this when debugging specific issues that you think may be being swallowed. For the preferred debugging method, see `Promise#done(onFulfilled, onRejected)`.\n\n`rejection-tracking.enable(options)` takes the following options:\n\n - allRejections (`boolean`) - track all exceptions, not just reference errors and type errors. Note that this has a high probability of resulting in false positives if your code loads data optimisticly\n - whitelist (`Array`) - this defaults to `[ReferenceError, TypeError]` but you can override it with your own list of error constructors to track.\n - `onUnhandled(id, error)` and `onHandled(id, error)` - you can use these to provide your own customised display for errors. Note that if possible you should indicate that the error was a false positive if `onHandled` is called. `onHandled` is only called if `onUnhandled` has already been called.\n\nTo reduce the chance of false-positives there is a delay of up to 2 seconds before errors are logged. This means that if you attach an error handler within 2 seconds, it won't be logged as a false positive. ReferenceErrors and TypeErrors are only subject to a 100ms delay due to the higher likelihood that the error is due to programmer error.\n\n## API\n\nBefore all examples, you will need:\n\n```js\nvar Promise = require('promise');\n```\n\n### new Promise(resolver)\n\nThis creates and returns a new promise. `resolver` must be a function. The `resolver` function is passed two arguments:\n\n 1. `resolve` should be called with a single argument. If it is called with a non-promise value then the promise is fulfilled with that value. If it is called with a promise (A) then the returned promise takes on the state of that new promise (A).\n 2. `reject` should be called with a single argument. The returned promise will be rejected with that argument.\n\n### Static Functions\n\n These methods are invoked by calling `Promise.methodName`.\n\n#### Promise.resolve(value)\n\n(deprecated aliases: `Promise.from(value)`, `Promise.cast(value)`)\n\nConverts values and foreign promises into Promises/A+ promises. If you pass it a value then it returns a Promise for that value. If you pass it something that is close to a promise (such as a jQuery attempt at a promise) it returns a Promise that takes on the state of `value` (rejected or fulfilled).\n\n#### Promise.reject(value)\n\nReturns a rejected promise with the given value.\n\n#### Promise.all(array)\n\nReturns a promise for an array. If it is called with a single argument that `Array.isArray` then this returns a promise for a copy of that array with any promises replaced by their fulfilled values. e.g.\n\n```js\nPromise.all([Promise.resolve('a'), 'b', Promise.resolve('c')])\n .then(function (res) {\n assert(res[0] === 'a')\n assert(res[1] === 'b')\n assert(res[2] === 'c')\n })\n```\n\n#### Promise.denodeify(fn)\n\n_Non Standard_\n\nTakes a function which accepts a node style callback and returns a new function that returns a promise instead.\n\ne.g.\n\n```javascript\nvar fs = require('fs')\n\nvar read = Promise.denodeify(fs.readFile)\nvar write = Promise.denodeify(fs.writeFile)\n\nvar p = read('foo.json', 'utf8')\n .then(function (str) {\n return write('foo.json', JSON.stringify(JSON.parse(str), null, ' '), 'utf8')\n })\n```\n\n#### Promise.nodeify(fn)\n\n_Non Standard_\n\nThe twin to `denodeify` is useful when you want to export an API that can be used by people who haven't learnt about the brilliance of promises yet.\n\n```javascript\nmodule.exports = Promise.nodeify(awesomeAPI)\nfunction awesomeAPI(a, b) {\n return download(a, b)\n}\n```\n\nIf the last argument passed to `module.exports` is a function, then it will be treated like a node.js callback and not parsed on to the child function, otherwise the API will just return a promise.\n\n### Prototype Methods\n\nThese methods are invoked on a promise instance by calling `myPromise.methodName`\n\n### Promise#then(onFulfilled, onRejected)\n\nThis method follows the [Promises/A+ spec](http://promises-aplus.github.io/promises-spec/). It explains things very clearly so I recommend you read it.\n\nEither `onFulfilled` or `onRejected` will be called and they will not be called more than once. They will be passed a single argument and will always be called asynchronously (in the next turn of the event loop).\n\nIf the promise is fulfilled then `onFulfilled` is called. If the promise is rejected then `onRejected` is called.\n\nThe call to `.then` also returns a promise. If the handler that is called returns a promise, the promise returned by `.then` takes on the state of that returned promise. If the handler that is called returns a value that is not a promise, the promise returned by `.then` will be fulfilled with that value. If the handler that is called throws an exception then the promise returned by `.then` is rejected with that exception.\n\n#### Promise#catch(onRejected)\n\nSugar for `Promise#then(null, onRejected)`, to mirror `catch` in synchronous code.\n\n#### Promise#done(onFulfilled, onRejected)\n\n_Non Standard_\n\nThe same semantics as `.then` except that it does not return a promise and any exceptions are re-thrown so that they can be logged (crashing the application in non-browser environments)\n\n#### Promise#nodeify(callback)\n\n_Non Standard_\n\nIf `callback` is `null` or `undefined` it just returns `this`. If `callback` is a function it is called with rejection reason as the first argument and result as the second argument (as per the node.js convention).\n\nThis lets you write API functions that look like:\n\n```javascript\nfunction awesomeAPI(foo, bar, callback) {\n return internalAPI(foo, bar)\n .then(parseResult)\n .then(null, retryErrors)\n .nodeify(callback)\n}\n```\n\nPeople who use typical node.js style callbacks will be able to just pass a callback and get the expected behavior. The enlightened people can not pass a callback and will get awesome promises.\n\n## License\n\n MIT\n", "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/then/promise/issues" }, "_id": "promise@7.1.1", "_from": "promise@^7.0.3", "realName": "promise", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/promise", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/promise", "parent": "[Circular]", "depth": 5, "peerDependencies": {} }, "ua-parser-js": { "title": "UAParser.js", "name": "ua-parser-js", "version": "0.7.10", "author": { "name": "Faisal Salman", "email": "fyzlman@gmail.com", "url": "http://faisalman.com" }, "description": "Lightweight JavaScript-based user-agent string parser", "keywords": [ "user-agent", "parser", "browser", "engine", "os", "device", "cpu" ], "homepage": "http://github.com/faisalman/ua-parser-js", "contributors": [ { "name": "Faisal Salman", "email": "fyzlman@gmail.com" }, { "name": "Benjamin Bertrand", "email": "bertrand.design@gmail.com" }, { "name": "Carl C Von Lewin", "email": "carlchristianlewin@gmail.com" }, { "name": "Christopher De Cairos", "email": "chris.decairos@gmail.com" }, { "name": "Davit Barbakadze", "email": "jayarjo@gmail.com" }, { "name": "Dmitry Tyschenko", "email": "dtyschenko@gmail.com" }, { "name": "Douglas Li", "email": "doug@knotch.it" }, { "name": "Dumitru Uzun", "email": "contact@duzun.me" }, { "name": "Erik Hesselink", "email": "hesselink@gmail.com" }, { "name": "Fabian Becker", "email": "halfdan@xnorfz.de" }, { "name": "Hendrik Helwich", "email": "h.helwich@iplabs.de" }, { "name": "Jackpoll", "email": "jackpoll123456@gmail.com" }, { "name": "Jake Mc", "email": "startswithaj@users.noreply.github.com" }, { "name": "John Tantalo", "email": "john.tantalo@gmail.com" }, { "name": "John Yanarella", "email": "jmy@codecatalyst.com" }, { "name": "Jon Buckley", "email": "jon@jbuckley.ca" }, { "name": "Kendall Buchanan", "email": "kendall@kendagriff.com" }, { "name": "Lee Treveil", "email": "leetreveil@gmail.com" }, { "name": "Leonardo", "email": "leofiore@libero.it" }, { "name": "Max Maurer", "email": "maxemanuel.maurer@gmail.com" }, { "name": "Michael Hess", "email": "mhess@connectify.me" }, { "name": "OtakuSiD", "email": "otakusid@gmail.com" }, { "name": "Ross Noble", "email": "rosshnoble@gmail.com" }, { "name": "Sandro Sonntag", "email": "sandro.sonntag@adorsys.de" } ], "main": "src/ua-parser.js", "scripts": { "build": "uglifyjs src/ua-parser.js > dist/ua-parser.min.js --comments '/UAParser\\.js/' && uglifyjs src/ua-parser.js > dist/ua-parser.pack.js --comments '/UAParser\\.js/' --compress --mangle", "test": "jshint src/ua-parser.js && mocha -R nyan test/test.js", "verup": "node ./node_modules/verup", "version": "node ./node_modules/verup 0" }, "verup": { "files": [ "ua-parser-js.jquery.json", "component.json", "bower.json", "package.js", "src/ua-parser.js" ], "regs": [ "^((?:\\$|(\\s*\\*\\s*@)|(\\s*(?:var|,)?\\s+))(?:LIBVERSION|version)[\\s\\:='\"]+)([0-9]+(?:\\.[0-9]+){2,2})", "^(\\s?\\*.*v)([0-9]+(?:\\.[0-9]+){2,2})" ] }, "devDependencies": { "jshint": "~1.1.0", "mocha": "~1.8.0", "uglify-js": "~1.3.4", "verup": "^1.3.x" }, "repository": { "type": "git", "url": "https://github.com/faisalman/ua-parser-js.git" }, "licenses": [ { "type": "GPLv2", "url": "http://www.gnu.org/licenses/gpl-2.0.html" }, { "type": "MIT", "url": "http://www.opensource.org/licenses/mit-license.php" } ], "engines": { "node": "*" }, "directories": { "dist": "dist", "src": "src", "test": "test" }, "readme": "# UAParser.js\r\n\r\nLightweight JavaScript-based User-Agent string parser. Supports browser & node.js environment. Also available as jQuery/Zepto plugin, Component/Bower/Meteor package, & RequireJS/AMD module\r\n\r\n[![Build Status](https://travis-ci.org/faisalman/ua-parser-js.svg?branch=master)](https://travis-ci.org/faisalman/ua-parser-js)\r\n[![Flattr this](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/3867907/faisalmanua-parser-js-on-GitHub)\r\n\r\n* Author : Faisal Salman <>\r\n* Demo : http://faisalman.github.io/ua-parser-js\r\n* Source : https://github.com/faisalman/ua-parser-js\r\n\r\n## Features\r\n\r\nExtract detailed type of web browser, layout engine, operating system, cpu architecture, and device type/model purely from user-agent string with relatively lightweight footprint (~11KB minified / ~4KB gzipped). Written in vanilla js, which means it doesn't depends on any other library.\r\n\r\n![It's over 9000](https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/over9000.jpg)\r\n\r\n## Methods\r\n\r\n* `getBrowser()`\r\n * returns `{ name: '', version: '' }`\r\n\r\n```\r\n# Possible 'browser.name':\r\nAmaya, Android Browser, Arora, Avant, Baidu, Blazer, Bolt, Camino, Chimera, Chrome, \r\nChromium, Comodo Dragon, Conkeror, Dillo, Dolphin, Doris, Edge, Epiphany, Fennec,\r\nFirebird, Firefox, Flock, GoBrowser, iCab, ICE Browser, IceApe, IceCat, IceDragon, \r\nIceweasel, IE [Mobile], Iron, Jasmine, K-Meleon, Konqueror, Kindle, Links, \r\nLunascape, Lynx, Maemo, Maxthon, Midori, Minimo, MIUI Browser, [Mobile] Safari, \r\nMosaic, Mozilla, Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet], \r\nPhantomJS, Phoenix, Polaris, QQBrowser, RockMelt, Silk, Skyfire, SeaMonkey, SlimBrowser,\r\nSwiftfox, Tizen, UCBrowser, Vivaldi, w3m, Yandex\r\n\r\n# 'browser.version' determined dynamically\r\n```\r\n\r\n* `getDevice()`\r\n * returns `{ model: '', type: '', vendor: '' }` \r\n\r\n```\r\n# Possible 'device.type':\r\nconsole, mobile, tablet, smarttv, wearable, embedded\r\n\r\n# Possible 'device.vendor':\r\nAcer, Alcatel, Amazon, Apple, Archos, Asus, BenQ, BlackBerry, Dell, GeeksPhone, \r\nGoogle, HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian, \r\nNintendo, Nokia, Nvidia, Ouya, Palm, Panasonic, Polytron, RIM, Samsung, Sharp, \r\nSiemens, Sony-Ericsson, Sprint, Xbox, ZTE\r\n\r\n# 'device.model' determined dynamically\r\n```\r\n\r\n* `getEngine()`\r\n * returns `{ name: '', version: '' }`\r\n\r\n```\r\n# Possible 'engine.name'\r\nAmaya, EdgeHTML, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto, \r\nTasman, Trident, w3m, WebKit\r\n\r\n# 'engine.version' determined dynamically\r\n```\r\n\r\n* `getOS()`\r\n * returns `{ name: '', version: '' }`\r\n\r\n```\r\n# Possible 'os.name'\r\nAIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS, Contiki,\r\nFedora, Firefox OS, FreeBSD, Debian, DragonFly, Gentoo, GNU, Haiku, Hurd, iOS, \r\nJoli, Linpus, Linux, Mac OS, Mageia, Mandriva, MeeGo, Minix, Mint, Morph OS, NetBSD, \r\nNintendo, OpenBSD, OpenVMS, OS/2, Palm, PCLinuxOS, Plan9, Playstation, QNX, RedHat, \r\nRIM Tablet OS, RISC OS, Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen, \r\nUbuntu, UNIX, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk\r\n\r\n# 'os.version' determined dynamically\r\n```\r\n\r\n* `getCPU()`\r\n * returns `{ architecture: '' }`\r\n\r\n```\r\n# Possible 'cpu.architecture'\r\n68k, amd64, arm, arm64, avr, ia32, ia64, irix, irix64, mips, mips64, pa-risc, \r\nppc, sparc, sparc64\r\n```\r\n\r\n* `getResult()`\r\n * returns `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`\r\n\r\n* `getUA()`\r\n * returns UA string of current instance\r\n\r\n* `setUA(uastring)`\r\n * set & parse UA string\r\n\r\n## Example\r\n\r\n```html\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```\r\n\r\n### Using node.js\r\n\r\n```sh\r\n$ npm install ua-parser-js\r\n```\r\n\r\n```js\r\nvar http = require('http');\r\nvar parser = require('ua-parser-js');\r\n\r\nhttp.createServer(function (req, res) {\r\n // get user-agent header\r\n var ua = parser(req.headers['user-agent']);\r\n // write the result as response\r\n res.end(JSON.stringify(ua, null, ' '));\r\n})\r\n.listen(1337, '127.0.0.1');\r\n\r\nconsole.log('Server running at http://127.0.0.1:1337/');\r\n```\r\n\r\n### Using requirejs\r\n\r\n```js\r\nrequire(['ua-parser'], function(UAParser) {\r\n var parser = new UAParser();\r\n console.log(parser.getResult());\r\n});\r\n```\r\n\r\n### Using component\r\n\r\n```sh\r\n$ component install faisalman/ua-parser-js\r\n```\r\n\r\n### Using bower\r\n\r\n```sh\r\n$ bower install ua-parser-js\r\n```\r\n\r\n### Using meteor\r\n\r\n```sh\r\n$ meteor add faisalman:ua-parser-js\r\n```\r\n\r\n### Using jQuery/Zepto ($.ua)\r\n\r\nAlthough written in vanilla js (which means it doesn't depends on jQuery), this library will automatically detect if jQuery/Zepto is present and create `$.ua` object based on browser's user-agent (although in case you need, `window.UAParser` constructor is still present). To get/set user-agent you can use: `$.ua.get()` / `$.ua.set(uastring)`. \r\n\r\n```js\r\n// In browser with default user-agent: 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0':\r\n\r\n// Do some tests\r\nconsole.log($.ua.device); // {vendor: \"HTC\", model: \"Evo Shift 4G\", type: \"mobile\"}\r\nconsole.log($.ua.os); // {name: \"Android\", version: \"2.3.4\"}\r\nconsole.log($.ua.os.name); // \"Android\"\r\nconsole.log($.ua.get()); // \"Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0\"\r\n\r\n// reset to custom user-agent\r\n$.ua.set('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; Xoom Build/HWI69) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13');\r\n\r\n// Test again\r\nconsole.log($.ua.browser.name); // \"Safari\"\r\nconsole.log($.ua.engine.name); // \"Webkit\"\r\nconsole.log($.ua.device); // {vendor: \"Motorola\", model: \"Xoom\", type: \"tablet\"}\r\nconsole.log(parseInt($.ua.browser.version.split('.')[0], 10)); // 4\r\n```\r\n\r\n### Extending regex patterns\r\n\r\n* `UAParser(uastring[, extensions])`\r\n\r\nPass your own regexes to extend the limited matching rules.\r\n\r\n```js\r\n// Example:\r\nvar uaString = 'ownbrowser/1.3';\r\nvar ownBrowser = [[/(ownbrowser)\\/([\\w\\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION]];\r\nvar parser = new UAParser(uaString, {browser: ownBrowser});\r\nconsole.log(parser.getBrowser()); // {name: \"ownbrowser\", version: \"1.3\"}\r\n```\r\n\r\n## Development\r\n\r\nVerify, test, & minify script\r\n\r\n```sh\r\n$ npm run test\r\n$ npm run build\r\n```\r\n\r\nThen submit a pull request to https://github.com/faisalman/ua-parser-js under `develop` branch.\r\n\r\n\r\n## License\r\n\r\nDual licensed under GPLv2 & MIT\r\n\r\nCopyright © 2012-2015 Faisal Salman <>\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of \r\nthis software and associated documentation files (the \"Software\"), to deal in \r\nthe Software without restriction, including without limitation the rights to use, \r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell copies of the \r\nSoftware, and to permit persons to whom the Software is furnished to do so, \r\nsubject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all \r\ncopies or substantial portions of the Software.\r\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/faisalman/ua-parser-js/issues" }, "_id": "ua-parser-js@0.7.10", "_from": "ua-parser-js@^0.7.9", "realName": "ua-parser-js", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/ua-parser-js", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/ua-parser-js", "parent": "[Circular]", "depth": 5, "peerDependencies": {} }, "whatwg-fetch": { "name": "whatwg-fetch", "version": "0.9.0", "main": "fetch.js", "repository": { "type": "git", "url": "git://github.com/github/fetch" }, "licenses": [ { "type": "MIT", "url": "https://github.com/github/fetch/blob/master/LICENSE" } ], "devDependencies": { "bower": "1.3.8", "chai": "1.10.0", "jshint": "2.5.2", "mocha-phantomjs": "3.5.2", "mocha": "2.1.0", "phantomjs": "1.9.13" }, "files": [ "LICENSE", "fetch.js" ], "readme": "# window.fetch polyfill\n\nThe global `fetch` function is an easier way to make web requests and handle\nresponses than using an XMLHttpRequest. This polyfill is written as closely as\npossible to the standard Fetch specification at https://fetch.spec.whatwg.org.\n\n## Installation\n\nAvailable on [Bower](http://bower.io) as **fetch**.\n\n```sh\n$ bower install fetch\n```\n\nYou'll also need a Promise polyfill for older browsers.\n\n```sh\n$ bower install es6-promise\n```\n\nThis can also be installed with `npm`.\n\n```sh\n$ npm install whatwg-fetch --save\n```\n\n(For a node.js implementation, try [node-fetch](https://github.com/bitinn/node-fetch))\n\n## Usage\n\nThe `fetch` function supports any HTTP method. We'll focus on GET and POST\nexample requests.\n\n### HTML\n\n```javascript\nfetch('/users.html')\n .then(function(response) {\n return response.text()\n }).then(function(body) {\n document.body.innerHTML = body\n })\n```\n\n### JSON\n\n```javascript\nfetch('/users.json')\n .then(function(response) {\n return response.json()\n }).then(function(json) {\n console.log('parsed json', json)\n }).catch(function(ex) {\n console.log('parsing failed', ex)\n })\n```\n\n### Response metadata\n\n```javascript\nfetch('/users.json').then(function(response) {\n console.log(response.headers.get('Content-Type'))\n console.log(response.headers.get('Date'))\n console.log(response.status)\n console.log(response.statusText)\n})\n```\n\n### Post form\n\n```javascript\nvar form = document.querySelector('form')\n\nfetch('/query', {\n method: 'post',\n body: new FormData(form)\n})\n```\n\n### Post JSON\n\n```javascript\nfetch('/users', {\n method: 'post',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n name: 'Hubot',\n login: 'hubot',\n })\n})\n```\n\n### File upload\n\n```javascript\nvar input = document.querySelector('input[type=\"file\"]')\n\nvar form = new FormData()\nform.append('file', input.files[0])\nform.append('user', 'hubot')\n\nfetch('/avatars', {\n method: 'post',\n body: form\n})\n```\n\n### Success and error handlers\n\nThis causes `fetch` to behave like jQuery's `$.ajax` by rejecting the `Promise`\non HTTP failure status codes like 404, 500, etc. The response `Promise` is\nresolved only on successful, 200 level, status codes.\n\n```javascript\nfunction status(response) {\n if (response.status >= 200 && response.status < 300) {\n return response\n }\n throw new Error(response.statusText)\n}\n\nfunction json(response) {\n return response.json()\n}\n\nfetch('/users')\n .then(status)\n .then(json)\n .then(function(json) {\n console.log('request succeeded with json response', json)\n }).catch(function(error) {\n console.log('request failed', error)\n })\n```\n\n### Response URL caveat\n\nThe `Response` object has a URL attribute for the final responded resource.\nUsually this is the same as the `Request` url, but in the case of a redirect,\nits all transparent. Newer versions of XHR include a `responseURL` attribute\nthat returns this value. But not every browser supports this. The compromise\nrequires setting a special server side header to tell the browser what URL it\njust requested (yeah, I know browsers).\n\n``` ruby\nresponse.headers['X-Request-URL'] = request.url\n```\n\nIf you want `response.url` to be reliable, you'll want to set this header. The\nday that you ditch this polyfill and use native fetch only, you can remove the\nheader hack.\n\n## Browser Support\n\n![Chrome](https://raw.github.com/alrra/browser-logos/master/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/firefox/firefox_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/safari/safari_48x48.png)\n--- | --- | --- | --- | --- |\nLatest ✔ | Latest ✔ | 9+ ✔ | Latest ✔ | 6.1+ ✔ |\n", "readmeFilename": "README.md", "description": "The global `fetch` function is an easier way to make web requests and handle responses than using an XMLHttpRequest. This polyfill is written as closely as possible to the standard Fetch specification at https://fetch.spec.whatwg.org.", "bugs": { "url": "https://github.com/github/fetch/issues" }, "_id": "whatwg-fetch@0.9.0", "_from": "whatwg-fetch@^0.9.0", "realName": "whatwg-fetch", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/whatwg-fetch", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs/node_modules/whatwg-fetch", "parent": "[Circular]", "depth": 5, "peerDependencies": {} } }, "devEngines": { "node": ">=3", "npm": "2.x" }, "browserify": { "transform": [ "loose-envify" ] }, "readme": "# FBJS\n\n## Purpose\n\nTo make it easier for Facebook to share and consume our own JavaScript. Primarily this will allow us to ship code without worrying too much about where it lives, keeping with the spirit of `@providesModule` but working in the broader JavaScript ecosystem.\n\n**Note:** If you are consuming the code here and you are not also a Facebook project, be prepared for a bad time. APIs may appear or disappear and we may not follow semver strictly, though we will do our best to. This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. In order for us to move fast and ship projects like React and Relay, we've made the decision to not support everybody. We probably won't take your feature requests unless they align with our needs. There will be overlap in functionality here and in other open source projects.\n\n## Usage\n\nAny `@providesModule` modules that are used by your project should be added to `src/`. They will be built and added to `module-map.json`. This file will contain a map from `@providesModule` name to what will be published as `fbjs`. The `module-map.json` file can then be consumed in your own project, along with the [rewrite-modules](https://github.com/facebook/fbjs/blob/master/scripts/babel/rewrite-modules.js) Babel plugin (which we'll publish with this), to rewrite requires in your own project. Then, just make sure `fbjs` is a dependency in your `package.json` and your package will consume the shared code.\n\n```js\n// Before transform\nvar emptyFunction = require('emptyFunction');\n// After transform\nvar emptyFunction = require('fbjs/lib/emptyFunction');\n```\n\nSee React for an example of this. *Coming soon!*\n\n## Building\n\nIt's as easy as just running gulp. This assumes you've also done `npm install -g gulp`.\n\n```sh\ngulp\n```\n\nAlternatively `npm run build` will also work.\n\n### Layout\n\nRight now these packages represent a subset of packages that we use internally at Facebook. Mostly these are support libraries used when shipping larger libraries, like React and Relay, or products. Each of these packages is in its own directory under `src/`.\n\n### Process\n\nSince we use `@providesModule`, we need to rewrite requires to be relative. Thanks to `@providesModule` requiring global uniqueness, we can do this easily. Eventually we'll try to make this part of the process go away by making more projects use CommmonJS.\n\n\n## TODO\n\n- Flow: Ideally we'd ship our original files with type annotations, however that's not doable right now. We have a couple options:\n - Make sure our transpilation step converts inline type annotations to the comment format.\n - Make our build process also build Flow interface files which we can ship to npm.\n- Split into multiple packages. This will be better for more concise versioning, otherwise we'll likely just be shipping lots of major versions.\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/facebook/fbjs/issues" }, "_id": "fbjs@0.6.1", "_from": "fbjs@^0.6.1", "realName": "fbjs", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react/node_modules/fbjs", "parent": "[Circular]", "depth": 4, "peerDependencies": {} } }, "browserify": { "transform": [ "envify" ] }, "readme": "# react\n\nAn npm package to get you immediate access to [React](https://facebook.github.io/react/),\nwithout also requiring the JSX transformer. This is especially useful for cases where you\nwant to [`browserify`](https://github.com/substack/node-browserify) your module using\n`React`.\n\n**Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages.\n\nTo use React in production mode, set the environment variable `NODE_ENV` to `production`. A minifier that performs dead-code elimination such as [UglifyJS](https://github.com/mishoo/UglifyJS2) is recommended to completely remove the extra code present in development mode.\n\n## Example Usage\n\n```js\nvar React = require('react');\n\n// Addons are in separate packages:\nvar createFragment = require('react-addons-create-fragment');\nvar immutabilityHelpers = require('react-addons-update');\nvar CSSTransitionGroup = require('react-addons-css-transition-group');\n```\n\nFor a complete list of addons visit the [addons documentation page](https://facebook.github.io/react/docs/addons.html).\n", "readmeFilename": "README.md", "_id": "react@0.14.7", "_from": "react@>=0.14.0", "realName": "react", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap/node_modules/react", "parent": "[Circular]", "depth": 3, "extraneous": false, "peerDependencies": {} } }, "release-script": { "skipBuildStep": "true", "bowerRepo": "git@github.com:react-bootstrap/react-bootstrap-bower.git", "docsRepo": "git@github.com:react-bootstrap/react-bootstrap.github.io.git" }, "readme": "# react-bootstrap\n\n[Bootstrap 3][bootstrap] components built with [React][react].\n\n[![Travis Build Status][build-badge]][build]\n[![Build status][appveyor-badge]][appveyor]\n\n[![HuBoard][huboard-badge]][huboard]\n[![Gitter][gitter-badge]][gitter]\n[![Thinkful][thinkful-badge]][thinkful]\n\n[![NPM version][npm-badge]][npm]\n[![Bower version][bower-badge]][bower]\n\n[![Dependency Status][deps-badge]][deps]\n[![devDependency Status][dev-deps-badge]][dev-deps]\n[![peerDependency Status][peer-deps-badge]][peer-deps]\n\n__Under active development - APIs will change.__ Check out the [1.0.0 Roadmap](https://github.com/react-bootstrap/react-bootstrap/wiki#100-roadmap) and [Contributing Guidelines][contributing] to see where you can help out. Prior to the 1.0.0 release, deprecations or breaking changes should result in a Minor version bump.\n\n## React v0.13 support\n\nReleases from v0.27.0 onward only support React v0.14. The latest releases compatible with React v0.13 are the v0.26.x releases.\n\n## Docs\n\nSee the [documentation][documentation] with live editable examples.\n\n## Related modules\n\n- [react-router-bootstrap][react-router-bootstrap] - Integration with [react-router][react-router].\n- [Complementary Tools][complementary-tools] - List of complementary tools that\n can be used with React.\n\n## Local Setup\n\n- Install the dependencies with `npm install`\n- Run tests `npm test`\n- Run tests in watch mode `npm run test-watch`\n- Run the docs site in development mode with `npm run docs`. This will watch\n for file changes as you work. Simply refresh the page to see the updates.\n- Build with `npm run build`\n\n## Contributions\n\nYes please! See the [contributing guidelines][contributing] for details.\n\n[bootstrap]: http://getbootstrap.com\n[react]: http://facebook.github.io/react/\n\n[documentation]: http://react-bootstrap.github.io\n[contributing]: https://github.com/react-bootstrap/react-bootstrap/blob/master/CONTRIBUTING.md\n\n[build-badge]: https://travis-ci.org/react-bootstrap/react-bootstrap.svg?branch=master\n[build]: https://travis-ci.org/react-bootstrap/react-bootstrap\n\n[npm-badge]: https://badge.fury.io/js/react-bootstrap.svg\n[npm]: http://badge.fury.io/js/react-bootstrap\n\n[bower-badge]: https://badge.fury.io/bo/react-bootstrap.svg\n[bower]: http://badge.fury.io/bo/react-bootstrap\n\n[gitter-badge]: https://badges.gitter.im/Join%20Chat.svg\n[gitter]: https://gitter.im/react-bootstrap/react-bootstrap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\n[deps-badge]: https://david-dm.org/react-bootstrap/react-bootstrap.svg\n[deps]: https://david-dm.org/react-bootstrap/react-bootstrap\n\n[dev-deps-badge]: https://david-dm.org/react-bootstrap/react-bootstrap/dev-status.svg\n[dev-deps]: https://david-dm.org/react-bootstrap/react-bootstrap#info=devDependencies\n\n[peer-deps-badge]: https://david-dm.org/react-bootstrap/react-bootstrap/peer-status.svg\n[peer-deps]: https://david-dm.org/react-bootstrap/react-bootstrap#info=peerDependencies\n\n[react-router-bootstrap]: https://github.com/react-bootstrap/react-router-bootstrap\n[react-router]: https://github.com/rackt/react-router\n\n[complementary-tools]: https://github.com/facebook/react/wiki/Complementary-Tools\n\n[huboard-badge]: https://img.shields.io/badge/Hu-Board-7965cc.svg\n[huboard]: https://huboard.com/react-bootstrap/react-bootstrap\n\n[thinkful-badge]: https://tf-assets-staging.s3.amazonaws.com/badges/thinkful_repo_badge.svg\n[thinkful]: http://start.thinkful.com/react/?utm_source=github&utm_medium=badge&utm_campaign=react-bootstrap\n\n[appveyor-badge]: https://ci.appveyor.com/api/projects/status/ylitpyo6n5yq1s6i/branch/master?svg=true\n[appveyor]: https://ci.appveyor.com/project/react-bootstrap/react-bootstrap/branch/master\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/react-bootstrap/react-bootstrap/issues" }, "_id": "react-bootstrap@0.27.1", "_from": "react-bootstrap@0.27.1", "realName": "react-bootstrap", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-bootstrap", "parent": "[Circular]", "depth": 2 }, "pui-css-alerts": { "name": "pui-css-alerts", "style": "alerts.css", "version": "3.0.0-alpha.2", "description": "alerts css component for Pivotal UI based on Bootstrap", "repository": { "type": "git", "url": "https://github.com/pivotal-cf/pivotal-ui.git" }, "keywords": [ "bootstrap", "pivotal ui", "pivotal ui modularized", "css" ], "author": { "name": "Pivotal Software, Inc" }, "license": "MIT", "bugs": { "url": "https://github.com/pivotal-cf/pivotal-ui/issues" }, "homepage": "http://styleguide.pivotal.io/", "dependencies": { "pui-css-bootstrap": { "name": "pui-css-bootstrap", "style": "bootstrap.css", "version": "3.0.0-alpha.2", "description": "Custom build of Bootstrap for Pivotal UI", "repository": { "type": "git", "url": "https://github.com/pivotal-cf/pivotal-ui.git" }, "keywords": [ "bootstrap", "pivotal ui", "pivotal ui modularized", "css" ], "author": { "name": "Pivotal Software, Inc" }, "license": "MIT", "bugs": { "url": "https://github.com/pivotal-cf/pivotal-ui/issues" }, "homepage": "http://styleguide.pivotal.io/", "peerDependencies": { "bootstrap": "3.3.5" }, "readme": "# pui-css-bootstrap\n\nCustom build of Bootstrap for Pivotal UI\n\n\n\n## Installation\n\nTo install the package, from the command line, type:\n\n```\nnpm install pui-css-bootstrap\n```\n\n\n*****************************************\n\nThis is a component of Pivotal UI. It is a Pivotal specific implementation of Bootstrap.\n\n[Styleguide](http://styleguide.pivotal.io)\n[Github](https://github.com/pivotal-cf/pivotal-ui)\n\n(c) Copyright 2015 Pivotal Software, Inc. All Rights Reserved.", "readmeFilename": "README.md", "_id": "pui-css-bootstrap@3.0.0-alpha.2", "_from": "pui-css-bootstrap@3.0.0-alpha.2", "realName": "pui-css-bootstrap", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-alerts/node_modules/pui-css-bootstrap", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-alerts/node_modules/pui-css-bootstrap", "parent": "[Circular]", "depth": 3, "extraneous": false }, "pui-css-typography": { "name": "pui-css-typography", "style": "typography.css", "version": "3.0.0-alpha.2", "description": "typography css component for Pivotal UI based on Bootstrap", "repository": { "type": "git", "url": "https://github.com/pivotal-cf/pivotal-ui.git" }, "keywords": [ "bootstrap", "pivotal ui", "pivotal ui modularized", "css" ], "author": { "name": "Pivotal Software, Inc" }, "license": "MIT", "bugs": { "url": "https://github.com/pivotal-cf/pivotal-ui/issues" }, "homepage": "http://styleguide.pivotal.io/", "dependencies": { "pui-css-bootstrap": { "dependencies": {} } }, "readme": "# pui-css-typography\n\nA CSS typography component that can be installed via this npm package. The package provides all of the\nCSS you need to use the component.\n\n\n\n## Installation\n\nTo install the package, from the command line, type:\n\n```\nnpm install pui-css-typography\n```\n\n## Usage\n\n```html\n

h1.title 42px

\n

h2 25px

\n

small text 14px

\n```\n\nYou can find more examples of the typography component in the [pui style guide](http://styleguide.pivotal.io/)\n\n*****************************************\n\nThis is a component of Pivotal UI. It is a Pivotal specific implementation of Bootstrap.\n\n[Styleguide](http://styleguide.pivotal.io)\n[Github](https://github.com/pivotal-cf/pivotal-ui)\n\n(c) Copyright 2015 Pivotal Software, Inc. All Rights Reserved.", "readmeFilename": "README.md", "_id": "pui-css-typography@3.0.0-alpha.2", "_from": "pui-css-typography@3.0.0-alpha.2", "realName": "pui-css-typography", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-alerts/node_modules/pui-css-typography", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-alerts/node_modules/pui-css-typography", "parent": "[Circular]", "depth": 3, "peerDependencies": {} }, "bootstrap": { "name": "bootstrap", "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", "version": "3.3.5", "keywords": [ "css", "less", "mobile-first", "responsive", "front-end", "framework", "web" ], "homepage": "http://getbootstrap.com", "author": { "name": "Twitter, Inc." }, "scripts": { "test": "grunt test" }, "style": "dist/css/bootstrap.css", "less": "less/bootstrap.less", "main": "./dist/js/npm", "repository": { "type": "git", "url": "https://github.com/twbs/bootstrap.git" }, "bugs": { "url": "https://github.com/twbs/bootstrap/issues" }, "license": "MIT", "devDependencies": { "btoa": "~1.1.2", "glob": "~5.0.5", "grunt": "~0.4.5", "grunt-autoprefixer": "~3.0.0", "grunt-contrib-clean": "~0.6.0", "grunt-contrib-compress": "~0.13.0", "grunt-contrib-concat": "~0.5.1", "grunt-contrib-connect": "~0.10.1", "grunt-contrib-copy": "~0.8.0", "grunt-contrib-csslint": "~0.4.0", "grunt-contrib-cssmin": "~0.12.3", "grunt-contrib-htmlmin": "~0.4.0", "grunt-contrib-jade": "~0.14.1", "grunt-contrib-jshint": "~0.11.2", "grunt-contrib-less": "~1.0.1", "grunt-contrib-qunit": "~0.7.0", "grunt-contrib-uglify": "~0.9.1", "grunt-contrib-watch": "~0.6.1", "grunt-csscomb": "~3.0.0", "grunt-exec": "~0.4.6", "grunt-html": "~4.0.3", "grunt-jekyll": "~0.4.2", "grunt-jscs": "~1.8.0", "grunt-saucelabs": "~8.6.1", "grunt-sed": "twbs/grunt-sed#v0.2.0", "load-grunt-tasks": "~3.2.0", "markdown-it": "^4.2.1", "npm-shrinkwrap": "^200.4.0", "time-grunt": "^1.2.0" }, "engines": { "node": ">=0.10.1" }, "files": [ "dist", "fonts", "grunt", "js/*.js", "less/**/*.less", "Gruntfile.js", "LICENSE" ], "jspm": { "main": "js/bootstrap", "shim": { "js/bootstrap": { "deps": "jquery", "exports": "$" } }, "files": [ "css", "fonts", "js" ] }, "readme": "# [Bootstrap](http://getbootstrap.com)\n[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com)\n![Bower version](https://img.shields.io/bower/v/bootstrap.svg)\n[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)\n[![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg)](https://travis-ci.org/twbs/bootstrap)\n[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap#info=devDependencies)\n[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)\n\nBootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thornton](https://twitter.com/fat), and maintained by the [core team](https://github.com/orgs/twbs/people) with the massive support and involvement of the community.\n\nTo get started, check out !\n\n## Table of contents\n\n- [Quick start](#quick-start)\n- [Bugs and feature requests](#bugs-and-feature-requests)\n- [Documentation](#documentation)\n- [Contributing](#contributing)\n- [Community](#community)\n- [Versioning](#versioning)\n- [Creators](#creators)\n- [Copyright and license](#copyright-and-license)\n\n## Quick start\n\nSeveral quick start options are available:\n\n- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.3.5.zip).\n- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.\n- Install with [Bower](http://bower.io): `bower install bootstrap`.\n- Install with [npm](https://www.npmjs.com): `npm install bootstrap`.\n- Install with [Meteor](https://www.meteor.com): `meteor add twbs:bootstrap`.\n- Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap`.\n\nRead the [Getting started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.\n\n### What's included\n\nWithin the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:\n\n```\nbootstrap/\n├── css/\n│ ├── bootstrap.css\n│ ├── bootstrap.css.map\n│ ├── bootstrap.min.css\n│ ├── bootstrap-theme.css\n│ ├── bootstrap-theme.css.map\n│ └── bootstrap-theme.min.css\n├── js/\n│ ├── bootstrap.js\n│ └── bootstrap.min.js\n└── fonts/\n ├── glyphicons-halflings-regular.eot\n ├── glyphicons-halflings-regular.svg\n ├── glyphicons-halflings-regular.ttf\n ├── glyphicons-halflings-regular.woff\n └── glyphicons-halflings-regular.woff2\n```\n\nWe provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developer.chrome.com/devtools/docs/css-preprocessors) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Fonts from Glyphicons are included, as is the optional Bootstrap theme.\n\n\n\n## Bugs and feature requests\n\nHave a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).\n\n\n## Documentation\n\nBootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at . The docs may also be run locally.\n\n### Running documentation locally\n\n1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v2.5.x).\n - **Windows users:** Read [this unofficial guide](http://jekyll-windows.juthilo.com/) to get Jekyll up and running without problems.\n2. Install the Ruby-based syntax highlighter, [Rouge](https://github.com/jneen/rouge), with `gem install rouge`.\n3. From the root `/bootstrap` directory, run `jekyll serve` in the command line.\n4. Open in your browser, and voilà.\n\nLearn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).\n\n### Documentation for previous releases\n\nDocumentation for v2.3.2 has been made available for the time being at while folks transition to Bootstrap 3.\n\n[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.\n\n\n\n## Contributing\n\nPlease read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.\n\nMoreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/master/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).\n\nEditor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at .\n\n\n\n## Community\n\nGet updates on Bootstrap's development and chat with the project maintainers and community members.\n\n- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).\n- Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).\n- Join [the official Slack room](https://bootstrap-slack.herokuapp.com).\n- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.\n- Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](https://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).\n- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.\n\n\n\n## Versioning\n\nFor transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](http://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible.\n\n\n\n## Creators\n\n**Mark Otto**\n\n- \n- \n\n**Jacob Thornton**\n\n- \n- \n\n\n\n## Copyright and license\n\nCode and documentation copyright 2011-2015 Twitter, Inc. Code released under [the MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE).\n", "readmeFilename": "README.md", "_id": "bootstrap@3.3.5", "_from": "bootstrap@3.3.5", "realName": "bootstrap", "dependencies": {}, "extraneous": false, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-alerts/node_modules/bootstrap", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-alerts/node_modules/bootstrap", "parent": "[Circular]", "depth": 3, "peerDependencies": {} } }, "readme": "# pui-css-alerts\n\nA CSS alerts component that can be installed via this npm package. The package provides all of the\nCSS you need to use the component.\n\n\n\n## Installation\n\nTo install the package, from the command line, type:\n\n```\nnpm install pui-css-alerts\n```\n\n## Usage\n\n```html\n
\n

Success

\n
\n```\n\n\nYou can find more examples of the alerts component in the [pui style guide](http://styleguide.pivotal.io/)\n\n*****************************************\n\nThis is a component of Pivotal UI. It is a Pivotal specific implementation of Bootstrap.\n\n[Styleguide](http://styleguide.pivotal.io)\n[Github](https://github.com/pivotal-cf/pivotal-ui)\n\n(c) Copyright 2015 Pivotal Software, Inc. All Rights Reserved.", "readmeFilename": "README.md", "_id": "pui-css-alerts@3.0.0-alpha.2", "_from": "pui-css-alerts@3.0.0-alpha.2", "realName": "pui-css-alerts", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-alerts", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-alerts", "parent": "[Circular]", "depth": 2, "peerDependencies": {} }, "pui-css-iconography": { "name": "pui-css-iconography", "style": "iconography.css", "version": "3.0.0-alpha.2", "description": "iconography css component for Pivotal UI based on Bootstrap", "repository": { "type": "git", "url": "https://github.com/pivotal-cf/pivotal-ui.git" }, "keywords": [ "bootstrap", "pivotal ui", "pivotal ui modularized", "css" ], "author": { "name": "Pivotal Software, Inc" }, "license": "MIT", "bugs": { "url": "https://github.com/pivotal-cf/pivotal-ui/issues" }, "homepage": "http://styleguide.pivotal.io/", "dependencies": { "font-awesome": { "name": "font-awesome", "description": "The iconic font and CSS framework", "version": "4.5.0", "style": "css/font-awesome.css", "keywords": [ "font", "awesome", "fontawesome", "icon", "font", "bootstrap" ], "homepage": "http://fontawesome.io/", "bugs": { "url": "http://github.com/FortAwesome/Font-Awesome/issues" }, "author": { "name": "Dave Gandy", "email": "dave@fontawesome.io", "url": "http://twitter.com/davegandy" }, "repository": { "type": "git", "url": "https://github.com/FortAwesome/Font-Awesome.git" }, "contributors": [ { "name": "Rob Madole", "url": "http://twitter.com/robmadole" }, { "name": "Geremia Taglialatela", "url": "http://twitter.com/gtagliala" }, { "name": "Travis Chase", "url": "http://twitter.com/supercodepoet" } ], "license": "(OFL-1.1 AND MIT)", "dependencies": {}, "engines": { "node": ">=0.10.3" }, "readme": "#[Font Awesome v4.5.0](http://fontawesome.io)\n###The iconic font and CSS framework\n\nFont Awesome is a full suite of 605 pictographic icons for easy scalable vector graphics on websites,\ncreated and maintained by [Dave Gandy](http://twitter.com/davegandy).\nStay up to date with the latest release and announcements on Twitter:\n[@fontawesome](http://twitter.com/fontawesome).\n\nGet started at http://fontawesome.io!\n\n##License\n- The Font Awesome font is licensed under the SIL OFL 1.1:\n - http://scripts.sil.org/OFL\n- Font Awesome CSS, LESS, and Sass files are licensed under the MIT License:\n - http://opensource.org/licenses/mit-license.html\n- The Font Awesome documentation is licensed under the CC BY 3.0 License:\n - http://creativecommons.org/licenses/by/3.0/\n- Attribution is no longer required as of Font Awesome 3.0, but much appreciated:\n - `Font Awesome by Dave Gandy - http://fontawesome.io`\n- Full details: http://fontawesome.io/license\n\n##Changelog\n- [v4.5.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?q=milestone%3A4.5.0+is%3Aclosed)\n- [v4.4.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?q=milestone%3A4.4.0+is%3Aclosed)\n- [v4.3.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?q=milestone%3A4.3.0+is%3Aclosed)\n- [v4.2.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=12&page=1&state=closed)\n- [v4.1.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=6&page=1&state=closed)\n- [v4.0.3 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=9&page=1&state=closed)\n- [v4.0.2 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=8&page=1&state=closed)\n- [v4.0.1 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=7&page=1&state=closed)\n- [v4.0.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=2&page=1&state=closed)\n- [v3.2.1 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=5&page=1&state=closed)\n- [v3.2.0 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=3&page=1&state=closed)\n- [v3.1.1 GitHub milestones](https://github.com/FortAwesome/Font-Awesome/issues?milestone=4&page=1&state=closed)\n- v3.1.0 - Added 54 icons, icon stacking styles, flipping and rotating icons, removed Sass support\n- v3.0.2 - much improved rendering and alignment in IE7\n- v3.0.1 - much improved rendering in webkit, various bug fixes\n- v3.0.0 - all icons redesigned from scratch, optimized for Bootstrap's 14px default\n\n## Contributing\n\nPlease read through our [contributing guidelines](https://github.com/FortAwesome/Font-Awesome/blob/master/CONTRIBUTING.md).\nIncluded are directions for opening issues, coding standards, and notes on development.\n\n##Versioning\n\nFont Awesome will be maintained under the Semantic Versioning guidelines as much as possible. Releases will be numbered\nwith the following format:\n\n`..`\n\nAnd constructed with the following guidelines:\n\n* Breaking backward compatibility bumps the major (and resets the minor and patch)\n* New additions, including new icons, without breaking backward compatibility bumps the minor (and resets the patch)\n* Bug fixes and misc changes bumps the patch\n\nFor more information on SemVer, please visit http://semver.org.\n\n##Author\n- Email: dave@fontawesome.io\n- Twitter: http://twitter.com/davegandy\n- GitHub: https://github.com/davegandy\n\n##Component\nTo include as a [component](http://github.com/component/component), just run\n\n $ component install FortAwesome/Font-Awesome\n\nOr add\n\n \"FortAwesome/Font-Awesome\": \"*\"\n\nto the `dependencies` in your `component.json`.\n\n## Hacking on Font Awesome\n\n**Before you can build the project**, you must first have the following installed:\n\n- [Ruby](https://www.ruby-lang.org/en/)\n- Ruby Development Headers\n - **Ubuntu:** `sudo apt-get install ruby-dev` *(Only if you're __NOT__ using `rbenv` or `rvm`)*\n - **Windows:** [DevKit](http://rubyinstaller.org/)\n- [Bundler](http://bundler.io/) (Run `gem install bundler` to install).\n- [Node Package Manager (AKA NPM)](https://docs.npmjs.com/getting-started/installing-node)\n- [Less](http://lesscss.org/) (Run `npm install -g less` to install).\n- [Less Plugin: Clean CSS](https://github.com/less/less-plugin-clean-css) (Run `npm install -g less-plugin-clean-css` to install).\n\nFrom the root of the repository, install the tools used to develop.\n\n $ bundle install\n $ npm install\n\nBuild the project and documentation:\n\n $ bundle exec jekyll build\n\nOr serve it on a local server on http://localhost:7998/Font-Awesome/:\n\n $ bundle exec jekyll -w serve\n", "readmeFilename": "README.md", "_id": "font-awesome@4.5.0", "_from": "font-awesome@^4.4.0", "realName": "font-awesome", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-iconography/node_modules/font-awesome", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-iconography/node_modules/font-awesome", "parent": "[Circular]", "depth": 3, "peerDependencies": {} } }, "readme": "# pui-css-iconography\n\nA CSS iconography component that can be installed via this npm package. The package provides all of the\nCSS you need to use the component.\n\n\n\n## Installation\n\nTo install the package, from the command line, type:\n\n```\nnpm install pui-css-iconography\n```\n\n## Usage\n\nNote that this requires the Font Awesome font to be loaded.\n\n```html\n\n```\n\n\nYou can find more examples of the iconography component in the [pui style guide](http://styleguide.pivotal.io/)\n\n*****************************************\n\nThis is a component of Pivotal UI. It is a Pivotal specific implementation of Bootstrap.\n\n[Styleguide](http://styleguide.pivotal.io)\n[Github](https://github.com/pivotal-cf/pivotal-ui)\n\n(c) Copyright 2015 Pivotal Software, Inc. All Rights Reserved.", "readmeFilename": "README.md", "_id": "pui-css-iconography@3.0.0-alpha.2", "_from": "pui-css-iconography@3.0.0-alpha.2", "realName": "pui-css-iconography", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-iconography", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/pui-css-iconography", "parent": "[Circular]", "depth": 2, "peerDependencies": {} }, "pui-react-media": { "dependencies": {} }, "react-dom": { "name": "react-dom", "version": "0.14.7", "description": "React package for working with the DOM.", "main": "index.js", "repository": { "type": "git", "url": "git://github.com/facebook/react" }, "keywords": [ "react" ], "license": "BSD-3-Clause", "bugs": { "url": "https://github.com/facebook/react/issues" }, "homepage": "https://facebook.github.io/react/", "dependencies": {}, "peerDependencies": { "react": "^0.14.7" }, "scripts": { "start": "node server.js" }, "readme": "# `react-dom`\n\nThis package serves as the entry point of the DOM-related rendering paths. It is intended to be paired with the isomorphic React, which will be shipped as `react` to npm.\n\n## Installation\n\n```sh\nnpm install react react-dom\n```\n\n## Usage\n\n### In the browser\n\n```js\nvar React = require('react');\nvar ReactDOM = require('react-dom');\n\nclass MyComponent extends React.Component {\n render() {\n return
Hello World
;\n }\n}\n\nReactDOM.render(, node);\n```\n\n### On the server\n\n```js\nvar React = require('react');\nvar ReactDOMServer = require('react-dom/server');\n\nclass MyComponent extends React.Component {\n render() {\n return
Hello World
;\n }\n}\n\nReactDOMServer.renderToString();\n```\n\n## API\n\n### `react-dom`\n\n- `findDOMNode`\n- `render`\n- `unmountComponentAtNode`\n\n### `react-dom/server`\n\n- `renderToString`\n- `renderToStaticMarkup`\n", "readmeFilename": "README.md", "_id": "react-dom@0.14.7", "_from": "react-dom@>=0.14.0", "realName": "react-dom", "extraneous": false, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-dom", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react-dom", "parent": "[Circular]", "depth": 2 }, "react": { "name": "react", "description": "React is a JavaScript library for building user interfaces.", "version": "0.14.7", "keywords": [ "react" ], "homepage": "https://facebook.github.io/react/", "bugs": { "url": "https://github.com/facebook/react/issues" }, "license": "BSD-3-Clause", "files": [ "LICENSE", "PATENTS", "addons.js", "react.js", "addons/", "dist/", "lib/" ], "main": "react.js", "repository": { "type": "git", "url": "git://github.com/facebook/react" }, "engines": { "node": ">=0.10.0" }, "dependencies": { "envify": { "name": "envify", "version": "3.4.0", "description": "Selectively replace Node-style environment variables with plain strings.", "main": "index.js", "scripts": { "test": "node test.js | tap-spec" }, "bin": { "envify": "bin/envify" }, "repository": { "type": "git", "url": "git://github.com/hughsk/envify.git" }, "author": { "name": "Hugh Kennedy", "email": "hughskennedy@gmail.com", "url": "http://hughskennedy.com/" }, "license": "MIT", "devDependencies": { "tap-spec": "^1.0.1", "tape": "~2.3.2" }, "dependencies": { "through": { "name": "through", "version": "2.3.8", "description": "simplified stream construction", "main": "index.js", "scripts": { "test": "set -e; for t in test/*.js; do node $t; done" }, "devDependencies": { "stream-spec": "~0.3.5", "tape": "~2.3.2", "from": "~0.1.3" }, "keywords": [ "stream", "streams", "user-streams", "pipe" ], "author": { "name": "Dominic Tarr", "email": "dominic.tarr@gmail.com", "url": "dominictarr.com" }, "license": "MIT", "repository": { "type": "git", "url": "https://github.com/dominictarr/through.git" }, "homepage": "https://github.com/dominictarr/through", "testling": { "browsers": [ "ie/8..latest", "ff/15..latest", "chrome/20..latest", "safari/5.1..latest" ], "files": "test/*.js" }, "readme": "#through\n\n[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through)\n[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through)\n\nEasy way to create a `Stream` that is both `readable` and `writable`. \n\n* Pass in optional `write` and `end` methods.\n* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`.\n* Use `this.pause()` and `this.resume()` to manage flow.\n* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`).\n\nThis function is the basis for most of the synchronous streams in \n[event-stream](http://github.com/dominictarr/event-stream).\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.queue(data) //data *must* not be null\n },\n function end () { //optional\n this.queue(null)\n })\n```\n\nOr, can also be used _without_ buffering on pause, use `this.emit('data', data)`,\nand this.emit('end')\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.emit('data', data)\n //this.pause() \n },\n function end () { //optional\n this.emit('end')\n })\n```\n\n## Extended Options\n\nYou will probably not need these 99% of the time.\n\n### autoDestroy=false\n\nBy default, `through` emits close when the writable\nand readable side of the stream has ended.\nIf that is not desired, set `autoDestroy=false`.\n\n``` js\nvar through = require('through')\n\n//like this\nvar ts = through(write, end, {autoDestroy: false})\n//or like this\nvar ts = through(write, end)\nts.autoDestroy = false\n```\n\n## License\n\nMIT / Apache2\n", "readmeFilename": "readme.markdown", "bugs": { "url": "https://github.com/dominictarr/through/issues" }, "_id": "through@2.3.8", "_from": "through@~2.3.4", "realName": "through", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/through", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/through", "parent": "[Circular]", "depth": 4, "peerDependencies": {} }, "jstransform": { "name": "jstransform", "version": "10.1.0", "description": "A simple AST visitor-based JS transformer", "contributors": [ { "name": "Jeff Morrison", "email": "jeffmo@fb.com" } ], "main": "src/jstransform", "repository": { "type": "git", "url": "git@github.com:facebook/jstransform.git" }, "keywords": [ "transformer", "compiler", "syntax", "visitor" ], "dependencies": { "base62": { "author": { "name": "Andrew Nesbitt", "email": "andrewnez@gmail.com", "url": "http://andrew-nesbitt.com/" }, "name": "base62", "description": "Javascript Base62 encode/decoder", "keywords": [ "base-62" ], "version": "0.1.1", "repository": { "type": "git", "url": "git://github.com/andrew/base62.js.git" }, "main": "base62.js", "engines": { "node": "*" }, "scripts": { "test": "mocha test" }, "devDependencies": { "mocha": "1.7.x" }, "readme": "# Base62.js \n[![build status](https://secure.travis-ci.org/andrew/base62.js.png)](http://travis-ci.org/andrew/base62.js)\n\nA javascript Base62 encode/decoder for node.js\n\n## Install\n\n npm install base62\n\n## Usage\n\n Base62 = require('base62')\n Base62.encode(999) // 'g7'\n Base62.decode('g7') // 999\n\n## Development\n\nSource hosted at [GitHub](http://github.com/andrew/base62.js).\nReport Issues/Feature requests on [GitHub Issues](http://github.com/andrew/split/base62.js).\n\n### Note on Patches/Pull Requests\n\n * Fork the project.\n * Make your feature addition or bug fix.\n * Add tests for it. This is important so I don't break it in a future version unintentionally.\n * Send me a pull request. Bonus points for topic branches.\n\n## Copyright\n\nCopyright (c) 2012 Andrew Nesbitt. See [LICENSE](https://github.com/andrew/base62.js/blob/master/LICENSE) for details.\n", "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/andrew/base62.js/issues" }, "_id": "base62@0.1.1", "_from": "base62@0.1.1", "realName": "base62", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/base62", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/base62", "parent": "[Circular]", "depth": 5, "peerDependencies": {} }, "esprima-fb": { "name": "esprima-fb", "description": "Facebook-specific fork of the esprima project", "homepage": "https://github.com/facebook/esprima/tree/fb-harmony", "main": "esprima.js", "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" }, "version": "13001.1001.0-dev-harmony-fb", "files": [ "bin", "test/run.js", "test/runner.js", "test/test.js", "test/compat.js", "test/reflect.js", "esprima.js" ], "engines": { "node": ">=0.4.0" }, "author": { "name": "Ariya Hidayat", "email": "ariya.hidayat@gmail.com" }, "maintainers": [ { "name": "Jeff Morrison", "email": "jeffmo@fb.com", "url": "https://www.facebook.com/lbljeffmo" } ], "repository": { "type": "git", "url": "http://github.com/facebook/esprima.git" }, "bugs": { "url": "http://issues.esprima.org" }, "licenses": [ { "type": "BSD", "url": "http://github.com/facebook/esprima/raw/master/LICENSE.BSD" } ], "devDependencies": { "eslint": "~0.12.0", "jscs": "~1.10.0", "istanbul": "~0.2.6", "escomplex-js": "1.0.0", "complexity-report": "~1.1.1", "regenerate": "~0.5.4", "unicode-6.3.0": "~0.1.0", "json-diff": "~0.3.1", "commander": "~2.5.0" }, "scripts": { "generate-regex": "node tools/generate-identifier-regex.js", "test": "node test/run.js && npm run lint && npm run coverage", "lint": "npm run check-version && npm run eslint && npm run jscs && npm run complexity", "check-version": "node tools/check-version.js", "jscs": "jscs esprima.js test/*test.js", "eslint": "node node_modules/eslint/bin/eslint.js esprima.js", "complexity": "node tools/list-complexity.js && cr -s -l -w --maxcyc 18 esprima.js", "coverage": "npm run analyze-coverage && npm run check-coverage", "analyze-coverage": "node node_modules/istanbul/lib/cli.js cover test/runner.js", "check-coverage": "node node_modules/istanbul/lib/cli.js check-coverage --statement 100 --branch 100 --function 100", "benchmark": "node test/benchmarks.js", "benchmark-quick": "node test/benchmarks.js quick" }, "readme": "**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance,\nstandard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)\nparser written in ECMAScript (also popularly known as\n[JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript)).\nEsprima is created and maintained by [Ariya Hidayat](http://twitter.com/ariyahidayat),\nwith the help of [many contributors](https://github.com/ariya/esprima/contributors).\n\n**Esprima-FB** is a fork of the [Harmony branch](https://github.com/ariya/esprima/tree/harmony) of Esprima that implements [JSX specification](https://github.com/facebook/jsx) on top of ECMAScript syntax.\n\n### Features\n\n- Full support for ECMAScript 5.1 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm))\n- Experimental support for ES6/Harmony (module, class, destructuring, ...)\n- Full support for [JSX syntax extensions](https://github.com/facebook/jsx).\n- Sensible [syntax tree format](https://github.com/facebook/jsx/blob/master/AST.md) compatible with Mozilla\n[Parser AST](https://developer.mozilla.org/en/SpiderMonkey/Parser_API)\n- Optional tracking of syntax node location (index-based and line-column)\n- Heavily tested (> 650 [unit tests](http://esprima.org/test/) with [full code coverage](http://esprima.org/test/coverage.html))\n- Ongoing support for ES6/Harmony (module, class, destructuring, ...)\n\n### Versioning rules\n\nIn order to follow semver rules and keep reference to original Esprima versions at the same time, we left 3 digits of each version part to refer to upstream harmony branch. We then take the most significant digit.\n\n**Example:** 4001.3001.0000-dev-harmony-fb aligns with 1.1.0-dev-harmony (aka 001.001.000-dev-harmony) in upstream, with our own changes on top.\n\nEsprima-FB serves as a **building block** for JSX language tools and transpiler implementations (such as [React](https://github.com/facebook/react) or [JSXDOM](https://github.com/vjeux/jsxdom)).\n\nEsprima-FB runs on many popular web browsers, as well as other ECMAScript platforms such as\n[Rhino](http://www.mozilla.org/rhino) and [Node.js](https://npmjs.org/package/esprima).\n\nFor more information on original Esprima, check the web site [esprima.org](http://esprima.org).\n", "readmeFilename": "README.md", "_id": "esprima-fb@13001.1001.0-dev-harmony-fb", "_from": "esprima-fb@13001.1001.0-dev-harmony-fb", "realName": "esprima-fb", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/esprima-fb", "parent": "[Circular]", "depth": 5, "peerDependencies": {} }, "source-map": { "name": "source-map", "description": "Generates and consumes source maps", "version": "0.1.31", "homepage": "https://github.com/mozilla/source-map", "author": { "name": "Nick Fitzgerald", "email": "nfitzgerald@mozilla.com" }, "contributors": [ { "name": "Tobias Koppers", "email": "tobias.koppers@googlemail.com" }, { "name": "Duncan Beevers", "email": "duncan@dweebd.com" }, { "name": "Stephen Crane", "email": "scrane@mozilla.com" }, { "name": "Ryan Seddon", "email": "seddon.ryan@gmail.com" }, { "name": "Miles Elam", "email": "miles.elam@deem.com" }, { "name": "Mihai Bazon", "email": "mihai.bazon@gmail.com" }, { "name": "Michael Ficarra", "email": "github.public.email@michael.ficarra.me" }, { "name": "Todd Wolfson", "email": "todd@twolfson.com" }, { "name": "Alexander Solovyov", "email": "alexander@solovyov.net" }, { "name": "Felix Gnass", "email": "fgnass@gmail.com" }, { "name": "Conrad Irwin", "email": "conrad.irwin@gmail.com" }, { "name": "usrbincc", "email": "usrbincc@yahoo.com" }, { "name": "David Glasser", "email": "glasser@davidglasser.net" }, { "name": "Chase Douglas", "email": "chase@newrelic.com" }, { "name": "Evan Wallace", "email": "evan.exe@gmail.com" }, { "name": "Heather Arthur", "email": "fayearthur@gmail.com" } ], "repository": { "type": "git", "url": "http://github.com/mozilla/source-map.git" }, "directories": { "lib": "./lib" }, "main": "./lib/source-map.js", "engines": { "node": ">=0.8.0" }, "licenses": [ { "type": "BSD", "url": "http://opensource.org/licenses/BSD-3-Clause" } ], "dependencies": { "amdefine": { "name": "amdefine", "description": "Provide AMD's define() API for declaring modules in the AMD format", "version": "1.0.0", "homepage": "http://github.com/jrburke/amdefine", "author": { "name": "James Burke", "email": "jrburke@gmail.com", "url": "http://github.com/jrburke" }, "license": "BSD-3-Clause AND MIT", "repository": { "type": "git", "url": "https://github.com/jrburke/amdefine.git" }, "main": "./amdefine.js", "engines": { "node": ">=0.4.2" }, "readme": "# amdefine\n\nA module that can be used to implement AMD's define() in Node. This allows you\nto code to the AMD API and have the module work in node programs without\nrequiring those other programs to use AMD.\n\n## Usage\n\n**1)** Update your package.json to indicate amdefine as a dependency:\n\n```javascript\n \"dependencies\": {\n \"amdefine\": \">=0.1.0\"\n }\n```\n\nThen run `npm install` to get amdefine into your project.\n\n**2)** At the top of each module that uses define(), place this code:\n\n```javascript\nif (typeof define !== 'function') { var define = require('amdefine')(module) }\n```\n\n**Only use these snippets** when loading amdefine. If you preserve the basic structure,\nwith the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer).\n\nYou can add spaces, line breaks and even require amdefine with a local path, but\nkeep the rest of the structure to get the stripping behavior.\n\nAs you may know, because `if` statements in JavaScript don't have their own scope, the var\ndeclaration in the above snippet is made whether the `if` expression is truthy or not. If\nRequireJS is loaded then the declaration is superfluous because `define` is already already\ndeclared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var`\ndeclarations of the same variable in the same scope gracefully.\n\nIf you want to deliver amdefine.js with your code rather than specifying it as a dependency\nwith npm, then just download the latest release and refer to it using a relative path:\n\n[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js)\n\n### amdefine/intercept\n\nConsider this very experimental.\n\nInstead of pasting the piece of text for the amdefine setup of a `define`\nvariable in each module you create or consume, you can use `amdefine/intercept`\ninstead. It will automatically insert the above snippet in each .js file loaded\nby Node.\n\n**Warning**: you should only use this if you are creating an application that\nis consuming AMD style defined()'d modules that are distributed via npm and want\nto run that code in Node.\n\nFor library code where you are not sure if it will be used by others in Node or\nin the browser, then explicitly depending on amdefine and placing the code\nsnippet above is suggested path, instead of using `amdefine/intercept`. The\nintercept module affects all .js files loaded in the Node app, and it is\ninconsiderate to modify global state like that unless you are also controlling\nthe top level app.\n\n#### Why distribute AMD-style modules via npm?\n\nnpm has a lot of weaknesses for front-end use (installed layout is not great,\nshould have better support for the `baseUrl + moduleID + '.js' style of loading,\nsingle file JS installs), but some people want a JS package manager and are\nwilling to live with those constraints. If that is you, but still want to author\nin AMD style modules to get dynamic require([]), better direct source usage and\npowerful loader plugin support in the browser, then this tool can help.\n\n#### amdefine/intercept usage\n\nJust require it in your top level app module (for example index.js, server.js):\n\n```javascript\nrequire('amdefine/intercept');\n```\n\nThe module does not return a value, so no need to assign the result to a local\nvariable.\n\nThen just require() code as you normally would with Node's require(). Any .js\nloaded after the intercept require will have the amdefine check injected in\nthe .js source as it is loaded. It does not modify the source on disk, just\nprepends some content to the text of the module as it is loaded by Node.\n\n#### How amdefine/intercept works\n\nIt overrides the `Module._extensions['.js']` in Node to automatically prepend\nthe amdefine snippet above. So, it will affect any .js file loaded by your\napp.\n\n## define() usage\n\nIt is best if you use the anonymous forms of define() in your module:\n\n```javascript\ndefine(function (require) {\n var dependency = require('dependency');\n});\n```\n\nor\n\n```javascript\ndefine(['dependency'], function (dependency) {\n\n});\n```\n\n## RequireJS optimizer integration.
\n\nVersion 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html)\nwill have support for stripping the `if (typeof define !== 'function')` check\nmentioned above, so you can include this snippet for code that runs in the\nbrowser, but avoid taking the cost of the if() statement once the code is\noptimized for deployment.\n\n## Node 0.4 Support\n\nIf you want to support Node 0.4, then add `require` as the second parameter to amdefine:\n\n```javascript\n//Only if you want Node 0.4. If using 0.5 or later, use the above snippet.\nif (typeof define !== 'function') { var define = require('amdefine')(module, require) }\n```\n\n## Limitations\n\n### Synchronous vs Asynchronous\n\namdefine creates a define() function that is callable by your code. It will\nexecute and trace dependencies and call the factory function *synchronously*,\nto keep the behavior in line with Node's synchronous dependency tracing.\n\nThe exception: calling AMD's callback-style require() from inside a factory\nfunction. The require callback is called on process.nextTick():\n\n```javascript\ndefine(function (require) {\n require(['a'], function(a) {\n //'a' is loaded synchronously, but\n //this callback is called on process.nextTick().\n });\n});\n```\n\n### Loader Plugins\n\nLoader plugins are supported as long as they call their load() callbacks\nsynchronously. So ones that do network requests will not work. However plugins\nlike [text](http://requirejs.org/docs/api.html#text) can load text files locally.\n\nThe plugin API's `load.fromText()` is **not supported** in amdefine, so this means\ntranspiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs)\nwill not work. This may be fixable, but it is a bit complex, and I do not have\nenough node-fu to figure it out yet. See the source for amdefine.js if you want\nto get an idea of the issues involved.\n\n## Tests\n\nTo run the tests, cd to **tests** and run:\n\n```\nnode all.js\nnode all-intercept.js\n```\n\n## License\n\nNew BSD and MIT. Check the LICENSE file for all the details.\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/jrburke/amdefine/issues" }, "_id": "amdefine@1.0.0", "_from": "amdefine@>=0.0.4", "scripts": {}, "realName": "amdefine", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/node_modules/amdefine", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/node_modules/amdefine", "parent": "[Circular]", "depth": 6, "peerDependencies": {} } }, "devDependencies": { "dryice": ">=0.4.8" }, "scripts": { "test": "node test/run-tests.js", "build": "node Makefile.dryice.js" }, "readme": "# Source Map\n\nThis is a library to generate and consume the source map format\n[described here][format].\n\nThis library is written in the Asynchronous Module Definition format, and works\nin the following environments:\n\n* Modern Browsers supporting ECMAScript 5 (either after the build, or with an\n AMD loader such as RequireJS)\n\n* Inside Firefox (as a JSM file, after the build)\n\n* With NodeJS versions 0.8.X and higher\n\n## Node\n\n $ npm install source-map\n\n## Building from Source (for everywhere else)\n\nInstall Node and then run\n\n $ git clone https://fitzgen@github.com/mozilla/source-map.git\n $ cd source-map\n $ npm link .\n\nNext, run\n\n $ node Makefile.dryice.js\n\nThis should spew a bunch of stuff to stdout, and create the following files:\n\n* `dist/source-map.js` - The unminified browser version.\n\n* `dist/source-map.min.js` - The minified browser version.\n\n* `dist/SourceMap.jsm` - The JavaScript Module for inclusion in Firefox source.\n\n## Examples\n\n### Consuming a source map\n\n var rawSourceMap = {\n version: 3,\n file: 'min.js',\n names: ['bar', 'baz', 'n'],\n sources: ['one.js', 'two.js'],\n sourceRoot: 'http://example.com/www/js/',\n mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'\n };\n\n var smc = new SourceMapConsumer(rawSourceMap);\n\n console.log(smc.sources);\n // [ 'http://example.com/www/js/one.js',\n // 'http://example.com/www/js/two.js' ]\n\n console.log(smc.originalPositionFor({\n line: 2,\n column: 28\n }));\n // { source: 'http://example.com/www/js/two.js',\n // line: 2,\n // column: 10,\n // name: 'n' }\n\n console.log(smc.generatedPositionFor({\n source: 'http://example.com/www/js/two.js',\n line: 2,\n column: 10\n }));\n // { line: 2, column: 28 }\n\n smc.eachMapping(function (m) {\n // ...\n });\n\n### Generating a source map\n\nIn depth guide:\n[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)\n\n#### With SourceNode (high level API)\n\n function compile(ast) {\n switch (ast.type) {\n case 'BinaryExpression':\n return new SourceNode(\n ast.location.line,\n ast.location.column,\n ast.location.source,\n [compile(ast.left), \" + \", compile(ast.right)]\n );\n case 'Literal':\n return new SourceNode(\n ast.location.line,\n ast.location.column,\n ast.location.source,\n String(ast.value)\n );\n // ...\n default:\n throw new Error(\"Bad AST\");\n }\n }\n\n var ast = parse(\"40 + 2\", \"add.js\");\n console.log(compile(ast).toStringWithSourceMap({\n file: 'add.js'\n }));\n // { code: '40 + 2',\n // map: [object SourceMapGenerator] }\n\n#### With SourceMapGenerator (low level API)\n\n var map = new SourceMapGenerator({\n file: \"source-mapped.js\"\n });\n\n map.addMapping({\n generated: {\n line: 10,\n column: 35\n },\n source: \"foo.js\",\n original: {\n line: 33,\n column: 2\n },\n name: \"christopher\"\n });\n\n console.log(map.toString());\n // '{\"version\":3,\"file\":\"source-mapped.js\",\"sources\":[\"foo.js\"],\"names\":[\"christopher\"],\"mappings\":\";;;;;;;;;mCAgCEA\"}'\n\n## API\n\nGet a reference to the module:\n\n // NodeJS\n var sourceMap = require('source-map');\n\n // Browser builds\n var sourceMap = window.sourceMap;\n\n // Inside Firefox\n let sourceMap = {};\n Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap);\n\n### SourceMapConsumer\n\nA SourceMapConsumer instance represents a parsed source map which we can query\nfor information about the original file positions by giving it a file position\nin the generated source.\n\n#### new SourceMapConsumer(rawSourceMap)\n\nThe only parameter is the raw source map (either as a string which can be\n`JSON.parse`'d, or an object). According to the spec, source maps have the\nfollowing attributes:\n\n* `version`: Which version of the source map spec this map is following.\n\n* `sources`: An array of URLs to the original source files.\n\n* `names`: An array of identifiers which can be referrenced by individual\n mappings.\n\n* `sourceRoot`: Optional. The URL root from which all sources are relative.\n\n* `sourcesContent`: Optional. An array of contents of the original source files.\n\n* `mappings`: A string of base64 VLQs which contain the actual mappings.\n\n* `file`: The generated filename this source map is associated with.\n\n#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)\n\nReturns the original source, line, and column information for the generated\nsource's line and column positions provided. The only argument is an object with\nthe following properties:\n\n* `line`: The line number in the generated source.\n\n* `column`: The column number in the generated source.\n\nand an object is returned with the following properties:\n\n* `source`: The original source file, or null if this information is not\n available.\n\n* `line`: The line number in the original source, or null if this information is\n not available.\n\n* `column`: The column number in the original source, or null or null if this\n information is not available.\n\n* `name`: The original identifier, or null if this information is not available.\n\n#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)\n\nReturns the generated line and column information for the original source,\nline, and column positions provided. The only argument is an object with\nthe following properties:\n\n* `source`: The filename of the original source.\n\n* `line`: The line number in the original source.\n\n* `column`: The column number in the original source.\n\nand an object is returned with the following properties:\n\n* `line`: The line number in the generated source, or null.\n\n* `column`: The column number in the generated source, or null.\n\n#### SourceMapConsumer.prototype.sourceContentFor(source)\n\nReturns the original source content for the source provided. The only\nargument is the URL of the original source file.\n\n#### SourceMapConsumer.prototype.eachMapping(callback, context, order)\n\nIterate over each mapping between an original source/line/column and a\ngenerated line/column in this source map.\n\n* `callback`: The function that is called with each mapping. Mappings have the\n form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,\n name }`\n\n* `context`: Optional. If specified, this object will be the value of `this`\n every time that `callback` is called.\n\n* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or\n `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over\n the mappings sorted by the generated file's line/column order or the\n original's source/line/column order, respectively. Defaults to\n `SourceMapConsumer.GENERATED_ORDER`.\n\n### SourceMapGenerator\n\nAn instance of the SourceMapGenerator represents a source map which is being\nbuilt incrementally.\n\n#### new SourceMapGenerator(startOfSourceMap)\n\nTo create a new one, you must pass an object with the following properties:\n\n* `file`: The filename of the generated source that this source map is\n associated with.\n\n* `sourceRoot`: An optional root for all relative URLs in this source map.\n\n#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)\n\nCreates a new SourceMapGenerator based on a SourceMapConsumer\n\n* `sourceMapConsumer` The SourceMap.\n\n#### SourceMapGenerator.prototype.addMapping(mapping)\n\nAdd a single mapping from original source line and column to the generated\nsource's line and column for this source map being created. The mapping object\nshould have the following properties:\n\n* `generated`: An object with the generated line and column positions.\n\n* `original`: An object with the original line and column positions.\n\n* `source`: The original source file (relative to the sourceRoot).\n\n* `name`: An optional original token name for this mapping.\n\n#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)\n\nSet the source content for an original source file.\n\n* `sourceFile` the URL of the original source file.\n\n* `sourceContent` the content of the source file.\n\n#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile])\n\nApplies a SourceMap for a source file to the SourceMap.\nEach mapping to the supplied source file is rewritten using the\nsupplied SourceMap. Note: The resolution for the resulting mappings\nis the minimium of this map and the supplied map.\n\n* `sourceMapConsumer`: The SourceMap to be applied.\n\n* `sourceFile`: Optional. The filename of the source file.\n If omitted, sourceMapConsumer.file will be used.\n\n#### SourceMapGenerator.prototype.toString()\n\nRenders the source map being generated to a string.\n\n### SourceNode\n\nSourceNodes provide a way to abstract over interpolating and/or concatenating\nsnippets of generated JavaScript source code, while maintaining the line and\ncolumn information associated between those snippets and the original source\ncode. This is useful as the final intermediate representation a compiler might\nuse before outputting the generated JS and source map.\n\n#### new SourceNode(line, column, source[, chunk[, name]])\n\n* `line`: The original line number associated with this source node, or null if\n it isn't associated with an original line.\n\n* `column`: The original column number associated with this source node, or null\n if it isn't associated with an original column.\n\n* `source`: The original source's filename.\n\n* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see\n below.\n\n* `name`: Optional. The original identifier.\n\n#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer)\n\nCreates a SourceNode from generated code and a SourceMapConsumer.\n\n* `code`: The generated code\n\n* `sourceMapConsumer` The SourceMap for the generated code\n\n#### SourceNode.prototype.add(chunk)\n\nAdd a chunk of generated JS to this source node.\n\n* `chunk`: A string snippet of generated JS code, another instance of\n `SourceNode`, or an array where each member is one of those things.\n\n#### SourceNode.prototype.prepend(chunk)\n\nPrepend a chunk of generated JS to this source node.\n\n* `chunk`: A string snippet of generated JS code, another instance of\n `SourceNode`, or an array where each member is one of those things.\n\n#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)\n\nSet the source content for a source file. This will be added to the\n`SourceMap` in the `sourcesContent` field.\n\n* `sourceFile`: The filename of the source file\n\n* `sourceContent`: The content of the source file\n\n#### SourceNode.prototype.walk(fn)\n\nWalk over the tree of JS snippets in this node and its children. The walking\nfunction is called once for each snippet of JS and is passed that snippet and\nthe its original associated source's line/column location.\n\n* `fn`: The traversal function.\n\n#### SourceNode.prototype.walkSourceContents(fn)\n\nWalk over the tree of SourceNodes. The walking function is called for each\nsource file content and is passed the filename and source content.\n\n* `fn`: The traversal function.\n\n#### SourceNode.prototype.join(sep)\n\nLike `Array.prototype.join` except for SourceNodes. Inserts the separator\nbetween each of this source node's children.\n\n* `sep`: The separator.\n\n#### SourceNode.prototype.replaceRight(pattern, replacement)\n\nCall `String.prototype.replace` on the very right-most source snippet. Useful\nfor trimming whitespace from the end of a source node, etc.\n\n* `pattern`: The pattern to replace.\n\n* `replacement`: The thing to replace the pattern with.\n\n#### SourceNode.prototype.toString()\n\nReturn the string representation of this source node. Walks over the tree and\nconcatenates all the various snippets together to one string.\n\n### SourceNode.prototype.toStringWithSourceMap(startOfSourceMap)\n\nReturns the string representation of this tree of source nodes, plus a\nSourceMapGenerator which contains all the mappings between the generated and\noriginal sources.\n\nThe arguments are the same as those to `new SourceMapGenerator`.\n\n## Tests\n\n[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map)\n\nInstall NodeJS version 0.8.0 or greater, then run `node test/run-tests.js`.\n\nTo add new tests, create a new file named `test/test-.js`\nand export your test functions with names that start with \"test\", for example\n\n exports[\"test doing the foo bar\"] = function (assert, util) {\n ...\n };\n\nThe new test will be located automatically when you run the suite.\n\nThe `util` argument is the test utility module located at `test/source-map/util`.\n\nThe `assert` argument is a cut down version of node's assert module. You have\naccess to the following assertion functions:\n\n* `doesNotThrow`\n\n* `equal`\n\n* `ok`\n\n* `strictEqual`\n\n* `throws`\n\n(The reason for the restricted set of test functions is because we need the\ntests to run inside Firefox's test suite as well and so the assert module is\nshimmed in that environment. See `build/assert-shim.js`.)\n\n[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\n[feature]: https://wiki.mozilla.org/DevTools/Features/SourceMap\n[Dryice]: https://github.com/mozilla/dryice\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/mozilla/source-map/issues" }, "_id": "source-map@0.1.31", "_from": "source-map@0.1.31", "realName": "source-map", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map", "parent": "[Circular]", "depth": 5, "peerDependencies": {} } }, "licenses": [ { "type": "Apache-2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0" } ], "engines": { "node": ">=0.8.8" }, "devDependencies": { "jest-cli": "^0.2", "jshint": "^2.5.10" }, "jest": { "scriptPreprocessor": "/jestPreprocessor.js", "setupEnvScriptFile": "/jestEnvironment.js", "testPathIgnorePatterns": [ "/node_modules/", "/__tests__/[^/]*/.+" ] }, "scripts": { "prepublish": "jest && jshint --config=.jshintrc --exclude=node_modules .", "test": "jest && jshint --config=.jshintrc --exclude=node_modules ." }, "readme": "# JSTransform [![Build Status](https://travis-ci.org/facebook/jstransform.svg?branch=master)](https://travis-ci.org/facebook/jstransform)\n\nA simple utility for pluggable JS syntax transforms using the esprima parser.\n\n* Makes it simple to write and plug-in syntax transformations\n* Makes it simple to coalesce multiple syntax transformations in a single pass of the AST\n* Gives complete control over the formatting of the output on a per-transformation basis\n* Supports source map generation\n* Comes pre-bundled with a small set of (optional) ES6 -> ES5 transforms\n\nNOTE: If you're looking for a library for writing new greenfield JS transformations, consider looking at the [Recast](https://github.com/benjamn/recast) library instead of jstransform. We are still actively supporting jstransform (and intend to for the foreseeable future), but longer term we would like to direct efforts toward Recast. Recast does a far better job of supporting a multi-pass JS transformation pipeline, and this is important when attempting to apply many transformations to a source file.\n\n## Examples\nUsing a pre-bundled or existing transform:\n```js\n/**\n * Reads a source file that may (or may not) contain ES6 classes, transforms it\n * to ES5 compatible code using the pre-bundled ES6 class visitors, and prints \n * out the result.\n */\nvar es6ClassVisitors = require('jstransform/visitors/es6-class-visitors').visitorList;\nvar fs = require('fs');\nvar jstransform = require('jstransform');\n\nvar originalFileContents = fs.readFileSync('path/to/original/file.js', 'utf-8');\n\nvar transformedFileData = jstransform.transform(\n es6ClassVisitors,\n originalFileContents\n);\n\nconsole.log(transformedFileData.code);\n```\n\nUsing multiple pre-bundled or existing transforms at once:\n```js\n/**\n * Reads a source file that may (or may not) contain ES6 classes *or* arrow\n * functions, transforms them to ES5 compatible code using the pre-bundled ES6 \n * visitors, and prints out the result.\n */\nvar es6ArrowFuncVisitors = require('jstransform/visitors/es6-arrow-function-visitors').visitorList;\nvar es6ClassVisitors = require('jstransform/visitors/es6-class-visitors').visitorList;\nvar jstransform = require('jstransform');\n\n// Normally you'd read this from the filesystem, but I'll just use a string here\n// to simplify the example.\nvar originalFileContents = \"var a = (param1) => param1; class FooClass {}\";\n\nvar transformedFileData = jstransform.transform(\n es6ClassVisitors.concat(es6ArrowFuncVisitors),\n originalFileContents\n);\n\n// var a = function(param1) {return param1;}; function FooClass(){\"use strict\";}\nconsole.log(transformedFileData.code);\n```\n\nWriting a simple custom transform:\n```js\n/**\n * Creates a custom transformation visitor that prefixes all calls to the\n * `eval()` function with a call to `alert()` saying how much of a clown you are\n * for using eval.\n */\nvar jstransform = require('jstransform');\nvar utils = require('jstransform/src/utils');\n\nvar Syntax = jstransform.Syntax;\n\nfunction visitEvalCallExpressions(traverse, node, path, state) {\n // Appends an alert() call to the output buffer *before* the visited node\n // (in this case the eval call) is appended to the output buffer\n utils.append('alert(\"...eval?...really?...\");', state);\n\n // Now we copy the eval expression to the output buffer from the original\n // source\n utils.catchup(node.range[1], state);\n}\nvisitEvalCallExpressions.test = function(node, path, state) {\n return node.type === Syntax.CallExpression\n && node.callee.type === Syntax.Identifier\n && node.callee.name === 'eval';\n};\n\n// Normally you'd read this from the filesystem, but I'll just use a string here\n// to simplify the example.\nvar originalFileContents = \"eval('foo');\";\n\nvar transformedFileData = jstransform.transform(\n [visitEvalCallExpressions], // Multiple visitors may be applied at once, so an\n // array is always expected for the first argument\n originalFileContents\n);\n\n// alert(\"...eval?...really?...\");eval('foo');\nconsole.log(transformedFileData.code);\n```\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/facebook/jstransform/issues" }, "_id": "jstransform@10.1.0", "_from": "jstransform@^10.0.1", "realName": "jstransform", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/jstransform", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify/node_modules/jstransform", "parent": "[Circular]", "depth": 4, "peerDependencies": {} } }, "keywords": [ "environment", "variables", "browserify", "browserify-transform", "transform", "source", "configuration" ], "readme": "# envify [![Build Status](https://secure.travis-ci.org/hughsk/envify.png?branch=master)](http://travis-ci.org/hughsk/envify) [![stable](http://hughsk.github.io/stability-badges/dist/stable.svg)](http://github.com/hughsk/stability-badges) #\n\nSelectively replace Node-style environment variables with plain strings.\nAvailable as a standalone CLI tool and a\n[Browserify](http://browserify.org) v2 transform.\n\nWorks best in combination with [uglifyify](http://github.com/hughsk/uglifyify).\n\n## Installation ##\n\nIf you're using the module with Browserify:\n\n``` bash\nnpm install envify browserify\n```\n\nOr, for the CLI:\n\n``` bash\nsudo npm install -g envify\n```\n\n## Usage ##\n\nenvify will replace your environment variable checks with ordinary strings -\nonly the variables you use will be included, so you don't have to worry about,\nsay, `AWS_SECRET_KEY` leaking through either. Take this example script:\n\n``` javascript\nif (process.env.NODE_ENV === \"development\") {\n console.log('development only')\n}\n```\n\nAfter running it through envify with `NODE_ENV` set to `production`, you'll\nget this:\n\n``` javascript\nif (\"production\" === \"development\") {\n console.log('development only')\n}\n```\n\nBy running this through a good minifier (e.g.\n[UglifyJS2](https://github.com/mishoo/UglifyJS)), the above code would be\nstripped out completely.\n\nHowever, if you bundled the same script with `NODE_ENV` set to `development`:\n\n``` javascript\nif (\"development\" === \"development\") {\n console.log('development only')\n}\n```\n\nThe `if` statement will evaluate to `true`, so the code won't be removed.\n\n## CLI Usage ##\n\nWith browserify:\n\n``` bash\nbrowserify index.js -t envify > bundle.js\n```\n\nOr standalone:\n\n``` bash\nenvify index.js > bundle.js\n```\n\nYou can also specify additional custom environment variables using\nbrowserify's [subarg](http://github.com/substack/subarg) syntax, which is\navailable in versions 3.25.0 and above:\n\n``` bash\nbrowserify index.js -t [ envify --NODE_ENV development ] > bundle.js\nbrowserify index.js -t [ envify --NODE_ENV production ] > bundle.js\n```\n\n## Module Usage ##\n\n**require('envify')**\n\nReturns a transform stream that updates based on the Node process'\n`process.env` object.\n\n**require('envify/custom')([environment])**\n\nIf you want to stay away from your environment variables, you can supply\nyour own object to use in its place:\n\n``` javascript\nvar browserify = require('browserify')\n , envify = require('envify/custom')\n , fs = require('fs')\n\nvar b = browserify('main.js')\n , output = fs.createWriteStream('bundle.js')\n\nb.transform(envify({\n NODE_ENV: 'development'\n}))\nb.bundle().pipe(output)\n```\n\n## Purging `process.env` ##\n\nBy default, environment variables that are not defined will be left untouched.\nThis is because in some cases, you might want to run an envify transform over\nyour source more than once, and removing these values would make that\nimpossible.\n\nHowever, if any references to `process.env` are remaining after transforming\nyour source with envify, browserify will automatically insert its shim for\nNode's process object, which will increase the size of your bundle. This weighs\nin at around 2KB, so if you're trying to be conservative with your bundle size\nyou can \"purge\" these remaining variables such that any missing ones are simply\nreplaced with undefined.\n\nTo do so through the command-line, simply use the subarg syntax and include\n`purge` after `envify`, e.g.:\n\n``` bash\nbrowserify index.js -t [ envify purge --NODE_ENV development ]\n```\n\nOr if you're using the module API, you can pass `_: \"purge\"` into your\narguments like so:\n\n``` javascript\nb.transform(envify({\n _: 'purge'\n , NODE_ENV: 'development'\n}))\n```\n\n## Contributors ##\n\n* [hughsk](http://github.com/hughsk)\n* [benjamn](http://github.com/benjamn)\n* [zag2art](http://github.com/zag2art)\n* [bjoerge](http://github.com/bjoerge)\n* [andreypopp](http://github.com/andreypopp)\n* [jupl](http://github.com/jupl)\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/hughsk/envify/issues" }, "_id": "envify@3.4.0", "_from": "envify@^3.0.0", "realName": "envify", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/envify", "parent": "[Circular]", "depth": 3, "peerDependencies": {} }, "fbjs": { "name": "fbjs", "version": "0.6.1", "description": "A collection of utility libraries used by other Facebook JS projects", "main": "index.js", "repository": { "type": "git", "url": "git://github.com/facebook/fbjs" }, "scripts": { "build": "gulp build", "lint": "eslint .", "prepublish": "npm run build", "pretest": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json", "test": "NODE_ENV=test jest", "typecheck": "flow check src" }, "author": "", "license": "BSD-3-Clause", "devDependencies": { "babel": "^5.4.7", "babel-eslint": "4.1.5", "del": "^1.2.1", "eslint": "1.10.3", "fbjs-scripts": "file:scripts", "flow-bin": "^0.18.1", "gulp": "^3.9.0", "gulp-babel": "^5.1.0", "gulp-flatten": "^0.2.0", "gulp-rename": "^1.2.2", "jest-cli": "^0.7.1", "merge-stream": "^1.0.0", "object-assign": "^4.0.1", "run-sequence": "^1.1.0" }, "files": [ "LICENSE", "PATENTS", "README.md", "flow/", "index.js", "lib/", "module-map.json" ], "jest": { "modulePathIgnorePatterns": [ "/lib/", "/node_modules/" ], "persistModuleRegistryBetweenSpecs": true, "preprocessorIgnorePatterns": [ "/node_modules/" ], "rootDir": "", "scriptPreprocessor": "node_modules/fbjs-scripts/jest/preprocessor.js", "setupEnvScriptFile": "node_modules/fbjs-scripts/jest/environment.js", "testPathDirs": [ "/src" ], "unmockedModulePathPatterns": [ "/node_modules/", "/src/(?!(__forks__/fetch.js$|fetch/))" ] }, "dependencies": { "core-js": { "name": "core-js", "description": "Standard library", "version": "1.2.6", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git" }, "main": "index.js", "devDependencies": { "webpack": "1.12.x", "LiveScript": "1.3.x", "grunt": "0.4.x", "grunt-cli": "0.1.x", "grunt-livescript": "0.5.x", "grunt-contrib-uglify": "0.10.x", "grunt-contrib-watch": "0.6.x", "grunt-contrib-clean": "0.6.x", "grunt-contrib-copy": "0.8.x", "grunt-karma": "0.12.x", "karma": "0.13.x", "karma-qunit": "0.1.x", "karma-chrome-launcher": "0.2.x", "karma-ie-launcher": "0.2.x", "karma-firefox-launcher": "0.1.x", "karma-phantomjs-launcher": "0.2.x", "promises-aplus-tests": "2.1.x", "eslint": "1.9.x" }, "scripts": { "grunt": "grunt", "lint": "eslint es5 es6 es7 js web core fn modules", "promises-tests": "promises-aplus-tests tests/promises-aplus/adapter", "test": "npm run lint && npm run grunt livescript client karma:continuous library karma:continuous-library && npm run promises-tests && lsc tests/commonjs" }, "license": "MIT", "keywords": [ "ES5", "ECMAScript 5", "ES6", "ECMAScript 6", "ES7", "ECMAScript 7", "Harmony", "Strawman", "Map", "Set", "WeakMap", "WeakSet", "Promise", "Symbol", "Array generics", "setImmediate", "Dict", "partial application" ], "readme": "# core-js\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![version](https://img.shields.io/npm/v/core-js.svg)](https://www.npmjs.com/package/core-js) [![npm downloads](https://img.shields.io/npm/dm/core-js.svg)](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18&to=2114-11-18) [![Build Status](https://travis-ci.org/zloirock/core-js.png)](https://travis-ci.org/zloirock/core-js) [![devDependency Status](https://david-dm.org/zloirock/core-js/dev-status.svg)](https://david-dm.org/zloirock/core-js#info=devDependencies)\n\nModular compact standard library for JavaScript. Includes polyfills for [ECMAScript 5](#ecmascript-5), [ECMAScript 6](#ecmascript-6): [symbols](#ecmascript-6-symbol), [collections](#ecmascript-6-collections), [iterators](#ecmascript-6-iterators), [promises](#ecmascript-6-promise), [ECMAScript 7 proposals](#ecmascript-7); [setImmediate](#setimmediate), [array generics](#mozilla-javascript-array-generics). Some additional features such as [dictionaries](#dict) or [extended partial application](#partial-application). You can require only standardized features polyfills, use features without global namespace pollution or create a custom build.\n\n[Example](http://goo.gl/mfHYm2):\n```javascript\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\n'*'.repeat(10); // => '**********'\nPromise.resolve(32).then(log); // => 32\nsetImmediate(log, 42); // => 42\n```\n\n[Without global namespace pollution](http://goo.gl/WBhs43):\n```javascript\nvar core = require('core-js/library'); // With a modular system, otherwise use global `core`\ncore.Array.from(new core.Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\ncore.String.repeat('*', 10); // => '**********'\ncore.Promise.resolve(32).then(core.log); // => 32\ncore.setImmediate(core.log, 42); // => 42\n```\n\n- [Usage](#usage)\n - [Basic](#basic)\n - [CommonJS](#commonjs)\n - [Custom build](#custom-build)\n- [Features](#features)\n - [ECMAScript 5](#ecmascript-5)\n - [ECMAScript 6](#ecmascript-6)\n - [ECMAScript 6: Object](#ecmascript-6-object)\n - [ECMAScript 6: Function](#ecmascript-6-function)\n - [ECMAScript 6: Array](#ecmascript-6-array)\n - [ECMAScript 6: String](#ecmascript-6-string)\n - [ECMAScript 6: RegExp](#ecmascript-6-regexp)\n - [ECMAScript 6: Number](#ecmascript-6-number)\n - [ECMAScript 6: Math](#ecmascript-6-math)\n - [ECMAScript 6: Symbol](#ecmascript-6-symbol)\n - [ECMAScript 6: Collections](#ecmascript-6-collections)\n - [ECMAScript 6: Iterators](#ecmascript-6-iterators)\n - [ECMAScript 6: Promise](#ecmascript-6-promise)\n - [ECMAScript 6: Reflect](#ecmascript-6-reflect)\n - [ECMAScript 7](#ecmascript-7)\n - [Mozilla JavaScript: Array generics](#mozilla-javascript-array-generics)\n - [Web standards](#web-standards)\n - [setTimeout / setInterval](#settimeout--setinterval)\n - [setImmediate](#setimmediate)\n - [Non-standard](#non-standard)\n - [Object](#object)\n - [Dict](#dict)\n - [Partial application](#partial-application)\n - [Number Iterator](#number-iterator)\n - [Escaping HTML](#escaping-html)\n - [delay](#delay)\n - [console](#console)\n- [Missing polyfills](#missing-polyfills)\n- [Changelog](./CHANGELOG.md)\n\n## Usage\n### Basic\n```\nnpm i core-js\nbower install core.js\n```\n\n```javascript\n// Default\nrequire('core-js');\n// Without global namespace pollution\nvar core = require('core-js/library');\n// Shim only\nrequire('core-js/shim');\n```\nIf you need complete build for browser, use builds from `core-js/client` path: [default](https://raw.githack.com/zloirock/core-js/master/client/core.min.js), [without global namespace pollution](https://raw.githack.com/zloirock/core-js/master/client/library.min.js), [shim only](https://raw.githack.com/zloirock/core-js/master/client/shim.min.js).\n\nWarning: if you uses `core-js` with the extension of native objects, require all needed `core-js` modules at the beginning of entry point of your application, otherwise maybe conflicts.\n\n### CommonJS\nYou can require only needed modules.\n\n```js\nrequire('core-js/es5'); // if you need support IE8-\nrequire('core-js/fn/set');\nrequire('core-js/fn/array/from');\nrequire('core-js/fn/array/find-index');\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\n[1, 2, NaN, 3, 4].findIndex(isNaN); // => 2\n\n// or, w/o global namespace pollution:\n\nvar core = require('core-js/library/es5'); // if you need support IE8-\nvar Set = require('core-js/library/fn/set');\nvar from = require('core-js/library/fn/array/from');\nvar findIndex = require('core-js/library/fn/array/find-index');\nfrom(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\nfindIndex([1, 2, NaN, 3, 4], isNaN); // => 2\n```\nAvailable entry points for methods / constructors, as above examples, excluding features from [`es5`](#ecmascript-5) module (this module requires completely in ES3 environment before all other modules).\n\nAvailable namespaces: for example, `core-js/es6/array` (`core-js/library/es6/array`) contains all [ES6 `Array` features](#ecmascript-6-array), `core-js/es6` (`core-js/library/es6`) contains all ES6 features.\n\n### Custom build\n```\nnpm i core-js && cd node_modules/core-js && npm i\nnpm run grunt build:core.dict,es6 -- --blacklist=es6.promise,es6.math --library=on --path=custom uglify\n```\nWhere `core.dict` and `es6` are modules (namespaces) names, which will be added to the build, `es6.promise` and `es6.math` are modules (namespaces) names, which will be excluded from the build, `--library=on` is flag for build without global namespace pollution and `custom` is target file name.\n\nAvailable namespaces: for example, `es6.array` contains [ES6 `Array` features](#ecmascript-6-array), `es6` contains all modules whose names start with `es6`.\n\nAvailable custom build from js code (required `webpack`):\n```js\nrequire('core-js/build')({\n modules: ['es6', 'core.dict'], // modules / namespaces\n blacklist: ['es6.reflect'], // blacklist of modules / namespaces\n library: false, // flag for build without global namespace pollution\n}, function(err, code){ // callback\n // ...\n});\n```\n## Features:\n### ECMAScript 5\nModule [`es5`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es5.js), nothing new - without examples.\n```javascript\nObject\n .create(proto | null, descriptors?) -> object\n .getPrototypeOf(object) -> proto | null\n .defineProperty(target, key, desc) -> target, cap for ie8-\n .defineProperties(target, descriptors) -> target, cap for ie8-\n .getOwnPropertyDescriptor(object, key) -> desc\n .getOwnPropertyNames(object) -> array\n .keys(object) -> array\nArray\n .isArray(var) -> bool\n #slice(start?, end?) -> array, fix for ie7-\n #join(string = ',') -> string, fix for ie7-\n #indexOf(var, from?) -> int\n #lastIndexOf(var, from?) -> int\n #every(fn(val, index, @), that) -> bool\n #some(fn(val, index, @), that) -> bool\n #forEach(fn(val, index, @), that) -> void\n #map(fn(val, index, @), that) -> array\n #filter(fn(val, index, @), that) -> array\n #reduce(fn(memo, val, index, @), memo?) -> var\n #reduceRight(fn(memo, val, index, @), memo?) -> var\nFunction\n #bind(object, ...args) -> boundFn(...args)\nDate\n .now() -> int\n #toISOString() -> string\n```\nSome features moved to [another modules / namespaces](#ecmascript-6), but available as part of `es5` namespace too:\n```js\nObject\n .seal(object) -> object, cap for ie8-\n .freeze(object) -> object, cap for ie8-\n .preventExtensions(object) -> object, cap for ie8-\n .isSealed(object) -> bool, cap for ie8-\n .isFrozen(object) -> bool, cap for ie8-\n .isExtensible(object) -> bool, cap for ie8-\nString\n #trim() -> str\n```\n\n### ECMAScript 6\n#### ECMAScript 6: Object\nModules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.to-string.js).\n```javascript\nObject\n .assign(target, ...src) -> target\n .is(a, b) -> bool\n .setPrototypeOf(target, proto | null) -> target (required __proto__ - IE11+)\n #toString() -> string, ES6 fix: @@toStringTag support\n```\n[Example](http://goo.gl/VzmY3j):\n```javascript\nvar foo = {q: 1, w: 2}\n , bar = {e: 3, r: 4}\n , baz = {t: 5, y: 6};\nObject.assign(foo, bar, baz); // => foo = {q: 1, w: 2, e: 3, r: 4, t: 5, y: 6}\n\nObject.is(NaN, NaN); // => true\nObject.is(0, -0); // => false\nObject.is(42, 42); // => true\nObject.is(42, '42'); // => false\n\nfunction Parent(){}\nfunction Child(){}\nObject.setPrototypeOf(Child.prototype, Parent.prototype);\nnew Child instanceof Child; // => true\nnew Child instanceof Parent; // => true\n\nvar O = {};\nO[Symbol.toStringTag] = 'Foo';\n'' + O; // => '[object Foo]'\n```\nIn ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.keys.js), [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-own-property-names.js).\n```javascript\nObject\n .freeze(var) -> var\n .seal(var) -> var\n .preventExtensions(var) -> var\n .isFrozen(var) -> bool\n .isSealed(var) -> bool\n .isExtensible(var) -> bool\n .getOwnPropertyDescriptor(var, key) -> desc | undefined\n .getPrototypeOf(var) -> object | null\n .keys(var) -> array\n .getOwnPropertyNames(var) -> array\n```\n[Example](http://goo.gl/35lPSi):\n```javascript\nObject.keys('qwe'); // => ['0', '1', '2']\nObject.getPrototypeOf('qwe') === String.prototype; // => true\n```\n#### ECMAScript 6: Function\nModules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.function.name.js) and [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.function.has-instance.js).\n```javascript\nFunction\n #name -> string (IE9+)\n #@@hasInstance(var) -> bool\n```\n[Example](http://goo.gl/zqu3Wp):\n```javascript\n(function foo(){}).name // => 'foo'\n```\n#### ECMAScript 6: Array\nModules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.find.js) and [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.find-index.js).\n```javascript\nArray\n .from(iterable | array-like, mapFn(val, index)?, that) -> array\n .of(...args) -> array\n #copyWithin(target = 0, start = 0, end = @length) -> @\n #fill(val, start = 0, end = @length) -> @\n #find(fn(val, index, @), that) -> val\n #findIndex(fn(val, index, @), that) -> index\n #@@unscopables -> object (cap)\n```\n[Example](http://goo.gl/nxmJTe):\n```javascript\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\nArray.from({0: 1, 1: 2, 2: 3, length: 3}); // => [1, 2, 3]\nArray.from('123', Number); // => [1, 2, 3]\nArray.from('123', function(it){\n return it * it;\n}); // => [1, 4, 9]\n\nArray.of(1); // => [1]\nArray.of(1, 2, 3); // => [1, 2, 3]\n\nfunction isOdd(val){\n return val % 2;\n}\n[4, 8, 15, 16, 23, 42].find(isOdd); // => 15\n[4, 8, 15, 16, 23, 42].findIndex(isOdd); // => 2\n[4, 8, 15, 16, 23, 42].find(isNaN); // => undefined\n[4, 8, 15, 16, 23, 42].findIndex(isNaN); // => -1\n\nArray(5).fill(42); // => [42, 42, 42, 42, 42]\n\n[1, 2, 3, 4, 5].copyWithin(0, 3); // => [4, 5, 3, 4, 5]\n```\n#### ECMAScript 6: String\nModules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.raw.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.trim.js).\n```javascript\nString\n .fromCodePoint(...codePoints) -> str\n .raw({raw}, ...substitutions) -> str\n #includes(str, from?) -> bool\n #startsWith(str, from?) -> bool\n #endsWith(str, from?) -> bool\n #repeat(num) -> str\n #codePointAt(pos) -> uint\n #trim() -> str, ES6 fix\n```\n[Examples](http://goo.gl/RMyFBo):\n```javascript\n'foobarbaz'.includes('bar'); // => true\n'foobarbaz'.includes('bar', 4); // => false\n'foobarbaz'.startsWith('foo'); // => true\n'foobarbaz'.startsWith('bar', 3); // => true\n'foobarbaz'.endsWith('baz'); // => true\n'foobarbaz'.endsWith('bar', 6); // => true\n\n'string'.repeat(3); // => 'stringstringstring'\n\n'𠮷'.codePointAt(0); // => 134071\nString.fromCodePoint(97, 134071, 98); // => 'a𠮷b'\n\nvar name = 'Bob';\nString.raw`Hi\\n${name}!`; // => 'Hi\\\\nBob!' (ES6 template string syntax)\nString.raw({raw: 'test'}, 0, 1, 2); // => 't0e1s2t'\n```\n#### ECMAScript 6: RegExp\nModules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.flags.js).\n\nSupport well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.split.js).\n```\nString\n #match(tpl) -> var, ES6 fix for support @@match\n #replace(tpl, replacer) -> var, ES6 fix for support @@replace\n #search(tpl) -> var, ES6 fix for support @@search\n #split(tpl, limit) -> var, ES6 fix for support @@split\n[new] RegExp(pattern, flags?) -> regexp, ES6 fix: can alter flags (IE9+)\n #flags -> str (IE9+)\n #@@match(str) -> array | null\n #@@replace(str, replacer) -> string\n #@@search(str) -> index\n #@@split(str, limit) -> array\n```\n[Examples](http://goo.gl/vLV603):\n```javascript\nRegExp(/./g, 'm'); // => /./m\n\n/foo/.flags; // => ''\n/foo/gim.flags; // => 'gim'\n\n'foo'.match({[Symbol.match]: _ => 1}); // => 1\n'foo'.replace({[Symbol.replace]: _ => 2}); // => 2\n'foo'.search({[Symbol.search]: _ => 3}); // => 3\n'foo'.split({[Symbol.split]: _ => 4}); // => 4\n```\n#### ECMAScript 6: Number\nModule [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [example](http://goo.gl/jRd6b3):\n```javascript\nNumber('0b1010101'); // => 85\nNumber('0o7654321'); // => 2054353\n```\n`Number`: modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.parse-int.js).\n```javascript\n[new] Number(var) -> number | number object\n .EPSILON -> num\n .isFinite(num) -> bool\n .isInteger(num) -> bool\n .isNaN(num) -> bool\n .isSafeInteger(num) -> bool\n .MAX_SAFE_INTEGER -> int\n .MIN_SAFE_INTEGER -> int\n .parseFloat(str) -> num\n .parseInt(str) -> int\n```\n#### ECMAScript 6: Math\n`Math`: modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.trunc.js).\n```javascript\nMath\n .acosh(num) -> num\n .asinh(num) -> num\n .atanh(num) -> num\n .cbrt(num) -> num\n .clz32(num) -> uint\n .cosh(num) -> num\n .expm1(num) -> num\n .fround(num) -> num\n .hypot(...args) -> num\n .imul(num, num) -> int\n .log1p(num) -> num\n .log10(num) -> num\n .log2(num) -> num\n .sign(num) -> 1 | -1 | 0 | -0 | NaN\n .sinh(num) -> num\n .tanh(num) -> num\n .trunc(num) -> num\n```\n\n#### ECMAScript 6: Symbol\nModule [`es6.symbol`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.symbol.js).\n```javascript\nSymbol(description?) -> symbol\n .hasInstance -> @@hasInstance\n .isConcatSpreadable -> @@isConcatSpreadable\n .iterator -> @@iterator\n .match -> @@match\n .replace -> @@replace\n .search -> @@search\n .species -> @@species\n .split -> @@split\n .toPrimitive -> @@toPrimitive\n .toStringTag -> @@toStringTag\n .unscopables -> @@unscopables\n .for(key) -> symbol\n .keyFor(symbol) -> key\n .useSimple() -> void\n .useSetter() -> void\nObject\n .getOwnPropertySymbols(object) -> array\n```\nAlso wrapped some methods for correct work with `Symbol` polyfill.\n```js\nObject\n .create(proto | null, descriptors?) -> object\n .defineProperty(target, key, desc) -> target\n .defineProperties(target, descriptors) -> target\n .getOwnPropertyDescriptor(var, key) -> desc | undefined\n .getOwnPropertyNames(var) -> array\n #propertyIsEnumerable(key) -> bool\nJSON\n .stringify(target, replacer?, space?) -> string | undefined\n```\n[Basic example](http://goo.gl/BbvWFc):\n```javascript\nvar Person = (function(){\n var NAME = Symbol('name');\n function Person(name){\n this[NAME] = name;\n }\n Person.prototype.getName = function(){\n return this[NAME];\n };\n return Person;\n})();\n\nvar person = new Person('Vasya');\nlog(person.getName()); // => 'Vasya'\nlog(person['name']); // => undefined\nlog(person[Symbol('name')]); // => undefined, symbols are uniq\nfor(var key in person)log(key); // => only 'getName', symbols are not enumerable\n```\n`Symbol.for` & `Symbol.keyFor` [example](http://goo.gl/0pdJjX):\n```javascript\nvar symbol = Symbol.for('key');\nsymbol === Symbol.for('key'); // true\nSymbol.keyFor(symbol); // 'key'\n```\n[Example](http://goo.gl/mKVOQJ) with methods for getting own object keys:\n```javascript\nvar O = {a: 1};\nObject.defineProperty(O, 'b', {value: 2});\nO[Symbol('c')] = 3;\nObject.keys(O); // => ['a']\nObject.getOwnPropertyNames(O); // => ['a', 'b']\nObject.getOwnPropertySymbols(O); // => [Symbol(c)]\nReflect.ownKeys(O); // => ['a', 'b', Symbol(c)]\n```\n#### Caveats when using `Symbol` polyfill:\n\n* We can't add new primitive type, `Symbol` returns object.\n* `Symbol.for` and `Symbol.keyFor` can't be shimmed cross-realm.\n* By default, to hide the keys, `Symbol` polyfill defines setter in `Object.prototype`. For this reason, uncontrolled creation of symbols can cause memory leak and the `in` operator is not working correctly with `Symbol` polyfill: `Symbol() in {} // => true`.\n\nYou can disable defining setters in `Object.prototype`. [Example](http://goo.gl/N5UD7J):\n```javascript\nSymbol.useSimple();\nvar s1 = Symbol('s1')\n , o1 = {};\no1[s1] = true;\nfor(var key in o1)log(key); // => 'Symbol(s1)_t.qamkg9f3q', w/o native Symbol\n\nSymbol.useSetter();\nvar s2 = Symbol('s2')\n , o2 = {};\no2[s2] = true;\nfor(var key in o2)log(key); // nothing\n```\n* Currently, `core-js` not adds setters to `Object.prototype` for well-known symbols for correct work something like `Symbol.iterator in foo`. It can cause problems with their enumerability.\n\n#### ECMAScript 6: Collections\n`core-js` uses native collections in most case, just fixes methods / constructor, if it's required, and in old environment uses fast polyfill (O(1) lookup).\n#### Map\nModule [`es6.map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.map.js). About iterators from this module [here](#ecmascript-6-iterators).\n```javascript\nnew Map(iterable (entries) ?) -> map\n #clear() -> void\n #delete(key) -> bool\n #forEach(fn(val, key, @), that) -> void\n #get(key) -> val\n #has(key) -> bool\n #set(key, val) -> @\n #size -> uint\n```\n[Example](http://goo.gl/RDbROF):\n```javascript\nvar a = [1];\n\nvar map = new Map([['a', 1], [42, 2]]);\nmap.set(a, 3).set(true, 4);\n\nlog(map.size); // => 4\nlog(map.has(a)); // => true\nlog(map.has([1])); // => false\nlog(map.get(a)); // => 3\nmap.forEach(function(val, key){\n log(val); // => 1, 2, 3, 4\n log(key); // => 'a', 42, [1], true\n});\nmap.delete(a);\nlog(map.size); // => 3\nlog(map.get(a)); // => undefined\nlog(Array.from(map)); // => [['a', 1], [42, 2], [true, 4]]\n```\n#### Set\nModule [`es6.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.set.js). About iterators from this module [here](#ecmascript-6-iterators).\n```javascript\nnew Set(iterable?) -> set\n #add(key) -> @\n #clear() -> void\n #delete(key) -> bool\n #forEach(fn(el, el, @), that) -> void\n #has(key) -> bool\n #size -> uint\n```\n[Example](http://goo.gl/7XYya3):\n```javascript\nvar set = new Set(['a', 'b', 'a', 'c']);\nset.add('d').add('b').add('e');\nlog(set.size); // => 5\nlog(set.has('b')); // => true\nset.forEach(function(it){\n log(it); // => 'a', 'b', 'c', 'd', 'e'\n});\nset.delete('b');\nlog(set.size); // => 4\nlog(set.has('b')); // => false\nlog(Array.from(set)); // => ['a', 'c', 'd', 'e']\n```\n#### WeakMap\nModule [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.weak-map.js).\n```javascript\nnew WeakMap(iterable (entries) ?) -> weakmap\n #delete(key) -> bool\n #get(key) -> val\n #has(key) -> bool\n #set(key, val) -> @\n```\n[Example](http://goo.gl/SILXyw):\n```javascript\nvar a = [1]\n , b = [2]\n , c = [3];\n\nvar wmap = new WeakMap([[a, 1], [b, 2]]);\nwmap.set(c, 3).set(b, 4);\nlog(wmap.has(a)); // => true\nlog(wmap.has([1])); // => false\nlog(wmap.get(a)); // => 1\nwmap.delete(a);\nlog(wmap.get(a)); // => undefined\n\n// Private properties store:\nvar Person = (function(){\n var names = new WeakMap;\n function Person(name){\n names.set(this, name);\n }\n Person.prototype.getName = function(){\n return names.get(this);\n };\n return Person;\n})();\n\nvar person = new Person('Vasya');\nlog(person.getName()); // => 'Vasya'\nfor(var key in person)log(key); // => only 'getName'\n```\n#### WeakSet\nModule [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.weak-set.js).\n```javascript\nnew WeakSet(iterable?) -> weakset\n #add(key) -> @\n #delete(key) -> bool\n #has(key) -> bool\n```\n[Example](http://goo.gl/TdFbEx):\n```javascript\nvar a = [1]\n , b = [2]\n , c = [3];\n\nvar wset = new WeakSet([a, b, a]);\nwset.add(c).add(b).add(c);\nlog(wset.has(b)); // => true\nlog(wset.has([2])); // => false\nwset.delete(b);\nlog(wset.has(b)); // => false\n```\n#### Caveats when using collections polyfill:\n\n* Frozen objects as collection keys are supported, but not recomended - it's slow (O(n) instead of O(1)) and, for weak-collections, leak.\n* Weak-collections polyfill stores values as hidden properties of keys. It works correct and not leak in most cases. However, it is desirable to store a collection longer than its keys.\n\n#### ECMAScript 6: Iterators\nModules [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.iterator.js) and [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.iterator.js):\n```javascript\nString\n #@@iterator() -> iterator\nArray\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator\nArguments\n #@@iterator() -> iterator (available only in core-js methods)\n```\nModules [`es6.map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.map.js) and [`es6.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.set.js):\n```javascript\nMap\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator (entries)\nSet\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator\n```\nModule [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.dom.iterable.js):\n```javascript\nNodeList\n #@@iterator() -> iterator\n```\n[Example](http://goo.gl/nzHVQF):\n```javascript\nvar string = 'a𠮷b';\n\nfor(var val of string)log(val); // => 'a', '𠮷', 'b'\n\nvar array = ['a', 'b', 'c'];\n\nfor(var val of array)log(val); // => 'a', 'b', 'c'\nfor(var val of array.values())log(val); // => 'a', 'b', 'c'\nfor(var key of array.keys())log(key); // => 0, 1, 2\nfor(var [key, val] of array.entries()){\n log(key); // => 0, 1, 2\n log(val); // => 'a', 'b', 'c'\n}\n\nvar map = new Map([['a', 1], ['b', 2], ['c', 3]]);\n\nfor(var [key, val] of map){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\nfor(var val of map.values())log(val); // => 1, 2, 3\nfor(var key of map.keys())log(key); // => 'a', 'b', 'c'\nfor(var [key, val] of map.entries()){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\n\nvar set = new Set([1, 2, 3, 2, 1]);\n\nfor(var val of set)log(val); // => 1, 2, 3\nfor(var val of set.values())log(val); // => 1, 2, 3\nfor(var key of set.keys())log(key); // => 1, 2, 3\nfor(var [key, val] of set.entries()){\n log(key); // => 1, 2, 3\n log(val); // => 1, 2, 3\n}\n\nfor(var x of document.querySelectorAll('*')){\n log(x.id);\n}\n```\nModules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.get-iterator-method.js) - helpers for check iterable / get iterator in `library` version or, for example, for `arguments` object:\n```javascript\ncore\n .isIterable(var) -> bool\n .getIterator(iterable) -> iterator\n .getIteratorMethod(var) -> function | undefined\n```\n[Example](http://goo.gl/SXsM6D):\n```js\nvar list = (function(){\n return arguments;\n})(1, 2, 3);\n\nlog(core.isIterable(list)); // true;\n\nvar iter = core.getIterator(list);\nlog(iter.next().value); // 1\nlog(iter.next().value); // 2\nlog(iter.next().value); // 3\nlog(iter.next().value); // undefined\n\ncore.getIterator({}); // TypeError: [object Object] is not iterable!\n\nvar iterFn = core.getIteratorMethod(list);\nlog(typeof iterFn); // 'function'\nvar iter = iterFn.call(list);\nlog(iter.next().value); // 1\nlog(iter.next().value); // 2\nlog(iter.next().value); // 3\nlog(iter.next().value); // undefined\n\nlog(core.getIteratorMethod({})); // undefined\n```\n#### ECMAScript 6: Promise\nModule [`es6.promise`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.promise.js).\n```javascript\nnew Promise(executor(resolve(var), reject(var))) -> promise\n #then(resolved(var), rejected(var)) -> promise\n #catch(rejected(var)) -> promise\n .resolve(var || promise) -> promise\n .reject(var) -> promise\n .all(iterable) -> promise\n .race(iterable) -> promise\n```\nBasic [example](http://goo.gl/vGrtUC):\n```javascript\nfunction sleepRandom(time){\n return new Promise(function(resolve, reject){\n setTimeout(resolve, time * 1e3, 0 | Math.random() * 1e3);\n });\n}\n\nlog('Run'); // => Run\nsleepRandom(5).then(function(result){\n log(result); // => 869, after 5 sec.\n return sleepRandom(10);\n}).then(function(result){\n log(result); // => 202, after 10 sec.\n}).then(function(){\n log('immediately after'); // => immediately after\n throw Error('Irror!');\n}).then(function(){\n log('will not be displayed');\n}).catch(log); // => => Error: Irror!\n```\n`Promise.resolve` and `Promise.reject` [example](http://goo.gl/vr8TN3):\n```javascript\nPromise.resolve(42).then(log); // => 42\nPromise.reject(42).catch(log); // => 42\n\nPromise.resolve($.getJSON('/data.json')); // => ES6 promise\n```\n`Promise.all` [example](http://goo.gl/RdoDBZ):\n```javascript\nPromise.all([\n 'foo',\n sleepRandom(5),\n sleepRandom(15),\n sleepRandom(10) // after 15 sec:\n]).then(log); // => ['foo', 956, 85, 382]\n```\n`Promise.race` [example](http://goo.gl/L8ovkJ):\n```javascript\nfunction timeLimit(promise, time){\n return Promise.race([promise, new Promise(function(resolve, reject){\n setTimeout(reject, time * 1e3, Error('Await > ' + time + ' sec'));\n })]);\n}\n\ntimeLimit(sleepRandom(5), 10).then(log); // => 853, after 5 sec.\ntimeLimit(sleepRandom(15), 10).catch(log); // Error: Await > 10 sec\n```\nECMAScript 7 [async functions](https://tc39.github.io/ecmascript-asyncawait) [example](http://goo.gl/wnQS4j):\n```javascript\nvar delay = time => new Promise(resolve => setTimeout(resolve, time))\n\nasync function sleepRandom(time){\n await delay(time * 1e3);\n return 0 | Math.random() * 1e3;\n};\nasync function sleepError(time, msg){\n await delay(time * 1e3);\n throw Error(msg);\n};\n\n(async () => {\n try {\n log('Run'); // => Run\n log(await sleepRandom(5)); // => 936, after 5 sec.\n var [a, b, c] = await Promise.all([\n sleepRandom(5),\n sleepRandom(15),\n sleepRandom(10)\n ]);\n log(a, b, c); // => 210 445 71, after 15 sec.\n await sleepError(5, 'Irror!');\n log('Will not be displayed');\n } catch(e){\n log(e); // => Error: 'Irror!', after 5 sec.\n }\n})();\n```\n\n##### Unhandled rejection tracking\n\n`core-js` `Promise` supports (but not adds to native implementations) unhandled rejection tracking.\n\n[Node.js](https://gist.github.com/benjamingr/0237932cee84712951a2):\n```js\nprocess.on('unhandledRejection', (reason, promise) => console.log(reason, promise));\nPromise.reject(42);\n// 42 [object Promise]\n\n```\nIn a browser, by default, you will see notify in the console, or you can add a custom handler, [example](http://goo.gl/izTr2I):\n```js\nwindow.onunhandledrejection = e => log(e.reason, e.promise);\nPromise.reject(42);\n// 42 [object Promise]\n```\n**Warning**: The problem here - we can't add it to native `Promise` implementations, but by idea `core-js` should use enough correct native implementation if it's available. Currently, most native implementations are buggy and `core-js` uses polyfill, but the situation will be changed. If someone wanna use this hook everywhere - he should delete `window.Promise` before inclusion `core-js`.\n\n\n#### ECMAScript 6: Reflect\nModules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.set-prototype-of.js).\n```javascript\nReflect\n .apply(target, thisArgument, argumentsList) -> var\n .construct(target, argumentsList, newTarget?) -> object\n .defineProperty(target, propertyKey, attributes) -> bool\n .deleteProperty(target, propertyKey) -> bool\n .enumerate(target) -> iterator\n .get(target, propertyKey, receiver?) -> var\n .getOwnPropertyDescriptor(target, propertyKey) -> desc\n .getPrototypeOf(target) -> object | null\n .has(target, propertyKey) -> bool\n .isExtensible(target) -> bool\n .ownKeys(target) -> array\n .preventExtensions(target) -> bool\n .set(target, propertyKey, V, receiver?) -> bool\n .setPrototypeOf(target, proto) -> bool (required __proto__ - IE11+)\n```\n[Example](http://goo.gl/gVT0cH):\n```javascript\nvar O = {a: 1};\nObject.defineProperty(O, 'b', {value: 2});\nO[Symbol('c')] = 3;\nReflect.ownKeys(O); // => ['a', 'b', Symbol(c)]\n\nfunction C(a, b){\n this.c = a + b;\n}\n\nvar instance = Reflect.construct(C, [20, 22]);\ninstance.c; // => 42\n```\n### ECMAScript 7\n* `Array#includes` [proposal](https://github.com/domenic/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.array.includes.js)\n* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.at.js)\n* `String#padLeft`, `String#padRight` [proposal](https://github.com/ljharb/proposal-string-pad-left-right) - modules [`es7.string.pad-left`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.pad-left.js), [`es7.string.pad-right`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.pad-right.js)\n* `String#trimLeft`, `String#trimRight` [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim) - modules [`es7.string.trim-left`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.trim-right.js)\n* `Object.values`, `Object.entries` [proposal](https://github.com/ljharb/proposal-object-values-entries) - modules [`es7.object.values`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.entries.js)\n* `Object.getOwnPropertyDescriptors` [proposal](https://gist.github.com/WebReflection/9353781) - module [`es7.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.get-own-property-descriptors.js)\n* `RegExp.escape` [proposal](https://github.com/benjamingr/RexExp.escape) - module [`es7.regexp.escape`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.regexp.escape.js)\n* `Map#toJSON`, `Set#toJSON` [proposal](https://github.com/DavidBruant/Map-Set.prototype.toJSON) - modules [`es7.map.to-json`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.set.to-json.js)\n\n```javascript\nArray\n #includes(var, from?) -> bool\nString\n #at(index) -> string\n #padLeft(length, fillStr = ' ') -> string\n #padRight(length, fillStr = ' ') -> string\n #trimLeft() -> string\n #trimRight() -> string\nObject\n .values(object) -> array\n .entries(object) -> array\n .getOwnPropertyDescriptors(object) -> object\nRegExp\n .escape(str) -> str\nMap\n #toJSON() -> array\nSet\n #toJSON() -> array\n```\n[Examples](http://goo.gl/aUZQRH):\n```javascript\n[1, 2, 3].includes(2); // => true\n[1, 2, 3].includes(4); // => false\n[1, 2, 3].includes(2, 2); // => false\n\n[NaN].indexOf(NaN); // => -1\n[NaN].includes(NaN); // => true\nArray(1).indexOf(undefined); // => -1\nArray(1).includes(undefined); // => true\n\n'a𠮷b'.at(1); // => '𠮷'\n'a𠮷b'.at(1).length; // => 2\n\n'hello'.padLeft(10); // => ' hello'\n'hello'.padLeft(10, '1234'); // => '41234hello'\n'hello'.padRight(10); // => 'hello '\n'hello'.padRight(10, '1234'); // => 'hello12341'\n\n' hello '.trimLeft(); // => 'hello '\n' hello '.trimRight(); // => ' hello'\n\nObject.values({a: 1, b: 2, c: 3}); // => [1, 2, 3]\nObject.entries({a: 1, b: 2, c: 3}); // => [['a', 1], ['b', 2], ['c', 3]]\n\n// Shallow object cloning with prototype and descriptors:\nvar copy = Object.create(Object.getPrototypeOf(O), Object.getOwnPropertyDescriptors(O));\n// Mixin:\nObject.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n\nRegExp.escape('Hello, []{}()*+?.\\\\^$|!'); // => 'Hello, \\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|!'\n\nJSON.stringify(new Map([['a', 'b'], ['c', 'd']])); // => '[[\"a\",\"b\"],[\"c\",\"d\"]]'\nJSON.stringify(new Set([1, 2, 3, 2, 1])); // => '[1,2,3]'\n```\n### Mozilla JavaScript: Array generics\nModule [`js.array.statics`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/js.array.statics.js).\n```javascript\nArray\n .{...ArrayPrototype methods}\n```\n\n```javascript\nArray.slice(arguments, 1);\n\nArray.join('abcdef', '+'); // => 'a+b+c+d+e+f'\n\nvar form = document.getElementsByClassName('form__input');\nArray.reduce(form, function(memo, it){\n memo[it.name] = it.value;\n return memo;\n}, {}); // => {name: 'Vasya', age: '42', sex: 'yes, please'}\n```\n### Web standards\n#### setTimeout / setInterval\nModule [`web.timers`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.timers.js). Additional arguments fix for IE9-.\n```javascript\nsetTimeout(fn(...args), time, ...args) -> id\nsetInterval(fn(...args), time, ...args) -> id\n```\n```javascript\n// Before:\nsetTimeout(log.bind(null, 42), 1000);\n// After:\nsetTimeout(log, 1000, 42);\n```\n#### setImmediate\nModule [`web.immediate`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill.\n```javascript\nsetImmediate(fn(...args), ...args) -> id\nclearImmediate(id) -> void\n```\n[Example](http://goo.gl/6nXGrx):\n```javascript\nsetImmediate(function(arg1, arg2){\n log(arg1, arg2); // => Message will be displayed with minimum delay\n}, 'Message will be displayed', 'with minimum delay');\n\nclearImmediate(setImmediate(function(){\n log('Message will not be displayed');\n}));\n```\n### Non-standard\n#### Object\nModules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.make.js).\n```javascript\nObject\n .isObject(var) -> bool\n .classof(var) -> string \n .define(target, mixin) -> target\n .make(proto | null, mixin?) -> object\n```\nObject classify [examples](http://goo.gl/YZQmGo):\n```javascript\nObject.isObject({}); // => true\nObject.isObject(isNaN); // => true\nObject.isObject(null); // => false\n\nvar classof = Object.classof;\n\nclassof(null); // => 'Null'\nclassof(undefined); // => 'Undefined'\nclassof(1); // => 'Number'\nclassof(true); // => 'Boolean'\nclassof('string'); // => 'String'\nclassof(Symbol()); // => 'Symbol'\n\nclassof(new Number(1)); // => 'Number'\nclassof(new Boolean(true)); // => 'Boolean'\nclassof(new String('string')); // => 'String'\n\nvar fn = function(){}\n , list = (function(){return arguments})(1, 2, 3);\n\nclassof({}); // => 'Object'\nclassof(fn); // => 'Function'\nclassof([]); // => 'Array'\nclassof(list); // => 'Arguments'\nclassof(/./); // => 'RegExp'\nclassof(new TypeError); // => 'Error'\n\nclassof(new Set); // => 'Set'\nclassof(new Map); // => 'Map'\nclassof(new WeakSet); // => 'WeakSet'\nclassof(new WeakMap); // => 'WeakMap'\nclassof(new Promise(fn)); // => 'Promise'\n\nclassof([].values()); // => 'Array Iterator'\nclassof(new Set().values()); // => 'Set Iterator'\nclassof(new Map().values()); // => 'Map Iterator'\n\nclassof(Math); // => 'Math'\nclassof(JSON); // => 'JSON'\n\nfunction Example(){}\nExample.prototype[Symbol.toStringTag] = 'Example';\n\nclassof(new Example); // => 'Example'\n```\n`Object.define` and `Object.make` [examples](http://goo.gl/rtpD5Z):\n```javascript\n// Before:\nObject.defineProperty(target, 'c', {\n enumerable: true,\n configurable: true,\n get: function(){\n return this.a + this.b;\n }\n});\n\n// After:\nObject.define(target, {\n get c(){\n return this.a + this.b;\n }\n});\n\n// Shallow object cloning with prototype and descriptors:\nvar copy = Object.make(Object.getPrototypeOf(src), src);\n\n// Simple inheritance:\nfunction Vector2D(x, y){\n this.x = x;\n this.y = y;\n}\nObject.define(Vector2D.prototype, {\n get xy(){\n return Math.hypot(this.x, this.y);\n }\n});\nfunction Vector3D(x, y, z){\n Vector2D.apply(this, arguments);\n this.z = z;\n}\nVector3D.prototype = Object.make(Vector2D.prototype, {\n constructor: Vector3D,\n get xyz(){\n return Math.hypot(this.x, this.y, this.z);\n }\n});\n\nvar vector = new Vector3D(9, 12, 20);\nlog(vector.xy); // => 15\nlog(vector.xyz); // => 25\nvector.y++;\nlog(vector.xy); // => 15.811388300841896\nlog(vector.xyz); // => 25.495097567963924\n```\n#### Dict\nModule [`core.dict`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.dict.js). Based on [TC39 discuss](https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-11/nov-29.md#collection-apis-review) / [strawman](http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard#dictionaries).\n```javascript\n[new] Dict(iterable (entries) | object ?) -> dict\n .isDict(var) -> bool\n .values(object) -> iterator\n .keys(object) -> iterator\n .entries(object) -> iterator (entries)\n .has(object, key) -> bool\n .get(object, key) -> val\n .set(object, key, value) -> object\n .forEach(object, fn(val, key, @), that) -> void\n .map(object, fn(val, key, @), that) -> new @\n .mapPairs(object, fn(val, key, @), that) -> new @\n .filter(object, fn(val, key, @), that) -> new @\n .some(object, fn(val, key, @), that) -> bool\n .every(object, fn(val, key, @), that) -> bool\n .find(object, fn(val, key, @), that) -> val\n .findKey(object, fn(val, key, @), that) -> key\n .keyOf(object, var) -> key\n .includes(object, var) -> bool\n .reduce(object, fn(memo, val, key, @), memo?) -> var\n```\n`Dict` create object without prototype from iterable or simple object. [Example](http://goo.gl/pnp8Vr):\n```javascript\nvar map = new Map([['a', 1], ['b', 2], ['c', 3]]);\n\nDict(); // => {__proto__: null}\nDict({a: 1, b: 2, c: 3}); // => {__proto__: null, a: 1, b: 2, c: 3}\nDict(map); // => {__proto__: null, a: 1, b: 2, c: 3}\nDict([1, 2, 3].entries()); // => {__proto__: null, 0: 1, 1: 2, 2: 3}\n\nvar dict = Dict({a: 42});\ndict instanceof Object; // => false\ndict.a; // => 42\ndict.toString; // => undefined\n'a' in dict; // => true\n'hasOwnProperty' in dict; // => false\n\nDict.isDict({}); // => false\nDict.isDict(Dict()); // => true\n```\n`Dict.keys`, `Dict.values` and `Dict.entries` returns iterators for objects, [examples](http://goo.gl/xAvECH):\n```javascript\nvar dict = {a: 1, b: 2, c: 3};\n\nfor(var key of Dict.keys(dict))log(key); // => 'a', 'b', 'c'\n\nfor(var val of Dict.values(dict))log(val); // => 1, 2, 3\n\nfor(var [key, val] of Dict.entries(dict)){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\n\nnew Map(Dict.entries(dict)); // => Map {a: 1, b: 2, c: 3}\n```\nBasic dict operations for objects with prototype [example](http://goo.gl/B28UnG):\n```js\n'q' in {q: 1}; // => true\n'toString' in {}; // => true\n\nDict.has({q: 1}, 'q'); // => true\nDict.has({}, 'toString'); // => false\n\n({q: 1})['q']; // => 1\n({}).toString; // => function toString(){ [native code] }\n\nDict.get({q: 1}, 'q'); // => 1\nDict.get({}, 'toString'); // => undefined\n\nvar O = {};\nO['q'] = 1;\nO['q']; // => 1\nO['__proto__'] = {w: 2};\nO['__proto__']; // => {w: 2}\nO['w']; // => 2\n\nvar O = {};\nDict.set(O, 'q', 1);\nO['q']; // => 1\nDict.set(O, '__proto__', {w: 2});\nO['__proto__']; // => {w: 2}\nO['w']; // => undefined\n```\nOther methods of `Dict` module are static equialents of `Array.prototype` methods for dictionaries, [examples](http://goo.gl/xFi1RH):\n```javascript\nvar dict = {a: 1, b: 2, c: 3};\n\nDict.forEach(dict, console.log, console);\n// => 1, 'a', {a: 1, b: 2, c: 3}\n// => 2, 'b', {a: 1, b: 2, c: 3}\n// => 3, 'c', {a: 1, b: 2, c: 3}\n\nDict.map(dict, function(it){\n return it * it;\n}); // => {a: 1, b: 4, c: 9}\n\nDict.mapPairs(dict, function(val, key){\n if(key != 'b')return [key + key, val * val];\n}); // => {aa: 1, cc: 9}\n\nDict.filter(dict, function(it){\n return it % 2;\n}); // => {a: 1, c: 3}\n\nDict.some(dict, function(it){\n return it === 2;\n}); // => true\n\nDict.every(dict, function(it){\n return it === 2;\n}); // => false\n\nDict.find(dict, function(it){\n return it > 2;\n}); // => 3\nDict.find(dict, function(it){\n return it > 4;\n}); // => undefined\n\nDict.findKey(dict, function(it){\n return it > 2;\n}); // => 'c'\nDict.findKey(dict, function(it){\n return it > 4;\n}); // => undefined\n\nDict.keyOf(dict, 2); // => 'b'\nDict.keyOf(dict, 4); // => undefined\n\nDict.includes(dict, 2); // => true\nDict.includes(dict, 4); // => false\n\nDict.reduce(dict, function(memo, it){\n return memo + it;\n}); // => 6\nDict.reduce(dict, function(memo, it){\n return memo + it;\n}, ''); // => '123'\n```\n#### Partial application\nModule [`core.function.part`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.function.part.js).\n```javascript\nFunction\n #part(...args | _) -> fn(...args)\n```\n`Function#part` partial apply function without `this` binding. Uses global variable `_` (`core._` for builds without global namespace pollution) as placeholder and not conflict with `Underscore` / `LoDash`. [Examples](http://goo.gl/p9ZJ8K):\n```javascript\nvar fn1 = log.part(1, 2);\nfn1(3, 4); // => 1, 2, 3, 4\n\nvar fn2 = log.part(_, 2, _, 4);\nfn2(1, 3); // => 1, 2, 3, 4\n\nvar fn3 = log.part(1, _, _, 4);\nfn3(2, 3); // => 1, 2, 3, 4\n\nfn2(1, 3, 5); // => 1, 2, 3, 4, 5\nfn2(1); // => 1, 2, undefined, 4\n```\n#### Number Iterator\nModules [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.number.iterator.js).\n```javascript\nNumber\n #@@iterator() -> iterator\n```\n[Examples](http://goo.gl/o45pCN):\n```javascript\nfor(var i of 3)log(i); // => 0, 1, 2\n\n[...10]; // => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\nArray.from(10, Math.random); // => [0.9817775336559862, 0.02720663254149258, ...]\n\nArray.from(10, function(it){\n return this + it * it;\n}, .42); // => [0.42, 1.42, 4.42, 9.42, 16.42, 25.42, 36.42, 49.42, 64.42, 81.42]\n```\n#### Escaping HTML\nModules [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.string.unescape-html.js).\n```javascript\nString\n #escapeHTML() -> str\n #unescapeHTML() -> str\n```\n[Examples](http://goo.gl/6bOvsQ):\n```javascript\n''.escapeHTML(); // => '<script>doSomething();</script>'\n'<script>doSomething();</script>'.unescapeHTML(); // => ''\n```\n#### delay\nModule [`core.delay`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function). [Example](http://goo.gl/lbucba):\n```javascript\ndelay(1e3).then(() => log('after 1 sec'));\n\n(async () => {\n await delay(3e3);\n log('after 3 sec');\n \n while(await delay(3e3))log('each 3 sec');\n})();\n```\n#### Console\nModule [`core.log`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.log.js). Console cap for old browsers and some additional functionality. In IE, Node.js / IO.js and Firebug `console` methods not require call from `console` object, but in Chromium and V8 this throws error. For some reason, we can't replace `console` methods by their bound versions. Add `log` object with bound console methods. Some more sugar: `log` is shortcut for `log.log`, we can disable output.\n```javascript\nlog ==== log.log\n .{...console API}\n .enable() -> void\n .disable() -> void\n```\n```javascript\n// Before:\nif(window.console && console.warn)console.warn(42);\n// After:\nlog.warn(42);\n\n// Before:\nsetTimeout(console.warn.bind(console, 42), 1000);\n[1, 2, 3].forEach(console.warn, console);\n// After:\nsetTimeout(log.warn, 1000, 42);\n[1, 2, 3].forEach(log.warn);\n\n// log is shortcut for log.log\nsetImmediate(log, 42); // => 42\n\nlog.disable();\nlog.warn('Console is disabled, you will not see this message.');\nlog.enable();\nlog.warn('Console is enabled again.');\n```\n\n## Missing polyfills\n- ES5 `JSON` is missing now only in IE7- and never it will be added to `core-js`, if you need it in these old browsers available many implementations, for example, [json3](https://github.com/bestiejs/json3).\n- ES6 Typed Arrays can be polyfilled without serious problems, but it will be slow - getter / setter for each element and they are missing completely only in IE9-. You can use [this polyfill](https://github.com/inexorabletash/polyfill/blob/master/typedarray.js). *Possible*, it will be added to `core-js` in the future, completely or only missing methods of existing arrays. \n- ES6 `String#normalize` is not very usefull feature, but this polyfill will be very large. If you need it, you can use [unorm](https://github.com/walling/unorm/).\n- ES6 `Proxy` can't be polyfilled, but for Node.js / Chromium with additional flags you can try [harmony-reflect](https://github.com/tvcutsem/harmony-reflect) for adapt old style `Proxy` API to final ES6 version.\n- ES6 logic for `@@isConcatSpreadable` and `@@species` (in most places) can be polyfilled without problems, but it will cause serious slowdown in popular cases in some engines. It will be polyfilled when it will be implemented in modern engines.\n- ES7 `Object.observe` can be polyfilled with many limitations, but it will be very slow - dirty checking on each tick. In nearest future it will not be added to `core-js` - it will cause serious slowdown in applications which uses `Object.observe` and fallback if it's missing. *Possible* it will be added as optional feature then most actual browsers will have this feature. Now you can use [this polyfill](https://github.com/MaxArt2501/object-observe).\n- ES7 `SIMD`. `core-js` doesn't adds polyfill of this feature because of large size and some other reasons. You can use [this polyfill](https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd.js).\n- `window.fetch` is not crossplatform feature, in some environments it make no sense. For this reason I don't think it should be in `core-js`. Looking at the large number of requests it *maybe* added in the future. Now you can use, for example, [this polyfill](https://github.com/github/fetch).", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/zloirock/core-js/issues" }, "_id": "core-js@1.2.6", "_from": "core-js@^1.0.0", "realName": "core-js", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/core-js", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/core-js", "parent": "[Circular]", "depth": 4, "peerDependencies": {} }, "loose-envify": { "name": "loose-envify", "version": "1.1.0", "description": "Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST", "keywords": [ "environment", "variables", "browserify", "browserify-transform", "transform", "source", "configuration" ], "homepage": "https://github.com/zertosh/loose-envify", "license": "MIT", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "repository": { "type": "git", "url": "git://github.com/zertosh/loose-envify.git" }, "scripts": { "test": "tap test/*.js" }, "dependencies": { "js-tokens": { "name": "js-tokens", "version": "1.0.2", "author": { "name": "Simon Lydell" }, "license": "MIT", "description": "A regex that tokenizes JavaScript.", "keywords": [ "JavaScript", "js", "token", "tokenize", "regex" ], "files": [ "index.js" ], "repository": { "type": "git", "url": "git://github.com/lydell/js-tokens" }, "scripts": { "test": "mocha --ui tdd", "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js", "build": "node generate-index.js", "dev": "npm run build && npm test" }, "devDependencies": { "coffee-script": "~1.9.3", "esprima": "^2.3.0", "everything.js": "^1.0.3", "mocha": "^2.2.5" }, "readme": "Overview [![Build Status](https://travis-ci.org/lydell/js-tokens.png?branch=master)](https://travis-ci.org/lydell/js-tokens)\n========\n\nA regex that tokenizes JavaScript.\n\n```js\nvar jsTokens = require(\"js-tokens\")\n\nvar jsString = \"var foo=opts.foo;\\n...\"\n\njsString.match(jsTokens)\n// [\"var\", \" \", \"foo\", \"=\", \"opts\", \".\", \"foo\", \";\", \"\\n\", ...]\n```\n\n\nInstallation\n============\n\n- `npm install js-tokens`\n\n```js\nvar jsTokens = require(\"js-tokens\")\n```\n\n\nUsage\n=====\n\n### `jsTokens` ###\n\nA regex with the `g` flag that matches JavaScript tokens.\n\nThe regex _always_ matches, even invalid JavaScript and the empty string.\n\nThe next match is always directly after the previous.\n\n### `var token = jsTokens.matchToToken(match)` ###\n\nTakes a `match` returned by `jsTokens.exec(string)`, and returns a `{type:\nString, value: String}` object. The following types are available:\n\n- string\n- comment\n- regex\n- number\n- name\n- punctuator\n- whitespace\n- invalid\n\nMulti-line comments and strings also have a `closed` property indicating if the\ntoken was closed or not (see below).\n\nComments and strings both come in several flavors. To distinguish them, check if\nthe token starts with `//`, `/*`, `'`, `\"` or `` ` ``.\n\nNames are ECMAScript IdentifierNames, that is, including both identifiers and\nkeywords. You may use [is-keyword-js] to tell them apart.\n\nWhitespace includes both line terminators and other whitespace.\n\nFor example usage, please see this [gist].\n\n[is-keyword-js]: https://github.com/crissdev/is-keyword-js\n[gist]: https://gist.github.com/lydell/be49dbf80c382c473004\n\n\nInvalid code handling\n=====================\n\nUnterminated strings are still matched as strings. JavaScript strings cannot\ncontain (unescaped) newlines, so unterminated strings simply end at the end of\nthe line. Unterminated template strings can contain unescaped newlines, though,\nso they go on to the end of input.\n\nUnterminated multi-line comments are also still matched as comments. They\nsimply go on to the end of the input.\n\nUnterminated regex literals are likely matched as division and whatever is\ninside the regex.\n\nInvalid ASCII characters have their own capturing group.\n\nInvalid non-ASCII characters are treated as names, to simplify the matching of\nnames (except unicode spaces which are treated as whitespace).\n\nRegex literals may contain invalid regex syntax. They are still matched as\nregex literals. They may also contain repeated regex flags, to keep the regex\nsimple.\n\nStrings may contain invalid escape sequences.\n\n\nLimitations\n===========\n\nTokenizing JavaScript using regexes—in fact, _one single regex_—won’t be\nperfect. But that’s not the point either.\n\nYou may compare jsTokens with [esprima] by using `esprima-compare.js`.\nSee `npm run esprima-compare`!\n\n[esprima]: http://esprima.org/\n\n### Template string interpolation ###\n\nTemplate strings are matched as single tokens, from the starting `` ` `` to the\nending `` ` ``, including interpolations (whose tokens are not matched\nindividually).\n\nMatching template string interpolations requires recursive balancing of `{` and\n`}`—something that JavaScript regexes cannot do. Only one level of nesting is\nsupported.\n\n### Division and regex literals collision ###\n\nConsider this example:\n\n```js\nvar g = 9.82\nvar number = bar / 2/g\n\nvar regex = / 2/g\n```\n\nA human can easily understand that in the `number` line we’re dealing with\ndivision, and in the `regex` line we’re dealing with a regex literal. How come?\nBecause humans can look at the whole code to put the `/` characters in context.\nA JavaScript regex cannot. It only sees forwards.\n\nWhen the `jsTokens` regex scans throught the above, it will see the following\nat the end of both the `number` and `regex` rows:\n\n```js\n/ 2/g\n```\n\nIt is then impossible to know if that is a regex literal, or part of an\nexpression dealing with division.\n\nHere is a similar case:\n\n```js\nfoo /= 2/g\nfoo(/= 2/g)\n```\n\nThe first line divides the `foo` variable with `2/g`. The second line calls the\n`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only\nsees forwards, it cannot tell the two cases apart.\n\nThere are some cases where we _can_ tell division and regex literals apart,\nthough.\n\nFirst off, we have the simple cases where there’s only one slash in the line:\n\n```js\nvar foo = 2/g\nfoo /= 2\n```\n\nRegex literals cannot contain newlines, so the above cases are correctly\nidentified as division. Things are only problematic when there are more than\none non-comment slash in a single line.\n\nSecondly, not every character is a valid regex flag.\n\n```js\nvar number = bar / 2/e\n```\n\nThe above example is also correctly identified as division, because `e` is not a\nvalid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*`\n(any letter) as flags, but it is not worth it since it increases the amount of\nambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are\nallowed. This means that the above example will be identified as division as\nlong as you don’t rename the `e` variable to some permutation of `gmiyu` 1 to 5\ncharacters long.\n\nLastly, we can look _forward_ for information.\n\n- If the token following what looks like a regex literal is not valid after a\n regex literal, but is valid in a division expression, then the regex literal\n is treated as division instead. For example, a flagless regex cannot be\n followed by a string, number or name, but all of those three can be the\n denominator of a division.\n- Generally, if what looks like a regex literal is followed by an operator, the\n regex literal is treated as division instead. This is because regexes are\n seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division\n could likely be part of such an expression.\n\nPlease consult the regex source and the test cases for precise information on\nwhen regex or division is matched (should you need to know). In short, you\ncould sum it up as:\n\nIf the end of a statement looks like a regex literal (even if it isn’t), it\nwill be treated as one. Otherwise it should work as expected (if you write sane\ncode).\n\n\nLicense\n=======\n\n[The X11 (“MIT”) License](LICENSE).\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/lydell/js-tokens/issues" }, "_id": "js-tokens@1.0.2", "_from": "js-tokens@^1.0.1", "realName": "js-tokens", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/loose-envify/node_modules/js-tokens", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/loose-envify/node_modules/js-tokens", "parent": "[Circular]", "depth": 5, "peerDependencies": {} } }, "devDependencies": { "browserify": "^11.0.1", "envify": "^3.4.0", "tap": "^1.4.0" }, "readme": "# loose-envify\n\n[![Build Status](https://travis-ci.org/zertosh/loose-envify.svg?branch=master)](https://travis-ci.org/zertosh/loose-envify)\n\nFast (and loose) selective `process.env` replacer using [js-tokens](https://github.com/lydell/js-tokens) instead of an AST. Works just like [envify](https://github.com/hughsk/envify) but much faster.\n\n## Gotchas\n\n* Doesn't handle broken syntax.\n* Doesn't look inside embedded expressions in template strings.\n - **this won't work:**\n ```js\n console.log(`the current env is ${process.env.NODE_ENV}`);\n ```\n* Doesn't replace oddly-spaced or oddly-commented expressions.\n - **this won't work:**\n ```js\n console.log(process./*won't*/env./*work*/NODE_ENV);\n ```\n\n## Usage/Options\n\nloose-envify has the exact same interface as [envify](https://github.com/hughsk/envify).\n\n## Benchmark\n\n```\nenvify:\n\n $ for i in {1..5}; do node bench/bench.js 'envify'; done\n 708ms\n 727ms\n 791ms\n 719ms\n 720ms\n\nloose-envify:\n\n $ for i in {1..5}; do node bench/bench.js '../'; done\n 51ms\n 52ms\n 52ms\n 52ms\n 52ms\n```\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/zertosh/loose-envify/issues" }, "_id": "loose-envify@1.1.0", "_from": "loose-envify@^1.0.0", "realName": "loose-envify", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/loose-envify", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/loose-envify", "parent": "[Circular]", "depth": 4, "peerDependencies": {} }, "promise": { "name": "promise", "version": "7.1.1", "description": "Bare bones Promises/A+ implementation", "main": "index.js", "scripts": { "prepublish": "node build", "pretest": "node build", "pretest-resolve": "node build", "pretest-extensions": "node build", "pretest-memory-leak": "node build", "test": "mocha --bail --timeout 200 --slow 99999 -R dot && npm run test-memory-leak", "test-resolve": "mocha test/resolver-tests.js --timeout 200 --slow 999999", "test-extensions": "mocha test/extensions-tests.js --timeout 200 --slow 999999", "test-memory-leak": "node --expose-gc test/memory-leak.js", "coverage": "istanbul cover node_modules/mocha/bin/_mocha -- --bail --timeout 200 --slow 99999 -R dot" }, "repository": { "type": "git", "url": "https://github.com/then/promise.git" }, "author": { "name": "ForbesLindesay" }, "license": "MIT", "devDependencies": { "acorn": "^1.0.1", "better-assert": "*", "istanbul": "^0.3.13", "mocha": "*", "promises-aplus-tests": "*", "rimraf": "^2.3.2" }, "dependencies": { "asap": { "name": "asap", "version": "2.0.3", "description": "High-priority task queue for Node.js and browsers", "keywords": [ "event", "task", "queue" ], "license": { "type": "MIT", "url": "https://github.com/kriskowal/asap/raw/master/LICENSE.md" }, "repository": { "type": "git", "url": "https://github.com/kriskowal/asap.git" }, "main": "./asap.js", "browser": { "./asap.js": "./browser-asap.js", "./raw.js": "./browser-raw.js", "./test/domain.js": "./test/browser-domain.js" }, "files": [ "raw.js", "asap.js", "browser-raw.js", "browser-asap.js" ], "scripts": { "test": "npm run lint && npm run test-node", "test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker", "test-node": "node test/asap-test.js", "test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy", "test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener", "test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json", "test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json", "test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json", "test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json", "lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)" }, "devDependencies": { "events": "^1.0.1", "jshint": "^2.5.1", "knox": "^0.8.10", "mr": "^2.0.5", "opener": "^1.3.0", "q": "^2.0.3", "q-io": "^2.0.3", "saucelabs": "^0.1.1", "wd": "^0.2.21", "weak-map": "^1.0.5" }, "readme": "# ASAP\n\n[![Build Status](https://travis-ci.org/kriskowal/asap.png?branch=master)](https://travis-ci.org/kriskowal/asap)\n\nPromise and asynchronous observer libraries, as well as hand-rolled callback\nprograms and libraries, often need a mechanism to postpone the execution of a\ncallback until the next available event.\n(See [Designing API’s for Asynchrony][Zalgo].)\nThe `asap` function executes a task **as soon as possible** but not before it\nreturns, waiting only for the completion of the current event and previously\nscheduled tasks.\n\n```javascript\nasap(function () {\n // ...\n});\n```\n\n[Zalgo]: http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony\n\nThis CommonJS package provides an `asap` module that exports a function that\nexecutes a task function *as soon as possible*.\n\nASAP strives to schedule events to occur before yielding for IO, reflow,\nor redrawing.\nEach event receives an independent stack, with only platform code in parent\nframes and the events run in the order they are scheduled.\n\nASAP provides a fast event queue that will execute tasks until it is\nempty before yielding to the JavaScript engine's underlying event-loop.\nWhen a task gets added to a previously empty event queue, ASAP schedules a flush\nevent, preferring for that event to occur before the JavaScript engine has an\nopportunity to perform IO tasks or rendering, thus making the first task and\nsubsequent tasks semantically indistinguishable.\nASAP uses a variety of techniques to preserve this invariant on different\nversions of browsers and Node.js.\n\nBy design, ASAP prevents input events from being handled until the task\nqueue is empty.\nIf the process is busy enough, this may cause incoming connection requests to be\ndropped, and may cause existing connections to inform the sender to reduce the\ntransmission rate or stall.\nASAP allows this on the theory that, if there is enough work to do, there is no\nsense in looking for trouble.\nAs a consequence, ASAP can interfere with smooth animation.\nIf your task should be tied to the rendering loop, consider using\n`requestAnimationFrame` instead.\nA long sequence of tasks can also effect the long running script dialog.\nIf this is a problem, you may be able to use ASAP’s cousin `setImmediate` to\nbreak long processes into shorter intervals and periodically allow the browser\nto breathe.\n`setImmediate` will yield for IO, reflow, and repaint events.\nIt also returns a handler and can be canceled.\nFor a `setImmediate` shim, consider [YuzuJS setImmediate][setImmediate].\n\n[setImmediate]: https://github.com/YuzuJS/setImmediate\n\nTake care.\nASAP can sustain infinite recursive calls without warning.\nIt will not halt from a stack overflow, and it will not consume unbounded\nmemory.\nThis is behaviorally equivalent to an infinite loop.\nJust as with infinite loops, you can monitor a Node.js process for this behavior\nwith a heart-beat signal.\nAs with infinite loops, a very small amount of caution goes a long way to\navoiding problems.\n\n```javascript\nfunction loop() {\n asap(loop);\n}\nloop();\n```\n\nIn browsers, if a task throws an exception, it will not interrupt the flushing\nof high-priority tasks.\nThe exception will be postponed to a later, low-priority event to avoid\nslow-downs.\nIn Node.js, if a task throws an exception, ASAP will resume flushing only if—and\nonly after—the error is handled by `domain.on(\"error\")` or\n`process.on(\"uncaughtException\")`.\n\n## Raw ASAP\n\nChecking for exceptions comes at a cost.\nThe package also provides an `asap/raw` module that exports the underlying\nimplementation which is faster but stalls if a task throws an exception.\nThis internal version of the ASAP function does not check for errors.\nIf a task does throw an error, it will stall the event queue unless you manually\ncall `rawAsap.requestFlush()` before throwing the error, or any time after.\n\nIn Node.js, `asap/raw` also runs all tasks outside any domain.\nIf you need a task to be bound to your domain, you will have to do it manually.\n\n```js\nif (process.domain) {\n task = process.domain.bind(task);\n}\nrawAsap(task);\n```\n\n## Tasks\n\nA task may be any object that implements `call()`.\nA function will suffice, but closures tend not to be reusable and can cause\ngarbage collector churn.\nBoth `asap` and `rawAsap` accept task objects to give you the option of\nrecycling task objects or using higher callable object abstractions.\nSee the `asap` source for an illustration.\n\n\n## Compatibility\n\nASAP is tested on Node.js v0.10 and in a broad spectrum of web browsers.\nThe following charts capture the browser test results for the most recent\nrelease.\nThe first chart shows test results for ASAP running in the main window context.\nThe second chart shows test results for ASAP running in a web worker context.\nTest results are inconclusive (grey) on browsers that do not support web\nworkers.\nThese data are captured automatically by [Continuous\nIntegration][].\n\n[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md\n\n![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg)\n\n![Compatibility in Web Workers](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-worker-results-matrix.svg)\n\n## Caveats\n\nWhen a task is added to an empty event queue, it is not always possible to\nguarantee that the task queue will begin flushing immediately after the current\nevent.\nHowever, once the task queue begins flushing, it will not yield until the queue\nis empty, even if the queue grows while executing tasks.\n\nThe following browsers allow the use of [DOM mutation observers][] to access\nthe HTML [microtask queue][], and thus begin flushing ASAP's task queue\nimmediately at the end of the current event loop turn, before any rendering or\nIO:\n\n[microtask queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#microtask-queue\n[DOM mutation observers]: http://dom.spec.whatwg.org/#mutation-observers\n\n- Android 4–4.3\n- Chrome 26–34\n- Firefox 14–29\n- Internet Explorer 11\n- iPad Safari 6–7.1\n- iPhone Safari 7–7.1\n- Safari 6–7\n\nIn the absense of mutation observers, there are a few browsers, and situations\nlike web workers in some of the above browsers, where [message channels][]\nwould be a useful way to avoid falling back to timers.\nMessage channels give direct access to the HTML [task queue][], so the ASAP\ntask queue would flush after any already queued rendering and IO tasks, but\nwithout having the minimum delay imposed by timers.\nHowever, among these browsers, Internet Explorer 10 and Safari do not reliably\ndispatch messages, so they are not worth the trouble to implement.\n\n[message channels]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#message-channels\n[task queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#concept-task\n\n- Internet Explorer 10\n- Safair 5.0-1\n- Opera 11-12\n\nIn the absense of mutation observers, these browsers and the following browsers\nall fall back to using `setTimeout` and `setInterval` to ensure that a `flush`\noccurs.\nThe implementation uses both and cancels whatever handler loses the race, since\n`setTimeout` tends to occasionally skip tasks in unisolated circumstances.\nTimers generally delay the flushing of ASAP's task queue for four milliseconds.\n\n- Firefox 3–13\n- Internet Explorer 6–10\n- iPad Safari 4.3\n- Lynx 2.8.7\n\n\n## Heritage\n\nASAP has been factored out of the [Q][] asynchronous promise library.\nIt originally had a naïve implementation in terms of `setTimeout`, but\n[Malte Ubl][NonBlocking] provided an insight that `postMessage` might be\nuseful for creating a high-priority, no-delay event dispatch hack.\nSince then, Internet Explorer proposed and implemented `setImmediate`.\nRobert Katić began contributing to Q by measuring the performance of\nthe internal implementation of `asap`, paying particular attention to\nerror recovery.\nDomenic, Robert, and Kris Kowal collectively settled on the current strategy of\nunrolling the high-priority event queue internally regardless of what strategy\nwe used to dispatch the potentially lower-priority flush event.\nDomenic went on to make ASAP cooperate with Node.js domains.\n\n[Q]: https://github.com/kriskowal/q\n[NonBlocking]: http://www.nonblocking.io/2011/06/windownexttick.html\n\nFor further reading, Nicholas Zakas provided a thorough article on [The\nCase for setImmediate][NCZ].\n\n[NCZ]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/\n\nEmber’s RSVP promise implementation later [adopted][RSVP ASAP] the name ASAP but\nfurther developed the implentation.\nParticularly, The `MessagePort` implementation was abandoned due to interaction\n[problems with Mobile Internet Explorer][IE Problems] in favor of an\nimplementation backed on the newer and more reliable DOM `MutationObserver`\ninterface.\nThese changes were back-ported into this library.\n\n[IE Problems]: https://github.com/cujojs/when/issues/197\n[RSVP ASAP]: https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\nIn addition, ASAP factored into `asap` and `asap/raw`, such that `asap` remained\nexception-safe, but `asap/raw` provided a tight kernel that could be used for\ntasks that guaranteed that they would not throw exceptions.\nThis core is useful for promise implementations that capture thrown errors in\nrejected promises and do not need a second safety net.\nAt the same time, the exception handling in `asap` was factored into separate\nimplementations for Node.js and browsers, using the the [Browserify][Browser\nConfig] `browser` property in `package.json` to instruct browser module loaders\nand bundlers, including [Browserify][], [Mr][], and [Mop][], to use the\nbrowser-only implementation.\n\n[Browser Config]: https://gist.github.com/defunctzombie/4339901\n[Browserify]: https://github.com/substack/node-browserify\n[Mr]: https://github.com/montagejs/mr\n[Mop]: https://github.com/montagejs/mop\n\n## License\n\nCopyright 2009-2014 by Contributors\nMIT License (enclosed)\n\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/kriskowal/asap/issues" }, "_id": "asap@2.0.3", "_from": "asap@~2.0.3", "realName": "asap", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/promise/node_modules/asap", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/promise/node_modules/asap", "parent": "[Circular]", "depth": 5, "peerDependencies": {} } }, "readme": "\n# promise\n\nThis is a simple implementation of Promises. It is a super set of ES6 Promises designed to have readable, performant code and to provide just the extensions that are absolutely necessary for using promises today.\n\nFor detailed tutorials on its use, see www.promisejs.org\n\n**N.B.** This promise exposes internals via underscore (`_`) prefixed properties. If you use these, your code will break with each new release.\n\n[![travis][travis-image]][travis-url]\n[![dep][dep-image]][dep-url]\n[![npm][npm-image]][npm-url]\n[![downloads][downloads-image]][downloads-url]\n\n[travis-image]: https://img.shields.io/travis/then/promise.svg?style=flat\n[travis-url]: https://travis-ci.org/then/promise\n[dep-image]: https://img.shields.io/gemnasium/then/promise.svg?style=flat\n[dep-url]: https://gemnasium.com/then/promise\n[npm-image]: https://img.shields.io/npm/v/promise.svg?style=flat\n[npm-url]: https://npmjs.org/package/promise\n[downloads-image]: https://img.shields.io/npm/dm/promise.svg?style=flat\n[downloads-url]: https://npmjs.org/package/promise\n\n## Installation\n\n**Server:**\n\n $ npm install promise\n\n**Client:**\n\nYou can use browserify on the client, or use the pre-compiled script that acts as a polyfill.\n\n```html\n\n```\n\nNote that the [es5-shim](https://github.com/es-shims/es5-shim) must be loaded before this library to support browsers pre IE9.\n\n```html\n\n```\n\n## Usage\n\nThe example below shows how you can load the promise library (in a way that works on both client and server using node or browserify). It then demonstrates creating a promise from scratch. You simply call `new Promise(fn)`. There is a complete specification for what is returned by this method in [Promises/A+](http://promises-aplus.github.com/promises-spec/).\n\n```javascript\nvar Promise = require('promise');\n\nvar promise = new Promise(function (resolve, reject) {\n get('http://www.google.com', function (err, res) {\n if (err) reject(err);\n else resolve(res);\n });\n});\n```\n\nIf you need [domains](https://iojs.org/api/domain.html) support, you should instead use:\n\n```js\nvar Promise = require('promise/domains');\n```\n\nIf you are in an environment that implements `setImmediate` and don't want the optimisations provided by asap, you can use:\n\n```js\nvar Promise = require('promise/setimmediate');\n```\n\nIf you only want part of the features, e.g. just a pure ES6 polyfill:\n\n```js\nvar Promise = require('promise/lib/es6-extensions');\n// or require('promise/domains/es6-extensions');\n// or require('promise/setimmediate/es6-extensions');\n```\n\n## Unhandled Rejections\n\nBy default, promises silence any unhandled rejections.\n\nYou can enable logging of unhandled ReferenceErrors and TypeErrors via:\n\n```js\nrequire('promise/lib/rejection-tracking').enable();\n```\n\nDue to the performance cost, you should only do this during development.\n\nYou can enable logging of all unhandled rejections if you need to debug an exception you think is being swallowed by promises:\n\n```js\nrequire('promise/lib/rejection-tracking').enable(\n {allRejections: true}\n);\n```\n\nDue to the high probability of false positives, I only recommend using this when debugging specific issues that you think may be being swallowed. For the preferred debugging method, see `Promise#done(onFulfilled, onRejected)`.\n\n`rejection-tracking.enable(options)` takes the following options:\n\n - allRejections (`boolean`) - track all exceptions, not just reference errors and type errors. Note that this has a high probability of resulting in false positives if your code loads data optimisticly\n - whitelist (`Array`) - this defaults to `[ReferenceError, TypeError]` but you can override it with your own list of error constructors to track.\n - `onUnhandled(id, error)` and `onHandled(id, error)` - you can use these to provide your own customised display for errors. Note that if possible you should indicate that the error was a false positive if `onHandled` is called. `onHandled` is only called if `onUnhandled` has already been called.\n\nTo reduce the chance of false-positives there is a delay of up to 2 seconds before errors are logged. This means that if you attach an error handler within 2 seconds, it won't be logged as a false positive. ReferenceErrors and TypeErrors are only subject to a 100ms delay due to the higher likelihood that the error is due to programmer error.\n\n## API\n\nBefore all examples, you will need:\n\n```js\nvar Promise = require('promise');\n```\n\n### new Promise(resolver)\n\nThis creates and returns a new promise. `resolver` must be a function. The `resolver` function is passed two arguments:\n\n 1. `resolve` should be called with a single argument. If it is called with a non-promise value then the promise is fulfilled with that value. If it is called with a promise (A) then the returned promise takes on the state of that new promise (A).\n 2. `reject` should be called with a single argument. The returned promise will be rejected with that argument.\n\n### Static Functions\n\n These methods are invoked by calling `Promise.methodName`.\n\n#### Promise.resolve(value)\n\n(deprecated aliases: `Promise.from(value)`, `Promise.cast(value)`)\n\nConverts values and foreign promises into Promises/A+ promises. If you pass it a value then it returns a Promise for that value. If you pass it something that is close to a promise (such as a jQuery attempt at a promise) it returns a Promise that takes on the state of `value` (rejected or fulfilled).\n\n#### Promise.reject(value)\n\nReturns a rejected promise with the given value.\n\n#### Promise.all(array)\n\nReturns a promise for an array. If it is called with a single argument that `Array.isArray` then this returns a promise for a copy of that array with any promises replaced by their fulfilled values. e.g.\n\n```js\nPromise.all([Promise.resolve('a'), 'b', Promise.resolve('c')])\n .then(function (res) {\n assert(res[0] === 'a')\n assert(res[1] === 'b')\n assert(res[2] === 'c')\n })\n```\n\n#### Promise.denodeify(fn)\n\n_Non Standard_\n\nTakes a function which accepts a node style callback and returns a new function that returns a promise instead.\n\ne.g.\n\n```javascript\nvar fs = require('fs')\n\nvar read = Promise.denodeify(fs.readFile)\nvar write = Promise.denodeify(fs.writeFile)\n\nvar p = read('foo.json', 'utf8')\n .then(function (str) {\n return write('foo.json', JSON.stringify(JSON.parse(str), null, ' '), 'utf8')\n })\n```\n\n#### Promise.nodeify(fn)\n\n_Non Standard_\n\nThe twin to `denodeify` is useful when you want to export an API that can be used by people who haven't learnt about the brilliance of promises yet.\n\n```javascript\nmodule.exports = Promise.nodeify(awesomeAPI)\nfunction awesomeAPI(a, b) {\n return download(a, b)\n}\n```\n\nIf the last argument passed to `module.exports` is a function, then it will be treated like a node.js callback and not parsed on to the child function, otherwise the API will just return a promise.\n\n### Prototype Methods\n\nThese methods are invoked on a promise instance by calling `myPromise.methodName`\n\n### Promise#then(onFulfilled, onRejected)\n\nThis method follows the [Promises/A+ spec](http://promises-aplus.github.io/promises-spec/). It explains things very clearly so I recommend you read it.\n\nEither `onFulfilled` or `onRejected` will be called and they will not be called more than once. They will be passed a single argument and will always be called asynchronously (in the next turn of the event loop).\n\nIf the promise is fulfilled then `onFulfilled` is called. If the promise is rejected then `onRejected` is called.\n\nThe call to `.then` also returns a promise. If the handler that is called returns a promise, the promise returned by `.then` takes on the state of that returned promise. If the handler that is called returns a value that is not a promise, the promise returned by `.then` will be fulfilled with that value. If the handler that is called throws an exception then the promise returned by `.then` is rejected with that exception.\n\n#### Promise#catch(onRejected)\n\nSugar for `Promise#then(null, onRejected)`, to mirror `catch` in synchronous code.\n\n#### Promise#done(onFulfilled, onRejected)\n\n_Non Standard_\n\nThe same semantics as `.then` except that it does not return a promise and any exceptions are re-thrown so that they can be logged (crashing the application in non-browser environments)\n\n#### Promise#nodeify(callback)\n\n_Non Standard_\n\nIf `callback` is `null` or `undefined` it just returns `this`. If `callback` is a function it is called with rejection reason as the first argument and result as the second argument (as per the node.js convention).\n\nThis lets you write API functions that look like:\n\n```javascript\nfunction awesomeAPI(foo, bar, callback) {\n return internalAPI(foo, bar)\n .then(parseResult)\n .then(null, retryErrors)\n .nodeify(callback)\n}\n```\n\nPeople who use typical node.js style callbacks will be able to just pass a callback and get the expected behavior. The enlightened people can not pass a callback and will get awesome promises.\n\n## License\n\n MIT\n", "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/then/promise/issues" }, "_id": "promise@7.1.1", "_from": "promise@^7.0.3", "realName": "promise", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/promise", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/promise", "parent": "[Circular]", "depth": 4, "peerDependencies": {} }, "ua-parser-js": { "title": "UAParser.js", "name": "ua-parser-js", "version": "0.7.10", "author": { "name": "Faisal Salman", "email": "fyzlman@gmail.com", "url": "http://faisalman.com" }, "description": "Lightweight JavaScript-based user-agent string parser", "keywords": [ "user-agent", "parser", "browser", "engine", "os", "device", "cpu" ], "homepage": "http://github.com/faisalman/ua-parser-js", "contributors": [ { "name": "Faisal Salman", "email": "fyzlman@gmail.com" }, { "name": "Benjamin Bertrand", "email": "bertrand.design@gmail.com" }, { "name": "Carl C Von Lewin", "email": "carlchristianlewin@gmail.com" }, { "name": "Christopher De Cairos", "email": "chris.decairos@gmail.com" }, { "name": "Davit Barbakadze", "email": "jayarjo@gmail.com" }, { "name": "Dmitry Tyschenko", "email": "dtyschenko@gmail.com" }, { "name": "Douglas Li", "email": "doug@knotch.it" }, { "name": "Dumitru Uzun", "email": "contact@duzun.me" }, { "name": "Erik Hesselink", "email": "hesselink@gmail.com" }, { "name": "Fabian Becker", "email": "halfdan@xnorfz.de" }, { "name": "Hendrik Helwich", "email": "h.helwich@iplabs.de" }, { "name": "Jackpoll", "email": "jackpoll123456@gmail.com" }, { "name": "Jake Mc", "email": "startswithaj@users.noreply.github.com" }, { "name": "John Tantalo", "email": "john.tantalo@gmail.com" }, { "name": "John Yanarella", "email": "jmy@codecatalyst.com" }, { "name": "Jon Buckley", "email": "jon@jbuckley.ca" }, { "name": "Kendall Buchanan", "email": "kendall@kendagriff.com" }, { "name": "Lee Treveil", "email": "leetreveil@gmail.com" }, { "name": "Leonardo", "email": "leofiore@libero.it" }, { "name": "Max Maurer", "email": "maxemanuel.maurer@gmail.com" }, { "name": "Michael Hess", "email": "mhess@connectify.me" }, { "name": "OtakuSiD", "email": "otakusid@gmail.com" }, { "name": "Ross Noble", "email": "rosshnoble@gmail.com" }, { "name": "Sandro Sonntag", "email": "sandro.sonntag@adorsys.de" } ], "main": "src/ua-parser.js", "scripts": { "build": "uglifyjs src/ua-parser.js > dist/ua-parser.min.js --comments '/UAParser\\.js/' && uglifyjs src/ua-parser.js > dist/ua-parser.pack.js --comments '/UAParser\\.js/' --compress --mangle", "test": "jshint src/ua-parser.js && mocha -R nyan test/test.js", "verup": "node ./node_modules/verup", "version": "node ./node_modules/verup 0" }, "verup": { "files": [ "ua-parser-js.jquery.json", "component.json", "bower.json", "package.js", "src/ua-parser.js" ], "regs": [ "^((?:\\$|(\\s*\\*\\s*@)|(\\s*(?:var|,)?\\s+))(?:LIBVERSION|version)[\\s\\:='\"]+)([0-9]+(?:\\.[0-9]+){2,2})", "^(\\s?\\*.*v)([0-9]+(?:\\.[0-9]+){2,2})" ] }, "devDependencies": { "jshint": "~1.1.0", "mocha": "~1.8.0", "uglify-js": "~1.3.4", "verup": "^1.3.x" }, "repository": { "type": "git", "url": "https://github.com/faisalman/ua-parser-js.git" }, "licenses": [ { "type": "GPLv2", "url": "http://www.gnu.org/licenses/gpl-2.0.html" }, { "type": "MIT", "url": "http://www.opensource.org/licenses/mit-license.php" } ], "engines": { "node": "*" }, "directories": { "dist": "dist", "src": "src", "test": "test" }, "readme": "# UAParser.js\r\n\r\nLightweight JavaScript-based User-Agent string parser. Supports browser & node.js environment. Also available as jQuery/Zepto plugin, Component/Bower/Meteor package, & RequireJS/AMD module\r\n\r\n[![Build Status](https://travis-ci.org/faisalman/ua-parser-js.svg?branch=master)](https://travis-ci.org/faisalman/ua-parser-js)\r\n[![Flattr this](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/3867907/faisalmanua-parser-js-on-GitHub)\r\n\r\n* Author : Faisal Salman <>\r\n* Demo : http://faisalman.github.io/ua-parser-js\r\n* Source : https://github.com/faisalman/ua-parser-js\r\n\r\n## Features\r\n\r\nExtract detailed type of web browser, layout engine, operating system, cpu architecture, and device type/model purely from user-agent string with relatively lightweight footprint (~11KB minified / ~4KB gzipped). Written in vanilla js, which means it doesn't depends on any other library.\r\n\r\n![It's over 9000](https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/over9000.jpg)\r\n\r\n## Methods\r\n\r\n* `getBrowser()`\r\n * returns `{ name: '', version: '' }`\r\n\r\n```\r\n# Possible 'browser.name':\r\nAmaya, Android Browser, Arora, Avant, Baidu, Blazer, Bolt, Camino, Chimera, Chrome, \r\nChromium, Comodo Dragon, Conkeror, Dillo, Dolphin, Doris, Edge, Epiphany, Fennec,\r\nFirebird, Firefox, Flock, GoBrowser, iCab, ICE Browser, IceApe, IceCat, IceDragon, \r\nIceweasel, IE [Mobile], Iron, Jasmine, K-Meleon, Konqueror, Kindle, Links, \r\nLunascape, Lynx, Maemo, Maxthon, Midori, Minimo, MIUI Browser, [Mobile] Safari, \r\nMosaic, Mozilla, Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet], \r\nPhantomJS, Phoenix, Polaris, QQBrowser, RockMelt, Silk, Skyfire, SeaMonkey, SlimBrowser,\r\nSwiftfox, Tizen, UCBrowser, Vivaldi, w3m, Yandex\r\n\r\n# 'browser.version' determined dynamically\r\n```\r\n\r\n* `getDevice()`\r\n * returns `{ model: '', type: '', vendor: '' }` \r\n\r\n```\r\n# Possible 'device.type':\r\nconsole, mobile, tablet, smarttv, wearable, embedded\r\n\r\n# Possible 'device.vendor':\r\nAcer, Alcatel, Amazon, Apple, Archos, Asus, BenQ, BlackBerry, Dell, GeeksPhone, \r\nGoogle, HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian, \r\nNintendo, Nokia, Nvidia, Ouya, Palm, Panasonic, Polytron, RIM, Samsung, Sharp, \r\nSiemens, Sony-Ericsson, Sprint, Xbox, ZTE\r\n\r\n# 'device.model' determined dynamically\r\n```\r\n\r\n* `getEngine()`\r\n * returns `{ name: '', version: '' }`\r\n\r\n```\r\n# Possible 'engine.name'\r\nAmaya, EdgeHTML, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto, \r\nTasman, Trident, w3m, WebKit\r\n\r\n# 'engine.version' determined dynamically\r\n```\r\n\r\n* `getOS()`\r\n * returns `{ name: '', version: '' }`\r\n\r\n```\r\n# Possible 'os.name'\r\nAIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS, Contiki,\r\nFedora, Firefox OS, FreeBSD, Debian, DragonFly, Gentoo, GNU, Haiku, Hurd, iOS, \r\nJoli, Linpus, Linux, Mac OS, Mageia, Mandriva, MeeGo, Minix, Mint, Morph OS, NetBSD, \r\nNintendo, OpenBSD, OpenVMS, OS/2, Palm, PCLinuxOS, Plan9, Playstation, QNX, RedHat, \r\nRIM Tablet OS, RISC OS, Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen, \r\nUbuntu, UNIX, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk\r\n\r\n# 'os.version' determined dynamically\r\n```\r\n\r\n* `getCPU()`\r\n * returns `{ architecture: '' }`\r\n\r\n```\r\n# Possible 'cpu.architecture'\r\n68k, amd64, arm, arm64, avr, ia32, ia64, irix, irix64, mips, mips64, pa-risc, \r\nppc, sparc, sparc64\r\n```\r\n\r\n* `getResult()`\r\n * returns `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`\r\n\r\n* `getUA()`\r\n * returns UA string of current instance\r\n\r\n* `setUA(uastring)`\r\n * set & parse UA string\r\n\r\n## Example\r\n\r\n```html\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```\r\n\r\n### Using node.js\r\n\r\n```sh\r\n$ npm install ua-parser-js\r\n```\r\n\r\n```js\r\nvar http = require('http');\r\nvar parser = require('ua-parser-js');\r\n\r\nhttp.createServer(function (req, res) {\r\n // get user-agent header\r\n var ua = parser(req.headers['user-agent']);\r\n // write the result as response\r\n res.end(JSON.stringify(ua, null, ' '));\r\n})\r\n.listen(1337, '127.0.0.1');\r\n\r\nconsole.log('Server running at http://127.0.0.1:1337/');\r\n```\r\n\r\n### Using requirejs\r\n\r\n```js\r\nrequire(['ua-parser'], function(UAParser) {\r\n var parser = new UAParser();\r\n console.log(parser.getResult());\r\n});\r\n```\r\n\r\n### Using component\r\n\r\n```sh\r\n$ component install faisalman/ua-parser-js\r\n```\r\n\r\n### Using bower\r\n\r\n```sh\r\n$ bower install ua-parser-js\r\n```\r\n\r\n### Using meteor\r\n\r\n```sh\r\n$ meteor add faisalman:ua-parser-js\r\n```\r\n\r\n### Using jQuery/Zepto ($.ua)\r\n\r\nAlthough written in vanilla js (which means it doesn't depends on jQuery), this library will automatically detect if jQuery/Zepto is present and create `$.ua` object based on browser's user-agent (although in case you need, `window.UAParser` constructor is still present). To get/set user-agent you can use: `$.ua.get()` / `$.ua.set(uastring)`. \r\n\r\n```js\r\n// In browser with default user-agent: 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0':\r\n\r\n// Do some tests\r\nconsole.log($.ua.device); // {vendor: \"HTC\", model: \"Evo Shift 4G\", type: \"mobile\"}\r\nconsole.log($.ua.os); // {name: \"Android\", version: \"2.3.4\"}\r\nconsole.log($.ua.os.name); // \"Android\"\r\nconsole.log($.ua.get()); // \"Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0\"\r\n\r\n// reset to custom user-agent\r\n$.ua.set('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; Xoom Build/HWI69) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13');\r\n\r\n// Test again\r\nconsole.log($.ua.browser.name); // \"Safari\"\r\nconsole.log($.ua.engine.name); // \"Webkit\"\r\nconsole.log($.ua.device); // {vendor: \"Motorola\", model: \"Xoom\", type: \"tablet\"}\r\nconsole.log(parseInt($.ua.browser.version.split('.')[0], 10)); // 4\r\n```\r\n\r\n### Extending regex patterns\r\n\r\n* `UAParser(uastring[, extensions])`\r\n\r\nPass your own regexes to extend the limited matching rules.\r\n\r\n```js\r\n// Example:\r\nvar uaString = 'ownbrowser/1.3';\r\nvar ownBrowser = [[/(ownbrowser)\\/([\\w\\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION]];\r\nvar parser = new UAParser(uaString, {browser: ownBrowser});\r\nconsole.log(parser.getBrowser()); // {name: \"ownbrowser\", version: \"1.3\"}\r\n```\r\n\r\n## Development\r\n\r\nVerify, test, & minify script\r\n\r\n```sh\r\n$ npm run test\r\n$ npm run build\r\n```\r\n\r\nThen submit a pull request to https://github.com/faisalman/ua-parser-js under `develop` branch.\r\n\r\n\r\n## License\r\n\r\nDual licensed under GPLv2 & MIT\r\n\r\nCopyright © 2012-2015 Faisal Salman <>\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of \r\nthis software and associated documentation files (the \"Software\"), to deal in \r\nthe Software without restriction, including without limitation the rights to use, \r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell copies of the \r\nSoftware, and to permit persons to whom the Software is furnished to do so, \r\nsubject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all \r\ncopies or substantial portions of the Software.\r\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/faisalman/ua-parser-js/issues" }, "_id": "ua-parser-js@0.7.10", "_from": "ua-parser-js@^0.7.9", "realName": "ua-parser-js", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/ua-parser-js", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/ua-parser-js", "parent": "[Circular]", "depth": 4, "peerDependencies": {} }, "whatwg-fetch": { "name": "whatwg-fetch", "version": "0.9.0", "main": "fetch.js", "repository": { "type": "git", "url": "git://github.com/github/fetch" }, "licenses": [ { "type": "MIT", "url": "https://github.com/github/fetch/blob/master/LICENSE" } ], "devDependencies": { "bower": "1.3.8", "chai": "1.10.0", "jshint": "2.5.2", "mocha-phantomjs": "3.5.2", "mocha": "2.1.0", "phantomjs": "1.9.13" }, "files": [ "LICENSE", "fetch.js" ], "readme": "# window.fetch polyfill\n\nThe global `fetch` function is an easier way to make web requests and handle\nresponses than using an XMLHttpRequest. This polyfill is written as closely as\npossible to the standard Fetch specification at https://fetch.spec.whatwg.org.\n\n## Installation\n\nAvailable on [Bower](http://bower.io) as **fetch**.\n\n```sh\n$ bower install fetch\n```\n\nYou'll also need a Promise polyfill for older browsers.\n\n```sh\n$ bower install es6-promise\n```\n\nThis can also be installed with `npm`.\n\n```sh\n$ npm install whatwg-fetch --save\n```\n\n(For a node.js implementation, try [node-fetch](https://github.com/bitinn/node-fetch))\n\n## Usage\n\nThe `fetch` function supports any HTTP method. We'll focus on GET and POST\nexample requests.\n\n### HTML\n\n```javascript\nfetch('/users.html')\n .then(function(response) {\n return response.text()\n }).then(function(body) {\n document.body.innerHTML = body\n })\n```\n\n### JSON\n\n```javascript\nfetch('/users.json')\n .then(function(response) {\n return response.json()\n }).then(function(json) {\n console.log('parsed json', json)\n }).catch(function(ex) {\n console.log('parsing failed', ex)\n })\n```\n\n### Response metadata\n\n```javascript\nfetch('/users.json').then(function(response) {\n console.log(response.headers.get('Content-Type'))\n console.log(response.headers.get('Date'))\n console.log(response.status)\n console.log(response.statusText)\n})\n```\n\n### Post form\n\n```javascript\nvar form = document.querySelector('form')\n\nfetch('/query', {\n method: 'post',\n body: new FormData(form)\n})\n```\n\n### Post JSON\n\n```javascript\nfetch('/users', {\n method: 'post',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n name: 'Hubot',\n login: 'hubot',\n })\n})\n```\n\n### File upload\n\n```javascript\nvar input = document.querySelector('input[type=\"file\"]')\n\nvar form = new FormData()\nform.append('file', input.files[0])\nform.append('user', 'hubot')\n\nfetch('/avatars', {\n method: 'post',\n body: form\n})\n```\n\n### Success and error handlers\n\nThis causes `fetch` to behave like jQuery's `$.ajax` by rejecting the `Promise`\non HTTP failure status codes like 404, 500, etc. The response `Promise` is\nresolved only on successful, 200 level, status codes.\n\n```javascript\nfunction status(response) {\n if (response.status >= 200 && response.status < 300) {\n return response\n }\n throw new Error(response.statusText)\n}\n\nfunction json(response) {\n return response.json()\n}\n\nfetch('/users')\n .then(status)\n .then(json)\n .then(function(json) {\n console.log('request succeeded with json response', json)\n }).catch(function(error) {\n console.log('request failed', error)\n })\n```\n\n### Response URL caveat\n\nThe `Response` object has a URL attribute for the final responded resource.\nUsually this is the same as the `Request` url, but in the case of a redirect,\nits all transparent. Newer versions of XHR include a `responseURL` attribute\nthat returns this value. But not every browser supports this. The compromise\nrequires setting a special server side header to tell the browser what URL it\njust requested (yeah, I know browsers).\n\n``` ruby\nresponse.headers['X-Request-URL'] = request.url\n```\n\nIf you want `response.url` to be reliable, you'll want to set this header. The\nday that you ditch this polyfill and use native fetch only, you can remove the\nheader hack.\n\n## Browser Support\n\n![Chrome](https://raw.github.com/alrra/browser-logos/master/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/firefox/firefox_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/safari/safari_48x48.png)\n--- | --- | --- | --- | --- |\nLatest ✔ | Latest ✔ | 9+ ✔ | Latest ✔ | 6.1+ ✔ |\n", "readmeFilename": "README.md", "description": "The global `fetch` function is an easier way to make web requests and handle responses than using an XMLHttpRequest. This polyfill is written as closely as possible to the standard Fetch specification at https://fetch.spec.whatwg.org.", "bugs": { "url": "https://github.com/github/fetch/issues" }, "_id": "whatwg-fetch@0.9.0", "_from": "whatwg-fetch@^0.9.0", "scripts": {}, "realName": "whatwg-fetch", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/whatwg-fetch", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs/node_modules/whatwg-fetch", "parent": "[Circular]", "depth": 4, "peerDependencies": {} } }, "devEngines": { "node": ">=3", "npm": "2.x" }, "browserify": { "transform": [ "loose-envify" ] }, "readme": "# FBJS\n\n## Purpose\n\nTo make it easier for Facebook to share and consume our own JavaScript. Primarily this will allow us to ship code without worrying too much about where it lives, keeping with the spirit of `@providesModule` but working in the broader JavaScript ecosystem.\n\n**Note:** If you are consuming the code here and you are not also a Facebook project, be prepared for a bad time. APIs may appear or disappear and we may not follow semver strictly, though we will do our best to. This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. In order for us to move fast and ship projects like React and Relay, we've made the decision to not support everybody. We probably won't take your feature requests unless they align with our needs. There will be overlap in functionality here and in other open source projects.\n\n## Usage\n\nAny `@providesModule` modules that are used by your project should be added to `src/`. They will be built and added to `module-map.json`. This file will contain a map from `@providesModule` name to what will be published as `fbjs`. The `module-map.json` file can then be consumed in your own project, along with the [rewrite-modules](https://github.com/facebook/fbjs/blob/master/scripts/babel/rewrite-modules.js) Babel plugin (which we'll publish with this), to rewrite requires in your own project. Then, just make sure `fbjs` is a dependency in your `package.json` and your package will consume the shared code.\n\n```js\n// Before transform\nvar emptyFunction = require('emptyFunction');\n// After transform\nvar emptyFunction = require('fbjs/lib/emptyFunction');\n```\n\nSee React for an example of this. *Coming soon!*\n\n## Building\n\nIt's as easy as just running gulp. This assumes you've also done `npm install -g gulp`.\n\n```sh\ngulp\n```\n\nAlternatively `npm run build` will also work.\n\n### Layout\n\nRight now these packages represent a subset of packages that we use internally at Facebook. Mostly these are support libraries used when shipping larger libraries, like React and Relay, or products. Each of these packages is in its own directory under `src/`.\n\n### Process\n\nSince we use `@providesModule`, we need to rewrite requires to be relative. Thanks to `@providesModule` requiring global uniqueness, we can do this easily. Eventually we'll try to make this part of the process go away by making more projects use CommmonJS.\n\n\n## TODO\n\n- Flow: Ideally we'd ship our original files with type annotations, however that's not doable right now. We have a couple options:\n - Make sure our transpilation step converts inline type annotations to the comment format.\n - Make our build process also build Flow interface files which we can ship to npm.\n- Split into multiple packages. This will be better for more concise versioning, otherwise we'll likely just be shipping lots of major versions.\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/facebook/fbjs/issues" }, "_id": "fbjs@0.6.1", "_from": "fbjs@^0.6.1", "realName": "fbjs", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react/node_modules/fbjs", "parent": "[Circular]", "depth": 3, "peerDependencies": {} } }, "browserify": { "transform": [ "envify" ] }, "readme": "# react\n\nAn npm package to get you immediate access to [React](https://facebook.github.io/react/),\nwithout also requiring the JSX transformer. This is especially useful for cases where you\nwant to [`browserify`](https://github.com/substack/node-browserify) your module using\n`React`.\n\n**Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages.\n\nTo use React in production mode, set the environment variable `NODE_ENV` to `production`. A minifier that performs dead-code elimination such as [UglifyJS](https://github.com/mishoo/UglifyJS2) is recommended to completely remove the extra code present in development mode.\n\n## Example Usage\n\n```js\nvar React = require('react');\n\n// Addons are in separate packages:\nvar createFragment = require('react-addons-create-fragment');\nvar immutabilityHelpers = require('react-addons-update');\nvar CSSTransitionGroup = require('react-addons-css-transition-group');\n```\n\nFor a complete list of addons visit the [addons documentation page](https://facebook.github.io/react/docs/addons.html).\n", "readmeFilename": "README.md", "_id": "react@0.14.7", "_from": "react@>=0.14.0", "scripts": {}, "realName": "react", "extraneous": false, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts/node_modules/react", "parent": "[Circular]", "depth": 2, "peerDependencies": {} } }, "readme": "# pui-react-alerts\n\nReact components to display flash messages to the user\n\nPivotal UI React ([GitHub](https://github.com/pivotal-cf/pivotal-ui-react), [npm](https://www.npmjs.com/browse/keyword/pivotal%20ui%20modularized)) is a collection of [React](https://facebook.github.io/react/) components for rapidly building and prototyping UIs.\n\nThis component requires React v0.13\n\nSee the [Pivotal UI Styleguide](http://styleguide.pivotal.io/) for fully rendered examples.\n\n## Components\n\n### SuccessAlert\n\nDisplay a flash message to the user indicating success.\n\n```js\nvar SuccessAlert = require('pui-react-alerts').SuccessAlert;\nvar MyComponent = React.createClass({\n render() {\n return The action was successful.;\n }\n});\n```\n\n#### Properties\n\n- `dismissable`\n - `Boolean`: Determines whether the alert can be closed by the user\n - `Function`: Called when the user closes the alert\n\n- `withIcon`\n - `Boolean`: Whether to show an icon with the alert text.\n\n\n### InfoAlert\n\nDisplay an informational flash message to the user.\n\n```js\nvar InfoAlert = require('pui-react-alerts').InfoAlert;\nvar MyComponent = React.createClass({\n render() {\n return For your information...;\n }\n});\n```\n\n#### Properties\n\n- `dismissable`\n - `Boolean`: Determines whether the alert can be closed by the user\n - `Function`: Called when the user closes the alert\n\n- `withIcon`\n - `Boolean`: Whether to show an icon with the alert text.\n\n\n### WarningAlert\n\nDisplay a flash message to warn the user.\n\n```js\nvar WarningAlert = require('pui-react-alerts').WarningAlert;\nvar MyComponent = React.createClass({\n render() {\n return You've been mentioned in chat.;\n }\n});\n```\n\n#### Properties\n\n- `dismissable`\n - `Boolean`: Determines whether the alert can be closed by the user\n - `Function`: Called when the user closes the alert\n\n- `withIcon`\n - `Boolean`: Whether to show an icon with the alert text.\n\n\n### ErrorAlert\n\nDisplay a flash message to the user indicating an error condition.\n\n```js\nvar ErrorAlert = require('pui-react-alerts').ErrorAlert;\nvar MyComponent = React.createClass({\n render() {\n return Oops, something bad happened.;\n }\n});\n```\n\n#### Properties\n\n- `dismissable`\n - `Boolean`: Determines whether the alert can be closed by the user\n - `Function`: Called when the user closes the alert\n\n- `withIcon`\n - `Boolean`: Whether to show an icon with the alert text.\n\n\n*****************************************\n\n(c) Copyright 2015 Pivotal Software, Inc. All Rights Reserved.\n", "readmeFilename": "README.md", "_id": "pui-react-alerts@3.0.0-alpha.2", "_from": "pui-react-alerts@3.0.0-alpha.2", "realName": "pui-react-alerts", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-alerts", "parent": "[Circular]", "depth": 1 }, "pui-react-media": { "name": "pui-react-media", "version": "3.0.0-alpha.2", "description": "React components for laying out images/audio/video next to text content", "main": "media.js", "repository": { "type": "git", "url": "https://github.com/pivotal-cf/pivotal-ui.git" }, "keywords": [ "bootstrap", "react", "pivotal ui", "pivotal ui modularized" ], "author": { "name": "Pivotal Software, Inc" }, "license": "MIT", "bugs": { "url": "https://github.com/pivotal-cf/pivotal-ui/issues" }, "homepage": "http://styleguide.pivotal.io/", "peerDependencies": { "react": "^0.14.0" }, "dependencies": { "babel-runtime": { "name": "babel-runtime", "version": "5.8.35", "description": "babel selfContained runtime", "license": "MIT", "repository": { "type": "git", "url": "git://github.com/babel/babel" }, "author": { "name": "Sebastian McKenzie", "email": "sebmck@gmail.com" }, "dependencies": { "core-js": { "name": "core-js", "description": "Standard library", "version": "1.2.6", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git" }, "main": "index.js", "devDependencies": { "webpack": "1.12.x", "LiveScript": "1.3.x", "grunt": "0.4.x", "grunt-cli": "0.1.x", "grunt-livescript": "0.5.x", "grunt-contrib-uglify": "0.10.x", "grunt-contrib-watch": "0.6.x", "grunt-contrib-clean": "0.6.x", "grunt-contrib-copy": "0.8.x", "grunt-karma": "0.12.x", "karma": "0.13.x", "karma-qunit": "0.1.x", "karma-chrome-launcher": "0.2.x", "karma-ie-launcher": "0.2.x", "karma-firefox-launcher": "0.1.x", "karma-phantomjs-launcher": "0.2.x", "promises-aplus-tests": "2.1.x", "eslint": "1.9.x" }, "scripts": { "grunt": "grunt", "lint": "eslint es5 es6 es7 js web core fn modules", "promises-tests": "promises-aplus-tests tests/promises-aplus/adapter", "test": "npm run lint && npm run grunt livescript client karma:continuous library karma:continuous-library && npm run promises-tests && lsc tests/commonjs" }, "license": "MIT", "keywords": [ "ES5", "ECMAScript 5", "ES6", "ECMAScript 6", "ES7", "ECMAScript 7", "Harmony", "Strawman", "Map", "Set", "WeakMap", "WeakSet", "Promise", "Symbol", "Array generics", "setImmediate", "Dict", "partial application" ], "readme": "# core-js\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![version](https://img.shields.io/npm/v/core-js.svg)](https://www.npmjs.com/package/core-js) [![npm downloads](https://img.shields.io/npm/dm/core-js.svg)](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18&to=2114-11-18) [![Build Status](https://travis-ci.org/zloirock/core-js.png)](https://travis-ci.org/zloirock/core-js) [![devDependency Status](https://david-dm.org/zloirock/core-js/dev-status.svg)](https://david-dm.org/zloirock/core-js#info=devDependencies)\n\nModular compact standard library for JavaScript. Includes polyfills for [ECMAScript 5](#ecmascript-5), [ECMAScript 6](#ecmascript-6): [symbols](#ecmascript-6-symbol), [collections](#ecmascript-6-collections), [iterators](#ecmascript-6-iterators), [promises](#ecmascript-6-promise), [ECMAScript 7 proposals](#ecmascript-7); [setImmediate](#setimmediate), [array generics](#mozilla-javascript-array-generics). Some additional features such as [dictionaries](#dict) or [extended partial application](#partial-application). You can require only standardized features polyfills, use features without global namespace pollution or create a custom build.\n\n[Example](http://goo.gl/mfHYm2):\n```javascript\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\n'*'.repeat(10); // => '**********'\nPromise.resolve(32).then(log); // => 32\nsetImmediate(log, 42); // => 42\n```\n\n[Without global namespace pollution](http://goo.gl/WBhs43):\n```javascript\nvar core = require('core-js/library'); // With a modular system, otherwise use global `core`\ncore.Array.from(new core.Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\ncore.String.repeat('*', 10); // => '**********'\ncore.Promise.resolve(32).then(core.log); // => 32\ncore.setImmediate(core.log, 42); // => 42\n```\n\n- [Usage](#usage)\n - [Basic](#basic)\n - [CommonJS](#commonjs)\n - [Custom build](#custom-build)\n- [Features](#features)\n - [ECMAScript 5](#ecmascript-5)\n - [ECMAScript 6](#ecmascript-6)\n - [ECMAScript 6: Object](#ecmascript-6-object)\n - [ECMAScript 6: Function](#ecmascript-6-function)\n - [ECMAScript 6: Array](#ecmascript-6-array)\n - [ECMAScript 6: String](#ecmascript-6-string)\n - [ECMAScript 6: RegExp](#ecmascript-6-regexp)\n - [ECMAScript 6: Number](#ecmascript-6-number)\n - [ECMAScript 6: Math](#ecmascript-6-math)\n - [ECMAScript 6: Symbol](#ecmascript-6-symbol)\n - [ECMAScript 6: Collections](#ecmascript-6-collections)\n - [ECMAScript 6: Iterators](#ecmascript-6-iterators)\n - [ECMAScript 6: Promise](#ecmascript-6-promise)\n - [ECMAScript 6: Reflect](#ecmascript-6-reflect)\n - [ECMAScript 7](#ecmascript-7)\n - [Mozilla JavaScript: Array generics](#mozilla-javascript-array-generics)\n - [Web standards](#web-standards)\n - [setTimeout / setInterval](#settimeout--setinterval)\n - [setImmediate](#setimmediate)\n - [Non-standard](#non-standard)\n - [Object](#object)\n - [Dict](#dict)\n - [Partial application](#partial-application)\n - [Number Iterator](#number-iterator)\n - [Escaping HTML](#escaping-html)\n - [delay](#delay)\n - [console](#console)\n- [Missing polyfills](#missing-polyfills)\n- [Changelog](./CHANGELOG.md)\n\n## Usage\n### Basic\n```\nnpm i core-js\nbower install core.js\n```\n\n```javascript\n// Default\nrequire('core-js');\n// Without global namespace pollution\nvar core = require('core-js/library');\n// Shim only\nrequire('core-js/shim');\n```\nIf you need complete build for browser, use builds from `core-js/client` path: [default](https://raw.githack.com/zloirock/core-js/master/client/core.min.js), [without global namespace pollution](https://raw.githack.com/zloirock/core-js/master/client/library.min.js), [shim only](https://raw.githack.com/zloirock/core-js/master/client/shim.min.js).\n\nWarning: if you uses `core-js` with the extension of native objects, require all needed `core-js` modules at the beginning of entry point of your application, otherwise maybe conflicts.\n\n### CommonJS\nYou can require only needed modules.\n\n```js\nrequire('core-js/es5'); // if you need support IE8-\nrequire('core-js/fn/set');\nrequire('core-js/fn/array/from');\nrequire('core-js/fn/array/find-index');\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\n[1, 2, NaN, 3, 4].findIndex(isNaN); // => 2\n\n// or, w/o global namespace pollution:\n\nvar core = require('core-js/library/es5'); // if you need support IE8-\nvar Set = require('core-js/library/fn/set');\nvar from = require('core-js/library/fn/array/from');\nvar findIndex = require('core-js/library/fn/array/find-index');\nfrom(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\nfindIndex([1, 2, NaN, 3, 4], isNaN); // => 2\n```\nAvailable entry points for methods / constructors, as above examples, excluding features from [`es5`](#ecmascript-5) module (this module requires completely in ES3 environment before all other modules).\n\nAvailable namespaces: for example, `core-js/es6/array` (`core-js/library/es6/array`) contains all [ES6 `Array` features](#ecmascript-6-array), `core-js/es6` (`core-js/library/es6`) contains all ES6 features.\n\n### Custom build\n```\nnpm i core-js && cd node_modules/core-js && npm i\nnpm run grunt build:core.dict,es6 -- --blacklist=es6.promise,es6.math --library=on --path=custom uglify\n```\nWhere `core.dict` and `es6` are modules (namespaces) names, which will be added to the build, `es6.promise` and `es6.math` are modules (namespaces) names, which will be excluded from the build, `--library=on` is flag for build without global namespace pollution and `custom` is target file name.\n\nAvailable namespaces: for example, `es6.array` contains [ES6 `Array` features](#ecmascript-6-array), `es6` contains all modules whose names start with `es6`.\n\nAvailable custom build from js code (required `webpack`):\n```js\nrequire('core-js/build')({\n modules: ['es6', 'core.dict'], // modules / namespaces\n blacklist: ['es6.reflect'], // blacklist of modules / namespaces\n library: false, // flag for build without global namespace pollution\n}, function(err, code){ // callback\n // ...\n});\n```\n## Features:\n### ECMAScript 5\nModule [`es5`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es5.js), nothing new - without examples.\n```javascript\nObject\n .create(proto | null, descriptors?) -> object\n .getPrototypeOf(object) -> proto | null\n .defineProperty(target, key, desc) -> target, cap for ie8-\n .defineProperties(target, descriptors) -> target, cap for ie8-\n .getOwnPropertyDescriptor(object, key) -> desc\n .getOwnPropertyNames(object) -> array\n .keys(object) -> array\nArray\n .isArray(var) -> bool\n #slice(start?, end?) -> array, fix for ie7-\n #join(string = ',') -> string, fix for ie7-\n #indexOf(var, from?) -> int\n #lastIndexOf(var, from?) -> int\n #every(fn(val, index, @), that) -> bool\n #some(fn(val, index, @), that) -> bool\n #forEach(fn(val, index, @), that) -> void\n #map(fn(val, index, @), that) -> array\n #filter(fn(val, index, @), that) -> array\n #reduce(fn(memo, val, index, @), memo?) -> var\n #reduceRight(fn(memo, val, index, @), memo?) -> var\nFunction\n #bind(object, ...args) -> boundFn(...args)\nDate\n .now() -> int\n #toISOString() -> string\n```\nSome features moved to [another modules / namespaces](#ecmascript-6), but available as part of `es5` namespace too:\n```js\nObject\n .seal(object) -> object, cap for ie8-\n .freeze(object) -> object, cap for ie8-\n .preventExtensions(object) -> object, cap for ie8-\n .isSealed(object) -> bool, cap for ie8-\n .isFrozen(object) -> bool, cap for ie8-\n .isExtensible(object) -> bool, cap for ie8-\nString\n #trim() -> str\n```\n\n### ECMAScript 6\n#### ECMAScript 6: Object\nModules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.to-string.js).\n```javascript\nObject\n .assign(target, ...src) -> target\n .is(a, b) -> bool\n .setPrototypeOf(target, proto | null) -> target (required __proto__ - IE11+)\n #toString() -> string, ES6 fix: @@toStringTag support\n```\n[Example](http://goo.gl/VzmY3j):\n```javascript\nvar foo = {q: 1, w: 2}\n , bar = {e: 3, r: 4}\n , baz = {t: 5, y: 6};\nObject.assign(foo, bar, baz); // => foo = {q: 1, w: 2, e: 3, r: 4, t: 5, y: 6}\n\nObject.is(NaN, NaN); // => true\nObject.is(0, -0); // => false\nObject.is(42, 42); // => true\nObject.is(42, '42'); // => false\n\nfunction Parent(){}\nfunction Child(){}\nObject.setPrototypeOf(Child.prototype, Parent.prototype);\nnew Child instanceof Child; // => true\nnew Child instanceof Parent; // => true\n\nvar O = {};\nO[Symbol.toStringTag] = 'Foo';\n'' + O; // => '[object Foo]'\n```\nIn ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.keys.js), [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-own-property-names.js).\n```javascript\nObject\n .freeze(var) -> var\n .seal(var) -> var\n .preventExtensions(var) -> var\n .isFrozen(var) -> bool\n .isSealed(var) -> bool\n .isExtensible(var) -> bool\n .getOwnPropertyDescriptor(var, key) -> desc | undefined\n .getPrototypeOf(var) -> object | null\n .keys(var) -> array\n .getOwnPropertyNames(var) -> array\n```\n[Example](http://goo.gl/35lPSi):\n```javascript\nObject.keys('qwe'); // => ['0', '1', '2']\nObject.getPrototypeOf('qwe') === String.prototype; // => true\n```\n#### ECMAScript 6: Function\nModules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.function.name.js) and [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.function.has-instance.js).\n```javascript\nFunction\n #name -> string (IE9+)\n #@@hasInstance(var) -> bool\n```\n[Example](http://goo.gl/zqu3Wp):\n```javascript\n(function foo(){}).name // => 'foo'\n```\n#### ECMAScript 6: Array\nModules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.find.js) and [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.find-index.js).\n```javascript\nArray\n .from(iterable | array-like, mapFn(val, index)?, that) -> array\n .of(...args) -> array\n #copyWithin(target = 0, start = 0, end = @length) -> @\n #fill(val, start = 0, end = @length) -> @\n #find(fn(val, index, @), that) -> val\n #findIndex(fn(val, index, @), that) -> index\n #@@unscopables -> object (cap)\n```\n[Example](http://goo.gl/nxmJTe):\n```javascript\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\nArray.from({0: 1, 1: 2, 2: 3, length: 3}); // => [1, 2, 3]\nArray.from('123', Number); // => [1, 2, 3]\nArray.from('123', function(it){\n return it * it;\n}); // => [1, 4, 9]\n\nArray.of(1); // => [1]\nArray.of(1, 2, 3); // => [1, 2, 3]\n\nfunction isOdd(val){\n return val % 2;\n}\n[4, 8, 15, 16, 23, 42].find(isOdd); // => 15\n[4, 8, 15, 16, 23, 42].findIndex(isOdd); // => 2\n[4, 8, 15, 16, 23, 42].find(isNaN); // => undefined\n[4, 8, 15, 16, 23, 42].findIndex(isNaN); // => -1\n\nArray(5).fill(42); // => [42, 42, 42, 42, 42]\n\n[1, 2, 3, 4, 5].copyWithin(0, 3); // => [4, 5, 3, 4, 5]\n```\n#### ECMAScript 6: String\nModules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.raw.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.trim.js).\n```javascript\nString\n .fromCodePoint(...codePoints) -> str\n .raw({raw}, ...substitutions) -> str\n #includes(str, from?) -> bool\n #startsWith(str, from?) -> bool\n #endsWith(str, from?) -> bool\n #repeat(num) -> str\n #codePointAt(pos) -> uint\n #trim() -> str, ES6 fix\n```\n[Examples](http://goo.gl/RMyFBo):\n```javascript\n'foobarbaz'.includes('bar'); // => true\n'foobarbaz'.includes('bar', 4); // => false\n'foobarbaz'.startsWith('foo'); // => true\n'foobarbaz'.startsWith('bar', 3); // => true\n'foobarbaz'.endsWith('baz'); // => true\n'foobarbaz'.endsWith('bar', 6); // => true\n\n'string'.repeat(3); // => 'stringstringstring'\n\n'𠮷'.codePointAt(0); // => 134071\nString.fromCodePoint(97, 134071, 98); // => 'a𠮷b'\n\nvar name = 'Bob';\nString.raw`Hi\\n${name}!`; // => 'Hi\\\\nBob!' (ES6 template string syntax)\nString.raw({raw: 'test'}, 0, 1, 2); // => 't0e1s2t'\n```\n#### ECMAScript 6: RegExp\nModules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.flags.js).\n\nSupport well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.split.js).\n```\nString\n #match(tpl) -> var, ES6 fix for support @@match\n #replace(tpl, replacer) -> var, ES6 fix for support @@replace\n #search(tpl) -> var, ES6 fix for support @@search\n #split(tpl, limit) -> var, ES6 fix for support @@split\n[new] RegExp(pattern, flags?) -> regexp, ES6 fix: can alter flags (IE9+)\n #flags -> str (IE9+)\n #@@match(str) -> array | null\n #@@replace(str, replacer) -> string\n #@@search(str) -> index\n #@@split(str, limit) -> array\n```\n[Examples](http://goo.gl/vLV603):\n```javascript\nRegExp(/./g, 'm'); // => /./m\n\n/foo/.flags; // => ''\n/foo/gim.flags; // => 'gim'\n\n'foo'.match({[Symbol.match]: _ => 1}); // => 1\n'foo'.replace({[Symbol.replace]: _ => 2}); // => 2\n'foo'.search({[Symbol.search]: _ => 3}); // => 3\n'foo'.split({[Symbol.split]: _ => 4}); // => 4\n```\n#### ECMAScript 6: Number\nModule [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [example](http://goo.gl/jRd6b3):\n```javascript\nNumber('0b1010101'); // => 85\nNumber('0o7654321'); // => 2054353\n```\n`Number`: modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.parse-int.js).\n```javascript\n[new] Number(var) -> number | number object\n .EPSILON -> num\n .isFinite(num) -> bool\n .isInteger(num) -> bool\n .isNaN(num) -> bool\n .isSafeInteger(num) -> bool\n .MAX_SAFE_INTEGER -> int\n .MIN_SAFE_INTEGER -> int\n .parseFloat(str) -> num\n .parseInt(str) -> int\n```\n#### ECMAScript 6: Math\n`Math`: modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.trunc.js).\n```javascript\nMath\n .acosh(num) -> num\n .asinh(num) -> num\n .atanh(num) -> num\n .cbrt(num) -> num\n .clz32(num) -> uint\n .cosh(num) -> num\n .expm1(num) -> num\n .fround(num) -> num\n .hypot(...args) -> num\n .imul(num, num) -> int\n .log1p(num) -> num\n .log10(num) -> num\n .log2(num) -> num\n .sign(num) -> 1 | -1 | 0 | -0 | NaN\n .sinh(num) -> num\n .tanh(num) -> num\n .trunc(num) -> num\n```\n\n#### ECMAScript 6: Symbol\nModule [`es6.symbol`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.symbol.js).\n```javascript\nSymbol(description?) -> symbol\n .hasInstance -> @@hasInstance\n .isConcatSpreadable -> @@isConcatSpreadable\n .iterator -> @@iterator\n .match -> @@match\n .replace -> @@replace\n .search -> @@search\n .species -> @@species\n .split -> @@split\n .toPrimitive -> @@toPrimitive\n .toStringTag -> @@toStringTag\n .unscopables -> @@unscopables\n .for(key) -> symbol\n .keyFor(symbol) -> key\n .useSimple() -> void\n .useSetter() -> void\nObject\n .getOwnPropertySymbols(object) -> array\n```\nAlso wrapped some methods for correct work with `Symbol` polyfill.\n```js\nObject\n .create(proto | null, descriptors?) -> object\n .defineProperty(target, key, desc) -> target\n .defineProperties(target, descriptors) -> target\n .getOwnPropertyDescriptor(var, key) -> desc | undefined\n .getOwnPropertyNames(var) -> array\n #propertyIsEnumerable(key) -> bool\nJSON\n .stringify(target, replacer?, space?) -> string | undefined\n```\n[Basic example](http://goo.gl/BbvWFc):\n```javascript\nvar Person = (function(){\n var NAME = Symbol('name');\n function Person(name){\n this[NAME] = name;\n }\n Person.prototype.getName = function(){\n return this[NAME];\n };\n return Person;\n})();\n\nvar person = new Person('Vasya');\nlog(person.getName()); // => 'Vasya'\nlog(person['name']); // => undefined\nlog(person[Symbol('name')]); // => undefined, symbols are uniq\nfor(var key in person)log(key); // => only 'getName', symbols are not enumerable\n```\n`Symbol.for` & `Symbol.keyFor` [example](http://goo.gl/0pdJjX):\n```javascript\nvar symbol = Symbol.for('key');\nsymbol === Symbol.for('key'); // true\nSymbol.keyFor(symbol); // 'key'\n```\n[Example](http://goo.gl/mKVOQJ) with methods for getting own object keys:\n```javascript\nvar O = {a: 1};\nObject.defineProperty(O, 'b', {value: 2});\nO[Symbol('c')] = 3;\nObject.keys(O); // => ['a']\nObject.getOwnPropertyNames(O); // => ['a', 'b']\nObject.getOwnPropertySymbols(O); // => [Symbol(c)]\nReflect.ownKeys(O); // => ['a', 'b', Symbol(c)]\n```\n#### Caveats when using `Symbol` polyfill:\n\n* We can't add new primitive type, `Symbol` returns object.\n* `Symbol.for` and `Symbol.keyFor` can't be shimmed cross-realm.\n* By default, to hide the keys, `Symbol` polyfill defines setter in `Object.prototype`. For this reason, uncontrolled creation of symbols can cause memory leak and the `in` operator is not working correctly with `Symbol` polyfill: `Symbol() in {} // => true`.\n\nYou can disable defining setters in `Object.prototype`. [Example](http://goo.gl/N5UD7J):\n```javascript\nSymbol.useSimple();\nvar s1 = Symbol('s1')\n , o1 = {};\no1[s1] = true;\nfor(var key in o1)log(key); // => 'Symbol(s1)_t.qamkg9f3q', w/o native Symbol\n\nSymbol.useSetter();\nvar s2 = Symbol('s2')\n , o2 = {};\no2[s2] = true;\nfor(var key in o2)log(key); // nothing\n```\n* Currently, `core-js` not adds setters to `Object.prototype` for well-known symbols for correct work something like `Symbol.iterator in foo`. It can cause problems with their enumerability.\n\n#### ECMAScript 6: Collections\n`core-js` uses native collections in most case, just fixes methods / constructor, if it's required, and in old environment uses fast polyfill (O(1) lookup).\n#### Map\nModule [`es6.map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.map.js). About iterators from this module [here](#ecmascript-6-iterators).\n```javascript\nnew Map(iterable (entries) ?) -> map\n #clear() -> void\n #delete(key) -> bool\n #forEach(fn(val, key, @), that) -> void\n #get(key) -> val\n #has(key) -> bool\n #set(key, val) -> @\n #size -> uint\n```\n[Example](http://goo.gl/RDbROF):\n```javascript\nvar a = [1];\n\nvar map = new Map([['a', 1], [42, 2]]);\nmap.set(a, 3).set(true, 4);\n\nlog(map.size); // => 4\nlog(map.has(a)); // => true\nlog(map.has([1])); // => false\nlog(map.get(a)); // => 3\nmap.forEach(function(val, key){\n log(val); // => 1, 2, 3, 4\n log(key); // => 'a', 42, [1], true\n});\nmap.delete(a);\nlog(map.size); // => 3\nlog(map.get(a)); // => undefined\nlog(Array.from(map)); // => [['a', 1], [42, 2], [true, 4]]\n```\n#### Set\nModule [`es6.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.set.js). About iterators from this module [here](#ecmascript-6-iterators).\n```javascript\nnew Set(iterable?) -> set\n #add(key) -> @\n #clear() -> void\n #delete(key) -> bool\n #forEach(fn(el, el, @), that) -> void\n #has(key) -> bool\n #size -> uint\n```\n[Example](http://goo.gl/7XYya3):\n```javascript\nvar set = new Set(['a', 'b', 'a', 'c']);\nset.add('d').add('b').add('e');\nlog(set.size); // => 5\nlog(set.has('b')); // => true\nset.forEach(function(it){\n log(it); // => 'a', 'b', 'c', 'd', 'e'\n});\nset.delete('b');\nlog(set.size); // => 4\nlog(set.has('b')); // => false\nlog(Array.from(set)); // => ['a', 'c', 'd', 'e']\n```\n#### WeakMap\nModule [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.weak-map.js).\n```javascript\nnew WeakMap(iterable (entries) ?) -> weakmap\n #delete(key) -> bool\n #get(key) -> val\n #has(key) -> bool\n #set(key, val) -> @\n```\n[Example](http://goo.gl/SILXyw):\n```javascript\nvar a = [1]\n , b = [2]\n , c = [3];\n\nvar wmap = new WeakMap([[a, 1], [b, 2]]);\nwmap.set(c, 3).set(b, 4);\nlog(wmap.has(a)); // => true\nlog(wmap.has([1])); // => false\nlog(wmap.get(a)); // => 1\nwmap.delete(a);\nlog(wmap.get(a)); // => undefined\n\n// Private properties store:\nvar Person = (function(){\n var names = new WeakMap;\n function Person(name){\n names.set(this, name);\n }\n Person.prototype.getName = function(){\n return names.get(this);\n };\n return Person;\n})();\n\nvar person = new Person('Vasya');\nlog(person.getName()); // => 'Vasya'\nfor(var key in person)log(key); // => only 'getName'\n```\n#### WeakSet\nModule [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.weak-set.js).\n```javascript\nnew WeakSet(iterable?) -> weakset\n #add(key) -> @\n #delete(key) -> bool\n #has(key) -> bool\n```\n[Example](http://goo.gl/TdFbEx):\n```javascript\nvar a = [1]\n , b = [2]\n , c = [3];\n\nvar wset = new WeakSet([a, b, a]);\nwset.add(c).add(b).add(c);\nlog(wset.has(b)); // => true\nlog(wset.has([2])); // => false\nwset.delete(b);\nlog(wset.has(b)); // => false\n```\n#### Caveats when using collections polyfill:\n\n* Frozen objects as collection keys are supported, but not recomended - it's slow (O(n) instead of O(1)) and, for weak-collections, leak.\n* Weak-collections polyfill stores values as hidden properties of keys. It works correct and not leak in most cases. However, it is desirable to store a collection longer than its keys.\n\n#### ECMAScript 6: Iterators\nModules [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.iterator.js) and [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.iterator.js):\n```javascript\nString\n #@@iterator() -> iterator\nArray\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator\nArguments\n #@@iterator() -> iterator (available only in core-js methods)\n```\nModules [`es6.map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.map.js) and [`es6.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.set.js):\n```javascript\nMap\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator (entries)\nSet\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator\n```\nModule [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.dom.iterable.js):\n```javascript\nNodeList\n #@@iterator() -> iterator\n```\n[Example](http://goo.gl/nzHVQF):\n```javascript\nvar string = 'a𠮷b';\n\nfor(var val of string)log(val); // => 'a', '𠮷', 'b'\n\nvar array = ['a', 'b', 'c'];\n\nfor(var val of array)log(val); // => 'a', 'b', 'c'\nfor(var val of array.values())log(val); // => 'a', 'b', 'c'\nfor(var key of array.keys())log(key); // => 0, 1, 2\nfor(var [key, val] of array.entries()){\n log(key); // => 0, 1, 2\n log(val); // => 'a', 'b', 'c'\n}\n\nvar map = new Map([['a', 1], ['b', 2], ['c', 3]]);\n\nfor(var [key, val] of map){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\nfor(var val of map.values())log(val); // => 1, 2, 3\nfor(var key of map.keys())log(key); // => 'a', 'b', 'c'\nfor(var [key, val] of map.entries()){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\n\nvar set = new Set([1, 2, 3, 2, 1]);\n\nfor(var val of set)log(val); // => 1, 2, 3\nfor(var val of set.values())log(val); // => 1, 2, 3\nfor(var key of set.keys())log(key); // => 1, 2, 3\nfor(var [key, val] of set.entries()){\n log(key); // => 1, 2, 3\n log(val); // => 1, 2, 3\n}\n\nfor(var x of document.querySelectorAll('*')){\n log(x.id);\n}\n```\nModules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.get-iterator-method.js) - helpers for check iterable / get iterator in `library` version or, for example, for `arguments` object:\n```javascript\ncore\n .isIterable(var) -> bool\n .getIterator(iterable) -> iterator\n .getIteratorMethod(var) -> function | undefined\n```\n[Example](http://goo.gl/SXsM6D):\n```js\nvar list = (function(){\n return arguments;\n})(1, 2, 3);\n\nlog(core.isIterable(list)); // true;\n\nvar iter = core.getIterator(list);\nlog(iter.next().value); // 1\nlog(iter.next().value); // 2\nlog(iter.next().value); // 3\nlog(iter.next().value); // undefined\n\ncore.getIterator({}); // TypeError: [object Object] is not iterable!\n\nvar iterFn = core.getIteratorMethod(list);\nlog(typeof iterFn); // 'function'\nvar iter = iterFn.call(list);\nlog(iter.next().value); // 1\nlog(iter.next().value); // 2\nlog(iter.next().value); // 3\nlog(iter.next().value); // undefined\n\nlog(core.getIteratorMethod({})); // undefined\n```\n#### ECMAScript 6: Promise\nModule [`es6.promise`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.promise.js).\n```javascript\nnew Promise(executor(resolve(var), reject(var))) -> promise\n #then(resolved(var), rejected(var)) -> promise\n #catch(rejected(var)) -> promise\n .resolve(var || promise) -> promise\n .reject(var) -> promise\n .all(iterable) -> promise\n .race(iterable) -> promise\n```\nBasic [example](http://goo.gl/vGrtUC):\n```javascript\nfunction sleepRandom(time){\n return new Promise(function(resolve, reject){\n setTimeout(resolve, time * 1e3, 0 | Math.random() * 1e3);\n });\n}\n\nlog('Run'); // => Run\nsleepRandom(5).then(function(result){\n log(result); // => 869, after 5 sec.\n return sleepRandom(10);\n}).then(function(result){\n log(result); // => 202, after 10 sec.\n}).then(function(){\n log('immediately after'); // => immediately after\n throw Error('Irror!');\n}).then(function(){\n log('will not be displayed');\n}).catch(log); // => => Error: Irror!\n```\n`Promise.resolve` and `Promise.reject` [example](http://goo.gl/vr8TN3):\n```javascript\nPromise.resolve(42).then(log); // => 42\nPromise.reject(42).catch(log); // => 42\n\nPromise.resolve($.getJSON('/data.json')); // => ES6 promise\n```\n`Promise.all` [example](http://goo.gl/RdoDBZ):\n```javascript\nPromise.all([\n 'foo',\n sleepRandom(5),\n sleepRandom(15),\n sleepRandom(10) // after 15 sec:\n]).then(log); // => ['foo', 956, 85, 382]\n```\n`Promise.race` [example](http://goo.gl/L8ovkJ):\n```javascript\nfunction timeLimit(promise, time){\n return Promise.race([promise, new Promise(function(resolve, reject){\n setTimeout(reject, time * 1e3, Error('Await > ' + time + ' sec'));\n })]);\n}\n\ntimeLimit(sleepRandom(5), 10).then(log); // => 853, after 5 sec.\ntimeLimit(sleepRandom(15), 10).catch(log); // Error: Await > 10 sec\n```\nECMAScript 7 [async functions](https://tc39.github.io/ecmascript-asyncawait) [example](http://goo.gl/wnQS4j):\n```javascript\nvar delay = time => new Promise(resolve => setTimeout(resolve, time))\n\nasync function sleepRandom(time){\n await delay(time * 1e3);\n return 0 | Math.random() * 1e3;\n};\nasync function sleepError(time, msg){\n await delay(time * 1e3);\n throw Error(msg);\n};\n\n(async () => {\n try {\n log('Run'); // => Run\n log(await sleepRandom(5)); // => 936, after 5 sec.\n var [a, b, c] = await Promise.all([\n sleepRandom(5),\n sleepRandom(15),\n sleepRandom(10)\n ]);\n log(a, b, c); // => 210 445 71, after 15 sec.\n await sleepError(5, 'Irror!');\n log('Will not be displayed');\n } catch(e){\n log(e); // => Error: 'Irror!', after 5 sec.\n }\n})();\n```\n\n##### Unhandled rejection tracking\n\n`core-js` `Promise` supports (but not adds to native implementations) unhandled rejection tracking.\n\n[Node.js](https://gist.github.com/benjamingr/0237932cee84712951a2):\n```js\nprocess.on('unhandledRejection', (reason, promise) => console.log(reason, promise));\nPromise.reject(42);\n// 42 [object Promise]\n\n```\nIn a browser, by default, you will see notify in the console, or you can add a custom handler, [example](http://goo.gl/izTr2I):\n```js\nwindow.onunhandledrejection = e => log(e.reason, e.promise);\nPromise.reject(42);\n// 42 [object Promise]\n```\n**Warning**: The problem here - we can't add it to native `Promise` implementations, but by idea `core-js` should use enough correct native implementation if it's available. Currently, most native implementations are buggy and `core-js` uses polyfill, but the situation will be changed. If someone wanna use this hook everywhere - he should delete `window.Promise` before inclusion `core-js`.\n\n\n#### ECMAScript 6: Reflect\nModules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.set-prototype-of.js).\n```javascript\nReflect\n .apply(target, thisArgument, argumentsList) -> var\n .construct(target, argumentsList, newTarget?) -> object\n .defineProperty(target, propertyKey, attributes) -> bool\n .deleteProperty(target, propertyKey) -> bool\n .enumerate(target) -> iterator\n .get(target, propertyKey, receiver?) -> var\n .getOwnPropertyDescriptor(target, propertyKey) -> desc\n .getPrototypeOf(target) -> object | null\n .has(target, propertyKey) -> bool\n .isExtensible(target) -> bool\n .ownKeys(target) -> array\n .preventExtensions(target) -> bool\n .set(target, propertyKey, V, receiver?) -> bool\n .setPrototypeOf(target, proto) -> bool (required __proto__ - IE11+)\n```\n[Example](http://goo.gl/gVT0cH):\n```javascript\nvar O = {a: 1};\nObject.defineProperty(O, 'b', {value: 2});\nO[Symbol('c')] = 3;\nReflect.ownKeys(O); // => ['a', 'b', Symbol(c)]\n\nfunction C(a, b){\n this.c = a + b;\n}\n\nvar instance = Reflect.construct(C, [20, 22]);\ninstance.c; // => 42\n```\n### ECMAScript 7\n* `Array#includes` [proposal](https://github.com/domenic/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.array.includes.js)\n* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.at.js)\n* `String#padLeft`, `String#padRight` [proposal](https://github.com/ljharb/proposal-string-pad-left-right) - modules [`es7.string.pad-left`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.pad-left.js), [`es7.string.pad-right`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.pad-right.js)\n* `String#trimLeft`, `String#trimRight` [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim) - modules [`es7.string.trim-left`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.trim-right.js)\n* `Object.values`, `Object.entries` [proposal](https://github.com/ljharb/proposal-object-values-entries) - modules [`es7.object.values`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.entries.js)\n* `Object.getOwnPropertyDescriptors` [proposal](https://gist.github.com/WebReflection/9353781) - module [`es7.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.get-own-property-descriptors.js)\n* `RegExp.escape` [proposal](https://github.com/benjamingr/RexExp.escape) - module [`es7.regexp.escape`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.regexp.escape.js)\n* `Map#toJSON`, `Set#toJSON` [proposal](https://github.com/DavidBruant/Map-Set.prototype.toJSON) - modules [`es7.map.to-json`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.set.to-json.js)\n\n```javascript\nArray\n #includes(var, from?) -> bool\nString\n #at(index) -> string\n #padLeft(length, fillStr = ' ') -> string\n #padRight(length, fillStr = ' ') -> string\n #trimLeft() -> string\n #trimRight() -> string\nObject\n .values(object) -> array\n .entries(object) -> array\n .getOwnPropertyDescriptors(object) -> object\nRegExp\n .escape(str) -> str\nMap\n #toJSON() -> array\nSet\n #toJSON() -> array\n```\n[Examples](http://goo.gl/aUZQRH):\n```javascript\n[1, 2, 3].includes(2); // => true\n[1, 2, 3].includes(4); // => false\n[1, 2, 3].includes(2, 2); // => false\n\n[NaN].indexOf(NaN); // => -1\n[NaN].includes(NaN); // => true\nArray(1).indexOf(undefined); // => -1\nArray(1).includes(undefined); // => true\n\n'a𠮷b'.at(1); // => '𠮷'\n'a𠮷b'.at(1).length; // => 2\n\n'hello'.padLeft(10); // => ' hello'\n'hello'.padLeft(10, '1234'); // => '41234hello'\n'hello'.padRight(10); // => 'hello '\n'hello'.padRight(10, '1234'); // => 'hello12341'\n\n' hello '.trimLeft(); // => 'hello '\n' hello '.trimRight(); // => ' hello'\n\nObject.values({a: 1, b: 2, c: 3}); // => [1, 2, 3]\nObject.entries({a: 1, b: 2, c: 3}); // => [['a', 1], ['b', 2], ['c', 3]]\n\n// Shallow object cloning with prototype and descriptors:\nvar copy = Object.create(Object.getPrototypeOf(O), Object.getOwnPropertyDescriptors(O));\n// Mixin:\nObject.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n\nRegExp.escape('Hello, []{}()*+?.\\\\^$|!'); // => 'Hello, \\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|!'\n\nJSON.stringify(new Map([['a', 'b'], ['c', 'd']])); // => '[[\"a\",\"b\"],[\"c\",\"d\"]]'\nJSON.stringify(new Set([1, 2, 3, 2, 1])); // => '[1,2,3]'\n```\n### Mozilla JavaScript: Array generics\nModule [`js.array.statics`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/js.array.statics.js).\n```javascript\nArray\n .{...ArrayPrototype methods}\n```\n\n```javascript\nArray.slice(arguments, 1);\n\nArray.join('abcdef', '+'); // => 'a+b+c+d+e+f'\n\nvar form = document.getElementsByClassName('form__input');\nArray.reduce(form, function(memo, it){\n memo[it.name] = it.value;\n return memo;\n}, {}); // => {name: 'Vasya', age: '42', sex: 'yes, please'}\n```\n### Web standards\n#### setTimeout / setInterval\nModule [`web.timers`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.timers.js). Additional arguments fix for IE9-.\n```javascript\nsetTimeout(fn(...args), time, ...args) -> id\nsetInterval(fn(...args), time, ...args) -> id\n```\n```javascript\n// Before:\nsetTimeout(log.bind(null, 42), 1000);\n// After:\nsetTimeout(log, 1000, 42);\n```\n#### setImmediate\nModule [`web.immediate`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill.\n```javascript\nsetImmediate(fn(...args), ...args) -> id\nclearImmediate(id) -> void\n```\n[Example](http://goo.gl/6nXGrx):\n```javascript\nsetImmediate(function(arg1, arg2){\n log(arg1, arg2); // => Message will be displayed with minimum delay\n}, 'Message will be displayed', 'with minimum delay');\n\nclearImmediate(setImmediate(function(){\n log('Message will not be displayed');\n}));\n```\n### Non-standard\n#### Object\nModules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.make.js).\n```javascript\nObject\n .isObject(var) -> bool\n .classof(var) -> string \n .define(target, mixin) -> target\n .make(proto | null, mixin?) -> object\n```\nObject classify [examples](http://goo.gl/YZQmGo):\n```javascript\nObject.isObject({}); // => true\nObject.isObject(isNaN); // => true\nObject.isObject(null); // => false\n\nvar classof = Object.classof;\n\nclassof(null); // => 'Null'\nclassof(undefined); // => 'Undefined'\nclassof(1); // => 'Number'\nclassof(true); // => 'Boolean'\nclassof('string'); // => 'String'\nclassof(Symbol()); // => 'Symbol'\n\nclassof(new Number(1)); // => 'Number'\nclassof(new Boolean(true)); // => 'Boolean'\nclassof(new String('string')); // => 'String'\n\nvar fn = function(){}\n , list = (function(){return arguments})(1, 2, 3);\n\nclassof({}); // => 'Object'\nclassof(fn); // => 'Function'\nclassof([]); // => 'Array'\nclassof(list); // => 'Arguments'\nclassof(/./); // => 'RegExp'\nclassof(new TypeError); // => 'Error'\n\nclassof(new Set); // => 'Set'\nclassof(new Map); // => 'Map'\nclassof(new WeakSet); // => 'WeakSet'\nclassof(new WeakMap); // => 'WeakMap'\nclassof(new Promise(fn)); // => 'Promise'\n\nclassof([].values()); // => 'Array Iterator'\nclassof(new Set().values()); // => 'Set Iterator'\nclassof(new Map().values()); // => 'Map Iterator'\n\nclassof(Math); // => 'Math'\nclassof(JSON); // => 'JSON'\n\nfunction Example(){}\nExample.prototype[Symbol.toStringTag] = 'Example';\n\nclassof(new Example); // => 'Example'\n```\n`Object.define` and `Object.make` [examples](http://goo.gl/rtpD5Z):\n```javascript\n// Before:\nObject.defineProperty(target, 'c', {\n enumerable: true,\n configurable: true,\n get: function(){\n return this.a + this.b;\n }\n});\n\n// After:\nObject.define(target, {\n get c(){\n return this.a + this.b;\n }\n});\n\n// Shallow object cloning with prototype and descriptors:\nvar copy = Object.make(Object.getPrototypeOf(src), src);\n\n// Simple inheritance:\nfunction Vector2D(x, y){\n this.x = x;\n this.y = y;\n}\nObject.define(Vector2D.prototype, {\n get xy(){\n return Math.hypot(this.x, this.y);\n }\n});\nfunction Vector3D(x, y, z){\n Vector2D.apply(this, arguments);\n this.z = z;\n}\nVector3D.prototype = Object.make(Vector2D.prototype, {\n constructor: Vector3D,\n get xyz(){\n return Math.hypot(this.x, this.y, this.z);\n }\n});\n\nvar vector = new Vector3D(9, 12, 20);\nlog(vector.xy); // => 15\nlog(vector.xyz); // => 25\nvector.y++;\nlog(vector.xy); // => 15.811388300841896\nlog(vector.xyz); // => 25.495097567963924\n```\n#### Dict\nModule [`core.dict`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.dict.js). Based on [TC39 discuss](https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-11/nov-29.md#collection-apis-review) / [strawman](http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard#dictionaries).\n```javascript\n[new] Dict(iterable (entries) | object ?) -> dict\n .isDict(var) -> bool\n .values(object) -> iterator\n .keys(object) -> iterator\n .entries(object) -> iterator (entries)\n .has(object, key) -> bool\n .get(object, key) -> val\n .set(object, key, value) -> object\n .forEach(object, fn(val, key, @), that) -> void\n .map(object, fn(val, key, @), that) -> new @\n .mapPairs(object, fn(val, key, @), that) -> new @\n .filter(object, fn(val, key, @), that) -> new @\n .some(object, fn(val, key, @), that) -> bool\n .every(object, fn(val, key, @), that) -> bool\n .find(object, fn(val, key, @), that) -> val\n .findKey(object, fn(val, key, @), that) -> key\n .keyOf(object, var) -> key\n .includes(object, var) -> bool\n .reduce(object, fn(memo, val, key, @), memo?) -> var\n```\n`Dict` create object without prototype from iterable or simple object. [Example](http://goo.gl/pnp8Vr):\n```javascript\nvar map = new Map([['a', 1], ['b', 2], ['c', 3]]);\n\nDict(); // => {__proto__: null}\nDict({a: 1, b: 2, c: 3}); // => {__proto__: null, a: 1, b: 2, c: 3}\nDict(map); // => {__proto__: null, a: 1, b: 2, c: 3}\nDict([1, 2, 3].entries()); // => {__proto__: null, 0: 1, 1: 2, 2: 3}\n\nvar dict = Dict({a: 42});\ndict instanceof Object; // => false\ndict.a; // => 42\ndict.toString; // => undefined\n'a' in dict; // => true\n'hasOwnProperty' in dict; // => false\n\nDict.isDict({}); // => false\nDict.isDict(Dict()); // => true\n```\n`Dict.keys`, `Dict.values` and `Dict.entries` returns iterators for objects, [examples](http://goo.gl/xAvECH):\n```javascript\nvar dict = {a: 1, b: 2, c: 3};\n\nfor(var key of Dict.keys(dict))log(key); // => 'a', 'b', 'c'\n\nfor(var val of Dict.values(dict))log(val); // => 1, 2, 3\n\nfor(var [key, val] of Dict.entries(dict)){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\n\nnew Map(Dict.entries(dict)); // => Map {a: 1, b: 2, c: 3}\n```\nBasic dict operations for objects with prototype [example](http://goo.gl/B28UnG):\n```js\n'q' in {q: 1}; // => true\n'toString' in {}; // => true\n\nDict.has({q: 1}, 'q'); // => true\nDict.has({}, 'toString'); // => false\n\n({q: 1})['q']; // => 1\n({}).toString; // => function toString(){ [native code] }\n\nDict.get({q: 1}, 'q'); // => 1\nDict.get({}, 'toString'); // => undefined\n\nvar O = {};\nO['q'] = 1;\nO['q']; // => 1\nO['__proto__'] = {w: 2};\nO['__proto__']; // => {w: 2}\nO['w']; // => 2\n\nvar O = {};\nDict.set(O, 'q', 1);\nO['q']; // => 1\nDict.set(O, '__proto__', {w: 2});\nO['__proto__']; // => {w: 2}\nO['w']; // => undefined\n```\nOther methods of `Dict` module are static equialents of `Array.prototype` methods for dictionaries, [examples](http://goo.gl/xFi1RH):\n```javascript\nvar dict = {a: 1, b: 2, c: 3};\n\nDict.forEach(dict, console.log, console);\n// => 1, 'a', {a: 1, b: 2, c: 3}\n// => 2, 'b', {a: 1, b: 2, c: 3}\n// => 3, 'c', {a: 1, b: 2, c: 3}\n\nDict.map(dict, function(it){\n return it * it;\n}); // => {a: 1, b: 4, c: 9}\n\nDict.mapPairs(dict, function(val, key){\n if(key != 'b')return [key + key, val * val];\n}); // => {aa: 1, cc: 9}\n\nDict.filter(dict, function(it){\n return it % 2;\n}); // => {a: 1, c: 3}\n\nDict.some(dict, function(it){\n return it === 2;\n}); // => true\n\nDict.every(dict, function(it){\n return it === 2;\n}); // => false\n\nDict.find(dict, function(it){\n return it > 2;\n}); // => 3\nDict.find(dict, function(it){\n return it > 4;\n}); // => undefined\n\nDict.findKey(dict, function(it){\n return it > 2;\n}); // => 'c'\nDict.findKey(dict, function(it){\n return it > 4;\n}); // => undefined\n\nDict.keyOf(dict, 2); // => 'b'\nDict.keyOf(dict, 4); // => undefined\n\nDict.includes(dict, 2); // => true\nDict.includes(dict, 4); // => false\n\nDict.reduce(dict, function(memo, it){\n return memo + it;\n}); // => 6\nDict.reduce(dict, function(memo, it){\n return memo + it;\n}, ''); // => '123'\n```\n#### Partial application\nModule [`core.function.part`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.function.part.js).\n```javascript\nFunction\n #part(...args | _) -> fn(...args)\n```\n`Function#part` partial apply function without `this` binding. Uses global variable `_` (`core._` for builds without global namespace pollution) as placeholder and not conflict with `Underscore` / `LoDash`. [Examples](http://goo.gl/p9ZJ8K):\n```javascript\nvar fn1 = log.part(1, 2);\nfn1(3, 4); // => 1, 2, 3, 4\n\nvar fn2 = log.part(_, 2, _, 4);\nfn2(1, 3); // => 1, 2, 3, 4\n\nvar fn3 = log.part(1, _, _, 4);\nfn3(2, 3); // => 1, 2, 3, 4\n\nfn2(1, 3, 5); // => 1, 2, 3, 4, 5\nfn2(1); // => 1, 2, undefined, 4\n```\n#### Number Iterator\nModules [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.number.iterator.js).\n```javascript\nNumber\n #@@iterator() -> iterator\n```\n[Examples](http://goo.gl/o45pCN):\n```javascript\nfor(var i of 3)log(i); // => 0, 1, 2\n\n[...10]; // => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\nArray.from(10, Math.random); // => [0.9817775336559862, 0.02720663254149258, ...]\n\nArray.from(10, function(it){\n return this + it * it;\n}, .42); // => [0.42, 1.42, 4.42, 9.42, 16.42, 25.42, 36.42, 49.42, 64.42, 81.42]\n```\n#### Escaping HTML\nModules [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.string.unescape-html.js).\n```javascript\nString\n #escapeHTML() -> str\n #unescapeHTML() -> str\n```\n[Examples](http://goo.gl/6bOvsQ):\n```javascript\n''.escapeHTML(); // => '<script>doSomething();</script>'\n'<script>doSomething();</script>'.unescapeHTML(); // => ''\n```\n#### delay\nModule [`core.delay`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function). [Example](http://goo.gl/lbucba):\n```javascript\ndelay(1e3).then(() => log('after 1 sec'));\n\n(async () => {\n await delay(3e3);\n log('after 3 sec');\n \n while(await delay(3e3))log('each 3 sec');\n})();\n```\n#### Console\nModule [`core.log`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.log.js). Console cap for old browsers and some additional functionality. In IE, Node.js / IO.js and Firebug `console` methods not require call from `console` object, but in Chromium and V8 this throws error. For some reason, we can't replace `console` methods by their bound versions. Add `log` object with bound console methods. Some more sugar: `log` is shortcut for `log.log`, we can disable output.\n```javascript\nlog ==== log.log\n .{...console API}\n .enable() -> void\n .disable() -> void\n```\n```javascript\n// Before:\nif(window.console && console.warn)console.warn(42);\n// After:\nlog.warn(42);\n\n// Before:\nsetTimeout(console.warn.bind(console, 42), 1000);\n[1, 2, 3].forEach(console.warn, console);\n// After:\nsetTimeout(log.warn, 1000, 42);\n[1, 2, 3].forEach(log.warn);\n\n// log is shortcut for log.log\nsetImmediate(log, 42); // => 42\n\nlog.disable();\nlog.warn('Console is disabled, you will not see this message.');\nlog.enable();\nlog.warn('Console is enabled again.');\n```\n\n## Missing polyfills\n- ES5 `JSON` is missing now only in IE7- and never it will be added to `core-js`, if you need it in these old browsers available many implementations, for example, [json3](https://github.com/bestiejs/json3).\n- ES6 Typed Arrays can be polyfilled without serious problems, but it will be slow - getter / setter for each element and they are missing completely only in IE9-. You can use [this polyfill](https://github.com/inexorabletash/polyfill/blob/master/typedarray.js). *Possible*, it will be added to `core-js` in the future, completely or only missing methods of existing arrays. \n- ES6 `String#normalize` is not very usefull feature, but this polyfill will be very large. If you need it, you can use [unorm](https://github.com/walling/unorm/).\n- ES6 `Proxy` can't be polyfilled, but for Node.js / Chromium with additional flags you can try [harmony-reflect](https://github.com/tvcutsem/harmony-reflect) for adapt old style `Proxy` API to final ES6 version.\n- ES6 logic for `@@isConcatSpreadable` and `@@species` (in most places) can be polyfilled without problems, but it will cause serious slowdown in popular cases in some engines. It will be polyfilled when it will be implemented in modern engines.\n- ES7 `Object.observe` can be polyfilled with many limitations, but it will be very slow - dirty checking on each tick. In nearest future it will not be added to `core-js` - it will cause serious slowdown in applications which uses `Object.observe` and fallback if it's missing. *Possible* it will be added as optional feature then most actual browsers will have this feature. Now you can use [this polyfill](https://github.com/MaxArt2501/object-observe).\n- ES7 `SIMD`. `core-js` doesn't adds polyfill of this feature because of large size and some other reasons. You can use [this polyfill](https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd.js).\n- `window.fetch` is not crossplatform feature, in some environments it make no sense. For this reason I don't think it should be in `core-js`. Looking at the large number of requests it *maybe* added in the future. Now you can use, for example, [this polyfill](https://github.com/github/fetch).", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/zloirock/core-js/issues" }, "_id": "core-js@1.2.6", "_from": "core-js@^1.0.0", "realName": "core-js", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/babel-runtime/node_modules/core-js", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/babel-runtime/node_modules/core-js", "parent": "[Circular]", "depth": 3, "peerDependencies": {} } }, "devDependencies": { "babel-plugin-runtime": "^1.0.7", "regenerator": "^0.8.34" }, "readme": "# babel-runtime\n\nBabel self-contained runtime\n\nFor more information please look at [babel](https://github.com/babel/babel).\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/babel/babel/issues" }, "_id": "babel-runtime@5.8.35", "_from": "babel-runtime@^5.8.3", "realName": "babel-runtime", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/babel-runtime", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/babel-runtime", "parent": "[Circular]", "depth": 2, "peerDependencies": {} }, "classnames": { "name": "classnames", "version": "1.2.2", "description": "A simple utility for conditionally joining classNames together", "main": "index.js", "author": { "name": "Jed Watson" }, "license": "MIT", "repository": { "type": "git", "url": "https://github.com/JedWatson/classnames.git" }, "scripts": { "test": "mocha tests.js" }, "keywords": [ "react", "css", "classes", "classname", "classnames", "util", "utility" ], "devDependencies": { "mocha": "^2.1.0" }, "readme": "Classnames\n===========\n\n[![Version](http://img.shields.io/npm/v/classnames.svg)](https://www.npmjs.org/package/classnames)\n\nA simple javascript utility for conditionally joining classNames together.\n\nInstall with npm or Bower.\n\n```sh\nnpm install classnames\n```\n\nThe `classNames` function takes any number of arguments which can be a string or object.\nThe argument `'foo'` is short for `{foo: true}`. If the value of the key is falsy, it won't be included in the output.\n\n```js\nclassNames('foo', 'bar'); // => 'foo bar'\nclassNames('foo', { bar: true }); // => 'foo bar'\nclassNames({ foo: true }, { bar: true }); // => 'foo bar'\nclassNames({ foo: true, bar: true }); // => 'foo bar'\n\n// lots of arguments of various types\nclassNames('foo', { bar: true, duck: false }, 'baz', { quux: true }) // => 'foo bar baz quux'\n\n// other falsy values are just ignored\nclassNames(null, false, 'bar', undefined, 0, 1, { baz: null }, ''); // => 'bar 1'\n```\n\nArrays will be recursively flattened as per the rules above:\n\n```js\nvar arr = ['b', { c: true, d: false }];\nclassNames('a', arr); // => 'a b c'\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2015 Jed Watson\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/JedWatson/classnames/issues" }, "_id": "classnames@1.2.2", "_from": "classnames@^1.2.0", "realName": "classnames", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/classnames", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/classnames", "parent": "[Circular]", "depth": 2, "peerDependencies": {} }, "pui-css-media": { "name": "pui-css-media", "style": "media.css", "version": "3.0.0-alpha.2", "description": "media css component for Pivotal UI based on Bootstrap", "repository": { "type": "git", "url": "https://github.com/pivotal-cf/pivotal-ui.git" }, "keywords": [ "bootstrap", "pivotal ui", "pivotal ui modularized", "css" ], "author": { "name": "Pivotal Software, Inc" }, "license": "MIT", "bugs": { "url": "https://github.com/pivotal-cf/pivotal-ui/issues" }, "homepage": "http://styleguide.pivotal.io/", "dependencies": { "pui-css-bootstrap": { "name": "pui-css-bootstrap", "style": "bootstrap.css", "version": "3.0.0-alpha.2", "description": "Custom build of Bootstrap for Pivotal UI", "repository": { "type": "git", "url": "https://github.com/pivotal-cf/pivotal-ui.git" }, "keywords": [ "bootstrap", "pivotal ui", "pivotal ui modularized", "css" ], "author": { "name": "Pivotal Software, Inc" }, "license": "MIT", "bugs": { "url": "https://github.com/pivotal-cf/pivotal-ui/issues" }, "homepage": "http://styleguide.pivotal.io/", "peerDependencies": { "bootstrap": "3.3.5" }, "readme": "# pui-css-bootstrap\n\nCustom build of Bootstrap for Pivotal UI\n\n\n\n## Installation\n\nTo install the package, from the command line, type:\n\n```\nnpm install pui-css-bootstrap\n```\n\n\n*****************************************\n\nThis is a component of Pivotal UI. It is a Pivotal specific implementation of Bootstrap.\n\n[Styleguide](http://styleguide.pivotal.io)\n[Github](https://github.com/pivotal-cf/pivotal-ui)\n\n(c) Copyright 2015 Pivotal Software, Inc. All Rights Reserved.", "readmeFilename": "README.md", "_id": "pui-css-bootstrap@3.0.0-alpha.2", "_from": "pui-css-bootstrap@3.0.0-alpha.2", "realName": "pui-css-bootstrap", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/pui-css-media/node_modules/pui-css-bootstrap", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/pui-css-media/node_modules/pui-css-bootstrap", "parent": "[Circular]", "depth": 3 }, "bootstrap": { "name": "bootstrap", "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", "version": "3.3.5", "keywords": [ "css", "less", "mobile-first", "responsive", "front-end", "framework", "web" ], "homepage": "http://getbootstrap.com", "author": { "name": "Twitter, Inc." }, "scripts": { "test": "grunt test" }, "style": "dist/css/bootstrap.css", "less": "less/bootstrap.less", "main": "./dist/js/npm", "repository": { "type": "git", "url": "https://github.com/twbs/bootstrap.git" }, "bugs": { "url": "https://github.com/twbs/bootstrap/issues" }, "license": "MIT", "devDependencies": { "btoa": "~1.1.2", "glob": "~5.0.5", "grunt": "~0.4.5", "grunt-autoprefixer": "~3.0.0", "grunt-contrib-clean": "~0.6.0", "grunt-contrib-compress": "~0.13.0", "grunt-contrib-concat": "~0.5.1", "grunt-contrib-connect": "~0.10.1", "grunt-contrib-copy": "~0.8.0", "grunt-contrib-csslint": "~0.4.0", "grunt-contrib-cssmin": "~0.12.3", "grunt-contrib-htmlmin": "~0.4.0", "grunt-contrib-jade": "~0.14.1", "grunt-contrib-jshint": "~0.11.2", "grunt-contrib-less": "~1.0.1", "grunt-contrib-qunit": "~0.7.0", "grunt-contrib-uglify": "~0.9.1", "grunt-contrib-watch": "~0.6.1", "grunt-csscomb": "~3.0.0", "grunt-exec": "~0.4.6", "grunt-html": "~4.0.3", "grunt-jekyll": "~0.4.2", "grunt-jscs": "~1.8.0", "grunt-saucelabs": "~8.6.1", "grunt-sed": "twbs/grunt-sed#v0.2.0", "load-grunt-tasks": "~3.2.0", "markdown-it": "^4.2.1", "npm-shrinkwrap": "^200.4.0", "time-grunt": "^1.2.0" }, "engines": { "node": ">=0.10.1" }, "files": [ "dist", "fonts", "grunt", "js/*.js", "less/**/*.less", "Gruntfile.js", "LICENSE" ], "jspm": { "main": "js/bootstrap", "shim": { "js/bootstrap": { "deps": "jquery", "exports": "$" } }, "files": [ "css", "fonts", "js" ] }, "readme": "# [Bootstrap](http://getbootstrap.com)\n[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com)\n![Bower version](https://img.shields.io/bower/v/bootstrap.svg)\n[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)\n[![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg)](https://travis-ci.org/twbs/bootstrap)\n[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap#info=devDependencies)\n[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)\n\nBootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thornton](https://twitter.com/fat), and maintained by the [core team](https://github.com/orgs/twbs/people) with the massive support and involvement of the community.\n\nTo get started, check out !\n\n## Table of contents\n\n- [Quick start](#quick-start)\n- [Bugs and feature requests](#bugs-and-feature-requests)\n- [Documentation](#documentation)\n- [Contributing](#contributing)\n- [Community](#community)\n- [Versioning](#versioning)\n- [Creators](#creators)\n- [Copyright and license](#copyright-and-license)\n\n## Quick start\n\nSeveral quick start options are available:\n\n- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.3.5.zip).\n- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.\n- Install with [Bower](http://bower.io): `bower install bootstrap`.\n- Install with [npm](https://www.npmjs.com): `npm install bootstrap`.\n- Install with [Meteor](https://www.meteor.com): `meteor add twbs:bootstrap`.\n- Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap`.\n\nRead the [Getting started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.\n\n### What's included\n\nWithin the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:\n\n```\nbootstrap/\n├── css/\n│ ├── bootstrap.css\n│ ├── bootstrap.css.map\n│ ├── bootstrap.min.css\n│ ├── bootstrap-theme.css\n│ ├── bootstrap-theme.css.map\n│ └── bootstrap-theme.min.css\n├── js/\n│ ├── bootstrap.js\n│ └── bootstrap.min.js\n└── fonts/\n ├── glyphicons-halflings-regular.eot\n ├── glyphicons-halflings-regular.svg\n ├── glyphicons-halflings-regular.ttf\n ├── glyphicons-halflings-regular.woff\n └── glyphicons-halflings-regular.woff2\n```\n\nWe provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developer.chrome.com/devtools/docs/css-preprocessors) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Fonts from Glyphicons are included, as is the optional Bootstrap theme.\n\n\n\n## Bugs and feature requests\n\nHave a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).\n\n\n## Documentation\n\nBootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at . The docs may also be run locally.\n\n### Running documentation locally\n\n1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v2.5.x).\n - **Windows users:** Read [this unofficial guide](http://jekyll-windows.juthilo.com/) to get Jekyll up and running without problems.\n2. Install the Ruby-based syntax highlighter, [Rouge](https://github.com/jneen/rouge), with `gem install rouge`.\n3. From the root `/bootstrap` directory, run `jekyll serve` in the command line.\n4. Open in your browser, and voilà.\n\nLearn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).\n\n### Documentation for previous releases\n\nDocumentation for v2.3.2 has been made available for the time being at while folks transition to Bootstrap 3.\n\n[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.\n\n\n\n## Contributing\n\nPlease read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.\n\nMoreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/master/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).\n\nEditor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at .\n\n\n\n## Community\n\nGet updates on Bootstrap's development and chat with the project maintainers and community members.\n\n- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).\n- Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).\n- Join [the official Slack room](https://bootstrap-slack.herokuapp.com).\n- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.\n- Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](https://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).\n- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.\n\n\n\n## Versioning\n\nFor transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](http://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible.\n\n\n\n## Creators\n\n**Mark Otto**\n\n- \n- \n\n**Jacob Thornton**\n\n- \n- \n\n\n\n## Copyright and license\n\nCode and documentation copyright 2011-2015 Twitter, Inc. Code released under [the MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE).\n", "readmeFilename": "README.md", "_id": "bootstrap@3.3.5", "_from": "bootstrap@3.3.5", "realName": "bootstrap", "dependencies": {}, "extraneous": false, "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/pui-css-media/node_modules/bootstrap", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/pui-css-media/node_modules/bootstrap", "parent": "[Circular]", "depth": 3, "peerDependencies": {} } }, "readme": "# pui-css-media\n\nA CSS media component that can be installed via this npm package. The package provides all of the\nCSS you need to use the component.\n\n\n\n## Installation\n\nTo install the package, from the command line, type:\n\n```\nnpm install pui-css-media\n```\n\n## Usage\n\n```html\n
\n \n \"placeholder\"\n \n
\n

Media heading

\n Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.\n
\n
\n\n
\n
\n

Media heading

\n Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.\n
\n \n \"placeholder\"\n \n
\n```\n\n\nYou can find more examples of the media component in the [pui style guide](http://styleguide.pivotal.io/)\n\n*****************************************\n\nThis is a component of Pivotal UI. It is a Pivotal specific implementation of Bootstrap.\n\n[Styleguide](http://styleguide.pivotal.io)\n[Github](https://github.com/pivotal-cf/pivotal-ui)\n\n(c) Copyright 2015 Pivotal Software, Inc. All Rights Reserved.", "readmeFilename": "README.md", "_id": "pui-css-media@3.0.0-alpha.2", "_from": "pui-css-media@3.0.0-alpha.2", "realName": "pui-css-media", "path": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/pui-css-media", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/pui-react-media/node_modules/pui-css-media", "parent": "[Circular]", "depth": 2, "peerDependencies": {} } }, "readme": "# pui-react-media\n\nReact components for laying out images/audio/video next to text content\n\nPivotal UI React ([GitHub](https://github.com/pivotal-cf/pivotal-ui-react), [npm](https://www.npmjs.com/browse/keyword/pivotal%20ui%20modularized)) is a collection of [React](https://facebook.github.io/react/) components for rapidly building and prototyping UIs.\n\nThis component requires React v0.13\n\nSee the [Pivotal UI Styleguide](http://styleguide.pivotal.io/) for fully rendered examples.\n\n## Components\n\n### Media\n\nDisplays a media object (images, video, or audio) to the left or right of a block of content\n\n```js\nvar Media = require('pui-react-media').Media;\nvar Image = require('pui-react-image').Image;\nvar MyComponent = React.createClass({\n render() {\n var image = ;\n return (Content);\n }\n});\n```\n\n#### Properties\n\n- `leftImage`\n - `Element`: ``, `
\n\nVersion 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html)\nwill have support for stripping the `if (typeof define !== 'function')` check\nmentioned above, so you can include this snippet for code that runs in the\nbrowser, but avoid taking the cost of the if() statement once the code is\noptimized for deployment.\n\n## Node 0.4 Support\n\nIf you want to support Node 0.4, then add `require` as the second parameter to amdefine:\n\n```javascript\n//Only if you want Node 0.4. If using 0.5 or later, use the above snippet.\nif (typeof define !== 'function') { var define = require('amdefine')(module, require) }\n```\n\n## Limitations\n\n### Synchronous vs Asynchronous\n\namdefine creates a define() function that is callable by your code. It will\nexecute and trace dependencies and call the factory function *synchronously*,\nto keep the behavior in line with Node's synchronous dependency tracing.\n\nThe exception: calling AMD's callback-style require() from inside a factory\nfunction. The require callback is called on process.nextTick():\n\n```javascript\ndefine(function (require) {\n require(['a'], function(a) {\n //'a' is loaded synchronously, but\n //this callback is called on process.nextTick().\n });\n});\n```\n\n### Loader Plugins\n\nLoader plugins are supported as long as they call their load() callbacks\nsynchronously. So ones that do network requests will not work. However plugins\nlike [text](http://requirejs.org/docs/api.html#text) can load text files locally.\n\nThe plugin API's `load.fromText()` is **not supported** in amdefine, so this means\ntranspiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs)\nwill not work. This may be fixable, but it is a bit complex, and I do not have\nenough node-fu to figure it out yet. See the source for amdefine.js if you want\nto get an idea of the issues involved.\n\n## Tests\n\nTo run the tests, cd to **tests** and run:\n\n```\nnode all.js\nnode all-intercept.js\n```\n\n## License\n\nNew BSD and MIT. Check the LICENSE file for all the details.\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/jrburke/amdefine/issues" }, "_id": "amdefine@1.0.0", "_from": "amdefine@>=0.0.4", "scripts": {}, "realName": "amdefine", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/node_modules/amdefine", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map/node_modules/amdefine", "parent": "[Circular]", "depth": 5, "peerDependencies": {} } }, "devDependencies": { "dryice": ">=0.4.8" }, "scripts": { "test": "node test/run-tests.js", "build": "node Makefile.dryice.js" }, "readme": "# Source Map\n\nThis is a library to generate and consume the source map format\n[described here][format].\n\nThis library is written in the Asynchronous Module Definition format, and works\nin the following environments:\n\n* Modern Browsers supporting ECMAScript 5 (either after the build, or with an\n AMD loader such as RequireJS)\n\n* Inside Firefox (as a JSM file, after the build)\n\n* With NodeJS versions 0.8.X and higher\n\n## Node\n\n $ npm install source-map\n\n## Building from Source (for everywhere else)\n\nInstall Node and then run\n\n $ git clone https://fitzgen@github.com/mozilla/source-map.git\n $ cd source-map\n $ npm link .\n\nNext, run\n\n $ node Makefile.dryice.js\n\nThis should spew a bunch of stuff to stdout, and create the following files:\n\n* `dist/source-map.js` - The unminified browser version.\n\n* `dist/source-map.min.js` - The minified browser version.\n\n* `dist/SourceMap.jsm` - The JavaScript Module for inclusion in Firefox source.\n\n## Examples\n\n### Consuming a source map\n\n var rawSourceMap = {\n version: 3,\n file: 'min.js',\n names: ['bar', 'baz', 'n'],\n sources: ['one.js', 'two.js'],\n sourceRoot: 'http://example.com/www/js/',\n mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'\n };\n\n var smc = new SourceMapConsumer(rawSourceMap);\n\n console.log(smc.sources);\n // [ 'http://example.com/www/js/one.js',\n // 'http://example.com/www/js/two.js' ]\n\n console.log(smc.originalPositionFor({\n line: 2,\n column: 28\n }));\n // { source: 'http://example.com/www/js/two.js',\n // line: 2,\n // column: 10,\n // name: 'n' }\n\n console.log(smc.generatedPositionFor({\n source: 'http://example.com/www/js/two.js',\n line: 2,\n column: 10\n }));\n // { line: 2, column: 28 }\n\n smc.eachMapping(function (m) {\n // ...\n });\n\n### Generating a source map\n\nIn depth guide:\n[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)\n\n#### With SourceNode (high level API)\n\n function compile(ast) {\n switch (ast.type) {\n case 'BinaryExpression':\n return new SourceNode(\n ast.location.line,\n ast.location.column,\n ast.location.source,\n [compile(ast.left), \" + \", compile(ast.right)]\n );\n case 'Literal':\n return new SourceNode(\n ast.location.line,\n ast.location.column,\n ast.location.source,\n String(ast.value)\n );\n // ...\n default:\n throw new Error(\"Bad AST\");\n }\n }\n\n var ast = parse(\"40 + 2\", \"add.js\");\n console.log(compile(ast).toStringWithSourceMap({\n file: 'add.js'\n }));\n // { code: '40 + 2',\n // map: [object SourceMapGenerator] }\n\n#### With SourceMapGenerator (low level API)\n\n var map = new SourceMapGenerator({\n file: \"source-mapped.js\"\n });\n\n map.addMapping({\n generated: {\n line: 10,\n column: 35\n },\n source: \"foo.js\",\n original: {\n line: 33,\n column: 2\n },\n name: \"christopher\"\n });\n\n console.log(map.toString());\n // '{\"version\":3,\"file\":\"source-mapped.js\",\"sources\":[\"foo.js\"],\"names\":[\"christopher\"],\"mappings\":\";;;;;;;;;mCAgCEA\"}'\n\n## API\n\nGet a reference to the module:\n\n // NodeJS\n var sourceMap = require('source-map');\n\n // Browser builds\n var sourceMap = window.sourceMap;\n\n // Inside Firefox\n let sourceMap = {};\n Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap);\n\n### SourceMapConsumer\n\nA SourceMapConsumer instance represents a parsed source map which we can query\nfor information about the original file positions by giving it a file position\nin the generated source.\n\n#### new SourceMapConsumer(rawSourceMap)\n\nThe only parameter is the raw source map (either as a string which can be\n`JSON.parse`'d, or an object). According to the spec, source maps have the\nfollowing attributes:\n\n* `version`: Which version of the source map spec this map is following.\n\n* `sources`: An array of URLs to the original source files.\n\n* `names`: An array of identifiers which can be referrenced by individual\n mappings.\n\n* `sourceRoot`: Optional. The URL root from which all sources are relative.\n\n* `sourcesContent`: Optional. An array of contents of the original source files.\n\n* `mappings`: A string of base64 VLQs which contain the actual mappings.\n\n* `file`: The generated filename this source map is associated with.\n\n#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)\n\nReturns the original source, line, and column information for the generated\nsource's line and column positions provided. The only argument is an object with\nthe following properties:\n\n* `line`: The line number in the generated source.\n\n* `column`: The column number in the generated source.\n\nand an object is returned with the following properties:\n\n* `source`: The original source file, or null if this information is not\n available.\n\n* `line`: The line number in the original source, or null if this information is\n not available.\n\n* `column`: The column number in the original source, or null or null if this\n information is not available.\n\n* `name`: The original identifier, or null if this information is not available.\n\n#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)\n\nReturns the generated line and column information for the original source,\nline, and column positions provided. The only argument is an object with\nthe following properties:\n\n* `source`: The filename of the original source.\n\n* `line`: The line number in the original source.\n\n* `column`: The column number in the original source.\n\nand an object is returned with the following properties:\n\n* `line`: The line number in the generated source, or null.\n\n* `column`: The column number in the generated source, or null.\n\n#### SourceMapConsumer.prototype.sourceContentFor(source)\n\nReturns the original source content for the source provided. The only\nargument is the URL of the original source file.\n\n#### SourceMapConsumer.prototype.eachMapping(callback, context, order)\n\nIterate over each mapping between an original source/line/column and a\ngenerated line/column in this source map.\n\n* `callback`: The function that is called with each mapping. Mappings have the\n form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,\n name }`\n\n* `context`: Optional. If specified, this object will be the value of `this`\n every time that `callback` is called.\n\n* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or\n `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over\n the mappings sorted by the generated file's line/column order or the\n original's source/line/column order, respectively. Defaults to\n `SourceMapConsumer.GENERATED_ORDER`.\n\n### SourceMapGenerator\n\nAn instance of the SourceMapGenerator represents a source map which is being\nbuilt incrementally.\n\n#### new SourceMapGenerator(startOfSourceMap)\n\nTo create a new one, you must pass an object with the following properties:\n\n* `file`: The filename of the generated source that this source map is\n associated with.\n\n* `sourceRoot`: An optional root for all relative URLs in this source map.\n\n#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)\n\nCreates a new SourceMapGenerator based on a SourceMapConsumer\n\n* `sourceMapConsumer` The SourceMap.\n\n#### SourceMapGenerator.prototype.addMapping(mapping)\n\nAdd a single mapping from original source line and column to the generated\nsource's line and column for this source map being created. The mapping object\nshould have the following properties:\n\n* `generated`: An object with the generated line and column positions.\n\n* `original`: An object with the original line and column positions.\n\n* `source`: The original source file (relative to the sourceRoot).\n\n* `name`: An optional original token name for this mapping.\n\n#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)\n\nSet the source content for an original source file.\n\n* `sourceFile` the URL of the original source file.\n\n* `sourceContent` the content of the source file.\n\n#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile])\n\nApplies a SourceMap for a source file to the SourceMap.\nEach mapping to the supplied source file is rewritten using the\nsupplied SourceMap. Note: The resolution for the resulting mappings\nis the minimium of this map and the supplied map.\n\n* `sourceMapConsumer`: The SourceMap to be applied.\n\n* `sourceFile`: Optional. The filename of the source file.\n If omitted, sourceMapConsumer.file will be used.\n\n#### SourceMapGenerator.prototype.toString()\n\nRenders the source map being generated to a string.\n\n### SourceNode\n\nSourceNodes provide a way to abstract over interpolating and/or concatenating\nsnippets of generated JavaScript source code, while maintaining the line and\ncolumn information associated between those snippets and the original source\ncode. This is useful as the final intermediate representation a compiler might\nuse before outputting the generated JS and source map.\n\n#### new SourceNode(line, column, source[, chunk[, name]])\n\n* `line`: The original line number associated with this source node, or null if\n it isn't associated with an original line.\n\n* `column`: The original column number associated with this source node, or null\n if it isn't associated with an original column.\n\n* `source`: The original source's filename.\n\n* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see\n below.\n\n* `name`: Optional. The original identifier.\n\n#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer)\n\nCreates a SourceNode from generated code and a SourceMapConsumer.\n\n* `code`: The generated code\n\n* `sourceMapConsumer` The SourceMap for the generated code\n\n#### SourceNode.prototype.add(chunk)\n\nAdd a chunk of generated JS to this source node.\n\n* `chunk`: A string snippet of generated JS code, another instance of\n `SourceNode`, or an array where each member is one of those things.\n\n#### SourceNode.prototype.prepend(chunk)\n\nPrepend a chunk of generated JS to this source node.\n\n* `chunk`: A string snippet of generated JS code, another instance of\n `SourceNode`, or an array where each member is one of those things.\n\n#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)\n\nSet the source content for a source file. This will be added to the\n`SourceMap` in the `sourcesContent` field.\n\n* `sourceFile`: The filename of the source file\n\n* `sourceContent`: The content of the source file\n\n#### SourceNode.prototype.walk(fn)\n\nWalk over the tree of JS snippets in this node and its children. The walking\nfunction is called once for each snippet of JS and is passed that snippet and\nthe its original associated source's line/column location.\n\n* `fn`: The traversal function.\n\n#### SourceNode.prototype.walkSourceContents(fn)\n\nWalk over the tree of SourceNodes. The walking function is called for each\nsource file content and is passed the filename and source content.\n\n* `fn`: The traversal function.\n\n#### SourceNode.prototype.join(sep)\n\nLike `Array.prototype.join` except for SourceNodes. Inserts the separator\nbetween each of this source node's children.\n\n* `sep`: The separator.\n\n#### SourceNode.prototype.replaceRight(pattern, replacement)\n\nCall `String.prototype.replace` on the very right-most source snippet. Useful\nfor trimming whitespace from the end of a source node, etc.\n\n* `pattern`: The pattern to replace.\n\n* `replacement`: The thing to replace the pattern with.\n\n#### SourceNode.prototype.toString()\n\nReturn the string representation of this source node. Walks over the tree and\nconcatenates all the various snippets together to one string.\n\n### SourceNode.prototype.toStringWithSourceMap(startOfSourceMap)\n\nReturns the string representation of this tree of source nodes, plus a\nSourceMapGenerator which contains all the mappings between the generated and\noriginal sources.\n\nThe arguments are the same as those to `new SourceMapGenerator`.\n\n## Tests\n\n[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map)\n\nInstall NodeJS version 0.8.0 or greater, then run `node test/run-tests.js`.\n\nTo add new tests, create a new file named `test/test-.js`\nand export your test functions with names that start with \"test\", for example\n\n exports[\"test doing the foo bar\"] = function (assert, util) {\n ...\n };\n\nThe new test will be located automatically when you run the suite.\n\nThe `util` argument is the test utility module located at `test/source-map/util`.\n\nThe `assert` argument is a cut down version of node's assert module. You have\naccess to the following assertion functions:\n\n* `doesNotThrow`\n\n* `equal`\n\n* `ok`\n\n* `strictEqual`\n\n* `throws`\n\n(The reason for the restricted set of test functions is because we need the\ntests to run inside Firefox's test suite as well and so the assert module is\nshimmed in that environment. See `build/assert-shim.js`.)\n\n[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\n[feature]: https://wiki.mozilla.org/DevTools/Features/SourceMap\n[Dryice]: https://github.com/mozilla/dryice\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/mozilla/source-map/issues" }, "_id": "source-map@0.1.31", "_from": "source-map@0.1.31", "realName": "source-map", "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/envify/node_modules/jstransform/node_modules/source-map", "parent": "[Circular]", "depth": 4, "peerDependencies": {} } }, "licenses": [ { "type": "Apache-2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0" } ], "engines": { "node": ">=0.8.8" }, "devDependencies": { "jest-cli": "^0.2", "jshint": "^2.5.10" }, "jest": { "scriptPreprocessor": "/jestPreprocessor.js", "setupEnvScriptFile": "/jestEnvironment.js", "testPathIgnorePatterns": [ "/node_modules/", "/__tests__/[^/]*/.+" ] }, "scripts": { "prepublish": "jest && jshint --config=.jshintrc --exclude=node_modules .", "test": "jest && jshint --config=.jshintrc --exclude=node_modules ." }, "readme": "# JSTransform [![Build Status](https://travis-ci.org/facebook/jstransform.svg?branch=master)](https://travis-ci.org/facebook/jstransform)\n\nA simple utility for pluggable JS syntax transforms using the esprima parser.\n\n* Makes it simple to write and plug-in syntax transformations\n* Makes it simple to coalesce multiple syntax transformations in a single pass of the AST\n* Gives complete control over the formatting of the output on a per-transformation basis\n* Supports source map generation\n* Comes pre-bundled with a small set of (optional) ES6 -> ES5 transforms\n\nNOTE: If you're looking for a library for writing new greenfield JS transformations, consider looking at the [Recast](https://github.com/benjamn/recast) library instead of jstransform. We are still actively supporting jstransform (and intend to for the foreseeable future), but longer term we would like to direct efforts toward Recast. Recast does a far better job of supporting a multi-pass JS transformation pipeline, and this is important when attempting to apply many transformations to a source file.\n\n## Examples\nUsing a pre-bundled or existing transform:\n```js\n/**\n * Reads a source file that may (or may not) contain ES6 classes, transforms it\n * to ES5 compatible code using the pre-bundled ES6 class visitors, and prints \n * out the result.\n */\nvar es6ClassVisitors = require('jstransform/visitors/es6-class-visitors').visitorList;\nvar fs = require('fs');\nvar jstransform = require('jstransform');\n\nvar originalFileContents = fs.readFileSync('path/to/original/file.js', 'utf-8');\n\nvar transformedFileData = jstransform.transform(\n es6ClassVisitors,\n originalFileContents\n);\n\nconsole.log(transformedFileData.code);\n```\n\nUsing multiple pre-bundled or existing transforms at once:\n```js\n/**\n * Reads a source file that may (or may not) contain ES6 classes *or* arrow\n * functions, transforms them to ES5 compatible code using the pre-bundled ES6 \n * visitors, and prints out the result.\n */\nvar es6ArrowFuncVisitors = require('jstransform/visitors/es6-arrow-function-visitors').visitorList;\nvar es6ClassVisitors = require('jstransform/visitors/es6-class-visitors').visitorList;\nvar jstransform = require('jstransform');\n\n// Normally you'd read this from the filesystem, but I'll just use a string here\n// to simplify the example.\nvar originalFileContents = \"var a = (param1) => param1; class FooClass {}\";\n\nvar transformedFileData = jstransform.transform(\n es6ClassVisitors.concat(es6ArrowFuncVisitors),\n originalFileContents\n);\n\n// var a = function(param1) {return param1;}; function FooClass(){\"use strict\";}\nconsole.log(transformedFileData.code);\n```\n\nWriting a simple custom transform:\n```js\n/**\n * Creates a custom transformation visitor that prefixes all calls to the\n * `eval()` function with a call to `alert()` saying how much of a clown you are\n * for using eval.\n */\nvar jstransform = require('jstransform');\nvar utils = require('jstransform/src/utils');\n\nvar Syntax = jstransform.Syntax;\n\nfunction visitEvalCallExpressions(traverse, node, path, state) {\n // Appends an alert() call to the output buffer *before* the visited node\n // (in this case the eval call) is appended to the output buffer\n utils.append('alert(\"...eval?...really?...\");', state);\n\n // Now we copy the eval expression to the output buffer from the original\n // source\n utils.catchup(node.range[1], state);\n}\nvisitEvalCallExpressions.test = function(node, path, state) {\n return node.type === Syntax.CallExpression\n && node.callee.type === Syntax.Identifier\n && node.callee.name === 'eval';\n};\n\n// Normally you'd read this from the filesystem, but I'll just use a string here\n// to simplify the example.\nvar originalFileContents = \"eval('foo');\";\n\nvar transformedFileData = jstransform.transform(\n [visitEvalCallExpressions], // Multiple visitors may be applied at once, so an\n // array is always expected for the first argument\n originalFileContents\n);\n\n// alert(\"...eval?...really?...\");eval('foo');\nconsole.log(transformedFileData.code);\n```\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/facebook/jstransform/issues" }, "_id": "jstransform@10.1.0", "_from": "jstransform@^10.0.1", "realName": "jstransform", "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/envify/node_modules/jstransform", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/envify/node_modules/jstransform", "parent": "[Circular]", "depth": 3, "peerDependencies": {} } }, "keywords": [ "environment", "variables", "browserify", "browserify-transform", "transform", "source", "configuration" ], "readme": "# envify [![Build Status](https://secure.travis-ci.org/hughsk/envify.png?branch=master)](http://travis-ci.org/hughsk/envify) [![stable](http://hughsk.github.io/stability-badges/dist/stable.svg)](http://github.com/hughsk/stability-badges) #\n\nSelectively replace Node-style environment variables with plain strings.\nAvailable as a standalone CLI tool and a\n[Browserify](http://browserify.org) v2 transform.\n\nWorks best in combination with [uglifyify](http://github.com/hughsk/uglifyify).\n\n## Installation ##\n\nIf you're using the module with Browserify:\n\n``` bash\nnpm install envify browserify\n```\n\nOr, for the CLI:\n\n``` bash\nsudo npm install -g envify\n```\n\n## Usage ##\n\nenvify will replace your environment variable checks with ordinary strings -\nonly the variables you use will be included, so you don't have to worry about,\nsay, `AWS_SECRET_KEY` leaking through either. Take this example script:\n\n``` javascript\nif (process.env.NODE_ENV === \"development\") {\n console.log('development only')\n}\n```\n\nAfter running it through envify with `NODE_ENV` set to `production`, you'll\nget this:\n\n``` javascript\nif (\"production\" === \"development\") {\n console.log('development only')\n}\n```\n\nBy running this through a good minifier (e.g.\n[UglifyJS2](https://github.com/mishoo/UglifyJS)), the above code would be\nstripped out completely.\n\nHowever, if you bundled the same script with `NODE_ENV` set to `development`:\n\n``` javascript\nif (\"development\" === \"development\") {\n console.log('development only')\n}\n```\n\nThe `if` statement will evaluate to `true`, so the code won't be removed.\n\n## CLI Usage ##\n\nWith browserify:\n\n``` bash\nbrowserify index.js -t envify > bundle.js\n```\n\nOr standalone:\n\n``` bash\nenvify index.js > bundle.js\n```\n\nYou can also specify additional custom environment variables using\nbrowserify's [subarg](http://github.com/substack/subarg) syntax, which is\navailable in versions 3.25.0 and above:\n\n``` bash\nbrowserify index.js -t [ envify --NODE_ENV development ] > bundle.js\nbrowserify index.js -t [ envify --NODE_ENV production ] > bundle.js\n```\n\n## Module Usage ##\n\n**require('envify')**\n\nReturns a transform stream that updates based on the Node process'\n`process.env` object.\n\n**require('envify/custom')([environment])**\n\nIf you want to stay away from your environment variables, you can supply\nyour own object to use in its place:\n\n``` javascript\nvar browserify = require('browserify')\n , envify = require('envify/custom')\n , fs = require('fs')\n\nvar b = browserify('main.js')\n , output = fs.createWriteStream('bundle.js')\n\nb.transform(envify({\n NODE_ENV: 'development'\n}))\nb.bundle().pipe(output)\n```\n\n## Purging `process.env` ##\n\nBy default, environment variables that are not defined will be left untouched.\nThis is because in some cases, you might want to run an envify transform over\nyour source more than once, and removing these values would make that\nimpossible.\n\nHowever, if any references to `process.env` are remaining after transforming\nyour source with envify, browserify will automatically insert its shim for\nNode's process object, which will increase the size of your bundle. This weighs\nin at around 2KB, so if you're trying to be conservative with your bundle size\nyou can \"purge\" these remaining variables such that any missing ones are simply\nreplaced with undefined.\n\nTo do so through the command-line, simply use the subarg syntax and include\n`purge` after `envify`, e.g.:\n\n``` bash\nbrowserify index.js -t [ envify purge --NODE_ENV development ]\n```\n\nOr if you're using the module API, you can pass `_: \"purge\"` into your\narguments like so:\n\n``` javascript\nb.transform(envify({\n _: 'purge'\n , NODE_ENV: 'development'\n}))\n```\n\n## Contributors ##\n\n* [hughsk](http://github.com/hughsk)\n* [benjamn](http://github.com/benjamn)\n* [zag2art](http://github.com/zag2art)\n* [bjoerge](http://github.com/bjoerge)\n* [andreypopp](http://github.com/andreypopp)\n* [jupl](http://github.com/jupl)\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/hughsk/envify/issues" }, "_id": "envify@3.4.0", "_from": "envify@^3.0.0", "realName": "envify", "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/envify", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/envify", "parent": "[Circular]", "depth": 2, "peerDependencies": {} }, "fbjs": { "name": "fbjs", "version": "0.6.1", "description": "A collection of utility libraries used by other Facebook JS projects", "main": "index.js", "repository": { "type": "git", "url": "git://github.com/facebook/fbjs" }, "scripts": { "build": "gulp build", "lint": "eslint .", "prepublish": "npm run build", "pretest": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json", "test": "NODE_ENV=test jest", "typecheck": "flow check src" }, "author": "", "license": "BSD-3-Clause", "devDependencies": { "babel": "^5.4.7", "babel-eslint": "4.1.5", "del": "^1.2.1", "eslint": "1.10.3", "fbjs-scripts": "file:scripts", "flow-bin": "^0.18.1", "gulp": "^3.9.0", "gulp-babel": "^5.1.0", "gulp-flatten": "^0.2.0", "gulp-rename": "^1.2.2", "jest-cli": "^0.7.1", "merge-stream": "^1.0.0", "object-assign": "^4.0.1", "run-sequence": "^1.1.0" }, "files": [ "LICENSE", "PATENTS", "README.md", "flow/", "index.js", "lib/", "module-map.json" ], "jest": { "modulePathIgnorePatterns": [ "/lib/", "/node_modules/" ], "persistModuleRegistryBetweenSpecs": true, "preprocessorIgnorePatterns": [ "/node_modules/" ], "rootDir": "", "scriptPreprocessor": "node_modules/fbjs-scripts/jest/preprocessor.js", "setupEnvScriptFile": "node_modules/fbjs-scripts/jest/environment.js", "testPathDirs": [ "/src" ], "unmockedModulePathPatterns": [ "/node_modules/", "/src/(?!(__forks__/fetch.js$|fetch/))" ] }, "dependencies": { "core-js": { "name": "core-js", "description": "Standard library", "version": "1.2.6", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git" }, "main": "index.js", "devDependencies": { "webpack": "1.12.x", "LiveScript": "1.3.x", "grunt": "0.4.x", "grunt-cli": "0.1.x", "grunt-livescript": "0.5.x", "grunt-contrib-uglify": "0.10.x", "grunt-contrib-watch": "0.6.x", "grunt-contrib-clean": "0.6.x", "grunt-contrib-copy": "0.8.x", "grunt-karma": "0.12.x", "karma": "0.13.x", "karma-qunit": "0.1.x", "karma-chrome-launcher": "0.2.x", "karma-ie-launcher": "0.2.x", "karma-firefox-launcher": "0.1.x", "karma-phantomjs-launcher": "0.2.x", "promises-aplus-tests": "2.1.x", "eslint": "1.9.x" }, "scripts": { "grunt": "grunt", "lint": "eslint es5 es6 es7 js web core fn modules", "promises-tests": "promises-aplus-tests tests/promises-aplus/adapter", "test": "npm run lint && npm run grunt livescript client karma:continuous library karma:continuous-library && npm run promises-tests && lsc tests/commonjs" }, "license": "MIT", "keywords": [ "ES5", "ECMAScript 5", "ES6", "ECMAScript 6", "ES7", "ECMAScript 7", "Harmony", "Strawman", "Map", "Set", "WeakMap", "WeakSet", "Promise", "Symbol", "Array generics", "setImmediate", "Dict", "partial application" ], "readme": "# core-js\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![version](https://img.shields.io/npm/v/core-js.svg)](https://www.npmjs.com/package/core-js) [![npm downloads](https://img.shields.io/npm/dm/core-js.svg)](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18&to=2114-11-18) [![Build Status](https://travis-ci.org/zloirock/core-js.png)](https://travis-ci.org/zloirock/core-js) [![devDependency Status](https://david-dm.org/zloirock/core-js/dev-status.svg)](https://david-dm.org/zloirock/core-js#info=devDependencies)\n\nModular compact standard library for JavaScript. Includes polyfills for [ECMAScript 5](#ecmascript-5), [ECMAScript 6](#ecmascript-6): [symbols](#ecmascript-6-symbol), [collections](#ecmascript-6-collections), [iterators](#ecmascript-6-iterators), [promises](#ecmascript-6-promise), [ECMAScript 7 proposals](#ecmascript-7); [setImmediate](#setimmediate), [array generics](#mozilla-javascript-array-generics). Some additional features such as [dictionaries](#dict) or [extended partial application](#partial-application). You can require only standardized features polyfills, use features without global namespace pollution or create a custom build.\n\n[Example](http://goo.gl/mfHYm2):\n```javascript\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\n'*'.repeat(10); // => '**********'\nPromise.resolve(32).then(log); // => 32\nsetImmediate(log, 42); // => 42\n```\n\n[Without global namespace pollution](http://goo.gl/WBhs43):\n```javascript\nvar core = require('core-js/library'); // With a modular system, otherwise use global `core`\ncore.Array.from(new core.Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\ncore.String.repeat('*', 10); // => '**********'\ncore.Promise.resolve(32).then(core.log); // => 32\ncore.setImmediate(core.log, 42); // => 42\n```\n\n- [Usage](#usage)\n - [Basic](#basic)\n - [CommonJS](#commonjs)\n - [Custom build](#custom-build)\n- [Features](#features)\n - [ECMAScript 5](#ecmascript-5)\n - [ECMAScript 6](#ecmascript-6)\n - [ECMAScript 6: Object](#ecmascript-6-object)\n - [ECMAScript 6: Function](#ecmascript-6-function)\n - [ECMAScript 6: Array](#ecmascript-6-array)\n - [ECMAScript 6: String](#ecmascript-6-string)\n - [ECMAScript 6: RegExp](#ecmascript-6-regexp)\n - [ECMAScript 6: Number](#ecmascript-6-number)\n - [ECMAScript 6: Math](#ecmascript-6-math)\n - [ECMAScript 6: Symbol](#ecmascript-6-symbol)\n - [ECMAScript 6: Collections](#ecmascript-6-collections)\n - [ECMAScript 6: Iterators](#ecmascript-6-iterators)\n - [ECMAScript 6: Promise](#ecmascript-6-promise)\n - [ECMAScript 6: Reflect](#ecmascript-6-reflect)\n - [ECMAScript 7](#ecmascript-7)\n - [Mozilla JavaScript: Array generics](#mozilla-javascript-array-generics)\n - [Web standards](#web-standards)\n - [setTimeout / setInterval](#settimeout--setinterval)\n - [setImmediate](#setimmediate)\n - [Non-standard](#non-standard)\n - [Object](#object)\n - [Dict](#dict)\n - [Partial application](#partial-application)\n - [Number Iterator](#number-iterator)\n - [Escaping HTML](#escaping-html)\n - [delay](#delay)\n - [console](#console)\n- [Missing polyfills](#missing-polyfills)\n- [Changelog](./CHANGELOG.md)\n\n## Usage\n### Basic\n```\nnpm i core-js\nbower install core.js\n```\n\n```javascript\n// Default\nrequire('core-js');\n// Without global namespace pollution\nvar core = require('core-js/library');\n// Shim only\nrequire('core-js/shim');\n```\nIf you need complete build for browser, use builds from `core-js/client` path: [default](https://raw.githack.com/zloirock/core-js/master/client/core.min.js), [without global namespace pollution](https://raw.githack.com/zloirock/core-js/master/client/library.min.js), [shim only](https://raw.githack.com/zloirock/core-js/master/client/shim.min.js).\n\nWarning: if you uses `core-js` with the extension of native objects, require all needed `core-js` modules at the beginning of entry point of your application, otherwise maybe conflicts.\n\n### CommonJS\nYou can require only needed modules.\n\n```js\nrequire('core-js/es5'); // if you need support IE8-\nrequire('core-js/fn/set');\nrequire('core-js/fn/array/from');\nrequire('core-js/fn/array/find-index');\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\n[1, 2, NaN, 3, 4].findIndex(isNaN); // => 2\n\n// or, w/o global namespace pollution:\n\nvar core = require('core-js/library/es5'); // if you need support IE8-\nvar Set = require('core-js/library/fn/set');\nvar from = require('core-js/library/fn/array/from');\nvar findIndex = require('core-js/library/fn/array/find-index');\nfrom(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\nfindIndex([1, 2, NaN, 3, 4], isNaN); // => 2\n```\nAvailable entry points for methods / constructors, as above examples, excluding features from [`es5`](#ecmascript-5) module (this module requires completely in ES3 environment before all other modules).\n\nAvailable namespaces: for example, `core-js/es6/array` (`core-js/library/es6/array`) contains all [ES6 `Array` features](#ecmascript-6-array), `core-js/es6` (`core-js/library/es6`) contains all ES6 features.\n\n### Custom build\n```\nnpm i core-js && cd node_modules/core-js && npm i\nnpm run grunt build:core.dict,es6 -- --blacklist=es6.promise,es6.math --library=on --path=custom uglify\n```\nWhere `core.dict` and `es6` are modules (namespaces) names, which will be added to the build, `es6.promise` and `es6.math` are modules (namespaces) names, which will be excluded from the build, `--library=on` is flag for build without global namespace pollution and `custom` is target file name.\n\nAvailable namespaces: for example, `es6.array` contains [ES6 `Array` features](#ecmascript-6-array), `es6` contains all modules whose names start with `es6`.\n\nAvailable custom build from js code (required `webpack`):\n```js\nrequire('core-js/build')({\n modules: ['es6', 'core.dict'], // modules / namespaces\n blacklist: ['es6.reflect'], // blacklist of modules / namespaces\n library: false, // flag for build without global namespace pollution\n}, function(err, code){ // callback\n // ...\n});\n```\n## Features:\n### ECMAScript 5\nModule [`es5`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es5.js), nothing new - without examples.\n```javascript\nObject\n .create(proto | null, descriptors?) -> object\n .getPrototypeOf(object) -> proto | null\n .defineProperty(target, key, desc) -> target, cap for ie8-\n .defineProperties(target, descriptors) -> target, cap for ie8-\n .getOwnPropertyDescriptor(object, key) -> desc\n .getOwnPropertyNames(object) -> array\n .keys(object) -> array\nArray\n .isArray(var) -> bool\n #slice(start?, end?) -> array, fix for ie7-\n #join(string = ',') -> string, fix for ie7-\n #indexOf(var, from?) -> int\n #lastIndexOf(var, from?) -> int\n #every(fn(val, index, @), that) -> bool\n #some(fn(val, index, @), that) -> bool\n #forEach(fn(val, index, @), that) -> void\n #map(fn(val, index, @), that) -> array\n #filter(fn(val, index, @), that) -> array\n #reduce(fn(memo, val, index, @), memo?) -> var\n #reduceRight(fn(memo, val, index, @), memo?) -> var\nFunction\n #bind(object, ...args) -> boundFn(...args)\nDate\n .now() -> int\n #toISOString() -> string\n```\nSome features moved to [another modules / namespaces](#ecmascript-6), but available as part of `es5` namespace too:\n```js\nObject\n .seal(object) -> object, cap for ie8-\n .freeze(object) -> object, cap for ie8-\n .preventExtensions(object) -> object, cap for ie8-\n .isSealed(object) -> bool, cap for ie8-\n .isFrozen(object) -> bool, cap for ie8-\n .isExtensible(object) -> bool, cap for ie8-\nString\n #trim() -> str\n```\n\n### ECMAScript 6\n#### ECMAScript 6: Object\nModules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.to-string.js).\n```javascript\nObject\n .assign(target, ...src) -> target\n .is(a, b) -> bool\n .setPrototypeOf(target, proto | null) -> target (required __proto__ - IE11+)\n #toString() -> string, ES6 fix: @@toStringTag support\n```\n[Example](http://goo.gl/VzmY3j):\n```javascript\nvar foo = {q: 1, w: 2}\n , bar = {e: 3, r: 4}\n , baz = {t: 5, y: 6};\nObject.assign(foo, bar, baz); // => foo = {q: 1, w: 2, e: 3, r: 4, t: 5, y: 6}\n\nObject.is(NaN, NaN); // => true\nObject.is(0, -0); // => false\nObject.is(42, 42); // => true\nObject.is(42, '42'); // => false\n\nfunction Parent(){}\nfunction Child(){}\nObject.setPrototypeOf(Child.prototype, Parent.prototype);\nnew Child instanceof Child; // => true\nnew Child instanceof Parent; // => true\n\nvar O = {};\nO[Symbol.toStringTag] = 'Foo';\n'' + O; // => '[object Foo]'\n```\nIn ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.keys.js), [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.object.get-own-property-names.js).\n```javascript\nObject\n .freeze(var) -> var\n .seal(var) -> var\n .preventExtensions(var) -> var\n .isFrozen(var) -> bool\n .isSealed(var) -> bool\n .isExtensible(var) -> bool\n .getOwnPropertyDescriptor(var, key) -> desc | undefined\n .getPrototypeOf(var) -> object | null\n .keys(var) -> array\n .getOwnPropertyNames(var) -> array\n```\n[Example](http://goo.gl/35lPSi):\n```javascript\nObject.keys('qwe'); // => ['0', '1', '2']\nObject.getPrototypeOf('qwe') === String.prototype; // => true\n```\n#### ECMAScript 6: Function\nModules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.function.name.js) and [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.function.has-instance.js).\n```javascript\nFunction\n #name -> string (IE9+)\n #@@hasInstance(var) -> bool\n```\n[Example](http://goo.gl/zqu3Wp):\n```javascript\n(function foo(){}).name // => 'foo'\n```\n#### ECMAScript 6: Array\nModules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.find.js) and [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.find-index.js).\n```javascript\nArray\n .from(iterable | array-like, mapFn(val, index)?, that) -> array\n .of(...args) -> array\n #copyWithin(target = 0, start = 0, end = @length) -> @\n #fill(val, start = 0, end = @length) -> @\n #find(fn(val, index, @), that) -> val\n #findIndex(fn(val, index, @), that) -> index\n #@@unscopables -> object (cap)\n```\n[Example](http://goo.gl/nxmJTe):\n```javascript\nArray.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]\nArray.from({0: 1, 1: 2, 2: 3, length: 3}); // => [1, 2, 3]\nArray.from('123', Number); // => [1, 2, 3]\nArray.from('123', function(it){\n return it * it;\n}); // => [1, 4, 9]\n\nArray.of(1); // => [1]\nArray.of(1, 2, 3); // => [1, 2, 3]\n\nfunction isOdd(val){\n return val % 2;\n}\n[4, 8, 15, 16, 23, 42].find(isOdd); // => 15\n[4, 8, 15, 16, 23, 42].findIndex(isOdd); // => 2\n[4, 8, 15, 16, 23, 42].find(isNaN); // => undefined\n[4, 8, 15, 16, 23, 42].findIndex(isNaN); // => -1\n\nArray(5).fill(42); // => [42, 42, 42, 42, 42]\n\n[1, 2, 3, 4, 5].copyWithin(0, 3); // => [4, 5, 3, 4, 5]\n```\n#### ECMAScript 6: String\nModules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.raw.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.trim.js).\n```javascript\nString\n .fromCodePoint(...codePoints) -> str\n .raw({raw}, ...substitutions) -> str\n #includes(str, from?) -> bool\n #startsWith(str, from?) -> bool\n #endsWith(str, from?) -> bool\n #repeat(num) -> str\n #codePointAt(pos) -> uint\n #trim() -> str, ES6 fix\n```\n[Examples](http://goo.gl/RMyFBo):\n```javascript\n'foobarbaz'.includes('bar'); // => true\n'foobarbaz'.includes('bar', 4); // => false\n'foobarbaz'.startsWith('foo'); // => true\n'foobarbaz'.startsWith('bar', 3); // => true\n'foobarbaz'.endsWith('baz'); // => true\n'foobarbaz'.endsWith('bar', 6); // => true\n\n'string'.repeat(3); // => 'stringstringstring'\n\n'𠮷'.codePointAt(0); // => 134071\nString.fromCodePoint(97, 134071, 98); // => 'a𠮷b'\n\nvar name = 'Bob';\nString.raw`Hi\\n${name}!`; // => 'Hi\\\\nBob!' (ES6 template string syntax)\nString.raw({raw: 'test'}, 0, 1, 2); // => 't0e1s2t'\n```\n#### ECMAScript 6: RegExp\nModules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.flags.js).\n\nSupport well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.regexp.split.js).\n```\nString\n #match(tpl) -> var, ES6 fix for support @@match\n #replace(tpl, replacer) -> var, ES6 fix for support @@replace\n #search(tpl) -> var, ES6 fix for support @@search\n #split(tpl, limit) -> var, ES6 fix for support @@split\n[new] RegExp(pattern, flags?) -> regexp, ES6 fix: can alter flags (IE9+)\n #flags -> str (IE9+)\n #@@match(str) -> array | null\n #@@replace(str, replacer) -> string\n #@@search(str) -> index\n #@@split(str, limit) -> array\n```\n[Examples](http://goo.gl/vLV603):\n```javascript\nRegExp(/./g, 'm'); // => /./m\n\n/foo/.flags; // => ''\n/foo/gim.flags; // => 'gim'\n\n'foo'.match({[Symbol.match]: _ => 1}); // => 1\n'foo'.replace({[Symbol.replace]: _ => 2}); // => 2\n'foo'.search({[Symbol.search]: _ => 3}); // => 3\n'foo'.split({[Symbol.split]: _ => 4}); // => 4\n```\n#### ECMAScript 6: Number\nModule [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [example](http://goo.gl/jRd6b3):\n```javascript\nNumber('0b1010101'); // => 85\nNumber('0o7654321'); // => 2054353\n```\n`Number`: modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.number.parse-int.js).\n```javascript\n[new] Number(var) -> number | number object\n .EPSILON -> num\n .isFinite(num) -> bool\n .isInteger(num) -> bool\n .isNaN(num) -> bool\n .isSafeInteger(num) -> bool\n .MAX_SAFE_INTEGER -> int\n .MIN_SAFE_INTEGER -> int\n .parseFloat(str) -> num\n .parseInt(str) -> int\n```\n#### ECMAScript 6: Math\n`Math`: modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.math.trunc.js).\n```javascript\nMath\n .acosh(num) -> num\n .asinh(num) -> num\n .atanh(num) -> num\n .cbrt(num) -> num\n .clz32(num) -> uint\n .cosh(num) -> num\n .expm1(num) -> num\n .fround(num) -> num\n .hypot(...args) -> num\n .imul(num, num) -> int\n .log1p(num) -> num\n .log10(num) -> num\n .log2(num) -> num\n .sign(num) -> 1 | -1 | 0 | -0 | NaN\n .sinh(num) -> num\n .tanh(num) -> num\n .trunc(num) -> num\n```\n\n#### ECMAScript 6: Symbol\nModule [`es6.symbol`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.symbol.js).\n```javascript\nSymbol(description?) -> symbol\n .hasInstance -> @@hasInstance\n .isConcatSpreadable -> @@isConcatSpreadable\n .iterator -> @@iterator\n .match -> @@match\n .replace -> @@replace\n .search -> @@search\n .species -> @@species\n .split -> @@split\n .toPrimitive -> @@toPrimitive\n .toStringTag -> @@toStringTag\n .unscopables -> @@unscopables\n .for(key) -> symbol\n .keyFor(symbol) -> key\n .useSimple() -> void\n .useSetter() -> void\nObject\n .getOwnPropertySymbols(object) -> array\n```\nAlso wrapped some methods for correct work with `Symbol` polyfill.\n```js\nObject\n .create(proto | null, descriptors?) -> object\n .defineProperty(target, key, desc) -> target\n .defineProperties(target, descriptors) -> target\n .getOwnPropertyDescriptor(var, key) -> desc | undefined\n .getOwnPropertyNames(var) -> array\n #propertyIsEnumerable(key) -> bool\nJSON\n .stringify(target, replacer?, space?) -> string | undefined\n```\n[Basic example](http://goo.gl/BbvWFc):\n```javascript\nvar Person = (function(){\n var NAME = Symbol('name');\n function Person(name){\n this[NAME] = name;\n }\n Person.prototype.getName = function(){\n return this[NAME];\n };\n return Person;\n})();\n\nvar person = new Person('Vasya');\nlog(person.getName()); // => 'Vasya'\nlog(person['name']); // => undefined\nlog(person[Symbol('name')]); // => undefined, symbols are uniq\nfor(var key in person)log(key); // => only 'getName', symbols are not enumerable\n```\n`Symbol.for` & `Symbol.keyFor` [example](http://goo.gl/0pdJjX):\n```javascript\nvar symbol = Symbol.for('key');\nsymbol === Symbol.for('key'); // true\nSymbol.keyFor(symbol); // 'key'\n```\n[Example](http://goo.gl/mKVOQJ) with methods for getting own object keys:\n```javascript\nvar O = {a: 1};\nObject.defineProperty(O, 'b', {value: 2});\nO[Symbol('c')] = 3;\nObject.keys(O); // => ['a']\nObject.getOwnPropertyNames(O); // => ['a', 'b']\nObject.getOwnPropertySymbols(O); // => [Symbol(c)]\nReflect.ownKeys(O); // => ['a', 'b', Symbol(c)]\n```\n#### Caveats when using `Symbol` polyfill:\n\n* We can't add new primitive type, `Symbol` returns object.\n* `Symbol.for` and `Symbol.keyFor` can't be shimmed cross-realm.\n* By default, to hide the keys, `Symbol` polyfill defines setter in `Object.prototype`. For this reason, uncontrolled creation of symbols can cause memory leak and the `in` operator is not working correctly with `Symbol` polyfill: `Symbol() in {} // => true`.\n\nYou can disable defining setters in `Object.prototype`. [Example](http://goo.gl/N5UD7J):\n```javascript\nSymbol.useSimple();\nvar s1 = Symbol('s1')\n , o1 = {};\no1[s1] = true;\nfor(var key in o1)log(key); // => 'Symbol(s1)_t.qamkg9f3q', w/o native Symbol\n\nSymbol.useSetter();\nvar s2 = Symbol('s2')\n , o2 = {};\no2[s2] = true;\nfor(var key in o2)log(key); // nothing\n```\n* Currently, `core-js` not adds setters to `Object.prototype` for well-known symbols for correct work something like `Symbol.iterator in foo`. It can cause problems with their enumerability.\n\n#### ECMAScript 6: Collections\n`core-js` uses native collections in most case, just fixes methods / constructor, if it's required, and in old environment uses fast polyfill (O(1) lookup).\n#### Map\nModule [`es6.map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.map.js). About iterators from this module [here](#ecmascript-6-iterators).\n```javascript\nnew Map(iterable (entries) ?) -> map\n #clear() -> void\n #delete(key) -> bool\n #forEach(fn(val, key, @), that) -> void\n #get(key) -> val\n #has(key) -> bool\n #set(key, val) -> @\n #size -> uint\n```\n[Example](http://goo.gl/RDbROF):\n```javascript\nvar a = [1];\n\nvar map = new Map([['a', 1], [42, 2]]);\nmap.set(a, 3).set(true, 4);\n\nlog(map.size); // => 4\nlog(map.has(a)); // => true\nlog(map.has([1])); // => false\nlog(map.get(a)); // => 3\nmap.forEach(function(val, key){\n log(val); // => 1, 2, 3, 4\n log(key); // => 'a', 42, [1], true\n});\nmap.delete(a);\nlog(map.size); // => 3\nlog(map.get(a)); // => undefined\nlog(Array.from(map)); // => [['a', 1], [42, 2], [true, 4]]\n```\n#### Set\nModule [`es6.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.set.js). About iterators from this module [here](#ecmascript-6-iterators).\n```javascript\nnew Set(iterable?) -> set\n #add(key) -> @\n #clear() -> void\n #delete(key) -> bool\n #forEach(fn(el, el, @), that) -> void\n #has(key) -> bool\n #size -> uint\n```\n[Example](http://goo.gl/7XYya3):\n```javascript\nvar set = new Set(['a', 'b', 'a', 'c']);\nset.add('d').add('b').add('e');\nlog(set.size); // => 5\nlog(set.has('b')); // => true\nset.forEach(function(it){\n log(it); // => 'a', 'b', 'c', 'd', 'e'\n});\nset.delete('b');\nlog(set.size); // => 4\nlog(set.has('b')); // => false\nlog(Array.from(set)); // => ['a', 'c', 'd', 'e']\n```\n#### WeakMap\nModule [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.weak-map.js).\n```javascript\nnew WeakMap(iterable (entries) ?) -> weakmap\n #delete(key) -> bool\n #get(key) -> val\n #has(key) -> bool\n #set(key, val) -> @\n```\n[Example](http://goo.gl/SILXyw):\n```javascript\nvar a = [1]\n , b = [2]\n , c = [3];\n\nvar wmap = new WeakMap([[a, 1], [b, 2]]);\nwmap.set(c, 3).set(b, 4);\nlog(wmap.has(a)); // => true\nlog(wmap.has([1])); // => false\nlog(wmap.get(a)); // => 1\nwmap.delete(a);\nlog(wmap.get(a)); // => undefined\n\n// Private properties store:\nvar Person = (function(){\n var names = new WeakMap;\n function Person(name){\n names.set(this, name);\n }\n Person.prototype.getName = function(){\n return names.get(this);\n };\n return Person;\n})();\n\nvar person = new Person('Vasya');\nlog(person.getName()); // => 'Vasya'\nfor(var key in person)log(key); // => only 'getName'\n```\n#### WeakSet\nModule [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.weak-set.js).\n```javascript\nnew WeakSet(iterable?) -> weakset\n #add(key) -> @\n #delete(key) -> bool\n #has(key) -> bool\n```\n[Example](http://goo.gl/TdFbEx):\n```javascript\nvar a = [1]\n , b = [2]\n , c = [3];\n\nvar wset = new WeakSet([a, b, a]);\nwset.add(c).add(b).add(c);\nlog(wset.has(b)); // => true\nlog(wset.has([2])); // => false\nwset.delete(b);\nlog(wset.has(b)); // => false\n```\n#### Caveats when using collections polyfill:\n\n* Frozen objects as collection keys are supported, but not recomended - it's slow (O(n) instead of O(1)) and, for weak-collections, leak.\n* Weak-collections polyfill stores values as hidden properties of keys. It works correct and not leak in most cases. However, it is desirable to store a collection longer than its keys.\n\n#### ECMAScript 6: Iterators\nModules [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.string.iterator.js) and [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.array.iterator.js):\n```javascript\nString\n #@@iterator() -> iterator\nArray\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator\nArguments\n #@@iterator() -> iterator (available only in core-js methods)\n```\nModules [`es6.map`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.map.js) and [`es6.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.set.js):\n```javascript\nMap\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator (entries)\nSet\n #values() -> iterator\n #keys() -> iterator\n #entries() -> iterator (entries)\n #@@iterator() -> iterator\n```\nModule [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.dom.iterable.js):\n```javascript\nNodeList\n #@@iterator() -> iterator\n```\n[Example](http://goo.gl/nzHVQF):\n```javascript\nvar string = 'a𠮷b';\n\nfor(var val of string)log(val); // => 'a', '𠮷', 'b'\n\nvar array = ['a', 'b', 'c'];\n\nfor(var val of array)log(val); // => 'a', 'b', 'c'\nfor(var val of array.values())log(val); // => 'a', 'b', 'c'\nfor(var key of array.keys())log(key); // => 0, 1, 2\nfor(var [key, val] of array.entries()){\n log(key); // => 0, 1, 2\n log(val); // => 'a', 'b', 'c'\n}\n\nvar map = new Map([['a', 1], ['b', 2], ['c', 3]]);\n\nfor(var [key, val] of map){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\nfor(var val of map.values())log(val); // => 1, 2, 3\nfor(var key of map.keys())log(key); // => 'a', 'b', 'c'\nfor(var [key, val] of map.entries()){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\n\nvar set = new Set([1, 2, 3, 2, 1]);\n\nfor(var val of set)log(val); // => 1, 2, 3\nfor(var val of set.values())log(val); // => 1, 2, 3\nfor(var key of set.keys())log(key); // => 1, 2, 3\nfor(var [key, val] of set.entries()){\n log(key); // => 1, 2, 3\n log(val); // => 1, 2, 3\n}\n\nfor(var x of document.querySelectorAll('*')){\n log(x.id);\n}\n```\nModules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.get-iterator-method.js) - helpers for check iterable / get iterator in `library` version or, for example, for `arguments` object:\n```javascript\ncore\n .isIterable(var) -> bool\n .getIterator(iterable) -> iterator\n .getIteratorMethod(var) -> function | undefined\n```\n[Example](http://goo.gl/SXsM6D):\n```js\nvar list = (function(){\n return arguments;\n})(1, 2, 3);\n\nlog(core.isIterable(list)); // true;\n\nvar iter = core.getIterator(list);\nlog(iter.next().value); // 1\nlog(iter.next().value); // 2\nlog(iter.next().value); // 3\nlog(iter.next().value); // undefined\n\ncore.getIterator({}); // TypeError: [object Object] is not iterable!\n\nvar iterFn = core.getIteratorMethod(list);\nlog(typeof iterFn); // 'function'\nvar iter = iterFn.call(list);\nlog(iter.next().value); // 1\nlog(iter.next().value); // 2\nlog(iter.next().value); // 3\nlog(iter.next().value); // undefined\n\nlog(core.getIteratorMethod({})); // undefined\n```\n#### ECMAScript 6: Promise\nModule [`es6.promise`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.promise.js).\n```javascript\nnew Promise(executor(resolve(var), reject(var))) -> promise\n #then(resolved(var), rejected(var)) -> promise\n #catch(rejected(var)) -> promise\n .resolve(var || promise) -> promise\n .reject(var) -> promise\n .all(iterable) -> promise\n .race(iterable) -> promise\n```\nBasic [example](http://goo.gl/vGrtUC):\n```javascript\nfunction sleepRandom(time){\n return new Promise(function(resolve, reject){\n setTimeout(resolve, time * 1e3, 0 | Math.random() * 1e3);\n });\n}\n\nlog('Run'); // => Run\nsleepRandom(5).then(function(result){\n log(result); // => 869, after 5 sec.\n return sleepRandom(10);\n}).then(function(result){\n log(result); // => 202, after 10 sec.\n}).then(function(){\n log('immediately after'); // => immediately after\n throw Error('Irror!');\n}).then(function(){\n log('will not be displayed');\n}).catch(log); // => => Error: Irror!\n```\n`Promise.resolve` and `Promise.reject` [example](http://goo.gl/vr8TN3):\n```javascript\nPromise.resolve(42).then(log); // => 42\nPromise.reject(42).catch(log); // => 42\n\nPromise.resolve($.getJSON('/data.json')); // => ES6 promise\n```\n`Promise.all` [example](http://goo.gl/RdoDBZ):\n```javascript\nPromise.all([\n 'foo',\n sleepRandom(5),\n sleepRandom(15),\n sleepRandom(10) // after 15 sec:\n]).then(log); // => ['foo', 956, 85, 382]\n```\n`Promise.race` [example](http://goo.gl/L8ovkJ):\n```javascript\nfunction timeLimit(promise, time){\n return Promise.race([promise, new Promise(function(resolve, reject){\n setTimeout(reject, time * 1e3, Error('Await > ' + time + ' sec'));\n })]);\n}\n\ntimeLimit(sleepRandom(5), 10).then(log); // => 853, after 5 sec.\ntimeLimit(sleepRandom(15), 10).catch(log); // Error: Await > 10 sec\n```\nECMAScript 7 [async functions](https://tc39.github.io/ecmascript-asyncawait) [example](http://goo.gl/wnQS4j):\n```javascript\nvar delay = time => new Promise(resolve => setTimeout(resolve, time))\n\nasync function sleepRandom(time){\n await delay(time * 1e3);\n return 0 | Math.random() * 1e3;\n};\nasync function sleepError(time, msg){\n await delay(time * 1e3);\n throw Error(msg);\n};\n\n(async () => {\n try {\n log('Run'); // => Run\n log(await sleepRandom(5)); // => 936, after 5 sec.\n var [a, b, c] = await Promise.all([\n sleepRandom(5),\n sleepRandom(15),\n sleepRandom(10)\n ]);\n log(a, b, c); // => 210 445 71, after 15 sec.\n await sleepError(5, 'Irror!');\n log('Will not be displayed');\n } catch(e){\n log(e); // => Error: 'Irror!', after 5 sec.\n }\n})();\n```\n\n##### Unhandled rejection tracking\n\n`core-js` `Promise` supports (but not adds to native implementations) unhandled rejection tracking.\n\n[Node.js](https://gist.github.com/benjamingr/0237932cee84712951a2):\n```js\nprocess.on('unhandledRejection', (reason, promise) => console.log(reason, promise));\nPromise.reject(42);\n// 42 [object Promise]\n\n```\nIn a browser, by default, you will see notify in the console, or you can add a custom handler, [example](http://goo.gl/izTr2I):\n```js\nwindow.onunhandledrejection = e => log(e.reason, e.promise);\nPromise.reject(42);\n// 42 [object Promise]\n```\n**Warning**: The problem here - we can't add it to native `Promise` implementations, but by idea `core-js` should use enough correct native implementation if it's available. Currently, most native implementations are buggy and `core-js` uses polyfill, but the situation will be changed. If someone wanna use this hook everywhere - he should delete `window.Promise` before inclusion `core-js`.\n\n\n#### ECMAScript 6: Reflect\nModules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es6.reflect.set-prototype-of.js).\n```javascript\nReflect\n .apply(target, thisArgument, argumentsList) -> var\n .construct(target, argumentsList, newTarget?) -> object\n .defineProperty(target, propertyKey, attributes) -> bool\n .deleteProperty(target, propertyKey) -> bool\n .enumerate(target) -> iterator\n .get(target, propertyKey, receiver?) -> var\n .getOwnPropertyDescriptor(target, propertyKey) -> desc\n .getPrototypeOf(target) -> object | null\n .has(target, propertyKey) -> bool\n .isExtensible(target) -> bool\n .ownKeys(target) -> array\n .preventExtensions(target) -> bool\n .set(target, propertyKey, V, receiver?) -> bool\n .setPrototypeOf(target, proto) -> bool (required __proto__ - IE11+)\n```\n[Example](http://goo.gl/gVT0cH):\n```javascript\nvar O = {a: 1};\nObject.defineProperty(O, 'b', {value: 2});\nO[Symbol('c')] = 3;\nReflect.ownKeys(O); // => ['a', 'b', Symbol(c)]\n\nfunction C(a, b){\n this.c = a + b;\n}\n\nvar instance = Reflect.construct(C, [20, 22]);\ninstance.c; // => 42\n```\n### ECMAScript 7\n* `Array#includes` [proposal](https://github.com/domenic/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.array.includes.js)\n* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.at.js)\n* `String#padLeft`, `String#padRight` [proposal](https://github.com/ljharb/proposal-string-pad-left-right) - modules [`es7.string.pad-left`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.pad-left.js), [`es7.string.pad-right`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.pad-right.js)\n* `String#trimLeft`, `String#trimRight` [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim) - modules [`es7.string.trim-left`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.string.trim-right.js)\n* `Object.values`, `Object.entries` [proposal](https://github.com/ljharb/proposal-object-values-entries) - modules [`es7.object.values`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.entries.js)\n* `Object.getOwnPropertyDescriptors` [proposal](https://gist.github.com/WebReflection/9353781) - module [`es7.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.object.get-own-property-descriptors.js)\n* `RegExp.escape` [proposal](https://github.com/benjamingr/RexExp.escape) - module [`es7.regexp.escape`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.regexp.escape.js)\n* `Map#toJSON`, `Set#toJSON` [proposal](https://github.com/DavidBruant/Map-Set.prototype.toJSON) - modules [`es7.map.to-json`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/es7.set.to-json.js)\n\n```javascript\nArray\n #includes(var, from?) -> bool\nString\n #at(index) -> string\n #padLeft(length, fillStr = ' ') -> string\n #padRight(length, fillStr = ' ') -> string\n #trimLeft() -> string\n #trimRight() -> string\nObject\n .values(object) -> array\n .entries(object) -> array\n .getOwnPropertyDescriptors(object) -> object\nRegExp\n .escape(str) -> str\nMap\n #toJSON() -> array\nSet\n #toJSON() -> array\n```\n[Examples](http://goo.gl/aUZQRH):\n```javascript\n[1, 2, 3].includes(2); // => true\n[1, 2, 3].includes(4); // => false\n[1, 2, 3].includes(2, 2); // => false\n\n[NaN].indexOf(NaN); // => -1\n[NaN].includes(NaN); // => true\nArray(1).indexOf(undefined); // => -1\nArray(1).includes(undefined); // => true\n\n'a𠮷b'.at(1); // => '𠮷'\n'a𠮷b'.at(1).length; // => 2\n\n'hello'.padLeft(10); // => ' hello'\n'hello'.padLeft(10, '1234'); // => '41234hello'\n'hello'.padRight(10); // => 'hello '\n'hello'.padRight(10, '1234'); // => 'hello12341'\n\n' hello '.trimLeft(); // => 'hello '\n' hello '.trimRight(); // => ' hello'\n\nObject.values({a: 1, b: 2, c: 3}); // => [1, 2, 3]\nObject.entries({a: 1, b: 2, c: 3}); // => [['a', 1], ['b', 2], ['c', 3]]\n\n// Shallow object cloning with prototype and descriptors:\nvar copy = Object.create(Object.getPrototypeOf(O), Object.getOwnPropertyDescriptors(O));\n// Mixin:\nObject.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n\nRegExp.escape('Hello, []{}()*+?.\\\\^$|!'); // => 'Hello, \\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|!'\n\nJSON.stringify(new Map([['a', 'b'], ['c', 'd']])); // => '[[\"a\",\"b\"],[\"c\",\"d\"]]'\nJSON.stringify(new Set([1, 2, 3, 2, 1])); // => '[1,2,3]'\n```\n### Mozilla JavaScript: Array generics\nModule [`js.array.statics`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/js.array.statics.js).\n```javascript\nArray\n .{...ArrayPrototype methods}\n```\n\n```javascript\nArray.slice(arguments, 1);\n\nArray.join('abcdef', '+'); // => 'a+b+c+d+e+f'\n\nvar form = document.getElementsByClassName('form__input');\nArray.reduce(form, function(memo, it){\n memo[it.name] = it.value;\n return memo;\n}, {}); // => {name: 'Vasya', age: '42', sex: 'yes, please'}\n```\n### Web standards\n#### setTimeout / setInterval\nModule [`web.timers`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.timers.js). Additional arguments fix for IE9-.\n```javascript\nsetTimeout(fn(...args), time, ...args) -> id\nsetInterval(fn(...args), time, ...args) -> id\n```\n```javascript\n// Before:\nsetTimeout(log.bind(null, 42), 1000);\n// After:\nsetTimeout(log, 1000, 42);\n```\n#### setImmediate\nModule [`web.immediate`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill.\n```javascript\nsetImmediate(fn(...args), ...args) -> id\nclearImmediate(id) -> void\n```\n[Example](http://goo.gl/6nXGrx):\n```javascript\nsetImmediate(function(arg1, arg2){\n log(arg1, arg2); // => Message will be displayed with minimum delay\n}, 'Message will be displayed', 'with minimum delay');\n\nclearImmediate(setImmediate(function(){\n log('Message will not be displayed');\n}));\n```\n### Non-standard\n#### Object\nModules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.object.make.js).\n```javascript\nObject\n .isObject(var) -> bool\n .classof(var) -> string \n .define(target, mixin) -> target\n .make(proto | null, mixin?) -> object\n```\nObject classify [examples](http://goo.gl/YZQmGo):\n```javascript\nObject.isObject({}); // => true\nObject.isObject(isNaN); // => true\nObject.isObject(null); // => false\n\nvar classof = Object.classof;\n\nclassof(null); // => 'Null'\nclassof(undefined); // => 'Undefined'\nclassof(1); // => 'Number'\nclassof(true); // => 'Boolean'\nclassof('string'); // => 'String'\nclassof(Symbol()); // => 'Symbol'\n\nclassof(new Number(1)); // => 'Number'\nclassof(new Boolean(true)); // => 'Boolean'\nclassof(new String('string')); // => 'String'\n\nvar fn = function(){}\n , list = (function(){return arguments})(1, 2, 3);\n\nclassof({}); // => 'Object'\nclassof(fn); // => 'Function'\nclassof([]); // => 'Array'\nclassof(list); // => 'Arguments'\nclassof(/./); // => 'RegExp'\nclassof(new TypeError); // => 'Error'\n\nclassof(new Set); // => 'Set'\nclassof(new Map); // => 'Map'\nclassof(new WeakSet); // => 'WeakSet'\nclassof(new WeakMap); // => 'WeakMap'\nclassof(new Promise(fn)); // => 'Promise'\n\nclassof([].values()); // => 'Array Iterator'\nclassof(new Set().values()); // => 'Set Iterator'\nclassof(new Map().values()); // => 'Map Iterator'\n\nclassof(Math); // => 'Math'\nclassof(JSON); // => 'JSON'\n\nfunction Example(){}\nExample.prototype[Symbol.toStringTag] = 'Example';\n\nclassof(new Example); // => 'Example'\n```\n`Object.define` and `Object.make` [examples](http://goo.gl/rtpD5Z):\n```javascript\n// Before:\nObject.defineProperty(target, 'c', {\n enumerable: true,\n configurable: true,\n get: function(){\n return this.a + this.b;\n }\n});\n\n// After:\nObject.define(target, {\n get c(){\n return this.a + this.b;\n }\n});\n\n// Shallow object cloning with prototype and descriptors:\nvar copy = Object.make(Object.getPrototypeOf(src), src);\n\n// Simple inheritance:\nfunction Vector2D(x, y){\n this.x = x;\n this.y = y;\n}\nObject.define(Vector2D.prototype, {\n get xy(){\n return Math.hypot(this.x, this.y);\n }\n});\nfunction Vector3D(x, y, z){\n Vector2D.apply(this, arguments);\n this.z = z;\n}\nVector3D.prototype = Object.make(Vector2D.prototype, {\n constructor: Vector3D,\n get xyz(){\n return Math.hypot(this.x, this.y, this.z);\n }\n});\n\nvar vector = new Vector3D(9, 12, 20);\nlog(vector.xy); // => 15\nlog(vector.xyz); // => 25\nvector.y++;\nlog(vector.xy); // => 15.811388300841896\nlog(vector.xyz); // => 25.495097567963924\n```\n#### Dict\nModule [`core.dict`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.dict.js). Based on [TC39 discuss](https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-11/nov-29.md#collection-apis-review) / [strawman](http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard#dictionaries).\n```javascript\n[new] Dict(iterable (entries) | object ?) -> dict\n .isDict(var) -> bool\n .values(object) -> iterator\n .keys(object) -> iterator\n .entries(object) -> iterator (entries)\n .has(object, key) -> bool\n .get(object, key) -> val\n .set(object, key, value) -> object\n .forEach(object, fn(val, key, @), that) -> void\n .map(object, fn(val, key, @), that) -> new @\n .mapPairs(object, fn(val, key, @), that) -> new @\n .filter(object, fn(val, key, @), that) -> new @\n .some(object, fn(val, key, @), that) -> bool\n .every(object, fn(val, key, @), that) -> bool\n .find(object, fn(val, key, @), that) -> val\n .findKey(object, fn(val, key, @), that) -> key\n .keyOf(object, var) -> key\n .includes(object, var) -> bool\n .reduce(object, fn(memo, val, key, @), memo?) -> var\n```\n`Dict` create object without prototype from iterable or simple object. [Example](http://goo.gl/pnp8Vr):\n```javascript\nvar map = new Map([['a', 1], ['b', 2], ['c', 3]]);\n\nDict(); // => {__proto__: null}\nDict({a: 1, b: 2, c: 3}); // => {__proto__: null, a: 1, b: 2, c: 3}\nDict(map); // => {__proto__: null, a: 1, b: 2, c: 3}\nDict([1, 2, 3].entries()); // => {__proto__: null, 0: 1, 1: 2, 2: 3}\n\nvar dict = Dict({a: 42});\ndict instanceof Object; // => false\ndict.a; // => 42\ndict.toString; // => undefined\n'a' in dict; // => true\n'hasOwnProperty' in dict; // => false\n\nDict.isDict({}); // => false\nDict.isDict(Dict()); // => true\n```\n`Dict.keys`, `Dict.values` and `Dict.entries` returns iterators for objects, [examples](http://goo.gl/xAvECH):\n```javascript\nvar dict = {a: 1, b: 2, c: 3};\n\nfor(var key of Dict.keys(dict))log(key); // => 'a', 'b', 'c'\n\nfor(var val of Dict.values(dict))log(val); // => 1, 2, 3\n\nfor(var [key, val] of Dict.entries(dict)){\n log(key); // => 'a', 'b', 'c'\n log(val); // => 1, 2, 3\n}\n\nnew Map(Dict.entries(dict)); // => Map {a: 1, b: 2, c: 3}\n```\nBasic dict operations for objects with prototype [example](http://goo.gl/B28UnG):\n```js\n'q' in {q: 1}; // => true\n'toString' in {}; // => true\n\nDict.has({q: 1}, 'q'); // => true\nDict.has({}, 'toString'); // => false\n\n({q: 1})['q']; // => 1\n({}).toString; // => function toString(){ [native code] }\n\nDict.get({q: 1}, 'q'); // => 1\nDict.get({}, 'toString'); // => undefined\n\nvar O = {};\nO['q'] = 1;\nO['q']; // => 1\nO['__proto__'] = {w: 2};\nO['__proto__']; // => {w: 2}\nO['w']; // => 2\n\nvar O = {};\nDict.set(O, 'q', 1);\nO['q']; // => 1\nDict.set(O, '__proto__', {w: 2});\nO['__proto__']; // => {w: 2}\nO['w']; // => undefined\n```\nOther methods of `Dict` module are static equialents of `Array.prototype` methods for dictionaries, [examples](http://goo.gl/xFi1RH):\n```javascript\nvar dict = {a: 1, b: 2, c: 3};\n\nDict.forEach(dict, console.log, console);\n// => 1, 'a', {a: 1, b: 2, c: 3}\n// => 2, 'b', {a: 1, b: 2, c: 3}\n// => 3, 'c', {a: 1, b: 2, c: 3}\n\nDict.map(dict, function(it){\n return it * it;\n}); // => {a: 1, b: 4, c: 9}\n\nDict.mapPairs(dict, function(val, key){\n if(key != 'b')return [key + key, val * val];\n}); // => {aa: 1, cc: 9}\n\nDict.filter(dict, function(it){\n return it % 2;\n}); // => {a: 1, c: 3}\n\nDict.some(dict, function(it){\n return it === 2;\n}); // => true\n\nDict.every(dict, function(it){\n return it === 2;\n}); // => false\n\nDict.find(dict, function(it){\n return it > 2;\n}); // => 3\nDict.find(dict, function(it){\n return it > 4;\n}); // => undefined\n\nDict.findKey(dict, function(it){\n return it > 2;\n}); // => 'c'\nDict.findKey(dict, function(it){\n return it > 4;\n}); // => undefined\n\nDict.keyOf(dict, 2); // => 'b'\nDict.keyOf(dict, 4); // => undefined\n\nDict.includes(dict, 2); // => true\nDict.includes(dict, 4); // => false\n\nDict.reduce(dict, function(memo, it){\n return memo + it;\n}); // => 6\nDict.reduce(dict, function(memo, it){\n return memo + it;\n}, ''); // => '123'\n```\n#### Partial application\nModule [`core.function.part`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.function.part.js).\n```javascript\nFunction\n #part(...args | _) -> fn(...args)\n```\n`Function#part` partial apply function without `this` binding. Uses global variable `_` (`core._` for builds without global namespace pollution) as placeholder and not conflict with `Underscore` / `LoDash`. [Examples](http://goo.gl/p9ZJ8K):\n```javascript\nvar fn1 = log.part(1, 2);\nfn1(3, 4); // => 1, 2, 3, 4\n\nvar fn2 = log.part(_, 2, _, 4);\nfn2(1, 3); // => 1, 2, 3, 4\n\nvar fn3 = log.part(1, _, _, 4);\nfn3(2, 3); // => 1, 2, 3, 4\n\nfn2(1, 3, 5); // => 1, 2, 3, 4, 5\nfn2(1); // => 1, 2, undefined, 4\n```\n#### Number Iterator\nModules [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.number.iterator.js).\n```javascript\nNumber\n #@@iterator() -> iterator\n```\n[Examples](http://goo.gl/o45pCN):\n```javascript\nfor(var i of 3)log(i); // => 0, 1, 2\n\n[...10]; // => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\nArray.from(10, Math.random); // => [0.9817775336559862, 0.02720663254149258, ...]\n\nArray.from(10, function(it){\n return this + it * it;\n}, .42); // => [0.42, 1.42, 4.42, 9.42, 16.42, 25.42, 36.42, 49.42, 64.42, 81.42]\n```\n#### Escaping HTML\nModules [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.string.unescape-html.js).\n```javascript\nString\n #escapeHTML() -> str\n #unescapeHTML() -> str\n```\n[Examples](http://goo.gl/6bOvsQ):\n```javascript\n''.escapeHTML(); // => '<script>doSomething();</script>'\n'<script>doSomething();</script>'.unescapeHTML(); // => ''\n```\n#### delay\nModule [`core.delay`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function). [Example](http://goo.gl/lbucba):\n```javascript\ndelay(1e3).then(() => log('after 1 sec'));\n\n(async () => {\n await delay(3e3);\n log('after 3 sec');\n \n while(await delay(3e3))log('each 3 sec');\n})();\n```\n#### Console\nModule [`core.log`](https://github.com/zloirock/core-js/blob/v1.2.6/modules/core.log.js). Console cap for old browsers and some additional functionality. In IE, Node.js / IO.js and Firebug `console` methods not require call from `console` object, but in Chromium and V8 this throws error. For some reason, we can't replace `console` methods by their bound versions. Add `log` object with bound console methods. Some more sugar: `log` is shortcut for `log.log`, we can disable output.\n```javascript\nlog ==== log.log\n .{...console API}\n .enable() -> void\n .disable() -> void\n```\n```javascript\n// Before:\nif(window.console && console.warn)console.warn(42);\n// After:\nlog.warn(42);\n\n// Before:\nsetTimeout(console.warn.bind(console, 42), 1000);\n[1, 2, 3].forEach(console.warn, console);\n// After:\nsetTimeout(log.warn, 1000, 42);\n[1, 2, 3].forEach(log.warn);\n\n// log is shortcut for log.log\nsetImmediate(log, 42); // => 42\n\nlog.disable();\nlog.warn('Console is disabled, you will not see this message.');\nlog.enable();\nlog.warn('Console is enabled again.');\n```\n\n## Missing polyfills\n- ES5 `JSON` is missing now only in IE7- and never it will be added to `core-js`, if you need it in these old browsers available many implementations, for example, [json3](https://github.com/bestiejs/json3).\n- ES6 Typed Arrays can be polyfilled without serious problems, but it will be slow - getter / setter for each element and they are missing completely only in IE9-. You can use [this polyfill](https://github.com/inexorabletash/polyfill/blob/master/typedarray.js). *Possible*, it will be added to `core-js` in the future, completely or only missing methods of existing arrays. \n- ES6 `String#normalize` is not very usefull feature, but this polyfill will be very large. If you need it, you can use [unorm](https://github.com/walling/unorm/).\n- ES6 `Proxy` can't be polyfilled, but for Node.js / Chromium with additional flags you can try [harmony-reflect](https://github.com/tvcutsem/harmony-reflect) for adapt old style `Proxy` API to final ES6 version.\n- ES6 logic for `@@isConcatSpreadable` and `@@species` (in most places) can be polyfilled without problems, but it will cause serious slowdown in popular cases in some engines. It will be polyfilled when it will be implemented in modern engines.\n- ES7 `Object.observe` can be polyfilled with many limitations, but it will be very slow - dirty checking on each tick. In nearest future it will not be added to `core-js` - it will cause serious slowdown in applications which uses `Object.observe` and fallback if it's missing. *Possible* it will be added as optional feature then most actual browsers will have this feature. Now you can use [this polyfill](https://github.com/MaxArt2501/object-observe).\n- ES7 `SIMD`. `core-js` doesn't adds polyfill of this feature because of large size and some other reasons. You can use [this polyfill](https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd.js).\n- `window.fetch` is not crossplatform feature, in some environments it make no sense. For this reason I don't think it should be in `core-js`. Looking at the large number of requests it *maybe* added in the future. Now you can use, for example, [this polyfill](https://github.com/github/fetch).", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/zloirock/core-js/issues" }, "_id": "core-js@1.2.6", "_from": "core-js@^1.0.0", "realName": "core-js", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/core-js", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/core-js", "parent": "[Circular]", "depth": 3, "peerDependencies": {} }, "loose-envify": { "name": "loose-envify", "version": "1.1.0", "description": "Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST", "keywords": [ "environment", "variables", "browserify", "browserify-transform", "transform", "source", "configuration" ], "homepage": "https://github.com/zertosh/loose-envify", "license": "MIT", "author": { "name": "Andres Suarez", "email": "zertosh@gmail.com" }, "repository": { "type": "git", "url": "git://github.com/zertosh/loose-envify.git" }, "scripts": { "test": "tap test/*.js" }, "dependencies": { "js-tokens": { "name": "js-tokens", "version": "1.0.2", "author": { "name": "Simon Lydell" }, "license": "MIT", "description": "A regex that tokenizes JavaScript.", "keywords": [ "JavaScript", "js", "token", "tokenize", "regex" ], "files": [ "index.js" ], "repository": { "type": "git", "url": "git://github.com/lydell/js-tokens" }, "scripts": { "test": "mocha --ui tdd", "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js", "build": "node generate-index.js", "dev": "npm run build && npm test" }, "devDependencies": { "coffee-script": "~1.9.3", "esprima": "^2.3.0", "everything.js": "^1.0.3", "mocha": "^2.2.5" }, "readme": "Overview [![Build Status](https://travis-ci.org/lydell/js-tokens.png?branch=master)](https://travis-ci.org/lydell/js-tokens)\n========\n\nA regex that tokenizes JavaScript.\n\n```js\nvar jsTokens = require(\"js-tokens\")\n\nvar jsString = \"var foo=opts.foo;\\n...\"\n\njsString.match(jsTokens)\n// [\"var\", \" \", \"foo\", \"=\", \"opts\", \".\", \"foo\", \";\", \"\\n\", ...]\n```\n\n\nInstallation\n============\n\n- `npm install js-tokens`\n\n```js\nvar jsTokens = require(\"js-tokens\")\n```\n\n\nUsage\n=====\n\n### `jsTokens` ###\n\nA regex with the `g` flag that matches JavaScript tokens.\n\nThe regex _always_ matches, even invalid JavaScript and the empty string.\n\nThe next match is always directly after the previous.\n\n### `var token = jsTokens.matchToToken(match)` ###\n\nTakes a `match` returned by `jsTokens.exec(string)`, and returns a `{type:\nString, value: String}` object. The following types are available:\n\n- string\n- comment\n- regex\n- number\n- name\n- punctuator\n- whitespace\n- invalid\n\nMulti-line comments and strings also have a `closed` property indicating if the\ntoken was closed or not (see below).\n\nComments and strings both come in several flavors. To distinguish them, check if\nthe token starts with `//`, `/*`, `'`, `\"` or `` ` ``.\n\nNames are ECMAScript IdentifierNames, that is, including both identifiers and\nkeywords. You may use [is-keyword-js] to tell them apart.\n\nWhitespace includes both line terminators and other whitespace.\n\nFor example usage, please see this [gist].\n\n[is-keyword-js]: https://github.com/crissdev/is-keyword-js\n[gist]: https://gist.github.com/lydell/be49dbf80c382c473004\n\n\nInvalid code handling\n=====================\n\nUnterminated strings are still matched as strings. JavaScript strings cannot\ncontain (unescaped) newlines, so unterminated strings simply end at the end of\nthe line. Unterminated template strings can contain unescaped newlines, though,\nso they go on to the end of input.\n\nUnterminated multi-line comments are also still matched as comments. They\nsimply go on to the end of the input.\n\nUnterminated regex literals are likely matched as division and whatever is\ninside the regex.\n\nInvalid ASCII characters have their own capturing group.\n\nInvalid non-ASCII characters are treated as names, to simplify the matching of\nnames (except unicode spaces which are treated as whitespace).\n\nRegex literals may contain invalid regex syntax. They are still matched as\nregex literals. They may also contain repeated regex flags, to keep the regex\nsimple.\n\nStrings may contain invalid escape sequences.\n\n\nLimitations\n===========\n\nTokenizing JavaScript using regexes—in fact, _one single regex_—won’t be\nperfect. But that’s not the point either.\n\nYou may compare jsTokens with [esprima] by using `esprima-compare.js`.\nSee `npm run esprima-compare`!\n\n[esprima]: http://esprima.org/\n\n### Template string interpolation ###\n\nTemplate strings are matched as single tokens, from the starting `` ` `` to the\nending `` ` ``, including interpolations (whose tokens are not matched\nindividually).\n\nMatching template string interpolations requires recursive balancing of `{` and\n`}`—something that JavaScript regexes cannot do. Only one level of nesting is\nsupported.\n\n### Division and regex literals collision ###\n\nConsider this example:\n\n```js\nvar g = 9.82\nvar number = bar / 2/g\n\nvar regex = / 2/g\n```\n\nA human can easily understand that in the `number` line we’re dealing with\ndivision, and in the `regex` line we’re dealing with a regex literal. How come?\nBecause humans can look at the whole code to put the `/` characters in context.\nA JavaScript regex cannot. It only sees forwards.\n\nWhen the `jsTokens` regex scans throught the above, it will see the following\nat the end of both the `number` and `regex` rows:\n\n```js\n/ 2/g\n```\n\nIt is then impossible to know if that is a regex literal, or part of an\nexpression dealing with division.\n\nHere is a similar case:\n\n```js\nfoo /= 2/g\nfoo(/= 2/g)\n```\n\nThe first line divides the `foo` variable with `2/g`. The second line calls the\n`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only\nsees forwards, it cannot tell the two cases apart.\n\nThere are some cases where we _can_ tell division and regex literals apart,\nthough.\n\nFirst off, we have the simple cases where there’s only one slash in the line:\n\n```js\nvar foo = 2/g\nfoo /= 2\n```\n\nRegex literals cannot contain newlines, so the above cases are correctly\nidentified as division. Things are only problematic when there are more than\none non-comment slash in a single line.\n\nSecondly, not every character is a valid regex flag.\n\n```js\nvar number = bar / 2/e\n```\n\nThe above example is also correctly identified as division, because `e` is not a\nvalid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*`\n(any letter) as flags, but it is not worth it since it increases the amount of\nambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are\nallowed. This means that the above example will be identified as division as\nlong as you don’t rename the `e` variable to some permutation of `gmiyu` 1 to 5\ncharacters long.\n\nLastly, we can look _forward_ for information.\n\n- If the token following what looks like a regex literal is not valid after a\n regex literal, but is valid in a division expression, then the regex literal\n is treated as division instead. For example, a flagless regex cannot be\n followed by a string, number or name, but all of those three can be the\n denominator of a division.\n- Generally, if what looks like a regex literal is followed by an operator, the\n regex literal is treated as division instead. This is because regexes are\n seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division\n could likely be part of such an expression.\n\nPlease consult the regex source and the test cases for precise information on\nwhen regex or division is matched (should you need to know). In short, you\ncould sum it up as:\n\nIf the end of a statement looks like a regex literal (even if it isn’t), it\nwill be treated as one. Otherwise it should work as expected (if you write sane\ncode).\n\n\nLicense\n=======\n\n[The X11 (“MIT”) License](LICENSE).\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/lydell/js-tokens/issues" }, "_id": "js-tokens@1.0.2", "_from": "js-tokens@^1.0.1", "realName": "js-tokens", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/loose-envify/node_modules/js-tokens", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/loose-envify/node_modules/js-tokens", "parent": "[Circular]", "depth": 4, "peerDependencies": {} } }, "devDependencies": { "browserify": "^11.0.1", "envify": "^3.4.0", "tap": "^1.4.0" }, "readme": "# loose-envify\n\n[![Build Status](https://travis-ci.org/zertosh/loose-envify.svg?branch=master)](https://travis-ci.org/zertosh/loose-envify)\n\nFast (and loose) selective `process.env` replacer using [js-tokens](https://github.com/lydell/js-tokens) instead of an AST. Works just like [envify](https://github.com/hughsk/envify) but much faster.\n\n## Gotchas\n\n* Doesn't handle broken syntax.\n* Doesn't look inside embedded expressions in template strings.\n - **this won't work:**\n ```js\n console.log(`the current env is ${process.env.NODE_ENV}`);\n ```\n* Doesn't replace oddly-spaced or oddly-commented expressions.\n - **this won't work:**\n ```js\n console.log(process./*won't*/env./*work*/NODE_ENV);\n ```\n\n## Usage/Options\n\nloose-envify has the exact same interface as [envify](https://github.com/hughsk/envify).\n\n## Benchmark\n\n```\nenvify:\n\n $ for i in {1..5}; do node bench/bench.js 'envify'; done\n 708ms\n 727ms\n 791ms\n 719ms\n 720ms\n\nloose-envify:\n\n $ for i in {1..5}; do node bench/bench.js '../'; done\n 51ms\n 52ms\n 52ms\n 52ms\n 52ms\n```\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/zertosh/loose-envify/issues" }, "_id": "loose-envify@1.1.0", "_from": "loose-envify@^1.0.0", "realName": "loose-envify", "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/loose-envify", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/loose-envify", "parent": "[Circular]", "depth": 3, "peerDependencies": {} }, "promise": { "name": "promise", "version": "7.1.1", "description": "Bare bones Promises/A+ implementation", "main": "index.js", "scripts": { "prepublish": "node build", "pretest": "node build", "pretest-resolve": "node build", "pretest-extensions": "node build", "pretest-memory-leak": "node build", "test": "mocha --bail --timeout 200 --slow 99999 -R dot && npm run test-memory-leak", "test-resolve": "mocha test/resolver-tests.js --timeout 200 --slow 999999", "test-extensions": "mocha test/extensions-tests.js --timeout 200 --slow 999999", "test-memory-leak": "node --expose-gc test/memory-leak.js", "coverage": "istanbul cover node_modules/mocha/bin/_mocha -- --bail --timeout 200 --slow 99999 -R dot" }, "repository": { "type": "git", "url": "https://github.com/then/promise.git" }, "author": { "name": "ForbesLindesay" }, "license": "MIT", "devDependencies": { "acorn": "^1.0.1", "better-assert": "*", "istanbul": "^0.3.13", "mocha": "*", "promises-aplus-tests": "*", "rimraf": "^2.3.2" }, "dependencies": { "asap": { "name": "asap", "version": "2.0.3", "description": "High-priority task queue for Node.js and browsers", "keywords": [ "event", "task", "queue" ], "license": { "type": "MIT", "url": "https://github.com/kriskowal/asap/raw/master/LICENSE.md" }, "repository": { "type": "git", "url": "https://github.com/kriskowal/asap.git" }, "main": "./asap.js", "browser": { "./asap.js": "./browser-asap.js", "./raw.js": "./browser-raw.js", "./test/domain.js": "./test/browser-domain.js" }, "files": [ "raw.js", "asap.js", "browser-raw.js", "browser-asap.js" ], "scripts": { "test": "npm run lint && npm run test-node", "test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker", "test-node": "node test/asap-test.js", "test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy", "test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener", "test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json", "test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json", "test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json", "test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json", "lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)" }, "devDependencies": { "events": "^1.0.1", "jshint": "^2.5.1", "knox": "^0.8.10", "mr": "^2.0.5", "opener": "^1.3.0", "q": "^2.0.3", "q-io": "^2.0.3", "saucelabs": "^0.1.1", "wd": "^0.2.21", "weak-map": "^1.0.5" }, "readme": "# ASAP\n\n[![Build Status](https://travis-ci.org/kriskowal/asap.png?branch=master)](https://travis-ci.org/kriskowal/asap)\n\nPromise and asynchronous observer libraries, as well as hand-rolled callback\nprograms and libraries, often need a mechanism to postpone the execution of a\ncallback until the next available event.\n(See [Designing API’s for Asynchrony][Zalgo].)\nThe `asap` function executes a task **as soon as possible** but not before it\nreturns, waiting only for the completion of the current event and previously\nscheduled tasks.\n\n```javascript\nasap(function () {\n // ...\n});\n```\n\n[Zalgo]: http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony\n\nThis CommonJS package provides an `asap` module that exports a function that\nexecutes a task function *as soon as possible*.\n\nASAP strives to schedule events to occur before yielding for IO, reflow,\nor redrawing.\nEach event receives an independent stack, with only platform code in parent\nframes and the events run in the order they are scheduled.\n\nASAP provides a fast event queue that will execute tasks until it is\nempty before yielding to the JavaScript engine's underlying event-loop.\nWhen a task gets added to a previously empty event queue, ASAP schedules a flush\nevent, preferring for that event to occur before the JavaScript engine has an\nopportunity to perform IO tasks or rendering, thus making the first task and\nsubsequent tasks semantically indistinguishable.\nASAP uses a variety of techniques to preserve this invariant on different\nversions of browsers and Node.js.\n\nBy design, ASAP prevents input events from being handled until the task\nqueue is empty.\nIf the process is busy enough, this may cause incoming connection requests to be\ndropped, and may cause existing connections to inform the sender to reduce the\ntransmission rate or stall.\nASAP allows this on the theory that, if there is enough work to do, there is no\nsense in looking for trouble.\nAs a consequence, ASAP can interfere with smooth animation.\nIf your task should be tied to the rendering loop, consider using\n`requestAnimationFrame` instead.\nA long sequence of tasks can also effect the long running script dialog.\nIf this is a problem, you may be able to use ASAP’s cousin `setImmediate` to\nbreak long processes into shorter intervals and periodically allow the browser\nto breathe.\n`setImmediate` will yield for IO, reflow, and repaint events.\nIt also returns a handler and can be canceled.\nFor a `setImmediate` shim, consider [YuzuJS setImmediate][setImmediate].\n\n[setImmediate]: https://github.com/YuzuJS/setImmediate\n\nTake care.\nASAP can sustain infinite recursive calls without warning.\nIt will not halt from a stack overflow, and it will not consume unbounded\nmemory.\nThis is behaviorally equivalent to an infinite loop.\nJust as with infinite loops, you can monitor a Node.js process for this behavior\nwith a heart-beat signal.\nAs with infinite loops, a very small amount of caution goes a long way to\navoiding problems.\n\n```javascript\nfunction loop() {\n asap(loop);\n}\nloop();\n```\n\nIn browsers, if a task throws an exception, it will not interrupt the flushing\nof high-priority tasks.\nThe exception will be postponed to a later, low-priority event to avoid\nslow-downs.\nIn Node.js, if a task throws an exception, ASAP will resume flushing only if—and\nonly after—the error is handled by `domain.on(\"error\")` or\n`process.on(\"uncaughtException\")`.\n\n## Raw ASAP\n\nChecking for exceptions comes at a cost.\nThe package also provides an `asap/raw` module that exports the underlying\nimplementation which is faster but stalls if a task throws an exception.\nThis internal version of the ASAP function does not check for errors.\nIf a task does throw an error, it will stall the event queue unless you manually\ncall `rawAsap.requestFlush()` before throwing the error, or any time after.\n\nIn Node.js, `asap/raw` also runs all tasks outside any domain.\nIf you need a task to be bound to your domain, you will have to do it manually.\n\n```js\nif (process.domain) {\n task = process.domain.bind(task);\n}\nrawAsap(task);\n```\n\n## Tasks\n\nA task may be any object that implements `call()`.\nA function will suffice, but closures tend not to be reusable and can cause\ngarbage collector churn.\nBoth `asap` and `rawAsap` accept task objects to give you the option of\nrecycling task objects or using higher callable object abstractions.\nSee the `asap` source for an illustration.\n\n\n## Compatibility\n\nASAP is tested on Node.js v0.10 and in a broad spectrum of web browsers.\nThe following charts capture the browser test results for the most recent\nrelease.\nThe first chart shows test results for ASAP running in the main window context.\nThe second chart shows test results for ASAP running in a web worker context.\nTest results are inconclusive (grey) on browsers that do not support web\nworkers.\nThese data are captured automatically by [Continuous\nIntegration][].\n\n[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md\n\n![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg)\n\n![Compatibility in Web Workers](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-worker-results-matrix.svg)\n\n## Caveats\n\nWhen a task is added to an empty event queue, it is not always possible to\nguarantee that the task queue will begin flushing immediately after the current\nevent.\nHowever, once the task queue begins flushing, it will not yield until the queue\nis empty, even if the queue grows while executing tasks.\n\nThe following browsers allow the use of [DOM mutation observers][] to access\nthe HTML [microtask queue][], and thus begin flushing ASAP's task queue\nimmediately at the end of the current event loop turn, before any rendering or\nIO:\n\n[microtask queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#microtask-queue\n[DOM mutation observers]: http://dom.spec.whatwg.org/#mutation-observers\n\n- Android 4–4.3\n- Chrome 26–34\n- Firefox 14–29\n- Internet Explorer 11\n- iPad Safari 6–7.1\n- iPhone Safari 7–7.1\n- Safari 6–7\n\nIn the absense of mutation observers, there are a few browsers, and situations\nlike web workers in some of the above browsers, where [message channels][]\nwould be a useful way to avoid falling back to timers.\nMessage channels give direct access to the HTML [task queue][], so the ASAP\ntask queue would flush after any already queued rendering and IO tasks, but\nwithout having the minimum delay imposed by timers.\nHowever, among these browsers, Internet Explorer 10 and Safari do not reliably\ndispatch messages, so they are not worth the trouble to implement.\n\n[message channels]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#message-channels\n[task queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#concept-task\n\n- Internet Explorer 10\n- Safair 5.0-1\n- Opera 11-12\n\nIn the absense of mutation observers, these browsers and the following browsers\nall fall back to using `setTimeout` and `setInterval` to ensure that a `flush`\noccurs.\nThe implementation uses both and cancels whatever handler loses the race, since\n`setTimeout` tends to occasionally skip tasks in unisolated circumstances.\nTimers generally delay the flushing of ASAP's task queue for four milliseconds.\n\n- Firefox 3–13\n- Internet Explorer 6–10\n- iPad Safari 4.3\n- Lynx 2.8.7\n\n\n## Heritage\n\nASAP has been factored out of the [Q][] asynchronous promise library.\nIt originally had a naïve implementation in terms of `setTimeout`, but\n[Malte Ubl][NonBlocking] provided an insight that `postMessage` might be\nuseful for creating a high-priority, no-delay event dispatch hack.\nSince then, Internet Explorer proposed and implemented `setImmediate`.\nRobert Katić began contributing to Q by measuring the performance of\nthe internal implementation of `asap`, paying particular attention to\nerror recovery.\nDomenic, Robert, and Kris Kowal collectively settled on the current strategy of\nunrolling the high-priority event queue internally regardless of what strategy\nwe used to dispatch the potentially lower-priority flush event.\nDomenic went on to make ASAP cooperate with Node.js domains.\n\n[Q]: https://github.com/kriskowal/q\n[NonBlocking]: http://www.nonblocking.io/2011/06/windownexttick.html\n\nFor further reading, Nicholas Zakas provided a thorough article on [The\nCase for setImmediate][NCZ].\n\n[NCZ]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/\n\nEmber’s RSVP promise implementation later [adopted][RSVP ASAP] the name ASAP but\nfurther developed the implentation.\nParticularly, The `MessagePort` implementation was abandoned due to interaction\n[problems with Mobile Internet Explorer][IE Problems] in favor of an\nimplementation backed on the newer and more reliable DOM `MutationObserver`\ninterface.\nThese changes were back-ported into this library.\n\n[IE Problems]: https://github.com/cujojs/when/issues/197\n[RSVP ASAP]: https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\nIn addition, ASAP factored into `asap` and `asap/raw`, such that `asap` remained\nexception-safe, but `asap/raw` provided a tight kernel that could be used for\ntasks that guaranteed that they would not throw exceptions.\nThis core is useful for promise implementations that capture thrown errors in\nrejected promises and do not need a second safety net.\nAt the same time, the exception handling in `asap` was factored into separate\nimplementations for Node.js and browsers, using the the [Browserify][Browser\nConfig] `browser` property in `package.json` to instruct browser module loaders\nand bundlers, including [Browserify][], [Mr][], and [Mop][], to use the\nbrowser-only implementation.\n\n[Browser Config]: https://gist.github.com/defunctzombie/4339901\n[Browserify]: https://github.com/substack/node-browserify\n[Mr]: https://github.com/montagejs/mr\n[Mop]: https://github.com/montagejs/mop\n\n## License\n\nCopyright 2009-2014 by Contributors\nMIT License (enclosed)\n\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/kriskowal/asap/issues" }, "_id": "asap@2.0.3", "_from": "asap@~2.0.3", "realName": "asap", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/promise/node_modules/asap", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/promise/node_modules/asap", "parent": "[Circular]", "depth": 4, "peerDependencies": {} } }, "readme": "\n# promise\n\nThis is a simple implementation of Promises. It is a super set of ES6 Promises designed to have readable, performant code and to provide just the extensions that are absolutely necessary for using promises today.\n\nFor detailed tutorials on its use, see www.promisejs.org\n\n**N.B.** This promise exposes internals via underscore (`_`) prefixed properties. If you use these, your code will break with each new release.\n\n[![travis][travis-image]][travis-url]\n[![dep][dep-image]][dep-url]\n[![npm][npm-image]][npm-url]\n[![downloads][downloads-image]][downloads-url]\n\n[travis-image]: https://img.shields.io/travis/then/promise.svg?style=flat\n[travis-url]: https://travis-ci.org/then/promise\n[dep-image]: https://img.shields.io/gemnasium/then/promise.svg?style=flat\n[dep-url]: https://gemnasium.com/then/promise\n[npm-image]: https://img.shields.io/npm/v/promise.svg?style=flat\n[npm-url]: https://npmjs.org/package/promise\n[downloads-image]: https://img.shields.io/npm/dm/promise.svg?style=flat\n[downloads-url]: https://npmjs.org/package/promise\n\n## Installation\n\n**Server:**\n\n $ npm install promise\n\n**Client:**\n\nYou can use browserify on the client, or use the pre-compiled script that acts as a polyfill.\n\n```html\n\n```\n\nNote that the [es5-shim](https://github.com/es-shims/es5-shim) must be loaded before this library to support browsers pre IE9.\n\n```html\n\n```\n\n## Usage\n\nThe example below shows how you can load the promise library (in a way that works on both client and server using node or browserify). It then demonstrates creating a promise from scratch. You simply call `new Promise(fn)`. There is a complete specification for what is returned by this method in [Promises/A+](http://promises-aplus.github.com/promises-spec/).\n\n```javascript\nvar Promise = require('promise');\n\nvar promise = new Promise(function (resolve, reject) {\n get('http://www.google.com', function (err, res) {\n if (err) reject(err);\n else resolve(res);\n });\n});\n```\n\nIf you need [domains](https://iojs.org/api/domain.html) support, you should instead use:\n\n```js\nvar Promise = require('promise/domains');\n```\n\nIf you are in an environment that implements `setImmediate` and don't want the optimisations provided by asap, you can use:\n\n```js\nvar Promise = require('promise/setimmediate');\n```\n\nIf you only want part of the features, e.g. just a pure ES6 polyfill:\n\n```js\nvar Promise = require('promise/lib/es6-extensions');\n// or require('promise/domains/es6-extensions');\n// or require('promise/setimmediate/es6-extensions');\n```\n\n## Unhandled Rejections\n\nBy default, promises silence any unhandled rejections.\n\nYou can enable logging of unhandled ReferenceErrors and TypeErrors via:\n\n```js\nrequire('promise/lib/rejection-tracking').enable();\n```\n\nDue to the performance cost, you should only do this during development.\n\nYou can enable logging of all unhandled rejections if you need to debug an exception you think is being swallowed by promises:\n\n```js\nrequire('promise/lib/rejection-tracking').enable(\n {allRejections: true}\n);\n```\n\nDue to the high probability of false positives, I only recommend using this when debugging specific issues that you think may be being swallowed. For the preferred debugging method, see `Promise#done(onFulfilled, onRejected)`.\n\n`rejection-tracking.enable(options)` takes the following options:\n\n - allRejections (`boolean`) - track all exceptions, not just reference errors and type errors. Note that this has a high probability of resulting in false positives if your code loads data optimisticly\n - whitelist (`Array`) - this defaults to `[ReferenceError, TypeError]` but you can override it with your own list of error constructors to track.\n - `onUnhandled(id, error)` and `onHandled(id, error)` - you can use these to provide your own customised display for errors. Note that if possible you should indicate that the error was a false positive if `onHandled` is called. `onHandled` is only called if `onUnhandled` has already been called.\n\nTo reduce the chance of false-positives there is a delay of up to 2 seconds before errors are logged. This means that if you attach an error handler within 2 seconds, it won't be logged as a false positive. ReferenceErrors and TypeErrors are only subject to a 100ms delay due to the higher likelihood that the error is due to programmer error.\n\n## API\n\nBefore all examples, you will need:\n\n```js\nvar Promise = require('promise');\n```\n\n### new Promise(resolver)\n\nThis creates and returns a new promise. `resolver` must be a function. The `resolver` function is passed two arguments:\n\n 1. `resolve` should be called with a single argument. If it is called with a non-promise value then the promise is fulfilled with that value. If it is called with a promise (A) then the returned promise takes on the state of that new promise (A).\n 2. `reject` should be called with a single argument. The returned promise will be rejected with that argument.\n\n### Static Functions\n\n These methods are invoked by calling `Promise.methodName`.\n\n#### Promise.resolve(value)\n\n(deprecated aliases: `Promise.from(value)`, `Promise.cast(value)`)\n\nConverts values and foreign promises into Promises/A+ promises. If you pass it a value then it returns a Promise for that value. If you pass it something that is close to a promise (such as a jQuery attempt at a promise) it returns a Promise that takes on the state of `value` (rejected or fulfilled).\n\n#### Promise.reject(value)\n\nReturns a rejected promise with the given value.\n\n#### Promise.all(array)\n\nReturns a promise for an array. If it is called with a single argument that `Array.isArray` then this returns a promise for a copy of that array with any promises replaced by their fulfilled values. e.g.\n\n```js\nPromise.all([Promise.resolve('a'), 'b', Promise.resolve('c')])\n .then(function (res) {\n assert(res[0] === 'a')\n assert(res[1] === 'b')\n assert(res[2] === 'c')\n })\n```\n\n#### Promise.denodeify(fn)\n\n_Non Standard_\n\nTakes a function which accepts a node style callback and returns a new function that returns a promise instead.\n\ne.g.\n\n```javascript\nvar fs = require('fs')\n\nvar read = Promise.denodeify(fs.readFile)\nvar write = Promise.denodeify(fs.writeFile)\n\nvar p = read('foo.json', 'utf8')\n .then(function (str) {\n return write('foo.json', JSON.stringify(JSON.parse(str), null, ' '), 'utf8')\n })\n```\n\n#### Promise.nodeify(fn)\n\n_Non Standard_\n\nThe twin to `denodeify` is useful when you want to export an API that can be used by people who haven't learnt about the brilliance of promises yet.\n\n```javascript\nmodule.exports = Promise.nodeify(awesomeAPI)\nfunction awesomeAPI(a, b) {\n return download(a, b)\n}\n```\n\nIf the last argument passed to `module.exports` is a function, then it will be treated like a node.js callback and not parsed on to the child function, otherwise the API will just return a promise.\n\n### Prototype Methods\n\nThese methods are invoked on a promise instance by calling `myPromise.methodName`\n\n### Promise#then(onFulfilled, onRejected)\n\nThis method follows the [Promises/A+ spec](http://promises-aplus.github.io/promises-spec/). It explains things very clearly so I recommend you read it.\n\nEither `onFulfilled` or `onRejected` will be called and they will not be called more than once. They will be passed a single argument and will always be called asynchronously (in the next turn of the event loop).\n\nIf the promise is fulfilled then `onFulfilled` is called. If the promise is rejected then `onRejected` is called.\n\nThe call to `.then` also returns a promise. If the handler that is called returns a promise, the promise returned by `.then` takes on the state of that returned promise. If the handler that is called returns a value that is not a promise, the promise returned by `.then` will be fulfilled with that value. If the handler that is called throws an exception then the promise returned by `.then` is rejected with that exception.\n\n#### Promise#catch(onRejected)\n\nSugar for `Promise#then(null, onRejected)`, to mirror `catch` in synchronous code.\n\n#### Promise#done(onFulfilled, onRejected)\n\n_Non Standard_\n\nThe same semantics as `.then` except that it does not return a promise and any exceptions are re-thrown so that they can be logged (crashing the application in non-browser environments)\n\n#### Promise#nodeify(callback)\n\n_Non Standard_\n\nIf `callback` is `null` or `undefined` it just returns `this`. If `callback` is a function it is called with rejection reason as the first argument and result as the second argument (as per the node.js convention).\n\nThis lets you write API functions that look like:\n\n```javascript\nfunction awesomeAPI(foo, bar, callback) {\n return internalAPI(foo, bar)\n .then(parseResult)\n .then(null, retryErrors)\n .nodeify(callback)\n}\n```\n\nPeople who use typical node.js style callbacks will be able to just pass a callback and get the expected behavior. The enlightened people can not pass a callback and will get awesome promises.\n\n## License\n\n MIT\n", "readmeFilename": "Readme.md", "bugs": { "url": "https://github.com/then/promise/issues" }, "_id": "promise@7.1.1", "_from": "promise@^7.0.3", "realName": "promise", "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/promise", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/promise", "parent": "[Circular]", "depth": 3, "peerDependencies": {} }, "ua-parser-js": { "title": "UAParser.js", "name": "ua-parser-js", "version": "0.7.10", "author": { "name": "Faisal Salman", "email": "fyzlman@gmail.com", "url": "http://faisalman.com" }, "description": "Lightweight JavaScript-based user-agent string parser", "keywords": [ "user-agent", "parser", "browser", "engine", "os", "device", "cpu" ], "homepage": "http://github.com/faisalman/ua-parser-js", "contributors": [ { "name": "Faisal Salman", "email": "fyzlman@gmail.com" }, { "name": "Benjamin Bertrand", "email": "bertrand.design@gmail.com" }, { "name": "Carl C Von Lewin", "email": "carlchristianlewin@gmail.com" }, { "name": "Christopher De Cairos", "email": "chris.decairos@gmail.com" }, { "name": "Davit Barbakadze", "email": "jayarjo@gmail.com" }, { "name": "Dmitry Tyschenko", "email": "dtyschenko@gmail.com" }, { "name": "Douglas Li", "email": "doug@knotch.it" }, { "name": "Dumitru Uzun", "email": "contact@duzun.me" }, { "name": "Erik Hesselink", "email": "hesselink@gmail.com" }, { "name": "Fabian Becker", "email": "halfdan@xnorfz.de" }, { "name": "Hendrik Helwich", "email": "h.helwich@iplabs.de" }, { "name": "Jackpoll", "email": "jackpoll123456@gmail.com" }, { "name": "Jake Mc", "email": "startswithaj@users.noreply.github.com" }, { "name": "John Tantalo", "email": "john.tantalo@gmail.com" }, { "name": "John Yanarella", "email": "jmy@codecatalyst.com" }, { "name": "Jon Buckley", "email": "jon@jbuckley.ca" }, { "name": "Kendall Buchanan", "email": "kendall@kendagriff.com" }, { "name": "Lee Treveil", "email": "leetreveil@gmail.com" }, { "name": "Leonardo", "email": "leofiore@libero.it" }, { "name": "Max Maurer", "email": "maxemanuel.maurer@gmail.com" }, { "name": "Michael Hess", "email": "mhess@connectify.me" }, { "name": "OtakuSiD", "email": "otakusid@gmail.com" }, { "name": "Ross Noble", "email": "rosshnoble@gmail.com" }, { "name": "Sandro Sonntag", "email": "sandro.sonntag@adorsys.de" } ], "main": "src/ua-parser.js", "scripts": { "build": "uglifyjs src/ua-parser.js > dist/ua-parser.min.js --comments '/UAParser\\.js/' && uglifyjs src/ua-parser.js > dist/ua-parser.pack.js --comments '/UAParser\\.js/' --compress --mangle", "test": "jshint src/ua-parser.js && mocha -R nyan test/test.js", "verup": "node ./node_modules/verup", "version": "node ./node_modules/verup 0" }, "verup": { "files": [ "ua-parser-js.jquery.json", "component.json", "bower.json", "package.js", "src/ua-parser.js" ], "regs": [ "^((?:\\$|(\\s*\\*\\s*@)|(\\s*(?:var|,)?\\s+))(?:LIBVERSION|version)[\\s\\:='\"]+)([0-9]+(?:\\.[0-9]+){2,2})", "^(\\s?\\*.*v)([0-9]+(?:\\.[0-9]+){2,2})" ] }, "devDependencies": { "jshint": "~1.1.0", "mocha": "~1.8.0", "uglify-js": "~1.3.4", "verup": "^1.3.x" }, "repository": { "type": "git", "url": "https://github.com/faisalman/ua-parser-js.git" }, "licenses": [ { "type": "GPLv2", "url": "http://www.gnu.org/licenses/gpl-2.0.html" }, { "type": "MIT", "url": "http://www.opensource.org/licenses/mit-license.php" } ], "engines": { "node": "*" }, "directories": { "dist": "dist", "src": "src", "test": "test" }, "readme": "# UAParser.js\r\n\r\nLightweight JavaScript-based User-Agent string parser. Supports browser & node.js environment. Also available as jQuery/Zepto plugin, Component/Bower/Meteor package, & RequireJS/AMD module\r\n\r\n[![Build Status](https://travis-ci.org/faisalman/ua-parser-js.svg?branch=master)](https://travis-ci.org/faisalman/ua-parser-js)\r\n[![Flattr this](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/3867907/faisalmanua-parser-js-on-GitHub)\r\n\r\n* Author : Faisal Salman <>\r\n* Demo : http://faisalman.github.io/ua-parser-js\r\n* Source : https://github.com/faisalman/ua-parser-js\r\n\r\n## Features\r\n\r\nExtract detailed type of web browser, layout engine, operating system, cpu architecture, and device type/model purely from user-agent string with relatively lightweight footprint (~11KB minified / ~4KB gzipped). Written in vanilla js, which means it doesn't depends on any other library.\r\n\r\n![It's over 9000](https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/over9000.jpg)\r\n\r\n## Methods\r\n\r\n* `getBrowser()`\r\n * returns `{ name: '', version: '' }`\r\n\r\n```\r\n# Possible 'browser.name':\r\nAmaya, Android Browser, Arora, Avant, Baidu, Blazer, Bolt, Camino, Chimera, Chrome, \r\nChromium, Comodo Dragon, Conkeror, Dillo, Dolphin, Doris, Edge, Epiphany, Fennec,\r\nFirebird, Firefox, Flock, GoBrowser, iCab, ICE Browser, IceApe, IceCat, IceDragon, \r\nIceweasel, IE [Mobile], Iron, Jasmine, K-Meleon, Konqueror, Kindle, Links, \r\nLunascape, Lynx, Maemo, Maxthon, Midori, Minimo, MIUI Browser, [Mobile] Safari, \r\nMosaic, Mozilla, Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet], \r\nPhantomJS, Phoenix, Polaris, QQBrowser, RockMelt, Silk, Skyfire, SeaMonkey, SlimBrowser,\r\nSwiftfox, Tizen, UCBrowser, Vivaldi, w3m, Yandex\r\n\r\n# 'browser.version' determined dynamically\r\n```\r\n\r\n* `getDevice()`\r\n * returns `{ model: '', type: '', vendor: '' }` \r\n\r\n```\r\n# Possible 'device.type':\r\nconsole, mobile, tablet, smarttv, wearable, embedded\r\n\r\n# Possible 'device.vendor':\r\nAcer, Alcatel, Amazon, Apple, Archos, Asus, BenQ, BlackBerry, Dell, GeeksPhone, \r\nGoogle, HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian, \r\nNintendo, Nokia, Nvidia, Ouya, Palm, Panasonic, Polytron, RIM, Samsung, Sharp, \r\nSiemens, Sony-Ericsson, Sprint, Xbox, ZTE\r\n\r\n# 'device.model' determined dynamically\r\n```\r\n\r\n* `getEngine()`\r\n * returns `{ name: '', version: '' }`\r\n\r\n```\r\n# Possible 'engine.name'\r\nAmaya, EdgeHTML, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto, \r\nTasman, Trident, w3m, WebKit\r\n\r\n# 'engine.version' determined dynamically\r\n```\r\n\r\n* `getOS()`\r\n * returns `{ name: '', version: '' }`\r\n\r\n```\r\n# Possible 'os.name'\r\nAIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS, Contiki,\r\nFedora, Firefox OS, FreeBSD, Debian, DragonFly, Gentoo, GNU, Haiku, Hurd, iOS, \r\nJoli, Linpus, Linux, Mac OS, Mageia, Mandriva, MeeGo, Minix, Mint, Morph OS, NetBSD, \r\nNintendo, OpenBSD, OpenVMS, OS/2, Palm, PCLinuxOS, Plan9, Playstation, QNX, RedHat, \r\nRIM Tablet OS, RISC OS, Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen, \r\nUbuntu, UNIX, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk\r\n\r\n# 'os.version' determined dynamically\r\n```\r\n\r\n* `getCPU()`\r\n * returns `{ architecture: '' }`\r\n\r\n```\r\n# Possible 'cpu.architecture'\r\n68k, amd64, arm, arm64, avr, ia32, ia64, irix, irix64, mips, mips64, pa-risc, \r\nppc, sparc, sparc64\r\n```\r\n\r\n* `getResult()`\r\n * returns `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`\r\n\r\n* `getUA()`\r\n * returns UA string of current instance\r\n\r\n* `setUA(uastring)`\r\n * set & parse UA string\r\n\r\n## Example\r\n\r\n```html\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```\r\n\r\n### Using node.js\r\n\r\n```sh\r\n$ npm install ua-parser-js\r\n```\r\n\r\n```js\r\nvar http = require('http');\r\nvar parser = require('ua-parser-js');\r\n\r\nhttp.createServer(function (req, res) {\r\n // get user-agent header\r\n var ua = parser(req.headers['user-agent']);\r\n // write the result as response\r\n res.end(JSON.stringify(ua, null, ' '));\r\n})\r\n.listen(1337, '127.0.0.1');\r\n\r\nconsole.log('Server running at http://127.0.0.1:1337/');\r\n```\r\n\r\n### Using requirejs\r\n\r\n```js\r\nrequire(['ua-parser'], function(UAParser) {\r\n var parser = new UAParser();\r\n console.log(parser.getResult());\r\n});\r\n```\r\n\r\n### Using component\r\n\r\n```sh\r\n$ component install faisalman/ua-parser-js\r\n```\r\n\r\n### Using bower\r\n\r\n```sh\r\n$ bower install ua-parser-js\r\n```\r\n\r\n### Using meteor\r\n\r\n```sh\r\n$ meteor add faisalman:ua-parser-js\r\n```\r\n\r\n### Using jQuery/Zepto ($.ua)\r\n\r\nAlthough written in vanilla js (which means it doesn't depends on jQuery), this library will automatically detect if jQuery/Zepto is present and create `$.ua` object based on browser's user-agent (although in case you need, `window.UAParser` constructor is still present). To get/set user-agent you can use: `$.ua.get()` / `$.ua.set(uastring)`. \r\n\r\n```js\r\n// In browser with default user-agent: 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0':\r\n\r\n// Do some tests\r\nconsole.log($.ua.device); // {vendor: \"HTC\", model: \"Evo Shift 4G\", type: \"mobile\"}\r\nconsole.log($.ua.os); // {name: \"Android\", version: \"2.3.4\"}\r\nconsole.log($.ua.os.name); // \"Android\"\r\nconsole.log($.ua.get()); // \"Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0\"\r\n\r\n// reset to custom user-agent\r\n$.ua.set('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; Xoom Build/HWI69) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13');\r\n\r\n// Test again\r\nconsole.log($.ua.browser.name); // \"Safari\"\r\nconsole.log($.ua.engine.name); // \"Webkit\"\r\nconsole.log($.ua.device); // {vendor: \"Motorola\", model: \"Xoom\", type: \"tablet\"}\r\nconsole.log(parseInt($.ua.browser.version.split('.')[0], 10)); // 4\r\n```\r\n\r\n### Extending regex patterns\r\n\r\n* `UAParser(uastring[, extensions])`\r\n\r\nPass your own regexes to extend the limited matching rules.\r\n\r\n```js\r\n// Example:\r\nvar uaString = 'ownbrowser/1.3';\r\nvar ownBrowser = [[/(ownbrowser)\\/([\\w\\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION]];\r\nvar parser = new UAParser(uaString, {browser: ownBrowser});\r\nconsole.log(parser.getBrowser()); // {name: \"ownbrowser\", version: \"1.3\"}\r\n```\r\n\r\n## Development\r\n\r\nVerify, test, & minify script\r\n\r\n```sh\r\n$ npm run test\r\n$ npm run build\r\n```\r\n\r\nThen submit a pull request to https://github.com/faisalman/ua-parser-js under `develop` branch.\r\n\r\n\r\n## License\r\n\r\nDual licensed under GPLv2 & MIT\r\n\r\nCopyright © 2012-2015 Faisal Salman <>\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of \r\nthis software and associated documentation files (the \"Software\"), to deal in \r\nthe Software without restriction, including without limitation the rights to use, \r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell copies of the \r\nSoftware, and to permit persons to whom the Software is furnished to do so, \r\nsubject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all \r\ncopies or substantial portions of the Software.\r\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/faisalman/ua-parser-js/issues" }, "_id": "ua-parser-js@0.7.10", "_from": "ua-parser-js@^0.7.9", "realName": "ua-parser-js", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/ua-parser-js", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/ua-parser-js", "parent": "[Circular]", "depth": 3, "peerDependencies": {} }, "whatwg-fetch": { "name": "whatwg-fetch", "version": "0.9.0", "main": "fetch.js", "repository": { "type": "git", "url": "git://github.com/github/fetch" }, "licenses": [ { "type": "MIT", "url": "https://github.com/github/fetch/blob/master/LICENSE" } ], "devDependencies": { "bower": "1.3.8", "chai": "1.10.0", "jshint": "2.5.2", "mocha-phantomjs": "3.5.2", "mocha": "2.1.0", "phantomjs": "1.9.13" }, "files": [ "LICENSE", "fetch.js" ], "readme": "# window.fetch polyfill\n\nThe global `fetch` function is an easier way to make web requests and handle\nresponses than using an XMLHttpRequest. This polyfill is written as closely as\npossible to the standard Fetch specification at https://fetch.spec.whatwg.org.\n\n## Installation\n\nAvailable on [Bower](http://bower.io) as **fetch**.\n\n```sh\n$ bower install fetch\n```\n\nYou'll also need a Promise polyfill for older browsers.\n\n```sh\n$ bower install es6-promise\n```\n\nThis can also be installed with `npm`.\n\n```sh\n$ npm install whatwg-fetch --save\n```\n\n(For a node.js implementation, try [node-fetch](https://github.com/bitinn/node-fetch))\n\n## Usage\n\nThe `fetch` function supports any HTTP method. We'll focus on GET and POST\nexample requests.\n\n### HTML\n\n```javascript\nfetch('/users.html')\n .then(function(response) {\n return response.text()\n }).then(function(body) {\n document.body.innerHTML = body\n })\n```\n\n### JSON\n\n```javascript\nfetch('/users.json')\n .then(function(response) {\n return response.json()\n }).then(function(json) {\n console.log('parsed json', json)\n }).catch(function(ex) {\n console.log('parsing failed', ex)\n })\n```\n\n### Response metadata\n\n```javascript\nfetch('/users.json').then(function(response) {\n console.log(response.headers.get('Content-Type'))\n console.log(response.headers.get('Date'))\n console.log(response.status)\n console.log(response.statusText)\n})\n```\n\n### Post form\n\n```javascript\nvar form = document.querySelector('form')\n\nfetch('/query', {\n method: 'post',\n body: new FormData(form)\n})\n```\n\n### Post JSON\n\n```javascript\nfetch('/users', {\n method: 'post',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n name: 'Hubot',\n login: 'hubot',\n })\n})\n```\n\n### File upload\n\n```javascript\nvar input = document.querySelector('input[type=\"file\"]')\n\nvar form = new FormData()\nform.append('file', input.files[0])\nform.append('user', 'hubot')\n\nfetch('/avatars', {\n method: 'post',\n body: form\n})\n```\n\n### Success and error handlers\n\nThis causes `fetch` to behave like jQuery's `$.ajax` by rejecting the `Promise`\non HTTP failure status codes like 404, 500, etc. The response `Promise` is\nresolved only on successful, 200 level, status codes.\n\n```javascript\nfunction status(response) {\n if (response.status >= 200 && response.status < 300) {\n return response\n }\n throw new Error(response.statusText)\n}\n\nfunction json(response) {\n return response.json()\n}\n\nfetch('/users')\n .then(status)\n .then(json)\n .then(function(json) {\n console.log('request succeeded with json response', json)\n }).catch(function(error) {\n console.log('request failed', error)\n })\n```\n\n### Response URL caveat\n\nThe `Response` object has a URL attribute for the final responded resource.\nUsually this is the same as the `Request` url, but in the case of a redirect,\nits all transparent. Newer versions of XHR include a `responseURL` attribute\nthat returns this value. But not every browser supports this. The compromise\nrequires setting a special server side header to tell the browser what URL it\njust requested (yeah, I know browsers).\n\n``` ruby\nresponse.headers['X-Request-URL'] = request.url\n```\n\nIf you want `response.url` to be reliable, you'll want to set this header. The\nday that you ditch this polyfill and use native fetch only, you can remove the\nheader hack.\n\n## Browser Support\n\n![Chrome](https://raw.github.com/alrra/browser-logos/master/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/firefox/firefox_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/safari/safari_48x48.png)\n--- | --- | --- | --- | --- |\nLatest ✔ | Latest ✔ | 9+ ✔ | Latest ✔ | 6.1+ ✔ |\n", "readmeFilename": "README.md", "description": "The global `fetch` function is an easier way to make web requests and handle responses than using an XMLHttpRequest. This polyfill is written as closely as possible to the standard Fetch specification at https://fetch.spec.whatwg.org.", "bugs": { "url": "https://github.com/github/fetch/issues" }, "_id": "whatwg-fetch@0.9.0", "_from": "whatwg-fetch@^0.9.0", "scripts": {}, "realName": "whatwg-fetch", "dependencies": {}, "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/whatwg-fetch", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs/node_modules/whatwg-fetch", "parent": "[Circular]", "depth": 3, "peerDependencies": {} } }, "devEngines": { "node": ">=3", "npm": "2.x" }, "browserify": { "transform": [ "loose-envify" ] }, "readme": "# FBJS\n\n## Purpose\n\nTo make it easier for Facebook to share and consume our own JavaScript. Primarily this will allow us to ship code without worrying too much about where it lives, keeping with the spirit of `@providesModule` but working in the broader JavaScript ecosystem.\n\n**Note:** If you are consuming the code here and you are not also a Facebook project, be prepared for a bad time. APIs may appear or disappear and we may not follow semver strictly, though we will do our best to. This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. In order for us to move fast and ship projects like React and Relay, we've made the decision to not support everybody. We probably won't take your feature requests unless they align with our needs. There will be overlap in functionality here and in other open source projects.\n\n## Usage\n\nAny `@providesModule` modules that are used by your project should be added to `src/`. They will be built and added to `module-map.json`. This file will contain a map from `@providesModule` name to what will be published as `fbjs`. The `module-map.json` file can then be consumed in your own project, along with the [rewrite-modules](https://github.com/facebook/fbjs/blob/master/scripts/babel/rewrite-modules.js) Babel plugin (which we'll publish with this), to rewrite requires in your own project. Then, just make sure `fbjs` is a dependency in your `package.json` and your package will consume the shared code.\n\n```js\n// Before transform\nvar emptyFunction = require('emptyFunction');\n// After transform\nvar emptyFunction = require('fbjs/lib/emptyFunction');\n```\n\nSee React for an example of this. *Coming soon!*\n\n## Building\n\nIt's as easy as just running gulp. This assumes you've also done `npm install -g gulp`.\n\n```sh\ngulp\n```\n\nAlternatively `npm run build` will also work.\n\n### Layout\n\nRight now these packages represent a subset of packages that we use internally at Facebook. Mostly these are support libraries used when shipping larger libraries, like React and Relay, or products. Each of these packages is in its own directory under `src/`.\n\n### Process\n\nSince we use `@providesModule`, we need to rewrite requires to be relative. Thanks to `@providesModule` requiring global uniqueness, we can do this easily. Eventually we'll try to make this part of the process go away by making more projects use CommmonJS.\n\n\n## TODO\n\n- Flow: Ideally we'd ship our original files with type annotations, however that's not doable right now. We have a couple options:\n - Make sure our transpilation step converts inline type annotations to the comment format.\n - Make our build process also build Flow interface files which we can ship to npm.\n- Split into multiple packages. This will be better for more concise versioning, otherwise we'll likely just be shipping lots of major versions.\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/facebook/fbjs/issues" }, "_id": "fbjs@0.6.1", "_from": "fbjs@^0.6.1", "realName": "fbjs", "path": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react/node_modules/fbjs", "parent": "[Circular]", "depth": 2, "peerDependencies": {} } }, "browserify": { "transform": [ "envify" ] }, "readme": "# react\n\nAn npm package to get you immediate access to [React](https://facebook.github.io/react/),\nwithout also requiring the JSX transformer. This is especially useful for cases where you\nwant to [`browserify`](https://github.com/substack/node-browserify) your module using\n`React`.\n\n**Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages.\n\nTo use React in production mode, set the environment variable `NODE_ENV` to `production`. A minifier that performs dead-code elimination such as [UglifyJS](https://github.com/mishoo/UglifyJS2) is recommended to completely remove the extra code present in development mode.\n\n## Example Usage\n\n```js\nvar React = require('react');\n\n// Addons are in separate packages:\nvar createFragment = require('react-addons-create-fragment');\nvar immutabilityHelpers = require('react-addons-update');\nvar CSSTransitionGroup = require('react-addons-css-transition-group');\n```\n\nFor a complete list of addons visit the [addons documentation page](https://facebook.github.io/react/docs/addons.html).\n", "readmeFilename": "README.md", "_id": "react@0.14.7", "_from": "react@^0.14.0", "scripts": {}, "realName": "react", "extraneous": false, "path": "/home/flavorjones/tmp/npm-test/node_modules/react", "realPath": "/home/flavorjones/tmp/npm-test/node_modules/react", "parent": "[Circular]", "depth": 1, "peerDependencies": {} } }, "readme": "ERROR: No README data found!", "_id": "asdf@0.0.0", "realName": "asdf", "path": "/home/flavorjones/tmp/npm-test", "realPath": "/home/flavorjones/tmp/npm-test", "depth": 0, "peerDependencies": {} } license-finder-2.1.2/spec/fixtures/npm-recursive-dependencies/package.json0000644000175000017500000000047212767430336025761 0ustar pravipravi{ "name": "asdf", "version": "0.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "BSD-2-Clause", "dependencies": { "pui-react-alerts": "3.0.0-alpha.2", "pui-react-media": "3.0.0-alpha.2" } } license-finder-2.1.2/features/0000755000175000017500000000000012767430336015260 5ustar pravipravilicense-finder-2.1.2/features/support/0000755000175000017500000000000012767430336016774 5ustar pravipravilicense-finder-2.1.2/features/support/feature_helper.rb0000644000175000017500000000053712767430336022320 0ustar pravipravi# These are integration tests, so reaching directly into LicenseFinder is forbidden # DO NOT: # require 'rubygems' # require 'bundler/setup' # require 'license_finder' require_relative 'testing_dsl' RSpec.configure do |rspec| rspec.default_formatter = 'doc' rspec.before(:each) do LicenseFinder::TestingDSL::Paths.reset_projects! end end license-finder-2.1.2/features/support/testing_dsl.rb0000644000175000017500000002166512767430336021652 0ustar pravipravirequire 'delegate' module LicenseFinder module TestingDSL class User def run_license_finder(path = nil) if path execute_command_in_path('license_finder --quiet', Paths.project("my_app/#{path}")) else execute_command 'license_finder --quiet' end end def create_empty_project(name = "my_app") EmptyProject.create(name) end def create_ruby_app(name = "my_app") BundlerProject.create(name) end def create_gem(name, options) GemProject.create(name, options) end def create_gem_in_path(name, path, options) GemProject.create_in_path(name, path, options) end def execute_command(command) execute_command_in_path(command, Paths.project) end def execute_command_outside_project(command) execute_command_in_path(command, Paths.root) end def seeing?(content) @output.include? content end def seeing_once?(content) @output.scan(/#{Regexp.escape content}/).size == 1 end def seeing_line?(content) seeing_something_like? /^#{Regexp.escape content}$/ end def seeing_something_like?(regex) @output =~ regex end def receiving_exit_code?(code) @exit_code == code end def view_html execute_command 'license_finder report --format html' HtmlReport.from_string(@output) end private def execute_command_in_path(command, path) @output, @exit_code = path.shell_out(command, true) end end require 'forwardable' class Project extend Forwardable def_delegators :project_dir, :shell_out, :add_to_file, :install_fixture attr_reader :name def self.create(name = "my_app") project = new(name) project.add_dep project.install project end def initialize(name = "my_app") @name = name project_dir.make end def add_dep end def install end def project_dir Paths.project(name) end def clone(fixture_name) FileUtils.mkpath(Paths.my_app.join(fixture_name)) FileUtils.cp_r(Paths.fixtures.join(fixture_name), Paths.my_app) end end class EmptyProject < Project end class PipProject < Project def add_dep add_to_file("requirements.txt", 'rsa==3.1.4') end def install shell_out("pip install -r requirements.txt --user") end end class NpmProject < Project def add_dep add_to_file("package.json", '{"dependencies" : {"http-server": "0.6.1"}}') end def install shell_out("npm install 2>/dev/null") end end class BowerProject < Project def add_dep add_to_file('bower.json', '{"name": "my_app", "dependencies" : {"gmaps": "0.2.30"}}') end def install shell_out("bower install 2>/dev/null") end end class MavenProject < Project def add_dep install_fixture("pom.xml") end def install shell_out("mvn install") end end class BareGradleProject < Project def add_dep install_fixture('build.gradle') end end class GradleProject < Project def add_dep clone('single-module-gradle') end class MultiModule < Project def add_dep clone('multi-module-gradle') end end class FileBasedLibs < Project def add_dep clone('file-based-libs-gradle') end end end class GoProject < Project def add_dep clone('gopath') end def install shell_out("GOPATH=#{project_dir}/gopath godep restore") end def shell_out(command) ProjectDir.new(Paths.root.join('tmp', 'projects', 'my_app', 'gopath', 'src', 'github.com', 'pivotal', 'foo')).shell_out(command) end end class CompositeProject < Project def add_dep clone('single-module-gradle') clone('multi-module-gradle') end end class CocoaPodsProject < Project def add_dep install_fixture("Podfile") end def install shell_out("pod install --no-integrate") end end class RebarProject < Project def add_dep install_fixture("rebar.config") end def install shell_out("rebar get-deps") end end class NugetProject < Project def add_dep clone('nuget') end end class BundlerProject < Project def add_dep add_to_gemfile("source 'https://rubygems.org'") add_gem_to_gemfile('license_finder', path: Paths.root.to_s) end def install shell_out("bundle install") end def depend_on(gem, bundler_options = {}) add_gem_to_gemfile(gem.name, bundler_options.merge(path: gem.project_dir.to_s)) install end private def add_gem_to_gemfile(gem_name, options) add_to_gemfile("gem #{gem_name.inspect}, #{options.inspect}") end def add_to_gemfile(content) add_to_file("Gemfile", content) end end class GemProject # lives adjacent to a BundlerProject, so has a different lifecycle from other Projects and doesn't inherit def self.create(name, options) result = new(name) result.define(options) result end def self.create_in_path(name, path, options) result = new(name, path) result.define(options) result end def initialize(name, path = nil) @name = name @path = path project_dir.make end def define(options) project_dir.write_file("#{name}.gemspec", gemspec_string(options)) end attr_reader :name, :path def project_dir if path Paths.project(path + '/' + name) else Paths.project(name) end end private def gemspec_string(options) dependencies = Array(options[:dependencies]).map do |dep| %[s.add_dependency "#{dep}"] end.join("\n") <<-GEMSPEC Gem::Specification.new do |s| s.name = "#{name}" s.version = "#{options[:version] || "0.0.0"}" s.license = "#{options.fetch(:license)}" s.author = "license_finder tests" s.summary = "#{options[:summary]}" s.description = "#{options[:description]}" s.homepage = "#{options[:homepage]}" #{dependencies} end GEMSPEC end end require 'capybara' class HtmlReport < SimpleDelegator # delegates to the parsed html def self.from_string(str) new(Capybara.string(str)) end def in_dep(dep_name) result = find("##{dep_name}") yield result if block_given? result end def approved?(dep_name) classes_of(dep_name).include? "approved" end def unapproved?(dep_name) classes_of(dep_name).include? "unapproved" end def titled?(title) find("h1").has_content? title end private def classes_of(dep_name) in_dep(dep_name)[:class].split(' ') end end class ProjectDir < SimpleDelegator # delegates to a Pathname def shell_out(command, allow_failures = false) Dir.chdir(self) { Shell.run(command, allow_failures) } end def add_to_file(filename, content) join(filename).open('a') { |file| file.puts content } end def write_file(filename, content) join(filename).open('w') { |file| file.write content } end def install_fixture(fixture_name) join(fixture_name).make_symlink Paths.fixtures.join(fixture_name) end def make mkpath end end require 'pathname' module Paths extend self def root # where license_finder is installed ProjectDir.new(Pathname.new(__FILE__).dirname.join("..", "..").realpath) end def fixtures root.join("features", "fixtures") end def projects root.join("tmp", "projects") end def my_app root.join("tmp", "projects", "my_app") end def project(name = "my_app") ProjectDir.new(projects.join(name)) end def reset_projects! # only destroyed when a test starts, so you can poke around after a failure projects.rmtree if projects.exist? projects.mkpath end end module Shell ERROR_MESSAGE_FORMAT = <&1` status = $? unless status.success? || allow_failures message = sprintf ERROR_MESSAGE_FORMAT, command, output.chomp, status.exitstatus raise RuntimeError.new(message) end return [output, status.exitstatus] end end end end license-finder-2.1.2/features/features/0000755000175000017500000000000012767430336017076 5ustar pravipravilicense-finder-2.1.2/features/features/cli/0000755000175000017500000000000012767430336017645 5ustar pravipravilicense-finder-2.1.2/features/features/cli/cli_spec.rb0000644000175000017500000000325412767430336021757 0ustar pravipravirequire_relative '../../support/feature_helper' describe "License Finder command line executable" do # As a developer # I want a command-line interface # So that I can manage my application's dependencies and licenses let(:developer) { LicenseFinder::TestingDSL::User.new } specify "shows usage and subcommand help" do developer.create_empty_project developer.execute_command "license_finder help" expect(developer).to be_seeing 'license_finder help [COMMAND]' developer.execute_command "license_finder ignored_groups help add" expect(developer).to be_seeing 'license_finder ignored_groups add GROUP' end it "reports `license_finder`'s license is MIT" do developer.create_ruby_app # has license_finder as a dependency developer.run_license_finder expect(developer).to be_seeing_something_like /license_finder.*MIT/ end it "reports dependencies' licenses" do developer.create_ruby_app # has license_finder as a dependency, which has thor as a dependency developer.run_license_finder expect(developer).to be_seeing_something_like /thor.*MIT/ end specify "runs default command" do developer.create_empty_project developer.run_license_finder expect(developer).to be_receiving_exit_code(0) expect(developer).to be_seeing 'All dependencies are approved for use' end specify "displays an error if project_path does not exist" do developer.create_empty_project developer.execute_command('license_finder report --project-path=/path/that/does/not/exist') expect(developer).to be_seeing("Project path '/path/that/does/not/exist' does not exist!") expect(developer).to be_receiving_exit_code(1) end end license-finder-2.1.2/features/features/configure/0000755000175000017500000000000012767430336021057 5ustar pravipravilicense-finder-2.1.2/features/features/configure/ignore_dependencies_spec.rb0000644000175000017500000000237312767430336026414 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Ignored Dependencies" do # As a developer # I want to ignore certain dependencies # To avoid frequently changing reports about dependencies I know will always be approved let(:developer) { LicenseFinder::TestingDSL::User.new } before do developer.create_empty_project developer.execute_command 'license_finder dependencies add ignored_dep Whatever' end specify "are excluded from reports" do developer.execute_command 'license_finder ignored_dependencies add ignored_dep' developer.run_license_finder expect(developer).to_not be_seeing 'ignored_dep' developer.execute_command('license_finder report') expect(developer).to_not be_seeing 'ignored_dep' end specify "appear in the CLI" do developer.execute_command 'license_finder ignored_dependencies add ignored_dep' expect(developer).to be_seeing 'ignored_dep' developer.execute_command 'license_finder ignored_dependencies list' expect(developer).to be_seeing 'ignored_dep' developer.execute_command 'license_finder ignored_dependencies remove ignored_dep' developer.execute_command 'license_finder ignored_dependencies list' expect(developer).to_not be_seeing 'ignored_dep' end end license-finder-2.1.2/features/features/configure/ignore_groups_spec.rb0000644000175000017500000000320012767430336025273 0ustar pravipravirequire_relative '../../support/feature_helper' require 'bundler' describe "Ignored Groups" do # As a developer # I want to ignore certain groups # So that license_finder skips any gems I use in development, or for testing let(:developer) { LicenseFinder::TestingDSL::User.new } specify "are excluded from reports" do project = developer.create_ruby_app gem = developer.create_gem 'dev_gem', license: 'GPL' project.depend_on gem, groups: ['dev'] developer.execute_command 'license_finder ignored_group add dev' developer.run_license_finder expect(developer).to_not be_seeing 'dev_gem' end specify "and their dependencies are excluded from reports" do project = developer.create_ruby_app gem = developer.create_gem 'dev_gem', license: 'GPL', dependencies: 'jwt' # with_clean_env allows jwt to be installed, despite the fact # that it isn't one of license_finder's own dependencies ::Bundler.with_clean_env do project.depend_on gem, groups: ['dev'] developer.execute_command 'license_finder ignored_group add dev' developer.run_license_finder expect(developer).to_not be_seeing 'jwt' end end specify "appear in the CLI" do developer.create_empty_project developer.execute_command 'license_finder ignored_group add dev' expect(developer).to be_seeing 'dev' developer.execute_command 'license_finder ignored_group list' expect(developer).to be_seeing 'dev' developer.execute_command 'license_finder ignored_group remove dev' developer.execute_command 'license_finder ignored_group list' expect(developer).to_not be_seeing 'dev' end end license-finder-2.1.2/features/features/configure/whitelist_licenses_spec.rb0000644000175000017500000000265712767430336026331 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Whitelisted licenses" do # As a developer # I want to whitelist certain licenses that my business has pre-approved # So that any dependencies with those licenses do not show up as action items let(:developer) { LicenseFinder::TestingDSL::User.new } before { developer.create_empty_project } specify "approve dependencies with those licenses" do developer.execute_command 'license_finder dependencies add bsd_gem BSD' developer.execute_command 'license_finder whitelist add BSD' developer.run_license_finder expect(developer).to_not be_seeing 'bsd_gem' end specify "approve dependencies with any of those licenses" do developer.execute_command 'license_finder dependencies add dep_with_many_licenses GPL' developer.execute_command 'license_finder licenses add dep_with_many_licenses MIT' developer.execute_command 'license_finder whitelist add GPL' developer.run_license_finder expect(developer).not_to be_seeing 'dep_with_many_licenses' end specify "are shown in the CLI" do developer.execute_command 'license_finder whitelist add Expat' developer.execute_command 'license_finder whitelist list' expect(developer).to be_seeing 'MIT' developer.execute_command 'license_finder whitelist remove Expat' developer.execute_command 'license_finder whitelist list' expect(developer).to_not be_seeing 'MIT' end end license-finder-2.1.2/features/features/configure/add_dependencies_spec.rb0000644000175000017500000000345112767430336025657 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Manually Added Dependencies" do # As a developer # I want to be able to manually add dependencies # So that I can track dependencies not managed by any official package manager let(:developer) { LicenseFinder::TestingDSL::User.new } before { developer.create_empty_project } specify "appear in reports" do developer.execute_command 'license_finder dependencies add manual_dep MIT 1.2.3' developer.run_license_finder expect(developer).to be_seeing 'manual_dep, 1.2.3, MIT' end specify "can be simultaneously approved" do developer.execute_command 'license_finder dependencies add --approve manual Whatever' developer.run_license_finder expect(developer).not_to be_seeing 'manual_dep' end specify "appear in the CLI" do developer.execute_command 'license_finder dependencies add manual_dep Whatever' expect(developer).to be_seeing 'manual_dep' developer.execute_command 'license_finder dependencies list' expect(developer).to be_seeing 'manual_dep' developer.execute_command 'license_finder dependencies remove manual_dep' developer.execute_command 'license_finder dependencies list' expect(developer).to_not be_seeing 'manual_dep' end specify "does not report dependencies that are manually removed" do developer.create_empty_project developer.execute_command("license_finder dependencies add test_gem Random_License 0.0.1") developer.run_license_finder expect(developer).to be_receiving_exit_code(1) expect(developer).to be_seeing 'test_gem' developer.execute_command("license_finder dependencies remove test_gem") developer.run_license_finder expect(developer).to be_receiving_exit_code(0) expect(developer).not_to be_seeing 'test_gem' end end license-finder-2.1.2/features/features/configure/name_project_spec.rb0000644000175000017500000000212512767430336025064 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Project name" do # As a developer # I want to assign a name for my project # So that product owners see it in the reports let(:developer) { LicenseFinder::TestingDSL::User.new } let(:product_owner) { LicenseFinder::TestingDSL::User.new } before { developer.create_empty_project } specify "appears in the HTML report" do developer.execute_command 'license_finder project_name add changed_name' expect(product_owner.view_html).to be_titled 'changed_name' end specify "defaults to the directory name" do expect(product_owner.view_html).to be_titled 'my_app' end specify "appears in the CLI" do developer.execute_command 'license_finder project_name add my_proj' expect(developer).to be_seeing 'my_proj' developer.execute_command 'license_finder project_name show' expect(developer).to be_seeing 'my_proj' developer.execute_command 'license_finder project_name remove' developer.execute_command 'license_finder project_name show' expect(developer).to_not be_seeing 'my_proj' end end license-finder-2.1.2/features/features/configure/set_project_path_spec.rb0000644000175000017500000000122612767430336025754 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Project path" do # As a developer # I want to set a project path # So that I can run license finder in a different Bundle environment to the project. let(:developer) { LicenseFinder::TestingDSL::User.new } specify "can be overridden on the command line" do project = developer.create_ruby_app gem = developer.create_gem 'mitlicensed_dep', license: 'MIT', version: '1.2.3' project.depend_on gem developer.execute_command_outside_project("license_finder --quiet --project_path #{project.project_dir}") expect(developer).to be_seeing 'mitlicensed_dep, 1.2.3, MIT' end end license-finder-2.1.2/features/features/configure/blacklist_licenses_spec.rb0000644000175000017500000000165312767430336026260 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Blacklisted licenses" do # As a lawyer # I want to blacklist certain licenses # So that any dependencies with only these licenses cannot be approved let(:developer) { LicenseFinder::TestingDSL::User.new } let(:lawyer) { LicenseFinder::TestingDSL::User.new } before do developer.create_empty_project lawyer.execute_command 'license_finder blacklist add BSD' developer.execute_command 'license_finder dependencies add blacklisted_dep BSD' end specify "prevent packages from being approved" do developer.execute_command 'license_finder approval add blacklisted_dep' lawyer.run_license_finder expect(lawyer).to be_seeing 'blacklisted_dep' end specify "override the whitelist" do developer.execute_command 'license_finder whitelist add BSD' lawyer.run_license_finder expect(lawyer).to be_seeing 'blacklisted_dep' end end license-finder-2.1.2/features/features/configure/approve_dependencies_spec.rb0000644000175000017500000000432412767430336026603 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Manually Approved Dependencies" do # As a developer # I want to approve dependencies without whitelisting their licenses # So that my business can track individual dependencies which it has approved let(:developer) { LicenseFinder::TestingDSL::User.new } let(:product_owner) { LicenseFinder::TestingDSL::User.new } before do developer.create_empty_project developer.execute_command 'license_finder dependencies add manual_dep MIT 1.2.3' developer.execute_command "license_finder approval add manual_dep --who 'Julian' --why 'We really need this'" end specify "do not appear in action items" do developer.run_license_finder expect(developer).to_not be_seeing "manual_dep" end specify "include approval detail in reports" do html = product_owner.view_html expect(html).to be_approved 'manual_dep' html.in_dep("manual_dep") do |section| expect(section).to have_content "Julian" expect(section).to have_content "We really need this" end end specify "reports unapproved dependencies" do developer.create_empty_project developer.execute_command("license_finder dependencies add test_gem Random_License 0.0.1") developer.execute_command("license_finder approvals add test_gem") developer.run_license_finder expect(developer).to be_receiving_exit_code(0) expect(developer).not_to be_seeing 'test_gem' developer.execute_command("license_finder approvals remove test_gem") developer.run_license_finder expect(developer).to be_receiving_exit_code(1) expect(developer).to be_seeing 'test_gem' end specify "reports only unapproved dependencies, no approved dependencies" do developer.create_empty_project developer.execute_command("license_finder dependencies add unapproved_gem Random_License 0.0.1") developer.execute_command("license_finder dependencies add approved_gem Random_License 0.0.1") developer.execute_command("license_finder approvals add approved_gem") developer.run_license_finder expect(developer).to be_receiving_exit_code(1) expect(developer).to be_seeing 'unapproved_gem' expect(developer).not_to be_seeing 'approved_gem ' end end license-finder-2.1.2/features/features/configure/assign_licenses_spec.rb0000644000175000017500000000263412767430336025574 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Manually Assigned Licenses" do # As a developer # I want to be able to override the licenses which license_finder finds # So that my dependencies all have the correct licenses let(:developer) { LicenseFinder::TestingDSL::User.new } specify "are shown in cli after being added, and default license is not shown" do project = developer.create_ruby_app gem = developer.create_gem 'mislicensed_dep', license: 'Unknown' project.depend_on gem developer.execute_command 'license_finder licenses add mislicensed_dep Known' developer.run_license_finder expect(developer).not_to be_seeing_something_like /mislicensed_dep.*Unknown/ expect(developer).to be_seeing_something_like /mislicensed_dep.*Known/ end specify "can be removed, revealing the default license for a dependency" do project = developer.create_ruby_app gem = developer.create_gem 'mislicensed_dep', license: 'Default' project.depend_on gem developer.execute_command 'license_finder licenses add mislicensed_dep Manual_license' developer.run_license_finder expect(developer).to be_seeing_something_like /mislicensed_dep.*Manual_license/ developer.execute_command 'license_finder licenses remove mislicensed_dep Manual_license' developer.run_license_finder expect(developer).to be_seeing_something_like /mislicensed_dep.*Default/ end endlicense-finder-2.1.2/features/features/report/0000755000175000017500000000000012767430336020411 5ustar pravipravilicense-finder-2.1.2/features/features/report/html_spec.rb0000644000175000017500000000350012767430336022712 0ustar pravipravirequire_relative '../../support/feature_helper' describe "HTML report" do # As a non-technical product owner # I want an HTML report # So that I can easily review my application's dependencies and licenses let(:developer) { LicenseFinder::TestingDSL::User.new } let(:product_owner) { LicenseFinder::TestingDSL::User.new } specify "shows basic dependency data" do gem_name = "a_gem" gem_group = "test" gem_attributes = { license: "MIT", summary: "gem is cool", description: "seriously", version: "0.0.1", homepage: "http://a_gem.github.com" } project = developer.create_ruby_app gem = developer.create_gem gem_name, gem_attributes project.depend_on gem, groups: [gem_group] product_owner.view_html.in_dep(gem_name) do |section| expect(section.find("a[href='#{gem_attributes[:homepage]}']", text: gem_name)).to be expect(section).to have_content gem_attributes[:license] expect(section).to have_content gem_attributes[:summary] expect(section).to have_content gem_attributes[:description] expect(section).to have_content gem_attributes[:version] expect(section).to have_content gem_group end end specify "shows approval status of dependencies" do developer.create_empty_project developer.execute_command 'license_finder dependencies add gpl_dep GPL' developer.execute_command 'license_finder dependencies add mit_dep MIT' developer.execute_command 'license_finder whitelist add MIT' html = product_owner.view_html expect(html).to be_unapproved 'gpl_dep' expect(html).to be_approved 'mit_dep' expect(html).to have_content '1 GPL' action_items = html.find('.action-items') expect(action_items).to have_content '(GPL)' expect(action_items).not_to have_content 'MIT' end end license-finder-2.1.2/features/features/report/java_groups_spec.rb0000644000175000017500000000066412767430336024276 0ustar pravipravirequire_relative '../../support/feature_helper' describe 'Composite project' do let(:developer) { LicenseFinder::TestingDSL::User.new } specify 'shows dependencies for all active projects' do LicenseFinder::TestingDSL::BareGradleProject.create developer.execute_command('license_finder report --gradle_include_groups') expect(developer).to be_seeing('junit:junit, 4.11, "Common Public License Version 1.0"') end end license-finder-2.1.2/features/features/report/csv_spec.rb0000644000175000017500000000127012767430336022543 0ustar pravipravirequire_relative '../../support/feature_helper' describe "CSV report" do # As a non-technical product owner # I want a csv report # So that I can easily review my application's dependencies and licenses let(:developer) { LicenseFinder::TestingDSL::User.new } let(:product_owner) { LicenseFinder::TestingDSL::User.new } specify "shows dependency data in CSV form" do developer.create_empty_project developer.execute_command 'license_finder dependencies add info_gem BSD 1.1.1' product_owner.execute_command('license_finder report --format csv --columns approved name version licenses') expect(product_owner).to be_seeing "Not approved,info_gem,1.1.1,BSD" end end license-finder-2.1.2/features/features/report/composite_spec.rb0000644000175000017500000000241412767430336023753 0ustar pravipravirequire_relative '../../support/feature_helper' describe 'Composite project' do # As a non-technical product owner # I want to run license finder on a composite project # So that I can easily review all licenses used by sub-projects let(:developer) { LicenseFinder::TestingDSL::User.new } specify 'shows dependencies for all active projects' do LicenseFinder::TestingDSL::CompositeProject.create developer.execute_command('license_finder report --recursive') expect(developer).to be_seeing('junit,4.11,Common Public License Version 1.0') end specify 'shows csv report columns in the right order' do LicenseFinder::TestingDSL::CompositeProject.create developer.execute_command('license_finder report --recursive --format csv --columns name version install_path licenses') expect(developer).to be_seeing('junit,4.11,,Common Public License Version 1.0') end specify 'shows install path column when scanning recursively' do project = LicenseFinder::TestingDSL::BundlerProject.create project.install developer.execute_command('license_finder report --recursive --format csv --columns name version install_path licenses') expect(developer).to be_seeing_something_like(/multi_xml,0.\d+.\d+,.*\/gems\/multi_xml-0.\d+.\d+,MIT/) end end license-finder-2.1.2/features/features/report/subproject_spec.rb0000644000175000017500000000473012767430336024134 0ustar pravipravirequire_relative '../../support/feature_helper' describe 'Subproject report' do # As a non-technical product owner # I want a single csv report that includes multiple sub-projects # So that I can easily review my composite application's dependencies and licenses let(:developer) { LicenseFinder::TestingDSL::User.new } specify 'shows dependencies for multiple subprojects' do project1 = developer.create_ruby_app('project_1') project1.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) project2 = developer.create_ruby_app('project_2') project2.depend_on(developer.create_gem('bar', version: '2.0.0', license: 'GPLv2')) developer.create_empty_project developer.execute_command("license_finder report --columns name version licenses subproject_paths --subprojects #{project1.project_dir} #{project2.project_dir} --format=csv") expect(developer).to be_seeing("foo,1.0.0,MIT,#{project1.project_dir}") expect(developer).to be_seeing("bar,2.0.0,GPLv2,#{project2.project_dir}") end specify 'shows duplicate dependencies only once, with list of project_paths' do foo = developer.create_gem('foo', version: '1.0.0', license: 'MIT') project1 = developer.create_ruby_app('project_1') project1.depend_on(foo) project2 = developer.create_ruby_app('project_2') project2.depend_on(foo) developer.create_empty_project developer.execute_command("license_finder report --columns name version licenses subproject_paths --subprojects #{project1.project_dir} #{project2.project_dir} --format=csv") expect(developer).to be_seeing_once("foo,1.0.0,MIT,\"#{project1.project_dir},#{project2.project_dir}\"") end specify 'does not mark dependencies with different versions as duplicates' do foo_10 = developer.create_gem_in_path('foo', 'v-10', version: '1.0.0', license: 'MIT') foo_11 = developer.create_gem_in_path('foo', 'v-11', version: '1.1.0', license: 'MIT') project1 = developer.create_ruby_app('project_1') project1.depend_on(foo_10) project2 = developer.create_ruby_app('project_2') project2.depend_on(foo_11) developer.create_empty_project developer.execute_command("license_finder report --columns name version licenses subproject_paths --subprojects #{project1.project_dir} #{project2.project_dir} --format=csv") expect(developer).to be_seeing_once("foo,1.0.0,MIT,#{project1.project_dir}") expect(developer).to be_seeing_once("foo,1.1.0,MIT,#{project2.project_dir}") end end license-finder-2.1.2/features/features/report/diff_spec.rb0000644000175000017500000002524312767430336022666 0ustar pravipravirequire_relative '../../support/feature_helper' describe 'Diff report' do # As a non-technical product owner # I want to see the differences between two reports # So that I can easily review what changed between versions let(:developer) { LicenseFinder::TestingDSL::User.new } context 'single project reports' do specify 'shows differences between two csv reports' do project = developer.create_ruby_app project.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) developer.execute_command('license_finder report --save=report-1.csv --format=csv') project.depend_on(developer.create_gem('bar', version: '2.0.0', license: 'GPLv2')) developer.execute_command('license_finder report --save=report-2.csv --format=csv') developer.execute_command('license_finder diff report-1.csv report-2.csv') expect(developer).to be_seeing('added,bar,2.0.0,,GPLv2') expect(developer).to be_seeing('unchanged,foo,1.0.0,1.0.0,MIT') end specify 'shows version changes between two csv reports' do project = developer.create_ruby_app project.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) developer.execute_command('license_finder report --save=report-1.csv --format=csv') project.depend_on(developer.create_gem('foo', version: '2.0.0', license: 'MIT')) developer.execute_command('license_finder report --save=report-2.csv --format=csv') developer.execute_command('license_finder diff report-1.csv report-2.csv') expect(developer).to be_seeing('unchanged,foo,2.0.0,1.0.0,MIT') end specify 'shows license changes between two csv reports' do project = developer.create_ruby_app project.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) developer.execute_command('license_finder report --save=report-1.csv --format=csv') project.depend_on(developer.create_gem('foo', version: '2.0.0', license: 'GPLv2')) developer.execute_command('license_finder report --save=report-2.csv --format=csv') developer.execute_command('license_finder diff report-1.csv report-2.csv') expect(developer).to be_seeing('removed,foo,,1.0.0,MIT') expect(developer).to be_seeing('added,foo,2.0.0,,GPLv2') end end context 'multi-project reports' do specify 'shows differences between two csv reports' do project = developer.create_empty_project # First multi-project report project1 = developer.create_ruby_app('project_1') project1.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) project1.depend_on(developer.create_gem('bar', version: '2.0.0', license: 'GPLv2')) project2 = developer.create_ruby_app('project_2') project2.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) developer.execute_command("license_finder report --columns name version licenses subproject_paths --subprojects=#{project1.project_dir} #{project2.project_dir} --save=report-1.csv --format=csv") # Second multi-project report project2.depend_on(developer.create_gem('baz', version: '3.0.0', license: 'BSD')) developer.execute_command("license_finder report --columns name version licenses subproject_paths --subprojects=#{project1.project_dir} #{project2.project_dir} --save=report-2.csv --format=csv") # Diff the reports developer.execute_command('license_finder diff report-1.csv report-2.csv --save=diff.csv --format=csv') diff = IO.read(project.project_dir.join('diff.csv')) expect(diff).to include("unchanged,foo,1.0.0,1.0.0,MIT,\"#{project1.project_dir},#{project2.project_dir}\"") expect(diff).to include("unchanged,bar,2.0.0,2.0.0,GPLv2,#{project1.project_dir}") expect(diff).to include("added,baz,3.0.0,,BSD,#{project2.project_dir}") end context 'when change affects only one file' do specify 'show version changes' do project = developer.create_empty_project # First multi-project report project1 = developer.create_ruby_app('project_1') project1.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) project1.depend_on(developer.create_gem('bar', version: '2.0.0', license: 'GPLv2')) project2 = developer.create_ruby_app('project_2') project2.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) developer.execute_command("license_finder report --columns name version licenses subproject_paths --subprojects=#{project1.project_dir} #{project2.project_dir} --save=report-1.csv --format=csv") # Second multi-project report project2.depend_on(developer.create_gem('baz', version: '3.0.0', license: 'BSD')) project1.depend_on(developer.create_gem('bar', version: '3.0.0', license: 'GPLv2')) developer.execute_command("license_finder report --columns name version licenses subproject_paths --subprojects=#{project1.project_dir} #{project2.project_dir} --save=report-2.csv --format=csv") # Diff the reports developer.execute_command('license_finder diff report-1.csv report-2.csv --save=diff.csv --format=csv') diff = IO.read(project.project_dir.join('diff.csv')) expect(diff).to include("unchanged,foo,1.0.0,1.0.0,MIT,\"#{project1.project_dir},#{project2.project_dir}\"") expect(diff).to include("unchanged,bar,3.0.0,2.0.0,GPLv2,#{project1.project_dir}") expect(diff).to include("added,baz,3.0.0,,BSD,#{project2.project_dir}") end specify 'shows license changes' do project = developer.create_empty_project # First multi-project report project1 = developer.create_ruby_app('project_1') project1.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) project1.depend_on(developer.create_gem('bar', version: '2.0.0', license: 'GPLv2')) project2 = developer.create_ruby_app('project_2') project2.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) developer.execute_command("license_finder report --columns name version licenses subproject_paths --subprojects=#{project1.project_dir} #{project2.project_dir} --save=report-1.csv --format=csv") # Second multi-project report project2.depend_on(developer.create_gem('baz', version: '3.0.0', license: 'BSD')) project1.depend_on(developer.create_gem('bar', version: '3.0.0', license: 'MIT')) developer.execute_command("license_finder report --columns name version licenses subproject_paths --subprojects=#{project1.project_dir} #{project2.project_dir} --save=report-2.csv --format=csv") # Diff the reports developer.execute_command('license_finder diff report-1.csv report-2.csv --save=diff.csv --format=csv') diff = IO.read(project.project_dir.join('diff.csv')) expect(diff).to include("unchanged,foo,1.0.0,1.0.0,MIT,\"#{project1.project_dir},#{project2.project_dir}\"") expect(diff).to include("removed,bar,,2.0.0,GPLv2,#{project1.project_dir}") expect(diff).to include("added,bar,3.0.0,,MIT,#{project1.project_dir}") expect(diff).to include("added,baz,3.0.0,,BSD,#{project2.project_dir}") end end context 'when change affects both files' do specify 'show licenses change when files contain exact copies of a dep' do project = developer.create_empty_project # First multi-project report project1 = developer.create_ruby_app('project_1') project1.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) project1.depend_on(developer.create_gem('bar', version: '2.0.0', license: 'GPLv2')) project2 = developer.create_ruby_app('project_2') project2.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) developer.execute_command("license_finder report --columns name version licenses subproject_paths --subprojects=#{project1.project_dir} #{project2.project_dir} --save=report-1.csv --format=csv") # Second multi-project report project2.depend_on(developer.create_gem('baz', version: '3.0.0', license: 'BSD')) project1.depend_on(developer.create_gem('foo', version: '2.0.0', license: 'BSD')) developer.execute_command("license_finder report --columns name version licenses subproject_paths --subprojects=#{project1.project_dir} #{project2.project_dir} --save=report-2.csv --format=csv") # Diff the reports developer.execute_command('license_finder diff report-1.csv report-2.csv --save=diff.csv --format=csv') diff = IO.read(project.project_dir.join('diff.csv')) expect(diff).to include("unchanged,bar,2.0.0,2.0.0,GPLv2,#{project1.project_dir}") expect(diff).to include("removed,foo,,1.0.0,MIT,\"#{project1.project_dir},#{project2.project_dir}\"") expect(diff).to include("added,foo,2.0.0,,BSD,\"#{project1.project_dir},#{project2.project_dir}\"") expect(diff).to include("added,baz,3.0.0,,BSD,#{project2.project_dir}") end xspecify 'show licenses change when files do not contain exact copies of a dep' do project = developer.create_empty_project # First multi-project report project1 = developer.create_ruby_app('project_1') project1.depend_on(developer.create_gem('foo', version: '1.0.0', license: 'MIT')) project1.depend_on(developer.create_gem('bar', version: '2.0.0', license: 'GPLv2')) project2 = developer.create_ruby_app('project_2') project2.depend_on(developer.create_gem('foo', version: '2.0.0', license: 'BSD')) developer.execute_command("license_finder report --subprojects=#{project1.project_dir} #{project2.project_dir} --save=report-1.csv --format=csv") # Second multi-project report project2.depend_on(developer.create_gem('baz', version: '3.0.0', license: 'BSD')) project1.depend_on(developer.create_gem('foo', version: '2.0.0', license: 'BSD')) developer.execute_command("license_finder report --subprojects=#{project1.project_dir} #{project2.project_dir} --save=report-2.csv --format=csv") # Diff the reports developer.execute_command('license_finder diff report-1.csv report-2.csv --save=diff.csv --format=csv') diff = IO.read(project.project_dir.join('diff.csv')) expect(diff).to include("removed,foo,,1.0.0,MIT,#{project1.project_dir}") # expect(diff).to include("removed,foo,,2.0.0,BSD,#{project2.project_dir}") expect(diff).to include("unchanged,foo,2.0.0,1.0.0,BSD,\"#{project1.project_dir},#{project2.project_dir}\"") expect(diff).to include("unchanged,bar,2.0.0,2.0.0,GPLv2,#{project1.project_dir}") expect(diff).to include("added,baz,3.0.0,,BSD,#{project2.project_dir}") end end end end license-finder-2.1.2/features/features/package_managers/0000755000175000017500000000000012767430336022346 5ustar pravipravilicense-finder-2.1.2/features/features/package_managers/cocoapods_spec.rb0000644000175000017500000000070212767430336025656 0ustar pravipravirequire_relative '../../support/feature_helper' describe "CocoaPods Dependencies", ios: true do # As a Cocoa developer # I want to be able to manage CocoaPods dependencies let(:cocoa_developer) { LicenseFinder::TestingDSL::User.new } specify "are shown in reports" do LicenseFinder::TestingDSL::CocoaPodsProject.create cocoa_developer.run_license_finder expect(cocoa_developer).to be_seeing_line "ABTest, 0.0.5, MIT" end end license-finder-2.1.2/features/features/package_managers/bower_spec.rb0000644000175000017500000000063712767430336025031 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Bower Dependencies" do # As a JS developer # I want to be able to manage Bower dependencies let(:js_developer) { LicenseFinder::TestingDSL::User.new } specify "are shown in reports" do LicenseFinder::TestingDSL::BowerProject.create js_developer.run_license_finder expect(js_developer).to be_seeing_line "gmaps, 0.2.30, MIT" end end license-finder-2.1.2/features/features/package_managers/gradle_spec.rb0000644000175000017500000000233412767430336025145 0ustar pravipravirequire_relative '../../support/feature_helper' describe 'Gradle Dependencies' do # As a Java developer # I want to be able to manage Gradle dependencies let(:java_developer) { LicenseFinder::TestingDSL::User.new } specify 'are shown in reports for a single-module project' do LicenseFinder::TestingDSL::GradleProject.create java_developer.run_license_finder('single-module-gradle') expect(java_developer).to be_seeing_line 'junit, 4.11, "Common Public License Version 1.0"' end specify 'are shown in reports for a multi-module project' do LicenseFinder::TestingDSL::GradleProject::MultiModule.create java_developer.run_license_finder('multi-module-gradle') expect(java_developer).to be_seeing_line 'junit, 4.12, "Eclipse Public License 1.0"' expect(java_developer).to be_seeing_line 'mockito-core, 1.9.5, "The MIT License"' end specify 'show both file-based jars and downloaded dependencies' do LicenseFinder::TestingDSL::GradleProject::FileBasedLibs.create java_developer.run_license_finder('file-based-libs-gradle') expect(java_developer).to be_seeing_line 'data.json-0.2.3.jar, unknown, unknown' expect(java_developer).to be_seeing_line 'guava, 18.0, "Apache 2.0"' end end license-finder-2.1.2/features/features/package_managers/pip_spec.rb0000644000175000017500000000065212767430336024500 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Pip Dependencies" do # As a Python developer # I want to be able to manage Pip dependencies let(:python_developer) { LicenseFinder::TestingDSL::User.new } specify "are shown in reports" do LicenseFinder::TestingDSL::PipProject.create python_developer.run_license_finder expect(python_developer).to be_seeing_line 'rsa, 3.1.4, "ASL 2"' end end license-finder-2.1.2/features/features/package_managers/rebar_spec.rb0000644000175000017500000000070612767430336025003 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Rebar Dependencies" do # As an Erlang developer # I want to be able to manage rebar dependencies let(:erlang_developer) { LicenseFinder::TestingDSL::User.new } specify "are shown in reports" do LicenseFinder::TestingDSL::RebarProject.create erlang_developer.run_license_finder expect(erlang_developer).to be_seeing_line "envy, \"BRANCH: master\", \"Apache 2.0\"" end end license-finder-2.1.2/features/features/package_managers/maven_spec.rb0000644000175000017500000000070512767430336025015 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Maven Dependencies" do # As a Java developer # I want to be able to manage Maven dependencies let(:java_developer) { LicenseFinder::TestingDSL::User.new } specify "are shown in reports" do LicenseFinder::TestingDSL::MavenProject.create java_developer.run_license_finder expect(java_developer).to be_seeing_line 'junit, 4.11, "Common Public License Version 1.0"' end end license-finder-2.1.2/features/features/package_managers/npm_spec.rb0000644000175000017500000000064612767430336024505 0ustar pravipravirequire_relative '../../support/feature_helper' describe "NPM Dependencies" do # As a Node developer # I want to be able to manage NPM dependencies let(:node_developer) { LicenseFinder::TestingDSL::User.new } specify "are shown in reports" do LicenseFinder::TestingDSL::NpmProject.create node_developer.run_license_finder expect(node_developer).to be_seeing_line "http-server, 0.6.1, MIT" end end license-finder-2.1.2/features/features/package_managers/nuget_spec.rb0000644000175000017500000000067012767430336025032 0ustar pravipravirequire_relative '../../support/feature_helper' describe "Nuget Dependencies" do # As a .NET developer # I want to be able to manage Nuget dependencies let(:dotnet_developer) { LicenseFinder::TestingDSL::User.new } specify "are shown in reports" do LicenseFinder::TestingDSL::NugetProject.create dotnet_developer.run_license_finder "nuget" expect(dotnet_developer).to be_seeing_line "NUnit, 2.6.4, unknown" end end license-finder-2.1.2/features/features/package_managers/godep_spec.rb0000644000175000017500000000116212767430336025003 0ustar pravipravirequire_relative '../../support/feature_helper' describe 'Godep Dependencies' do # As a Go developer # I want to be able to manage Godep dependencies let(:go_developer) { LicenseFinder::TestingDSL::User.new } specify 'are shown in reports for a project' do project = LicenseFinder::TestingDSL::GoProject.create ENV['GOPATH'] = "#{project.project_dir}/gopath" go_developer.run_license_finder('gopath/src/github.com/pivotal/foo') expect(go_developer).to be_seeing_line 'github.com/onsi/ginkgo, d981d36, MIT' expect(go_developer).to be_seeing_line 'github.com/onsi/gomega, d6c945f, MIT' end end license-finder-2.1.2/features/fixtures/0000755000175000017500000000000012767430336017131 5ustar pravipravilicense-finder-2.1.2/features/fixtures/build.gradle0000644000175000017500000000066412767430336021416 0ustar pravipraviapply plugin: 'java' sourceCompatibility = 1.5 version = '1.0' repositories { mavenCentral() } dependencies { compile group: 'junit', name: 'junit', version: '4.11' } buildscript { repositories { maven { url 'https://plugins.gradle.org/m2/' } } dependencies { classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.12.1' } } apply plugin: 'license' license-finder-2.1.2/features/fixtures/rebar.config0000644000175000017500000000047512767430336021421 0ustar pravipravi%% -*- mode: erlang -*- %% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*- %% ex: ts=4 sw=4 ft=erlang et {erl_opts, [warnings_as_errors, {parse_transform, lager_transform}, debug_info]}. {deps, [ {envy, ".*", {git, "git://github.com/manderson26/envy.git", {branch, "master"}}} ] }. license-finder-2.1.2/features/fixtures/multi-module-gradle/0000755000175000017500000000000012767430336023002 5ustar pravipravilicense-finder-2.1.2/features/fixtures/multi-module-gradle/build.gradle0000644000175000017500000000047312767430336025265 0ustar pravipravibuildscript { repositories { maven { url 'https://plugins.gradle.org/m2/' } } dependencies { classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.12.1' } } allprojects { apply plugin: 'java' apply plugin: 'license' repositories { mavenCentral() } } license-finder-2.1.2/features/fixtures/multi-module-gradle/module2/0000755000175000017500000000000012767430336024351 5ustar pravipravilicense-finder-2.1.2/features/fixtures/multi-module-gradle/module2/build.gradle0000644000175000017500000000007412767430336026631 0ustar pravipravidependencies { compile 'org.mockito:mockito-core:1.9.5' } license-finder-2.1.2/features/fixtures/multi-module-gradle/module1/0000755000175000017500000000000012767430336024350 5ustar pravipravilicense-finder-2.1.2/features/fixtures/multi-module-gradle/module1/build.gradle0000644000175000017500000000005612767430336026630 0ustar pravipravidependencies { compile 'junit:junit:4.12' } license-finder-2.1.2/features/fixtures/multi-module-gradle/settings.gradle0000644000175000017500000000003712767430336026022 0ustar pravipraviinclude ':module1', ':module2' license-finder-2.1.2/features/fixtures/Podfile0000644000175000017500000000011412767430336020432 0ustar pravipraviplatform :ios, '7.0' pod 'JSONKit', '~> 1.4' pod 'ABTest', '~> 0.0.5' license-finder-2.1.2/features/fixtures/pom.xml0000644000175000017500000000113012767430336020441 0ustar pravipravi 4.0.0 dummy dummy 1.0-SNAPSHOT junit junit 4.11 test license-finder-2.1.2/features/fixtures/file-based-libs-gradle/0000755000175000017500000000000012767430336023307 5ustar pravipravilicense-finder-2.1.2/features/fixtures/file-based-libs-gradle/build.gradle0000644000175000017500000000055412767430336025572 0ustar pravipraviplugins { id "com.github.hierynomus.license" version "0.11.0" } repositories { mavenCentral() } apply plugin: 'java' dependencies { compile( "com.google.guava:guava:18.0" ) // Import external libraries that are **not** available to download via repo compile fileTree(dir: 'libs', include: '*.jar') } license-finder-2.1.2/features/fixtures/file-based-libs-gradle/libs/0000755000175000017500000000000012767430336024240 5ustar pravipravilicense-finder-2.1.2/features/fixtures/file-based-libs-gradle/libs/data.json-0.2.3.jar0000644000175000017500000001664212767430336027266 0ustar pravipraviPK CC META-INF/PK CC+se}META-INF/MANIFEST.MFMLK-. K-*ϳR03r,J,K-BV+$xRKRSt* 3R|RxJ3sJ)P]lfzF@;xPK CCclojure/PK CC clojure/data/PK CC"p! clojure/data/json_compat_0_1.cljUMO1W8%* Ԫ*藠gw6qW}7 =t$^̛73pH纬LݸJG7]:=>9M((@,l8KvTY&pHqV-ڐJKVn! g4q4J YZ.q!S SVp|S{\9u-]m&"BluؤM ^RMvbK5NAK11i4ULSyNu(s$xKx'>ӥ6jKSB*d‰df,\z~Etp1ݎ.8( F!#5^X1H8FP[ 8&w9zM&k^ uxƩ8K R*ҁkVTB `˙z Fr%TBK1 C=*+a㴄(^xʐ#"?3xKc?1rXLDKa:1Mx^t&+bCȡ$΀O__ rFnSD}- BoD)կ;jϧ2*|Or;}#J| _TI9XE$_miQiQ4Oj)%"_%MXs( N8E!5De"eFk^Ʋؒ!@(2 ۤ*\ ψ:y9d)<5l*WUA=5RRCۆ^[K <lо bS=7Y ~YHZY Zg69qT$W=]hBMO妤+BD`&Q1@ԄgujLv vv0smDLڨ/(u7OZL?ҘL[E$Vr@!pdFة/%2_$sT?C#x/xiHۿ2,E5x<9l|9rjG8'GUbb~U6H#UV"; e<;əRNp DaX;vj_?QQ=> L?*FBvLn#܈3 S+,8^1CT&SOtߚB3N Qqf1U,۱2off)|gJ6C^Wˉ_ e-Ah$ -B1xwjJGpUDۤ }j7}bA{&0tNݺN`;? Oa5?0(&CXß L8> M'9:k[Йa3VJdS-[!ASVȳr,`D:J5USf:9"Qiɶ4+Q>| ]:=R+@- 9nbND%&v(aRGWw鸷.ֵv$U7{ l:6Wʝ\ɿ/<cuآ<͗N_X[>՟Pz'Gsoq=XAPuKUݎmJ!T O3lTH KJlq-@ņ줆F!W$PMDWbAI#Mk,KH_͸fM9 Cf#ImrUn Ygl; Ƴg܈P^0~]NwEMgm" ()uqm#kSFl˕)UiDiTBEeWff)AEWς/*QrK&L3HMJXg`DQ,Ut1\CRGPݔzBqhIK4pZ 7e!Yœ64KeNM%@$)n:\(ǖTLhQTE5u \ UQoi2[:(\uE֠>Jc+Go.cAQzofߤPo:U!k=v[hSW յI\ ;߭P۸,|PJQuDߏp\ [c: B9%gW}bXEl=W^zBrܟV:m RXMH=*&~Mՙq 7Ӭs\|{˜TCKV/BYe3_B7{=HM dȏwfƈݥO/ze5,ؾpąֺ4q)25oyy;O;ܝ2ru=V|(| hr&oݻ'Ced*p?~:(dϑ*A0"gu}Gj&ɃE1WG]For#tXj@ZX>wdzTRLrsaٶ6p߆M5l>,č r:tcdu?Bc ÷f-}>v]*p (z&Ɏ;q*Q;'7Rxƛ'Av/"{8j6{l#oL;p-%.;Yj-XUwkiuk].ZJqvVHߓ=R -6`-v[ 4i-Uv0[,q4\iULY(7J/ÃBlH˻Sϋ,-x L6ƯA`Ye/:?}cdrTǧ Rv7 . ?ɡJ׺#1 b~>9Ug\ߤ .R )`2\xVFs}=dx:܌pp{CʻUg;$Uydl4r=! 01US0]喲Z:+_қ MO*9v9ɒu$FuKv_b?4Sj76&Z7 bU{zIAh\F{BK}G1\3'R!L 1U~mـU*3quԻH3`" [vQjP~Ҧ:Z8oDՐTS7I{NYnQOAHU)oܺ[H1.=JWd[ǙPQkFL=z%HǨeʕ{6S0(>sKNE+$.|>UU`l* ΍̷" "DS> }SǦk}Skm0<;AoEqn糊М_bWƽ־z⡸Y'z7m +öfN|[>Tɢ-T|^72Xu&FI~SoG;S1؜re]m0xc 5fAIGkk_51bzfA񮻛;^?_ҀL[NJwTOd%n8m:b#cH`@ ,֦Q2tp5N3M]k+3srlݻ^z (qwx^,Z:ie~zl*}}?Ba%f] a~{@У( 'izkw,ldꇳt :W!d~M^Re{̜niS"uNzZW$J '|ei\T 弜_5*U_u đ*+3:֫K.{\Df4#TK+v!קd 1*PV1uDՄ4aT_ɷtyRlNKOm?T׆X}Z=% УC-qã'=Z0T<_1gKydHHeq*Ϳ$0@{p^s1P8zHPK CCMETA-INF/maven/PK CCMETA-INF/maven/org.clojure/PK CC%META-INF/maven/org.clojure/data.json/PK CC\+<a,META-INF/maven/org.clojure/data.json/pom.xmlTj0}WWKN0Z(ll ث*-IN}W8Ї9Wc^uUeVY?|*>,5[)<v|}_Ԙ\l$6!{\.Y:=_E޲,/vk!AT"xgԫW'< u2hgjJSxFHząR{hJfh c%^+Jv3d(X8VaBYjiaXݐ^7z#ޠl+QpP:JMB,27#B$=MY򱓭v0R=ͱ JZOsDZn\ wS' ^Rjdz?FKV|X$ti(آ~$7 =7A&,t`F{/>K{iP8э ,+H%nNTϤ3]rvϩc1΢7-a{PK CC ii3META-INF/maven/org.clojure/data.json/pom.properties 0 {"{-B ʆolC^uVqN.Ѝz6.׀nj^ license-finder-2.1.2/features/fixtures/nuget/Fun.Test/0000755000175000017500000000000012767430336021721 5ustar pravipravilicense-finder-2.1.2/features/fixtures/nuget/Fun.Test/packages.config0000755000175000017500000000020212767430336024663 0ustar pravipravi license-finder-2.1.2/bin/0000755000175000017500000000000012767430336014212 5ustar pravipravilicense-finder-2.1.2/bin/license_finder_pip.py0000755000175000017500000000123212767430336020406 0ustar pravipravi#!/usr/bin/env python import json from pip.req import parse_requirements from pip.download import PipSession from pip._vendor import pkg_resources from pip._vendor.six import print_ requirements = [req.req for req in parse_requirements('requirements.txt', session=PipSession())] transform = lambda dist: { 'name': dist.project_name, 'version': dist.version, 'location': dist.location, 'dependencies': list(map(lambda dependency: dependency.project_name, dist.requires())), } packages = [transform(dist) for dist in pkg_resources.working_set.resolve(requirements)] print_(json.dumps(packages)) license-finder-2.1.2/bin/license_finder0000755000175000017500000000011612767430336017107 0ustar pravipravi#!/usr/bin/env ruby require 'license_finder' LicenseFinder::CLI::Main.start license-finder-2.1.2/release/0000755000175000017500000000000012767430336015062 5ustar pravipravilicense-finder-2.1.2/release/instructions.md0000644000175000017500000000046112767430336020151 0ustar pravipravi## Release Releasing involves building a package, tagging its version on github and pushing it to http://rubygems.org. Like other gems, you can build, tag and release `license_finder` with `rake release`. You may want to run `rake -T` before releasing to confirm you are releasing the correct version.