├── .babelrc
├── .editorconfig
├── .github
└── FUNDING.yml
├── .gitignore
├── .postcssrc.js
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── build
├── build.js
├── check-versions.js
├── logo.png
├── utils.js
├── vue-loader.conf.js
├── webpack.base.conf.js
├── webpack.dev.conf.js
└── webpack.prod.conf.js
├── config
├── dev.env.js
├── index.js
└── prod.env.js
├── docs
├── index.html
└── static
│ ├── SplitText.min.js
│ ├── css
│ ├── app.da4edb0940c93b0ccf15ba7f997689b5.css
│ └── app.da4edb0940c93b0ccf15ba7f997689b5.css.map
│ ├── fonts
│ ├── 1a6dec8e-26f9-4243-8495-835709538f92.3939ac6.eot
│ ├── 1f6af904-724d-4f75-b836-51c3d674a37e.1748af2.eot
│ ├── 2029e71f-067d-46a8-bc44-b5c64a258928.daa6dec.woff2
│ ├── 33f5d8d9-105f-4a49-9351-74ecae7f4a49.32044ed.ttf
│ ├── 3e18b964-7a6f-4828-8e18-5cc698e1051f.c99c69c.woff
│ ├── 4bfd13a9-3195-4d8f-87a9-83a212d18b16.a00cb26.woff2
│ ├── 63aa9f40-04be-453a-a672-aa8f9919115d.75f4b90.woff
│ ├── a7622e06-0cde-414a-a25d-5e5f6f5bfcaa.6885c19.ttf
│ ├── a82a5fb6-ad03-4675-801e-d3182a58ff5f.623b22d.ttf
│ ├── b01b8a8a-cb45-4c4e-b2bb-e5b8853e6fe6.cc06d64.woff2
│ ├── c4be5717-c19c-43a5-9ad3-b548ddf070d4.29d5f41.eot
│ └── f05272f9-83e3-4de6-8423-5d57f730c87b.fd6b6e9.woff
│ ├── img
│ ├── b56150eb-5caa-4385-b907-373e97ddb2ff.8286231.svg
│ ├── beb2cee2-1a51-44ca-848f-4f795394ee5a.b8d79de.svg
│ └── ca4569d2-e4c3-4dec-8bfe-52712ef6bc31.52c259e.svg
│ ├── js
│ ├── app.e4cceecd78724032dadb.js
│ ├── app.e4cceecd78724032dadb.js.map
│ ├── manifest.2ae2e69a05c33dfc65f8.js
│ ├── manifest.2ae2e69a05c33dfc65f8.js.map
│ ├── vendor.aaa6f9e0cfe8c0fffcb4.js
│ └── vendor.aaa6f9e0cfe8c0fffcb4.js.map
│ └── normalize.css
├── index.html
├── package-lock.json
├── package.json
├── src
├── App.vue
├── assets
│ └── Fonts
│ │ ├── 1a6dec8e-26f9-4243-8495-835709538f92.eot
│ │ ├── 1f6af904-724d-4f75-b836-51c3d674a37e.eot
│ │ ├── 2029e71f-067d-46a8-bc44-b5c64a258928.woff2
│ │ ├── 33f5d8d9-105f-4a49-9351-74ecae7f4a49.ttf
│ │ ├── 3e18b964-7a6f-4828-8e18-5cc698e1051f.woff
│ │ ├── 4bfd13a9-3195-4d8f-87a9-83a212d18b16.woff2
│ │ ├── 63aa9f40-04be-453a-a672-aa8f9919115d.woff
│ │ ├── a7622e06-0cde-414a-a25d-5e5f6f5bfcaa.ttf
│ │ ├── a82a5fb6-ad03-4675-801e-d3182a58ff5f.ttf
│ │ ├── b01b8a8a-cb45-4c4e-b2bb-e5b8853e6fe6.woff2
│ │ ├── b56150eb-5caa-4385-b907-373e97ddb2ff.svg
│ │ ├── beb2cee2-1a51-44ca-848f-4f795394ee5a.svg
│ │ ├── c4be5717-c19c-43a5-9ad3-b548ddf070d4.eot
│ │ ├── ca4569d2-e4c3-4dec-8bfe-52712ef6bc31.svg
│ │ └── f05272f9-83e3-4de6-8423-5d57f730c87b.woff
├── components
│ ├── AppCode.vue
│ ├── AppGithubCorner.vue
│ ├── AppMethodPrimary.vue
│ ├── LocaleSwitcher.vue
│ └── methods
│ │ ├── MethodBase.vue
│ │ └── MethodChoice.vue
├── locale
│ ├── ar
│ │ └── index.js
│ ├── bg
│ │ └── index.js
│ ├── cz
│ │ └── index.js
│ ├── de
│ │ └── index.js
│ ├── el
│ │ └── index.js
│ ├── en
│ │ └── index.js
│ ├── es
│ │ └── index.js
│ ├── fi
│ │ └── index.js
│ ├── fr
│ │ └── index.js
│ ├── id
│ │ └── index.js
│ ├── it
│ │ └── index.js
│ ├── ja
│ │ └── index.js
│ ├── nl
│ │ └── index.js
│ ├── pt
│ │ └── index.js
│ ├── ru
│ │ └── index.js
│ ├── sr
│ │ └── index.js
│ ├── tr
│ │ └── index.js
│ ├── ua
│ │ └── index.js
│ └── zh_cn
│ │ └── index.js
└── main.js
├── static
├── .gitkeep
├── SplitText.min.js
└── normalize.css
└── store
├── ar
├── index.js
└── meta.json
├── bg
├── index.js
└── meta.json
├── cz
├── index.js
└── meta.json
├── de
├── index.js
└── meta.json
├── el
├── index.js
└── meta.json
├── en
├── index.js
└── meta.json
├── es
├── index.js
└── meta.json
├── fi
├── index.js
└── meta.json
├── fr
├── index.js
└── meta.json
├── id
├── index.js
└── meta.json
├── index.js
├── it
├── index.js
└── meta.json
├── ja
├── index.js
└── meta.json
├── nl
├── index.js
└── meta.json
├── pt
├── index.js
└── meta.json
├── ru
├── index.js
└── meta.json
├── sr
├── index.js
└── meta.json
├── tr
├── index.js
└── meta.json
├── ua
├── index.js
└── meta.json
└── zh_cn
├── index.js
└── meta.json
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-vue-jsx", "transform-runtime"]
12 | }
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 | quote_type = single
11 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [sdras]
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | npm-debug.log*
2 | yarn-debug.log*
3 | yarn-error.log*
4 |
5 | # Editor directories and files
6 | .idea
7 | .vscode
8 | *.suo
9 | *.ntvs*
10 | *.njsproj
11 | *.sln
12 |
13 | ### OSX ###
14 | *.DS_Store
15 | .AppleDouble
16 | .LSOverride
17 |
18 | # Icon must end with two
19 | Icon
20 | # Thumbnails
21 | ._*
22 | # Files that might appear in the root of a volume
23 | .DocumentRevisions-V100
24 | .fseventsd
25 | .Spotlight-V100
26 | .TemporaryItems
27 | .Trashes
28 | .VolumeIcon.icns
29 | .com.apple.timemachine.donotpresent
30 | # Directories potentially created on remote AFP share
31 | .AppleDB
32 | .AppleDesktop
33 | Network Trash Folder
34 | Temporary Items
35 | .apdisk
36 |
37 | ### Node ###
38 | # Logs
39 | logs
40 | *.log
41 | npm-debug.log*
42 |
43 | # Runtime data
44 | pids
45 | *.pid
46 | *.seed
47 | *.pid.lock
48 |
49 | # Directory for instrumented libs generated by jscoverage/JSCover
50 | lib-cov
51 |
52 | # Coverage directory used by tools like istanbul
53 | coverage
54 |
55 | # nyc test coverage
56 | .nyc_output
57 |
58 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
59 | .grunt
60 |
61 | # node-waf configuration
62 | .lock-wscript
63 |
64 | # Compiled binary addons (http://nodejs.org/api/addons.html)
65 | build/Release
66 |
67 | # Dependency directories
68 | node_modules
69 | jspm_packages
70 |
71 | # Optional npm cache directory
72 | .npm
73 |
74 | # Optional eslint cache
75 | .eslintcache
76 |
77 | # Optional REPL history
78 | .node_repl_history
79 |
80 | # Output of 'npm pack'
81 | *.tgz
82 |
83 | # Yarn Integrity file
84 | .yarn-integrity
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | // to edit target browsers: use "browserslist" field in package.json
6 | "postcss-import": {},
7 | "autoprefixer": {}
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at sarah.drasner@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to contribute
2 |
3 | Thank you for stopping by the project! If you're interested in creating a language translation, please check out **Translations** below.
4 |
5 | The mission of this project is to build the resource I would have wanted when I was first learning array methods, so some very opinionated choices have been made to keep in line with that idea, and some are controversial. One such example was not to include `Array.prototype.methodName()` and rather, simplify to `Array.methodName()`, as when I was learning I found it confusing. After polling a lot of people, I wasn't the only one, so this change was made.
6 |
7 | This tool is not meant to be a replacement for documentation, but rather a way to quickly traverse and find what one needs. I value quick clarity and the ability to scan above all else. If you see a way that this can be improved, I appreciate contributions!
8 |
9 | ## Build Setup
10 |
11 | ```bash
12 | # install dependencies
13 | npm install
14 |
15 | # serve with hot reload at localhost:8080
16 | npm run dev
17 |
18 | # build for production with minification
19 | npm run build
20 |
21 | # build for production and view the bundle analyzer report
22 | npm run build --report
23 |
24 | # to build for the docs:
25 | npm run build
26 | # then rename `dist` to `docs` and remove the first slash `/static` from `static` in `index.html`
27 | # then change the font paths in the css file from `/static` to `../../static`
28 | ```
29 |
30 | ## Submitting changes
31 |
32 | Please send a pull request with a clear list of what you've done (read more about [pull requests](https://help.github.com/categories/collaborating-with-issues-and-pull-requests/)).
33 |
34 | ## Translations
35 |
36 | In `store`, you'll see many folders with language acronyms, each one has an `index.js` file and a `meta.json` file. Please make a copy of the `en` folder and translate the `index.js`, and give yourself credit in the `meta.json` file, and state the language.
37 |
38 | Then in `store/index.js`, you will see a few places where you'll need to add your translation version.
39 |
40 | In `src/locale`, you'll find another set of language folders, please duplicate the `en` folder and translate the `index.js` file.
41 |
42 | Test that everything is working by running:
43 |
44 | ```
45 | yarn
46 | npm run dev
47 | ```
48 |
49 | ## Coding conventions
50 |
51 | Start reading our code and you'll get the hang of it. I optimize for readability:
52 |
53 | * I use prettier to format the javascript, two spaces
54 | * I use single quotes or template literal backticks in the JS, double quotes in the HTML
55 | * The meat of the content is in a Vuex store that is disseminated through the application, rather than being hardcoded into the components
56 |
57 | Thank you!
58 | Sarah Drasner
59 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Sarah Drasner
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | # JavaScript Array Explorer
6 |
7 | When I was first learning array methods, I spent a lot of time digging through the docs to find the appropriate one, and I had to search one by one. I made this resource to help people find the correct array method a bit more naturally. You can narrow down what you want to do and explore until you find what's most useful to you.
8 |
9 | Check out the site here: [https://arrayexplorer.netlify.com/](https://arrayexplorer.netlify.com/)
10 |
11 | Or if you prefer codepen: [https://codepen.io/sdras/full/gogVRX/](https://codepen.io/sdras/full/gogVRX/)
12 |
13 | I realize that there are about a million ways that this resource can be set up, and some of the taxonomy is necessarily opinionated. I tried to focus on what I thought would have helped me learn the best, rather than industry standard delineations (mutator, accessor, iteration, for example). There are a lot of resources that already divide the methods this way, so if that style of learning suits you better, that's great! This resource is not set up that way. Please keep in mind that this is not meant to be as comprehensive or a replacement for full documentation, which is why the MDN docs are linked to in each method.
14 |
15 | I based most of the examples and longer descriptions off of the MDN documentation, altering it slightly where I felt the description was not as beginner-friendly as it could be.
16 |
17 | **Enjoy!**
18 |
19 | ## Other Similar Projects
20 |
21 | **I have an Object Explorer as well: [https://objectexplorer.netlify.com/](https://objectexplorer.netlify.com/)**
22 |
23 | I've heard people say they want to fork this project for other languages and data types (ruby, etc), please feel free to! If you let me know about it, I'll link it up here.
24 |
25 | - [Ruby Array Explorer](https://contrepoint.github.io/ruby-array-explorer/). Code [here](https://github.com/contrepoint/ruby-array-explorer)
26 | - [Angular Array Explorer](https://niladri24dutta.github.io/Array-explorer-angular/) . Code [here](https://github.com/Niladri24dutta/Array-explorer-angular)
27 | - [Python List Explorer](https://akashp1712.github.io/python-explorer/). Code [here](https://github.com/akashp1712/python-explorer)
28 | - [Ramdajs Methods Explorer](https://davesnx.github.io/learn-ramda/) . Code [here](https://github.com/davesnx/learn-ramda)
29 |
30 | ## Thank you!
31 |
32 | Many thanks to everyone who helped with the translations! @AWolf81, @Gonzalo2310, @welll, @julienmartin, @g-plane, @imbyurhan, @bahe007, @salahaa1, @proYang, @bdimitrovski, @TheElderMindseeker, @glenngijsberts, @galuhsahid, @xgebi
33 |
34 | ## Build Setup
35 |
36 | ```bash
37 | # install dependencies
38 | npm install
39 |
40 | # serve with hot reload at localhost:8080
41 | npm run dev
42 |
43 | # build for production with minification
44 | npm run build
45 |
46 | # build for production and view the bundle analyzer report
47 | npm run build --report
48 | ```
49 |
50 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
51 |
--------------------------------------------------------------------------------
/build/build.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | require('./check-versions')()
3 |
4 | process.env.NODE_ENV = 'production'
5 |
6 | const ora = require('ora')
7 | const rm = require('rimraf')
8 | const path = require('path')
9 | const chalk = require('chalk')
10 | const webpack = require('webpack')
11 | const config = require('../config')
12 | const webpackConfig = require('./webpack.prod.conf')
13 |
14 | const spinner = ora('building for production...')
15 | spinner.start()
16 |
17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
18 | if (err) throw err
19 | webpack(webpackConfig, (err, stats) => {
20 | spinner.stop()
21 | if (err) throw err
22 | process.stdout.write(stats.toString({
23 | colors: true,
24 | modules: false,
25 | children: false, // if you are using ts-loader, setting this to true will make tyescript errors show up during build
26 | chunks: false,
27 | chunkModules: false
28 | }) + '\n\n')
29 |
30 | if (stats.hasErrors()) {
31 | console.log(chalk.red(' Build failed with errors.\n'))
32 | process.exit(1)
33 | }
34 |
35 | console.log(chalk.cyan(' Build complete.\n'))
36 | console.log(chalk.yellow(
37 | ' Tip: built files are meant to be served over an HTTP server.\n' +
38 | ' Opening index.html over file:// won\'t work.\n'
39 | ))
40 | })
41 | })
42 |
--------------------------------------------------------------------------------
/build/check-versions.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const chalk = require('chalk')
3 | const semver = require('semver')
4 | const packageConfig = require('../package.json')
5 | const shell = require('shelljs')
6 |
7 | function exec (cmd) {
8 | return require('child_process').execSync(cmd).toString().trim()
9 | }
10 |
11 | const versionRequirements = [
12 | {
13 | name: 'node',
14 | currentVersion: semver.clean(process.version),
15 | versionRequirement: packageConfig.engines.node
16 | }
17 | ]
18 |
19 | if (shell.which('npm')) {
20 | versionRequirements.push({
21 | name: 'npm',
22 | currentVersion: exec('npm --version'),
23 | versionRequirement: packageConfig.engines.npm
24 | })
25 | }
26 |
27 | module.exports = function () {
28 | const warnings = []
29 |
30 | for (let i = 0; i < versionRequirements.length; i++) {
31 | const mod = versionRequirements[i]
32 |
33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
34 | warnings.push(mod.name + ': ' +
35 | chalk.red(mod.currentVersion) + ' should be ' +
36 | chalk.green(mod.versionRequirement)
37 | )
38 | }
39 | }
40 |
41 | if (warnings.length) {
42 | console.log('')
43 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
44 | console.log()
45 |
46 | for (let i = 0; i < warnings.length; i++) {
47 | const warning = warnings[i]
48 | console.log(' ' + warning)
49 | }
50 |
51 | console.log()
52 | process.exit(1)
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/build/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/build/logo.png
--------------------------------------------------------------------------------
/build/utils.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const config = require('../config')
4 | const ExtractTextPlugin = require('extract-text-webpack-plugin')
5 | const packageConfig = require('../package.json')
6 |
7 | exports.assetsPath = function (_path) {
8 | const assetsSubDirectory = process.env.NODE_ENV === 'production'
9 | ? config.build.assetsSubDirectory
10 | : config.dev.assetsSubDirectory
11 |
12 | return path.posix.join(assetsSubDirectory, _path)
13 | }
14 |
15 | exports.cssLoaders = function (options) {
16 | options = options || {}
17 |
18 | const cssLoader = {
19 | loader: 'css-loader',
20 | options: {
21 | sourceMap: options.sourceMap
22 | }
23 | }
24 |
25 | const postcssLoader = {
26 | loader: 'postcss-loader',
27 | options: {
28 | sourceMap: options.sourceMap
29 | }
30 | }
31 |
32 | // generate loader string to be used with extract text plugin
33 | function generateLoaders (loader, loaderOptions) {
34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
35 |
36 | if (loader) {
37 | loaders.push({
38 | loader: loader + '-loader',
39 | options: Object.assign({}, loaderOptions, {
40 | sourceMap: options.sourceMap
41 | })
42 | })
43 | }
44 |
45 | // Extract CSS when that option is specified
46 | // (which is the case during production build)
47 | if (options.extract) {
48 | return ExtractTextPlugin.extract({
49 | use: loaders,
50 | fallback: 'vue-style-loader'
51 | })
52 | } else {
53 | return ['vue-style-loader'].concat(loaders)
54 | }
55 | }
56 |
57 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html
58 | return {
59 | css: generateLoaders(),
60 | postcss: generateLoaders(),
61 | less: generateLoaders('less'),
62 | sass: generateLoaders('sass', { indentedSyntax: true }),
63 | scss: generateLoaders('sass'),
64 | stylus: generateLoaders('stylus'),
65 | styl: generateLoaders('stylus')
66 | }
67 | }
68 |
69 | // Generate loaders for standalone style files (outside of .vue)
70 | exports.styleLoaders = function (options) {
71 | const output = []
72 | const loaders = exports.cssLoaders(options)
73 |
74 | for (const extension in loaders) {
75 | const loader = loaders[extension]
76 | output.push({
77 | test: new RegExp('\\.' + extension + '$'),
78 | use: loader
79 | })
80 | }
81 |
82 | return output
83 | }
84 |
85 | exports.createNotifierCallback = () => {
86 | const notifier = require('node-notifier')
87 |
88 | return (severity, errors) => {
89 | if (severity !== 'error') return
90 |
91 | const error = errors[0]
92 | const filename = error.file && error.file.split('!').pop()
93 |
94 | notifier.notify({
95 | title: packageConfig.name,
96 | message: severity + ': ' + error.name,
97 | subtitle: filename || '',
98 | icon: path.join(__dirname, 'logo.png')
99 | })
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/build/vue-loader.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('./utils')
3 | const config = require('../config')
4 | const isProduction = process.env.NODE_ENV === 'production'
5 | const sourceMapEnabled = isProduction
6 | ? config.build.productionSourceMap
7 | : config.dev.cssSourceMap
8 |
9 | module.exports = {
10 | loaders: utils.cssLoaders({
11 | sourceMap: sourceMapEnabled,
12 | extract: isProduction
13 | }),
14 | cssSourceMap: sourceMapEnabled,
15 | cacheBusting: config.dev.cacheBusting,
16 | transformToRequire: {
17 | video: ['src', 'poster'],
18 | source: 'src',
19 | img: 'src',
20 | image: 'xlink:href'
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/build/webpack.base.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const utils = require('./utils')
4 | const config = require('../config')
5 | const vueLoaderConfig = require('./vue-loader.conf')
6 |
7 | function resolve (dir) {
8 | return path.join(__dirname, '..', dir)
9 | }
10 |
11 |
12 |
13 | module.exports = {
14 | context: path.resolve(__dirname, '../'),
15 | entry: {
16 | app: './src/main.js'
17 | },
18 | output: {
19 | path: config.build.assetsRoot,
20 | filename: '[name].js',
21 | publicPath: process.env.NODE_ENV === 'production'
22 | ? config.build.assetsPublicPath
23 | : config.dev.assetsPublicPath
24 | },
25 | resolve: {
26 | extensions: ['.js', '.vue', '.json'],
27 | alias: {
28 | 'vue$': 'vue/dist/vue.esm.js',
29 | '@': resolve('src'),
30 | }
31 | },
32 | module: {
33 | rules: [
34 | {
35 | test: /\.vue$/,
36 | loader: 'vue-loader',
37 | options: vueLoaderConfig
38 | },
39 | {
40 | test: /\.js$/,
41 | loader: 'babel-loader',
42 | include: [resolve('src'), resolve('test')]
43 | },
44 | {
45 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
46 | loader: 'url-loader',
47 | options: {
48 | limit: 10000,
49 | name: utils.assetsPath('img/[name].[hash:7].[ext]')
50 | }
51 | },
52 | {
53 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
54 | loader: 'url-loader',
55 | options: {
56 | limit: 10000,
57 | name: utils.assetsPath('media/[name].[hash:7].[ext]')
58 | }
59 | },
60 | {
61 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
62 | loader: 'url-loader',
63 | options: {
64 | limit: 10000,
65 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
66 | }
67 | }
68 | ]
69 | },
70 | node: {
71 | // prevent webpack from injecting useless setImmediate polyfill because Vue
72 | // source contains it (although only uses it if it's native).
73 | setImmediate: false,
74 | // prevent webpack from injecting mocks to Node native modules
75 | // that does not make sense for the client
76 | dgram: 'empty',
77 | fs: 'empty',
78 | net: 'empty',
79 | tls: 'empty',
80 | child_process: 'empty'
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/build/webpack.dev.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('./utils')
3 | const webpack = require('webpack')
4 | const config = require('../config')
5 | const merge = require('webpack-merge')
6 | const baseWebpackConfig = require('./webpack.base.conf')
7 | const HtmlWebpackPlugin = require('html-webpack-plugin')
8 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
9 | const portfinder = require('portfinder')
10 |
11 | const HOST = process.env.HOST
12 | const PORT = process.env.PORT && Number(process.env.PORT)
13 |
14 | const devWebpackConfig = merge(baseWebpackConfig, {
15 | module: {
16 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
17 | },
18 | // cheap-module-eval-source-map is faster for development
19 | devtool: config.dev.devtool,
20 |
21 | // these devServer options should be customized in /config/index.js
22 | devServer: {
23 | clientLogLevel: 'warning',
24 | historyApiFallback: true,
25 | hot: true,
26 | compress: true,
27 | host: HOST || config.dev.host,
28 | port: PORT || config.dev.port,
29 | open: config.dev.autoOpenBrowser,
30 | overlay: config.dev.errorOverlay
31 | ? { warnings: false, errors: true }
32 | : false,
33 | publicPath: config.dev.assetsPublicPath,
34 | proxy: config.dev.proxyTable,
35 | quiet: true, // necessary for FriendlyErrorsPlugin
36 | watchOptions: {
37 | poll: config.dev.poll,
38 | }
39 | },
40 | plugins: [
41 | new webpack.DefinePlugin({
42 | 'process.env': require('../config/dev.env')
43 | }),
44 | new webpack.HotModuleReplacementPlugin(),
45 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
46 | new webpack.NoEmitOnErrorsPlugin(),
47 | // https://github.com/ampedandwired/html-webpack-plugin
48 | new HtmlWebpackPlugin({
49 | filename: 'index.html',
50 | template: 'index.html',
51 | inject: true
52 | }),
53 | ]
54 | })
55 |
56 | module.exports = new Promise((resolve, reject) => {
57 | portfinder.basePort = process.env.PORT || config.dev.port
58 | portfinder.getPort((err, port) => {
59 | if (err) {
60 | reject(err)
61 | } else {
62 | // publish the new Port, necessary for e2e tests
63 | process.env.PORT = port
64 | // add port to devServer config
65 | devWebpackConfig.devServer.port = port
66 |
67 | // Add FriendlyErrorsPlugin
68 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
69 | compilationSuccessInfo: {
70 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
71 | },
72 | onErrors: config.dev.notifyOnErrors
73 | ? utils.createNotifierCallback()
74 | : undefined
75 | }))
76 |
77 | resolve(devWebpackConfig)
78 | }
79 | })
80 | })
81 |
--------------------------------------------------------------------------------
/build/webpack.prod.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const utils = require('./utils')
4 | const webpack = require('webpack')
5 | const config = require('../config')
6 | const merge = require('webpack-merge')
7 | const baseWebpackConfig = require('./webpack.base.conf')
8 | const CopyWebpackPlugin = require('copy-webpack-plugin')
9 | const HtmlWebpackPlugin = require('html-webpack-plugin')
10 | const ExtractTextPlugin = require('extract-text-webpack-plugin')
11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
13 |
14 | const env = require('../config/prod.env')
15 |
16 | const webpackConfig = merge(baseWebpackConfig, {
17 | module: {
18 | rules: utils.styleLoaders({
19 | sourceMap: config.build.productionSourceMap,
20 | extract: true,
21 | usePostCSS: true
22 | })
23 | },
24 | devtool: config.build.productionSourceMap ? config.build.devtool : false,
25 | output: {
26 | path: config.build.assetsRoot,
27 | filename: utils.assetsPath('js/[name].[chunkhash].js'),
28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
29 | },
30 | plugins: [
31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html
32 | new webpack.DefinePlugin({
33 | 'process.env': env
34 | }),
35 | new UglifyJsPlugin({
36 | uglifyOptions: {
37 | compress: {
38 | warnings: false
39 | }
40 | },
41 | sourceMap: config.build.productionSourceMap,
42 | parallel: true
43 | }),
44 | // extract css into its own file
45 | new ExtractTextPlugin({
46 | filename: utils.assetsPath('css/[name].[contenthash].css'),
47 | // Setting the following option to `false` will not extract CSS from codesplit chunks.
48 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
49 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
50 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
51 | allChunks: true,
52 | }),
53 | // Compress extracted CSS. We are using this plugin so that possible
54 | // duplicated CSS from different components can be deduped.
55 | new OptimizeCSSPlugin({
56 | cssProcessorOptions: config.build.productionSourceMap
57 | ? { safe: true, map: { inline: false } }
58 | : { safe: true }
59 | }),
60 | // generate dist index.html with correct asset hash for caching.
61 | // you can customize output by editing /index.html
62 | // see https://github.com/ampedandwired/html-webpack-plugin
63 | new HtmlWebpackPlugin({
64 | filename: config.build.index,
65 | template: 'index.html',
66 | inject: true,
67 | minify: {
68 | removeComments: true,
69 | collapseWhitespace: true,
70 | removeAttributeQuotes: true
71 | // more options:
72 | // https://github.com/kangax/html-minifier#options-quick-reference
73 | },
74 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin
75 | chunksSortMode: 'dependency'
76 | }),
77 | // keep module.id stable when vender modules does not change
78 | new webpack.HashedModuleIdsPlugin(),
79 | // enable scope hoisting
80 | new webpack.optimize.ModuleConcatenationPlugin(),
81 | // split vendor js into its own file
82 | new webpack.optimize.CommonsChunkPlugin({
83 | name: 'vendor',
84 | minChunks (module) {
85 | // any required modules inside node_modules are extracted to vendor
86 | return (
87 | module.resource &&
88 | /\.js$/.test(module.resource) &&
89 | module.resource.indexOf(
90 | path.join(__dirname, '../node_modules')
91 | ) === 0
92 | )
93 | }
94 | }),
95 | // extract webpack runtime and module manifest to its own file in order to
96 | // prevent vendor hash from being updated whenever app bundle is updated
97 | new webpack.optimize.CommonsChunkPlugin({
98 | name: 'manifest',
99 | minChunks: Infinity
100 | }),
101 | // This instance extracts shared chunks from code splitted chunks and bundles them
102 | // in a separate chunk, similar to the vendor chunk
103 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
104 | new webpack.optimize.CommonsChunkPlugin({
105 | name: 'app',
106 | async: 'vendor-async',
107 | children: true,
108 | minChunks: 3
109 | }),
110 |
111 | // copy custom static assets
112 | new CopyWebpackPlugin([
113 | {
114 | from: path.resolve(__dirname, '../static'),
115 | to: config.build.assetsSubDirectory,
116 | ignore: ['.*']
117 | }
118 | ])
119 | ]
120 | })
121 |
122 | if (config.build.productionGzip) {
123 | const CompressionWebpackPlugin = require('compression-webpack-plugin')
124 |
125 | webpackConfig.plugins.push(
126 | new CompressionWebpackPlugin({
127 | asset: '[path].gz[query]',
128 | algorithm: 'gzip',
129 | test: new RegExp(
130 | '\\.(' +
131 | config.build.productionGzipExtensions.join('|') +
132 | ')$'
133 | ),
134 | threshold: 10240,
135 | minRatio: 0.8
136 | })
137 | )
138 | }
139 |
140 | if (config.build.bundleAnalyzerReport) {
141 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
142 | webpackConfig.plugins.push(new BundleAnalyzerPlugin())
143 | }
144 |
145 | module.exports = webpackConfig
146 |
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | // Template version: 1.2.7
3 | // see http://vuejs-templates.github.io/webpack for documentation.
4 |
5 | const path = require('path')
6 |
7 | module.exports = {
8 | dev: {
9 |
10 | // Paths
11 | assetsSubDirectory: 'static',
12 | assetsPublicPath: '/',
13 | proxyTable: {},
14 |
15 | // Various Dev Server settings
16 | host: 'localhost', // can be overwritten by process.env.HOST
17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
18 | autoOpenBrowser: false,
19 | errorOverlay: true,
20 | notifyOnErrors: true,
21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
22 |
23 |
24 | /**
25 | * Source Maps
26 | */
27 |
28 | // https://webpack.js.org/configuration/devtool/#development
29 | devtool: 'eval-source-map',
30 |
31 | // If you have problems debugging vue-files in devtools,
32 | // set this to false - it *may* help
33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting
34 | cacheBusting: true,
35 |
36 | // CSS Sourcemaps off by default because relative paths are "buggy"
37 | // with this option, according to the CSS-Loader README
38 | // (https://github.com/webpack/css-loader#sourcemaps)
39 | // In our experience, they generally work as expected,
40 | // just be aware of this issue when enabling this option.
41 | cssSourceMap: false,
42 | },
43 |
44 | build: {
45 | // Template for index.html
46 | index: path.resolve(__dirname, '../dist/index.html'),
47 |
48 | // Paths
49 | assetsRoot: path.resolve(__dirname, '../dist'),
50 | assetsSubDirectory: 'static',
51 | assetsPublicPath: '/',
52 |
53 | /**
54 | * Source Maps
55 | */
56 |
57 | productionSourceMap: true,
58 | // https://webpack.js.org/configuration/devtool/#production
59 | devtool: '#source-map',
60 |
61 | // Gzip off by default as many popular static hosts such as
62 | // Surge or Netlify already gzip all static assets for you.
63 | // Before setting to `true`, make sure to:
64 | // npm install --save-dev compression-webpack-plugin
65 | productionGzip: false,
66 | productionGzipExtensions: ['js', 'css'],
67 |
68 | // Run the build command with an extra argument to
69 | // View the bundle analyzer report after build finishes:
70 | // `npm run build --report`
71 | // Set to `true` or `false` to always turn it on or off
72 | bundleAnalyzerReport: process.env.npm_config_report
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | JavaScript Array Explorer
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/docs/static/css/app.da4edb0940c93b0ccf15ba7f997689b5.css:
--------------------------------------------------------------------------------
1 | body,html{margin:0;padding:0;color:#2c3e50;background:#f6f7f7}@font-face{font-family:Gill Sans W04 Book;src:url(/static/fonts/c4be5717-c19c-43a5-9ad3-b548ddf070d4.29d5f41.eot?#iefix);src:url(/static/fonts/c4be5717-c19c-43a5-9ad3-b548ddf070d4.29d5f41.eot?#iefix) format("eot"),url(/static/fonts/4bfd13a9-3195-4d8f-87a9-83a212d18b16.a00cb26.woff2) format("woff2"),url(/static/fonts/63aa9f40-04be-453a-a672-aa8f9919115d.75f4b90.woff) format("woff"),url(/static/fonts/a82a5fb6-ad03-4675-801e-d3182a58ff5f.623b22d.ttf) format("truetype"),url(/static/img/beb2cee2-1a51-44ca-848f-4f795394ee5a.b8d79de.svg#beb2cee2-1a51-44ca-848f-4f795394ee5a) format("svg")}@font-face{font-family:GillSansW01-MediumItali;src:url(/static/fonts/1f6af904-724d-4f75-b836-51c3d674a37e.1748af2.eot?#iefix);src:url(/static/fonts/1f6af904-724d-4f75-b836-51c3d674a37e.1748af2.eot?#iefix) format("eot"),url(/static/fonts/b01b8a8a-cb45-4c4e-b2bb-e5b8853e6fe6.cc06d64.woff2) format("woff2"),url(/static/fonts/3e18b964-7a6f-4828-8e18-5cc698e1051f.c99c69c.woff) format("woff"),url(/static/fonts/a7622e06-0cde-414a-a25d-5e5f6f5bfcaa.6885c19.ttf) format("truetype"),url(/static/img/ca4569d2-e4c3-4dec-8bfe-52712ef6bc31.52c259e.svg#ca4569d2-e4c3-4dec-8bfe-52712ef6bc31) format("svg")}@font-face{font-family:Gill Sans W01 Bold;src:url(/static/fonts/1a6dec8e-26f9-4243-8495-835709538f92.3939ac6.eot?#iefix);src:url(/static/fonts/1a6dec8e-26f9-4243-8495-835709538f92.3939ac6.eot?#iefix) format("eot"),url(/static/fonts/2029e71f-067d-46a8-bc44-b5c64a258928.daa6dec.woff2) format("woff2"),url(/static/fonts/f05272f9-83e3-4de6-8423-5d57f730c87b.fd6b6e9.woff) format("woff"),url(/static/fonts/33f5d8d9-105f-4a49-9351-74ecae7f4a49.32044ed.ttf) format("truetype"),url(/static/img/b56150eb-5caa-4385-b907-373e97ddb2ff.8286231.svg#b56150eb-5caa-4385-b907-373e97ddb2ff) format("svg")}#app{height:100vh;margin:0;padding:0;font-size:19px;letter-spacing:.005em}#app,option,select{font-family:Gill Sans W04 Book,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a:focus,select:focus{outline:1px dashed #ccc}h1,h2,h3,h4,h5{font-family:Gill Sans W01 Bold,Helvetica,Arial,sans-serif}em{font-family:GillSansW01-MediumItali,Helvetica,Arial,sans-serif;font-style:normal;letter-spacing:-.01em}h1{margin-bottom:0}.subtitle{color:#d86f5a;margin-top:0}a,a:active,a:visited{color:#d86f5a;text-decoration:none}body{margin:40px}main{margin-top:60px;width:95%;display:grid;grid-gap:40px;grid-template-columns:1fr 1fr;grid-auto-columns:minmax(500px,auto)}@media screen and (max-width:850px){main{grid-template-columns:1fr}}.usage{margin:35px 0 0}code[data-v-c134480e]{background:#eee;padding:3px 6px;font-size:16px;border-radius:5px;color:#666}div[data-v-0dd77848]{border:1px solid #ccc;margin-top:30px;padding:0 20px;background:#fff;border-radius:5px}h2[data-v-0dd77848]{color:#ce371a}p.desc[data-v-0dd77848]{margin-bottom:0}p.link[data-v-0dd77848]{margin-top:5px}.github-corner:hover .octo-arm[data-v-ba6985fe]{-webkit-animation:octocat-wave-data-v-ba6985fe .56s ease-in-out;animation:octocat-wave-data-v-ba6985fe .56s ease-in-out}@-webkit-keyframes octocat-wave-data-v-ba6985fe{0%,to{-webkit-transform:rotate(0);transform:rotate(0)}20%,60%{-webkit-transform:rotate(-25deg);transform:rotate(-25deg)}40%,80%{-webkit-transform:rotate(10deg);transform:rotate(10deg)}}@keyframes octocat-wave-data-v-ba6985fe{0%,to{-webkit-transform:rotate(0);transform:rotate(0)}20%,60%{-webkit-transform:rotate(-25deg);transform:rotate(-25deg)}40%,80%{-webkit-transform:rotate(10deg);transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm[data-v-ba6985fe]{-webkit-animation:none;animation:none}.github-corner .octo-arm[data-v-ba6985fe]{-webkit-animation:octocat-wave-data-v-ba6985fe .56s ease-in-out;animation:octocat-wave-data-v-ba6985fe .56s ease-in-out}}select[data-v-83802682]{margin-top:8px}.localization-dropdown[data-v-83802682]{position:absolute;right:8%;top:35px;text-align:right}.usage-code{padding:0 20px;margin:20px 0;background:#333;border:2px solid #f55e41;transition:all .2s ease;display:block;border-radius:5px;line-height:1.8em;font-family:monospace}.usage1{color:#aeded4}.usage2 span{color:#ecc2a4}.exampleoutput,.exampleoutput2{display:inline-block;opacity:0}.exampleoutput2 div,.exampleoutput div{opacity:0;-webkit-transform:scale(0);transform:scale(0)}
2 | /*# sourceMappingURL=app.da4edb0940c93b0ccf15ba7f997689b5.css.map */
--------------------------------------------------------------------------------
/docs/static/css/app.da4edb0940c93b0ccf15ba7f997689b5.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["app.da4edb0940c93b0ccf15ba7f997689b5.css"],"names":[],"mappings":"AACA,UAEE,SAAU,AACV,UAAW,AACX,cAAe,AACf,kBAAoB,CACrB,AACD,WACE,+BAAkC,AAClC,+EAAgF,AAChF,kdASkB,CACnB,AACD,WACE,oCAAuC,AACvC,+EAAgF,AAChF,kdASkB,CACnB,AACD,WACE,+BAAkC,AAClC,+EAAgF,AAChF,kdASkB,CACnB,AACD,KAIE,aAAc,AACd,SAAU,AACV,UAAW,AACX,eAAgB,AAChB,qBAAwB,CACzB,AACD,mBATE,0DAAgE,AAChE,mCAAoC,AACpC,iCAAmC,CAYpC,AACD,qBAEE,uBAAyB,CAC1B,AACD,eAKE,yDAAgE,CACjE,AACD,GACE,+DAAqE,AACrE,kBAAmB,AACnB,qBAAwB,CACzB,AACD,GACE,eAAiB,CAClB,AACD,UACE,cAAe,AACf,YAAc,CACf,AACD,qBAGE,cAAe,AACf,oBAAsB,CACvB,AAGD,KACE,WAAa,CACd,AACD,KACE,gBAAiB,AACjB,UAAW,AACX,aAAc,AACd,cAAe,AACf,8BAA+B,AAC/B,oCAAuC,CACxC,AACD,oCACA,KACI,yBAA2B,CAC9B,CACA,AACD,OACE,eAAiB,CAClB,AA2GD,sBACE,gBAAiB,AACjB,gBAAiB,AACjB,eAAgB,AAChB,kBAAmB,AACnB,UAAY,CACb,AAED,qBACE,sBAAuB,AACvB,gBAAiB,AACjB,eAAgB,AAChB,gBAAkB,AAClB,iBAAmB,CACpB,AACD,oBACE,aAAe,CAChB,AACD,wBACE,eAAiB,CAClB,AACD,wBACE,cAAgB,CACjB,AAED,gDACE,gEAAkE,AAC1D,uDAA0D,CACnE,AACD,gDACA,MAEI,4BAA6B,AACrB,mBAAqB,CAChC,AACD,QAEI,iCAAkC,AAC1B,wBAA0B,CACrC,AACD,QAEI,gCAAiC,AACzB,uBAAyB,CACpC,CACA,AACD,wCACA,MAEI,4BAA6B,AACrB,mBAAqB,CAChC,AACD,QAEI,iCAAkC,AAC1B,wBAA0B,CACrC,AACD,QAEI,gCAAiC,AACzB,uBAAyB,CACpC,CACA,AACD,yBACA,gDACI,uBAAwB,AAChB,cAAgB,CAC3B,AACD,0CACI,gEAAkE,AAC1D,uDAA0D,CACrE,CACA,AAED,wBACE,cAAgB,CACjB,AACD,wCACE,kBAAmB,AACnB,SAAU,AACV,SAAU,AACV,gBAAkB,CACnB,AAED,YACE,eAAgB,AAChB,cAAe,AACf,gBAAiB,AACjB,yBAA0B,AAE1B,wBAA0B,AAC1B,cAAe,AACf,kBAAmB,AACnB,kBAAmB,AACnB,qBAAuB,CACxB,AACD,QACE,aAAe,CAChB,AACD,aACE,aAAe,CAChB,AACD,+BAEE,qBAAsB,AACtB,SAAW,CACZ,AACD,uCAEE,UAAW,AACX,2BAA4B,AACpB,kBAAoB,CAC7B","file":"app.da4edb0940c93b0ccf15ba7f997689b5.css","sourcesContent":["\nbody,\nhtml {\n margin: 0;\n padding: 0;\n color: #2c3e50;\n background: #f6f7f7;\n}\n@font-face {\n font-family: 'Gill Sans W04 Book';\n src: url(/static/fonts/c4be5717-c19c-43a5-9ad3-b548ddf070d4.29d5f41.eot?#iefix);\n src: url(/static/fonts/c4be5717-c19c-43a5-9ad3-b548ddf070d4.29d5f41.eot?#iefix)\n format('eot'),\n url(/static/fonts/4bfd13a9-3195-4d8f-87a9-83a212d18b16.a00cb26.woff2)\n format('woff2'),\n url(/static/fonts/63aa9f40-04be-453a-a672-aa8f9919115d.75f4b90.woff)\n format('woff'),\n url(/static/fonts/a82a5fb6-ad03-4675-801e-d3182a58ff5f.623b22d.ttf)\n format('truetype'),\n url(/static/img/beb2cee2-1a51-44ca-848f-4f795394ee5a.b8d79de.svg#beb2cee2-1a51-44ca-848f-4f795394ee5a)\n format('svg');\n}\n@font-face {\n font-family: 'GillSansW01-MediumItali';\n src: url(/static/fonts/1f6af904-724d-4f75-b836-51c3d674a37e.1748af2.eot?#iefix);\n src: url(/static/fonts/1f6af904-724d-4f75-b836-51c3d674a37e.1748af2.eot?#iefix)\n format('eot'),\n url(/static/fonts/b01b8a8a-cb45-4c4e-b2bb-e5b8853e6fe6.cc06d64.woff2)\n format('woff2'),\n url(/static/fonts/3e18b964-7a6f-4828-8e18-5cc698e1051f.c99c69c.woff)\n format('woff'),\n url(/static/fonts/a7622e06-0cde-414a-a25d-5e5f6f5bfcaa.6885c19.ttf)\n format('truetype'),\n url(/static/img/ca4569d2-e4c3-4dec-8bfe-52712ef6bc31.52c259e.svg#ca4569d2-e4c3-4dec-8bfe-52712ef6bc31)\n format('svg');\n}\n@font-face {\n font-family: 'Gill Sans W01 Bold';\n src: url(/static/fonts/1a6dec8e-26f9-4243-8495-835709538f92.3939ac6.eot?#iefix);\n src: url(/static/fonts/1a6dec8e-26f9-4243-8495-835709538f92.3939ac6.eot?#iefix)\n format('eot'),\n url(/static/fonts/2029e71f-067d-46a8-bc44-b5c64a258928.daa6dec.woff2)\n format('woff2'),\n url(/static/fonts/f05272f9-83e3-4de6-8423-5d57f730c87b.fd6b6e9.woff)\n format('woff'),\n url(/static/fonts/33f5d8d9-105f-4a49-9351-74ecae7f4a49.32044ed.ttf)\n format('truetype'),\n url(/static/img/b56150eb-5caa-4385-b907-373e97ddb2ff.8286231.svg#b56150eb-5caa-4385-b907-373e97ddb2ff)\n format('svg');\n}\n#app {\n font-family: 'Gill Sans W04 Book', Helvetica, Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n height: 100vh;\n margin: 0;\n padding: 0;\n font-size: 19px;\n letter-spacing: 0.005em;\n}\nselect,\noption {\n font-family: 'Gill Sans W04 Book', Helvetica, Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\nselect:focus,\na:focus {\n outline: 1px dashed #ccc;\n}\nh1,\nh2,\nh3,\nh4,\nh5 {\n font-family: 'Gill Sans W01 Bold', Helvetica, Arial, sans-serif;\n}\nem {\n font-family: 'GillSansW01-MediumItali', Helvetica, Arial, sans-serif;\n font-style: normal;\n letter-spacing: -0.01em;\n}\nh1 {\n margin-bottom: 0;\n}\n.subtitle {\n color: #d86f5a;\n margin-top: 0;\n}\na,\na:visited,\na:active {\n color: #d86f5a;\n text-decoration: none;\n}\n\n/* -- grid -- */\nbody {\n margin: 40px;\n}\nmain {\n margin-top: 60px;\n width: 95%;\n display: grid;\n grid-gap: 40px;\n grid-template-columns: 1fr 1fr;\n grid-auto-columns: minmax(500px, auto);\n}\n@media screen and (max-width: 850px) {\nmain {\n grid-template-columns: 1fr;\n}\n}\n.usage {\n margin: 35px 0 0;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ncode[data-v-c134480e] {\n background: #eee;\n padding: 3px 6px;\n font-size: 16px;\n border-radius: 5px;\n color: #666;\n}\n\ndiv[data-v-0dd77848] {\n border: 1px solid #ccc;\n margin-top: 30px;\n padding: 0 20px;\n background: white;\n border-radius: 5px;\n}\nh2[data-v-0dd77848] {\n color: #ce371a;\n}\np.desc[data-v-0dd77848] {\n margin-bottom: 0;\n}\np.link[data-v-0dd77848] {\n margin-top: 5px;\n}\n\n.github-corner:hover .octo-arm[data-v-ba6985fe] {\n -webkit-animation: octocat-wave-data-v-ba6985fe 560ms ease-in-out;\n animation: octocat-wave-data-v-ba6985fe 560ms ease-in-out;\n}\n@-webkit-keyframes octocat-wave-data-v-ba6985fe {\n0%,\n 100% {\n -webkit-transform: rotate(0);\n transform: rotate(0);\n}\n20%,\n 60% {\n -webkit-transform: rotate(-25deg);\n transform: rotate(-25deg);\n}\n40%,\n 80% {\n -webkit-transform: rotate(10deg);\n transform: rotate(10deg);\n}\n}\n@keyframes octocat-wave-data-v-ba6985fe {\n0%,\n 100% {\n -webkit-transform: rotate(0);\n transform: rotate(0);\n}\n20%,\n 60% {\n -webkit-transform: rotate(-25deg);\n transform: rotate(-25deg);\n}\n40%,\n 80% {\n -webkit-transform: rotate(10deg);\n transform: rotate(10deg);\n}\n}\n@media (max-width: 500px) {\n.github-corner:hover .octo-arm[data-v-ba6985fe] {\n -webkit-animation: none;\n animation: none;\n}\n.github-corner .octo-arm[data-v-ba6985fe] {\n -webkit-animation: octocat-wave-data-v-ba6985fe 560ms ease-in-out;\n animation: octocat-wave-data-v-ba6985fe 560ms ease-in-out;\n}\n}\n\nselect[data-v-83802682] {\n margin-top: 8px;\n}\n.localization-dropdown[data-v-83802682] {\n position: absolute;\n right: 8%;\n top: 35px;\n text-align: right;\n}\n\n.usage-code {\n padding: 0 20px;\n margin: 20px 0;\n background: #333;\n border: 2px solid #f55e41;\n -webkit-transition: 0.2s all ease;\n transition: 0.2s all ease;\n display: block;\n border-radius: 5px;\n line-height: 1.8em;\n font-family: monospace;\n}\n.usage1 {\n color: #aeded4;\n}\n.usage2 span {\n color: #ecc2a4;\n}\n.exampleoutput,\n.exampleoutput2 {\n display: inline-block;\n opacity: 0;\n}\n.exampleoutput div,\n.exampleoutput2 div {\n opacity: 0;\n -webkit-transform: scale(0);\n transform: scale(0);\n}\n"]}
--------------------------------------------------------------------------------
/docs/static/fonts/1a6dec8e-26f9-4243-8495-835709538f92.3939ac6.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/1a6dec8e-26f9-4243-8495-835709538f92.3939ac6.eot
--------------------------------------------------------------------------------
/docs/static/fonts/1f6af904-724d-4f75-b836-51c3d674a37e.1748af2.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/1f6af904-724d-4f75-b836-51c3d674a37e.1748af2.eot
--------------------------------------------------------------------------------
/docs/static/fonts/2029e71f-067d-46a8-bc44-b5c64a258928.daa6dec.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/2029e71f-067d-46a8-bc44-b5c64a258928.daa6dec.woff2
--------------------------------------------------------------------------------
/docs/static/fonts/33f5d8d9-105f-4a49-9351-74ecae7f4a49.32044ed.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/33f5d8d9-105f-4a49-9351-74ecae7f4a49.32044ed.ttf
--------------------------------------------------------------------------------
/docs/static/fonts/3e18b964-7a6f-4828-8e18-5cc698e1051f.c99c69c.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/3e18b964-7a6f-4828-8e18-5cc698e1051f.c99c69c.woff
--------------------------------------------------------------------------------
/docs/static/fonts/4bfd13a9-3195-4d8f-87a9-83a212d18b16.a00cb26.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/4bfd13a9-3195-4d8f-87a9-83a212d18b16.a00cb26.woff2
--------------------------------------------------------------------------------
/docs/static/fonts/63aa9f40-04be-453a-a672-aa8f9919115d.75f4b90.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/63aa9f40-04be-453a-a672-aa8f9919115d.75f4b90.woff
--------------------------------------------------------------------------------
/docs/static/fonts/a7622e06-0cde-414a-a25d-5e5f6f5bfcaa.6885c19.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/a7622e06-0cde-414a-a25d-5e5f6f5bfcaa.6885c19.ttf
--------------------------------------------------------------------------------
/docs/static/fonts/a82a5fb6-ad03-4675-801e-d3182a58ff5f.623b22d.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/a82a5fb6-ad03-4675-801e-d3182a58ff5f.623b22d.ttf
--------------------------------------------------------------------------------
/docs/static/fonts/b01b8a8a-cb45-4c4e-b2bb-e5b8853e6fe6.cc06d64.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/b01b8a8a-cb45-4c4e-b2bb-e5b8853e6fe6.cc06d64.woff2
--------------------------------------------------------------------------------
/docs/static/fonts/c4be5717-c19c-43a5-9ad3-b548ddf070d4.29d5f41.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/c4be5717-c19c-43a5-9ad3-b548ddf070d4.29d5f41.eot
--------------------------------------------------------------------------------
/docs/static/fonts/f05272f9-83e3-4de6-8423-5d57f730c87b.fd6b6e9.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/docs/static/fonts/f05272f9-83e3-4de6-8423-5d57f730c87b.fd6b6e9.woff
--------------------------------------------------------------------------------
/docs/static/js/manifest.2ae2e69a05c33dfc65f8.js:
--------------------------------------------------------------------------------
1 | !function(r){var n=window.webpackJsonp;window.webpackJsonp=function(e,u,c){for(var f,i,p,a=0,l=[];a
2 |
3 |
4 |
5 |
6 |
7 |
8 | JavaScript Array Explorer
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "array-explorer",
3 | "version": "1.0.0",
4 | "description": "A resource to help figure out what array method would be best to use at any given time",
5 | "author": "sdras ",
6 | "private": true,
7 | "scripts": {
8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
9 | "start": "npm run dev",
10 | "build": "node build/build.js"
11 | },
12 | "dependencies": {
13 | "gsap": "^1.20.6",
14 | "vue": "^2.5.21",
15 | "vue-prism": "^1.0.5",
16 | "vuex": "^3.0.1",
17 | "vuex-i18n": "^1.11.0"
18 | },
19 | "devDependencies": {
20 | "autoprefixer": "^7.2.6",
21 | "babel-core": "^6.26.3",
22 | "babel-helper-vue-jsx-merge-props": "^2.0.3",
23 | "babel-loader": "^7.1.5",
24 | "babel-plugin-syntax-jsx": "^6.18.0",
25 | "babel-plugin-transform-runtime": "^6.22.0",
26 | "babel-plugin-transform-vue-jsx": "^3.7.0",
27 | "babel-preset-env": "^1.7.0",
28 | "babel-preset-stage-2": "^6.22.0",
29 | "chalk": "^2.4.2",
30 | "copy-webpack-plugin": "^4.6.0",
31 | "css-loader": "^0.28.11",
32 | "extract-text-webpack-plugin": "^3.0.0",
33 | "file-loader": "^1.1.11",
34 | "friendly-errors-webpack-plugin": "^1.7.0",
35 | "html-webpack-plugin": "^2.30.1",
36 | "node-notifier": "^5.3.0",
37 | "optimize-css-assets-webpack-plugin": "^3.2.0",
38 | "ora": "^1.4.0",
39 | "portfinder": "^1.0.20",
40 | "postcss-import": "^11.1.0",
41 | "postcss-loader": "^2.1.6",
42 | "rimraf": "^2.6.3",
43 | "semver": "^5.6.0",
44 | "shelljs": "^0.7.6",
45 | "uglifyjs-webpack-plugin": "^1.3.0",
46 | "url-loader": "^0.5.8",
47 | "vue-loader": "^13.7.3",
48 | "vue-style-loader": "^3.1.2",
49 | "vue-template-compiler": "^2.5.21",
50 | "webpack": "^3.12.0",
51 | "webpack-bundle-analyzer": "^3.3.2",
52 | "webpack-dev-server": "^3.1.11",
53 | "webpack-merge": "^4.2.1"
54 | },
55 | "engines": {
56 | "node": ">= 4.0.0",
57 | "npm": ">= 3.0.0"
58 | },
59 | "browserslist": [
60 | "> 1%",
61 | "last 2 versions",
62 | "not ie <= 8"
63 | ]
64 | }
65 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | JavaScript Array Explorer
8 | Find the array method you need without digging through the docs
9 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
34 |
35 |
164 |
--------------------------------------------------------------------------------
/src/assets/Fonts/1a6dec8e-26f9-4243-8495-835709538f92.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/1a6dec8e-26f9-4243-8495-835709538f92.eot
--------------------------------------------------------------------------------
/src/assets/Fonts/1f6af904-724d-4f75-b836-51c3d674a37e.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/1f6af904-724d-4f75-b836-51c3d674a37e.eot
--------------------------------------------------------------------------------
/src/assets/Fonts/2029e71f-067d-46a8-bc44-b5c64a258928.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/2029e71f-067d-46a8-bc44-b5c64a258928.woff2
--------------------------------------------------------------------------------
/src/assets/Fonts/33f5d8d9-105f-4a49-9351-74ecae7f4a49.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/33f5d8d9-105f-4a49-9351-74ecae7f4a49.ttf
--------------------------------------------------------------------------------
/src/assets/Fonts/3e18b964-7a6f-4828-8e18-5cc698e1051f.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/3e18b964-7a6f-4828-8e18-5cc698e1051f.woff
--------------------------------------------------------------------------------
/src/assets/Fonts/4bfd13a9-3195-4d8f-87a9-83a212d18b16.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/4bfd13a9-3195-4d8f-87a9-83a212d18b16.woff2
--------------------------------------------------------------------------------
/src/assets/Fonts/63aa9f40-04be-453a-a672-aa8f9919115d.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/63aa9f40-04be-453a-a672-aa8f9919115d.woff
--------------------------------------------------------------------------------
/src/assets/Fonts/a7622e06-0cde-414a-a25d-5e5f6f5bfcaa.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/a7622e06-0cde-414a-a25d-5e5f6f5bfcaa.ttf
--------------------------------------------------------------------------------
/src/assets/Fonts/a82a5fb6-ad03-4675-801e-d3182a58ff5f.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/a82a5fb6-ad03-4675-801e-d3182a58ff5f.ttf
--------------------------------------------------------------------------------
/src/assets/Fonts/b01b8a8a-cb45-4c4e-b2bb-e5b8853e6fe6.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/b01b8a8a-cb45-4c4e-b2bb-e5b8853e6fe6.woff2
--------------------------------------------------------------------------------
/src/assets/Fonts/c4be5717-c19c-43a5-9ad3-b548ddf070d4.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/c4be5717-c19c-43a5-9ad3-b548ddf070d4.eot
--------------------------------------------------------------------------------
/src/assets/Fonts/f05272f9-83e3-4de6-8423-5d57f730c87b.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/src/assets/Fonts/f05272f9-83e3-4de6-8423-5d57f730c87b.woff
--------------------------------------------------------------------------------
/src/components/AppCode.vue:
--------------------------------------------------------------------------------
1 |
2 |
26 |
27 |
28 |
125 |
126 |
159 |
--------------------------------------------------------------------------------
/src/components/AppGithubCorner.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/AppMethodPrimary.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
103 |
104 |
107 |
--------------------------------------------------------------------------------
/src/components/LocaleSwitcher.vue:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
30 |
31 |
43 |
--------------------------------------------------------------------------------
/src/components/methods/MethodBase.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
20 |
21 |
22 |
43 |
--------------------------------------------------------------------------------
/src/components/methods/MethodChoice.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
13 | Array.{{selected.name}}
14 | Array.{{selected.name}}()
15 |
16 |
17 |
18 |
19 |
20 |
55 |
56 |
65 |
--------------------------------------------------------------------------------
/src/locale/ar/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'لدي مجموعة، أود',
3 | findMethod: 'أحاول أن أجد',
4 | methodOptions: 'أنا بحاجة لــ',
5 | methodTypes: {
6 | add: 'إضافة',
7 | remove: 'إزالة',
8 | find: 'بحث',
9 | 'iterate by': 'يتكرر من قبل',
10 | string: ' سلسلة'
11 | },
12 | singleItem: 'عنصر واحد',
13 | manyItems: 'واحد أو العديد من العناصر',
14 | primaryOptions: [
15 | 'إضافة عناصر أو صفائف أخرى',
16 | 'إزالة العناصر',
17 | 'العثور على العناصر',
18 | 'المشي على العناصر',
19 | 'إرجاع سلسلة',
20 | 'ترتيب مصفوفة',
21 | 'شيء آخر'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/bg/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Имам масив, бих искал да', // I have an array, I would like to
3 | findMethod: 'Опитвам се да намеря', // I'm trying to find
4 | methodOptions: 'Tрябва да',
5 | methodTypes: {
6 | add: 'добавя',
7 | remove: 'премахна',
8 | find: 'намеря',
9 | 'iterate by': 'обходя',
10 | string: 'низ'
11 | },
12 | singleItem: 'един елемент', // one item
13 | manyItems: 'един или много елементи', // one or many items
14 | primaryOptions: [
15 | 'добавя елементи или други масиви', // add items or other arrays
16 | 'премахна елементи', // remove items
17 | 'намеря елементи', // find items
18 | 'премина през елементите', // walk over items
19 | 'върна низ', // return a string
20 | 'сортирам масив', // order an array
21 | 'нещо друго' // something else
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/cz/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Mám pole a chci',
3 | findMethod: "Snažím se najít",
4 | methodOptions: 'Potřebuji',
5 | methodTypes: {
6 | add: 'přidat',
7 | remove: 'odebrat',
8 | find: 'nalézt',
9 | 'iterate by': 'projít pomocí',
10 | 'string': 'řetězec'
11 | },
12 | singleItem: 'jeden prvek',
13 | manyItems: 'jeden nebo více prvků',
14 | primaryOptions: [
15 | 'přidat prvky nebo jiná pole',
16 | 'odebrat prvky',
17 | 'najít prvky',
18 | 'projít prvky',
19 | 'vrátit řetězec',
20 | 'seřadit pole',
21 | 'něco jiného'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/de/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Ich habe ein Array und würde gerne', //'I have an array, I would like to',
3 | findMethod: 'Ich möchte', // "I'm trying to find"
4 | methodOptions: 'Ich muss',
5 | methodTypes: {
6 | add: '',
7 | remove: '',
8 | find: '',
9 | 'iterate by': '',
10 | 'string': 'String zurückgeben'
11 | },
12 | singleItem: 'ein Element finden', // 'one item',
13 | manyItems: 'ein oder mehrere Elemente finden', // 'one or many items',
14 | primaryOptions: [
15 | 'Elemente oder Arrays hinzufügen', // ich würde gerne i would like to ... add items or other arrays
16 | 'Elemente entfernen',
17 | 'Elemente finden',
18 | 'Elemente durchlaufen',
19 | 'einen String zurückgeben',
20 | 'ein Array sortieren',
21 | 'etwas anderes machen'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/el/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Έχω έναν πίνακα, θα ήθελα να',
3 | findMethod: "Προσπαθώ να βρω",
4 | methodOptions: 'Θέλω να',
5 | methodTypes: {
6 | add: 'προσθέσω',
7 | remove: 'αφαιρέσω',
8 | find: 'βρω',
9 | 'iterate by': '',
10 | 'string': 'αλφαριθμητικό'
11 | },
12 | singleItem: 'ένα στοιχείο',
13 | manyItems: 'ένα ή περισσότερα στοιχεία',
14 | primaryOptions: [
15 | 'προσθέσω στοιχεία ή άλλους πίνακες',
16 | 'αφαιρέσω στοιχεία',
17 | 'βρω στοιχεία',
18 | 'διατρέξω τα στοιχεία',
19 | 'επιστρέψω έναν πίνακα',
20 | 'ταξινομήσω τον πίνακα',
21 | 'κάτι διαφορετικό'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/en/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'I have an array, I would like to',
3 | findMethod: "I'm trying to find",
4 | methodOptions: 'I need to',
5 | methodTypes: {
6 | add: 'add',
7 | remove: 'remove',
8 | find: 'find',
9 | 'iterate by': 'iterate by',
10 | 'string': 'string'
11 | },
12 | singleItem: 'one item',
13 | manyItems: 'one or many items',
14 | primaryOptions: [
15 | 'add items or other arrays',
16 | 'remove items',
17 | 'find items',
18 | 'walk over items',
19 | 'return a string',
20 | 'order an array',
21 | 'something else'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/es/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Tengo un array, me gustaría',
3 | findMethod: "Estoy intentando encontrar",
4 | methodOptions: 'Necesito que',
5 | methodTypes: {
6 | add: 'agregar',
7 | remove: 'eliminar',
8 | find: 'buscar',
9 | 'iterate by': 'iterar con',
10 | 'string': 'Cadena de caracteres'
11 | },
12 | singleItem: 'un elemento',
13 | manyItems: 'uno o mas elementos',
14 | primaryOptions: [
15 | 'agregar elementos u otros arrays',
16 | 'eliminar elementos',
17 | 'buscar elementos',
18 | 'pasar entre elementos',
19 | 'devolver una cadena de caracteres',
20 | 'ordenar un array',
21 | 'cualquier otra cosa'
22 | ]
23 | // other text can be added here
24 | }
--------------------------------------------------------------------------------
/src/locale/fi/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Minulla on taulukko, haluan',
3 | findMethod: 'Yritän löytää',
4 | methodOptions: 'haluan',
5 | methodTypes: {
6 | add: 'lisätä',
7 | remove: 'poistaa',
8 | find: 'selvittää',
9 | 'iterate by': 'iteroida',
10 | string: 'string',
11 | },
12 | singleItem: 'yhden alkion/arvon',
13 | manyItems: 'yhden tai useamman alkion/arvon',
14 | primaryOptions: [
15 | 'lisätä alkioita tai muita taulukoita',
16 | 'poistaa alkioita',
17 | 'löytää alkioita',
18 | 'iteroida alkioita',
19 | 'palauttaa merkkijonon',
20 | 'järjestää taulukon',
21 | 'tehdä jotain muuta',
22 | ],
23 | // other text can be added here
24 | };
25 |
--------------------------------------------------------------------------------
/src/locale/fr/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'J\'ai un tableau, je voudrais',
3 | findMethod: 'J\'essaye de trouver',
4 | methodOptions: 'J\'ai besoin',
5 | methodTypes: {
6 | add: 'd\'ajouter',
7 | remove: 'de supprimer',
8 | find: 'de chercher',
9 | 'iterate by': 'd\'itérer en',
10 | 'string': 'chaîne de caractères'
11 | },
12 | singleItem: 'un élément',
13 | manyItems: 'un ou plusieurs éléments',
14 | primaryOptions: [
15 | 'ajouter des éléments',
16 | 'supprimer des éléments',
17 | 'chercher des éléments',
18 | 'parcourir les éléments',
19 | 'retourner une chaîne de caractères',
20 | 'trier les éléments',
21 | 'faire autre chose'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/id/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Saya mempunyai array, saya ingin',
3 | findMethod: "Saya ingin mencari",
4 | methodOptions: 'Saya perlu untuk',
5 | methodTypes: {
6 | add: 'menambah',
7 | remove: 'menghapus',
8 | find: 'menemukan',
9 | 'iterate by': 'melakukan iterasi dengan',
10 | 'string': 'string'
11 | },
12 | singleItem: 'sebuah item',
13 | manyItems: 'satu atau banyak item',
14 | primaryOptions: [
15 | 'menambah item atau array lain',
16 | 'menghilangkan item',
17 | 'menemukan item',
18 | 'melakukan iterasi terhadap item',
19 | 'mengembalikan sebuah string',
20 | 'mengurutkan sebuah array',
21 | 'lainnya'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/it/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Ho un array e vorrei',
3 | findMethod: 'Sto cercando',
4 | methodOptions: 'Voglio',
5 | methodTypes: {
6 | add: 'aggiungere',
7 | remove: 'togliere',
8 | find: 'trovare',
9 | 'iterate by': '',
10 | 'string': ''
11 | },
12 | singleItem: 'un elemento',
13 | manyItems: 'uno o più elementi',
14 | primaryOptions: [
15 | 'aggiungere elementi o altri array',
16 | 'rimuovere elementi',
17 | 'cercare uno o più valori',
18 | 'visitarne gli elementi',
19 | 'generare una stringa',
20 | 'riordinarlo',
21 | 'fare qualcos\'altro'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/ja/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: '配列に対し、私は',
3 | findMethod: "右記を対象に: ",
4 | methodOptions: '次のことをやりたいです: ',
5 | methodTypes: {
6 | add: '',
7 | remove: '',
8 | find: '',
9 | 'iterate by': '',
10 | 'string': ''
11 | },
12 | singleItem: '一つの要素',
13 | manyItems: '一つ以上の要素',
14 | primaryOptions: [
15 | '要素または他の配列を追加して',
16 | '要素を削除して',
17 | '要素を検索して',
18 | '繰り返し処理で',
19 | '文字列の取得で',
20 | '配列を並べ替えて',
21 | 'その他の処理で'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/nl/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Ik heb een array, ik wil graag',
3 | findMethod: "Ik ben op zoek naar",
4 | methodOptions: 'Ik moet',
5 | methodTypes: {
6 | add: 'toevoegen',
7 | remove: 'verwijderen',
8 | find: 'zoeken',
9 | 'iterate by': 'itereren door',
10 | 'string': 'string'
11 | },
12 | singleItem: 'een enkel element',
13 | manyItems: 'een of meerdere elementen',
14 | primaryOptions: [
15 | 'een element of een andere array toevoegen',
16 | 'elementen verwijderen',
17 | 'elementen zoeken',
18 | 'door elementen heen loopen',
19 | 'een string teruggeven',
20 | 'een array ordenen',
21 | 'iets anders'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/pt/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Eu tenho um array e gostaria de:',
3 | findMethod: "Eu estou tentando encontrar",
4 | methodOptions: 'Eu preciso',
5 | methodTypes: {
6 | add: 'adicionar',
7 | remove: 'remover',
8 | find: 'procurar',
9 | 'iterate by': 'iterar',
10 | 'string': 'string'
11 | },
12 | singleItem: 'um item',
13 | manyItems: 'um ou mais itens',
14 | primaryOptions: [
15 | 'adicionar um item ou outro array',
16 | 'remover itens',
17 | 'procurar itens',
18 | 'iterar sobre os itens',
19 | 'retornar uma string',
20 | 'ordernar os itens',
21 | 'nenhuma das opções'
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/locale/ru/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'У меня есть массив, я хотел бы',
3 | findMethod: 'Я пытаюсь найти',
4 | methodOptions: 'Мне нужно',
5 | methodTypes: {
6 | add: 'добавить',
7 | remove: 'удалить',
8 | find: 'найти',
9 | 'iterate by': 'пройти',
10 | 'string': 'строка'
11 | },
12 | singleItem: 'один элемент',
13 | manyItems: 'один или более элементов',
14 | primaryOptions: [
15 | 'добавить элементы или другие массивы',
16 | 'удалить элементы',
17 | 'найти элементы',
18 | 'пройти по элементам',
19 | 'получить строку',
20 | 'упорядочить массив',
21 | 'другое'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/sr/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Imam niz, želeo/la bih da',
3 | findMethod: "Pokušavam da pronađem",
4 | methodOptions: 'Želeo/la bih',
5 | methodTypes: {
6 | add: 'da dodam',
7 | remove: 'da uklonim',
8 | find: 'da pronađem',
9 | 'iterate by': 'iteriram po',
10 | 'string': 'string'
11 | },
12 | singleItem: 'jednom elementu',
13 | manyItems: 'jednom ili više elemenata',
14 | primaryOptions: [
15 | 'dodam elemente ili druge nizove',
16 | 'uklonim elemente',
17 | 'pronađem elemente',
18 | 'pređem preko elemenata',
19 | 'vratim string',
20 | 'sortiram niz',
21 | 'nešto drugo'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/tr/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'Elimde bir dizim var, Bununla şunu yapmak istiyorum: ',
3 | findMethod: "Şunu bulmaya çalışıyorum: ",
4 | methodOptions: 'Diziyle yapacağım şey, ',
5 | methodTypes: {
6 | add: 'ekleme işlemi',
7 | remove: 'silme işlemi',
8 | find: 'arama işlemi',
9 | 'iterate by': 'tekrarla',
10 | 'string': 'string'
11 | },
12 | singleItem: 'tek eleman',
13 | manyItems: 'tek veya daha fazla eleman',
14 | primaryOptions: [
15 | 'eleman eklemek',
16 | 'eleman silmek',
17 | 'eleman aramak',
18 | 'elemanlar üzerinden işlem yapmak',
19 | 'geriye string döndürmek',
20 | 'diziyi sıralamak',
21 | 'başka bir şey'
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/src/locale/ua/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: 'У мене є масив, я хотів би',
3 | findMethod: "Я намагаюсь знайти",
4 | methodOptions: 'Мені потрібно',
5 | methodTypes: {
6 | add: 'додати',
7 | remove: 'remove',
8 | find: 'видалити',
9 | 'iterate by': 'ітеруватися',
10 | 'string': 'стрічка'
11 | },
12 | singleItem: 'один елемент',
13 | manyItems: 'один чи більше елементів',
14 | primaryOptions: [
15 | 'додати елементи або інші масиви',
16 | 'видалити елементи',
17 | 'знайти елементи',
18 | 'пройти по елементам',
19 | 'повернути рядок',
20 | 'сортувати масив',
21 | 'інше'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/locale/zh_cn/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | firstMethod: '我有一个数组,我想',
3 | findMethod: '我想查找',
4 | methodOptions: '我需要',
5 | methodTypes: {
6 | add: '添加',
7 | remove: '移除',
8 | find: '查找',
9 | 'iterate by': '',
10 | 'string': '字符串'
11 | },
12 | singleItem: '一个元素',
13 | manyItems: '一个或多个元素',
14 | primaryOptions: [
15 | '添加元素或别的数组',
16 | '移除元素',
17 | '查找元素',
18 | '对每个元素进行操作',
19 | '返回字符串',
20 | '对数组排序',
21 | '其它'
22 | ]
23 | // other text can be added here
24 | }
25 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | // The Vue build version to load with the `import` command
2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3 | import Vue from 'vue'
4 | import App from './App'
5 | import { store } from './../store/index'
6 | import VuePrism from 'vue-prism'
7 |
8 | Vue.use(VuePrism)
9 |
10 | Vue.config.productionTip = false
11 |
12 | /* eslint-disable no-new */
13 | new Vue({
14 | el: '#app',
15 | store,
16 | template: '',
17 | components: { App }
18 | })
19 |
--------------------------------------------------------------------------------
/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdras/array-explorer/9941fc89f7055a570aea582ba5543c90fe94d266/static/.gitkeep
--------------------------------------------------------------------------------
/static/normalize.css:
--------------------------------------------------------------------------------
1 | /*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
2 |
3 | /* Document
4 | ========================================================================== */
5 |
6 | /**
7 | * 1. Correct the line height in all browsers.
8 | * 2. Prevent adjustments of font size after orientation changes in
9 | * IE on Windows Phone and in iOS.
10 | */
11 |
12 | html {
13 | line-height: 1.15; /* 1 */
14 | -ms-text-size-adjust: 100%; /* 2 */
15 | -webkit-text-size-adjust: 100%; /* 2 */
16 | }
17 |
18 | /* Sections
19 | ========================================================================== */
20 |
21 | /**
22 | * Remove the margin in all browsers (opinionated).
23 | */
24 |
25 | body {
26 | margin: 0;
27 | }
28 |
29 | /**
30 | * Add the correct display in IE 9-.
31 | */
32 |
33 | article,
34 | aside,
35 | footer,
36 | header,
37 | nav,
38 | section {
39 | display: block;
40 | }
41 |
42 | /**
43 | * Correct the font size and margin on `h1` elements within `section` and
44 | * `article` contexts in Chrome, Firefox, and Safari.
45 | */
46 |
47 | h1 {
48 | font-size: 2em;
49 | margin: 0.67em 0;
50 | }
51 |
52 | /* Grouping content
53 | ========================================================================== */
54 |
55 | /**
56 | * Add the correct display in IE 9-.
57 | * 1. Add the correct display in IE.
58 | */
59 |
60 | figcaption,
61 | figure,
62 | main {
63 | /* 1 */
64 | display: block;
65 | }
66 |
67 | /**
68 | * Add the correct margin in IE 8.
69 | */
70 |
71 | figure {
72 | margin: 1em 40px;
73 | }
74 |
75 | /**
76 | * 1. Add the correct box sizing in Firefox.
77 | * 2. Show the overflow in Edge and IE.
78 | */
79 |
80 | hr {
81 | box-sizing: content-box; /* 1 */
82 | height: 0; /* 1 */
83 | overflow: visible; /* 2 */
84 | }
85 |
86 | /**
87 | * 1. Correct the inheritance and scaling of font size in all browsers.
88 | * 2. Correct the odd `em` font sizing in all browsers.
89 | */
90 |
91 | pre {
92 | font-family: monospace, monospace; /* 1 */
93 | font-size: 1em; /* 2 */
94 | }
95 |
96 | /* Text-level semantics
97 | ========================================================================== */
98 |
99 | /**
100 | * 1. Remove the gray background on active links in IE 10.
101 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
102 | */
103 |
104 | a {
105 | background-color: transparent; /* 1 */
106 | -webkit-text-decoration-skip: objects; /* 2 */
107 | }
108 |
109 | /**
110 | * 1. Remove the bottom border in Chrome 57- and Firefox 39-.
111 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
112 | */
113 |
114 | abbr[title] {
115 | border-bottom: none; /* 1 */
116 | text-decoration: underline; /* 2 */
117 | text-decoration: underline dotted; /* 2 */
118 | }
119 |
120 | /**
121 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
122 | */
123 |
124 | b,
125 | strong {
126 | font-weight: inherit;
127 | }
128 |
129 | /**
130 | * Add the correct font weight in Chrome, Edge, and Safari.
131 | */
132 |
133 | b,
134 | strong {
135 | font-weight: bolder;
136 | }
137 |
138 | /**
139 | * 1. Correct the inheritance and scaling of font size in all browsers.
140 | * 2. Correct the odd `em` font sizing in all browsers.
141 | */
142 |
143 | code,
144 | kbd,
145 | samp {
146 | font-family: monospace, monospace; /* 1 */
147 | font-size: 1em; /* 2 */
148 | }
149 |
150 | /**
151 | * Add the correct font style in Android 4.3-.
152 | */
153 |
154 | dfn {
155 | font-style: italic;
156 | }
157 |
158 | /**
159 | * Add the correct background and color in IE 9-.
160 | */
161 |
162 | mark {
163 | background-color: #ff0;
164 | color: #000;
165 | }
166 |
167 | /**
168 | * Add the correct font size in all browsers.
169 | */
170 |
171 | small {
172 | font-size: 80%;
173 | }
174 |
175 | /**
176 | * Prevent `sub` and `sup` elements from affecting the line height in
177 | * all browsers.
178 | */
179 |
180 | sub,
181 | sup {
182 | font-size: 75%;
183 | line-height: 0;
184 | position: relative;
185 | vertical-align: baseline;
186 | }
187 |
188 | sub {
189 | bottom: -0.25em;
190 | }
191 |
192 | sup {
193 | top: -0.5em;
194 | }
195 |
196 | /* Embedded content
197 | ========================================================================== */
198 |
199 | /**
200 | * Add the correct display in IE 9-.
201 | */
202 |
203 | audio,
204 | video {
205 | display: inline-block;
206 | }
207 |
208 | /**
209 | * Add the correct display in iOS 4-7.
210 | */
211 |
212 | audio:not([controls]) {
213 | display: none;
214 | height: 0;
215 | }
216 |
217 | /**
218 | * Remove the border on images inside links in IE 10-.
219 | */
220 |
221 | img {
222 | border-style: none;
223 | }
224 |
225 | /**
226 | * Hide the overflow in IE.
227 | */
228 |
229 | svg:not(:root) {
230 | overflow: hidden;
231 | }
232 |
233 | /* Forms
234 | ========================================================================== */
235 |
236 | /**
237 | * 1. Change the font styles in all browsers (opinionated).
238 | * 2. Remove the margin in Firefox and Safari.
239 | */
240 |
241 | button,
242 | input,
243 | optgroup,
244 | select,
245 | textarea {
246 | font-family: sans-serif; /* 1 */
247 | font-size: 100%; /* 1 */
248 | line-height: 1.15; /* 1 */
249 | margin: 0; /* 2 */
250 | }
251 |
252 | /**
253 | * Show the overflow in IE.
254 | * 1. Show the overflow in Edge.
255 | */
256 |
257 | button,
258 | input {
259 | /* 1 */
260 | overflow: visible;
261 | }
262 |
263 | /**
264 | * Remove the inheritance of text transform in Edge, Firefox, and IE.
265 | * 1. Remove the inheritance of text transform in Firefox.
266 | */
267 |
268 | button,
269 | select {
270 | /* 1 */
271 | text-transform: none;
272 | }
273 |
274 | /**
275 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
276 | * controls in Android 4.
277 | * 2. Correct the inability to style clickable types in iOS and Safari.
278 | */
279 |
280 | button,
281 | html [type='button'],
282 | /* 1 */ [type='reset'],
283 | [type='submit'] {
284 | -webkit-appearance: button; /* 2 */
285 | }
286 |
287 | /**
288 | * Remove the inner border and padding in Firefox.
289 | */
290 |
291 | button::-moz-focus-inner,
292 | [type='button']::-moz-focus-inner,
293 | [type='reset']::-moz-focus-inner,
294 | [type='submit']::-moz-focus-inner {
295 | border-style: none;
296 | padding: 0;
297 | }
298 |
299 | /**
300 | * Restore the focus styles unset by the previous rule.
301 | */
302 |
303 | button:-moz-focusring,
304 | [type='button']:-moz-focusring,
305 | [type='reset']:-moz-focusring,
306 | [type='submit']:-moz-focusring {
307 | outline: 1px dotted ButtonText;
308 | }
309 |
310 | /**
311 | * Correct the padding in Firefox.
312 | */
313 |
314 | fieldset {
315 | padding: 0.35em 0.75em 0.625em;
316 | }
317 |
318 | /**
319 | * 1. Correct the text wrapping in Edge and IE.
320 | * 2. Correct the color inheritance from `fieldset` elements in IE.
321 | * 3. Remove the padding so developers are not caught out when they zero out
322 | * `fieldset` elements in all browsers.
323 | */
324 |
325 | legend {
326 | box-sizing: border-box; /* 1 */
327 | color: inherit; /* 2 */
328 | display: table; /* 1 */
329 | max-width: 100%; /* 1 */
330 | padding: 0; /* 3 */
331 | white-space: normal; /* 1 */
332 | }
333 |
334 | /**
335 | * 1. Add the correct display in IE 9-.
336 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
337 | */
338 |
339 | progress {
340 | display: inline-block; /* 1 */
341 | vertical-align: baseline; /* 2 */
342 | }
343 |
344 | /**
345 | * Remove the default vertical scrollbar in IE.
346 | */
347 |
348 | textarea {
349 | overflow: auto;
350 | }
351 |
352 | /**
353 | * 1. Add the correct box sizing in IE 10-.
354 | * 2. Remove the padding in IE 10-.
355 | */
356 |
357 | [type='checkbox'],
358 | [type='radio'] {
359 | box-sizing: border-box; /* 1 */
360 | padding: 0; /* 2 */
361 | }
362 |
363 | /**
364 | * Correct the cursor style of increment and decrement buttons in Chrome.
365 | */
366 |
367 | [type='number']::-webkit-inner-spin-button,
368 | [type='number']::-webkit-outer-spin-button {
369 | height: auto;
370 | }
371 |
372 | /**
373 | * 1. Correct the odd appearance in Chrome and Safari.
374 | * 2. Correct the outline style in Safari.
375 | */
376 |
377 | [type='search'] {
378 | -webkit-appearance: textfield; /* 1 */
379 | outline-offset: -2px; /* 2 */
380 | }
381 |
382 | /**
383 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
384 | */
385 |
386 | [type='search']::-webkit-search-cancel-button,
387 | [type='search']::-webkit-search-decoration {
388 | -webkit-appearance: none;
389 | }
390 |
391 | /**
392 | * 1. Correct the inability to style clickable types in iOS and Safari.
393 | * 2. Change font properties to `inherit` in Safari.
394 | */
395 |
396 | ::-webkit-file-upload-button {
397 | -webkit-appearance: button; /* 1 */
398 | font: inherit; /* 2 */
399 | }
400 |
401 | /* Interactive
402 | ========================================================================== */
403 |
404 | /*
405 | * Add the correct display in IE 9-.
406 | * 1. Add the correct display in Edge, IE, and Firefox.
407 | */
408 |
409 | details,
410 | /* 1 */ menu {
411 | display: block;
412 | }
413 |
414 | /*
415 | * Add the correct display in all browsers.
416 | */
417 |
418 | summary {
419 | display: list-item;
420 | }
421 |
422 | /* Scripting
423 | ========================================================================== */
424 |
425 | /**
426 | * Add the correct display in IE 9-.
427 | */
428 |
429 | canvas {
430 | display: inline-block;
431 | }
432 |
433 | /**
434 | * Add the correct display in IE.
435 | */
436 |
437 | template {
438 | display: none;
439 | }
440 |
441 | /* Hidden
442 | ========================================================================== */
443 |
444 | /**
445 | * Add the correct display in IE 10-.
446 | */
447 |
448 | [hidden] {
449 | display: none;
450 | }
451 |
--------------------------------------------------------------------------------
/store/ar/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | selectedMethod: '',
4 | adding: [
5 | {
6 | name: 'splice',
7 | shortDesc: 'عنصر أو أكثر للمصفوفة',
8 | desc: 'تضيف و/أو تحذف عناصر من المصفوفة.',
9 | example: `arr.splice(2, 0, 'tacos');
10 | console.log(arr);`,
11 | output: `[5, 1, 'tacos', 8]`
12 | },
13 | {
14 | name: 'push',
15 | shortDesc: 'عناصر إلى نهاية المصفوفة',
16 | desc:
17 | 'إضافة عنصر أو أكثر إلى نهاية المصفوفة وتعيد الطول الجديد للمصفوفة.',
18 | example: `arr.push(2);
19 | console.log(arr);`,
20 | output: '[5, 1, 8, 2]'
21 | },
22 | {
23 | name: 'unshift',
24 | shortDesc: 'عناصر إلى بداية المصفوفة',
25 | desc:
26 | 'إضافة عنصر أو أكثر إلى بداية المصفوفة وتعيد الطول الجديد للمصفوفة.',
27 | example: `arr.unshift(2, 7);
28 | console.log(arr);`,
29 | output: '[2, 7, 5, 1, 8]'
30 | },
31 | {
32 | name: 'concat',
33 | shortDesc: 'هذه المصفوفة إلى مصفوفة أو أكثر و/أو قيمة أو أكثر',
34 | desc:
35 | 'تعيد المصفوفة المكونة من هذه المصوفة مع مصفوفة أو أكثر و/أو قيمة أكثر الأخرى.',
36 | example: `let arr2 = ['a', 'b', 'c'];
37 | let arr3 = arr.concat(arr2);
38 | console.log(arr3);`,
39 | output: `[5, 1, 8, 'a', 'b', 'c']`
40 | }
41 | ],
42 | removing: [
43 | {
44 | name: 'splice',
45 | shortDesc: 'عنصر أو أكثر من المصفوفة',
46 | desc: 'تضيف و/أو تحذف عناصر من المصفوفة.',
47 | example: `arr.splice(2, 1);
48 | console.log(arr);`,
49 | output: `[5, 1]`
50 | },
51 | {
52 | name: 'pop',
53 | shortDesc: 'العنصر الأخير في المصفوفة',
54 | desc: 'تحذف العنصر الأخير في المصفوفة وتعيد هذا العنصر.',
55 | example: `arr.pop();
56 | console.log(arr);`,
57 | output: `[5, 1]`
58 | },
59 | {
60 | name: 'shift',
61 | shortDesc: 'العنصر الأول من المصفوفة',
62 | desc: 'تحذف العنصر الأول من المصفوفة وتعيد هذا العنصر.',
63 | example: `arr.shift();
64 | console.log(arr);`,
65 | output: `[1, 8]`
66 | },
67 | {
68 | name: 'slice',
69 | shortDesc:
70 | 'عنصر أو أكثر من المصفوفة للاستخدام ، تاركة المصفوفة الأصلية كما هي',
71 | desc:
72 | 'الدالة slice()
تعيد نسخة مصغرة لجزء من مصفوفة إلى عنصر مصفوفة جديد . بإمكانك إما تحديد العنصر الأخير ( حيث أن العنصر الأول الافتراضي سيكون صفر ) أو بإمكانك تحديد البداية والنهاية, مفصولين بفاصلة , comma-separated. المصفوفة الأصلية لن يتم تعديلها.',
73 | example: `let slicedArr = arr.slice(1);
74 | console.log(arr);
75 | console.log(slicedArr);`,
76 | output: `[5, 1, 8]
77 | [1, 8]`
78 | }
79 | ],
80 | string: [
81 | {
82 | name: 'join',
83 | shortDesc: 'دمج جميع عناصر المصفوفة في سلسلة نصية واحدة',
84 | desc: `دمج جميع عناصر المصفوفة في سلسلة نصية . بإمكانك دمجهم مع بعض كماهم أو مع فاصل بينهم, elements.join(' -
85 | ')
تعطيك foo-bar
`,
86 | example: `console.log(arr.join());`,
87 | output: `"5,1,8"`
88 | },
89 | {
90 | name: 'toString',
91 | shortDesc: 'تعيد سلسلة نصية تمثل هذه المصفوفة.',
92 | desc: 'تعيد سلسلة نصية تمثل المصفوفة وعناصرها.',
93 | example: `console.log(arr.toString());`,
94 | output: `"5,1,8"`
95 | },
96 | {
97 | name: 'toLocaleString',
98 | shortDesc: 'تعيد سلسلة نصية (محلية- تمثل البلد الحالي ) تمثل المصفوفة.',
99 | desc:
100 | 'هذه الدالة فيها قليل من الجنون. تعيد سلسلة نصية (محلية- تمثل البلد الحالي ) تمثل المصفوفة وعناصرها. هذه الدالة مفيدة للتواريخ والعملات وكذلك بعض الاختصارات المحلية الغريبة, لذلك يستحسن مراجعة التوثيق الخاص بها',
101 | example: `let date = [new Date()];
102 | arr.toLocaleString();
103 | date.toLocaleString();
104 | console.log(arr, date);`,
105 | output: `"5,1,8 12/26/2017, 6:54:49 م"`
106 | }
107 | ],
108 | ordering: [
109 | {
110 | name: 'reverse',
111 | shortDesc: 'تعكس ترتيب عناصر المصفوفة',
112 | desc:
113 | 'تعكس ترتيب عناصر المصفوفة بمكانهم - بحيث الأول يصبح الأخير والأخير يصبح الأول.',
114 | example: `arr.reverse();
115 | console.log(arr);`,
116 | output: `[8, 1, 5]`
117 | },
118 | {
119 | name: 'sort',
120 | shortDesc: 'ترتيب عناصر المصفوفة',
121 |
122 | desc: `ترتب عناصر المصفوفة المحددة وترجع مصفوفة مرتبة.
123 |
124 | ملاحطة مهمة: إذا لم يتم كتابة دالة الترتيب ، سيتم ترتيب العناصر عن طريق تحويلهم إلى سلاسل ومقارنة على أساس ترتيبهم ضمن الـ Unicode الخاص بهم.على سبيل المثال، "Banana" تأتي قبل "cherry". في الترتيب بالنسبة للأرقام، فإن 9 تأتي قبل 80 ، وذلك لأنه تم تحويل الأرقام إلى سلاسل نصية ، و "80" تأتي قبل "9" في ترتيب الرموز ضمن الـ Unicode . التوثيق في الكثير من المعلومات للتوضيح.`,
125 | example: `arr.sort();
126 | console.log(arr);`,
127 | output: `[1, 5, 8]`
128 | }
129 | ],
130 | other: [
131 | {
132 | name: 'length',
133 | shortDesc: 'معرفة طول المصفوفة',
134 | desc: 'تعيد عدد العناصر في هذه المصفوفة.',
135 | example: `console.log(arr.length);`,
136 | output: `3`
137 | },
138 | {
139 | name: 'fill',
140 | shortDesc: 'تعبية جميع عناصر المصفوفة بقيمة ثابتة',
141 | desc:
142 | 'تقوم بتعبئة جميع عناصر المصفوفة ابتداءً من عنوان البداية إلى عنوان النهاية بقيم .',
143 | example: `arr.fill(2);
144 | console.log(arr);`,
145 | output: `[2, 2, 2]`
146 | },
147 | {
148 | name: 'copyWithin',
149 | shortDesc: 'نسخ سلسلة من عناصر المصفوفة ضمن المصفوفة.',
150 | desc:
151 | 'تقوم بنسخ سلسلة من عناصر المصوفة ضمن المصفوفة نفسها . بإمكانك تحديد العنصر الأخير فقط ( حيث العنصر الأول سيكون الافتراضي صفر ) أو بإمكانك تحديد العنصر الأول والأ×ير مفصولين بفاصلة , comma-separated.',
152 | example: `arr.copyWithin(1);
153 | console.log(arr);`,
154 | output: `[5, 5, 1]`
155 | }
156 | ],
157 | iterate: [
158 | {
159 | name: 'forEach',
160 | shortDesc: 'تنفيذ دالة سأقوم بإنشاء (for each) للعنصر',
161 | desc:
162 | 'دالة الـ forEach() تقوم بتنفيذ دالة معينة مرة واحد لكل من عناصر المصفوفة.',
163 | example: `arr.forEach((element) => {
164 | console.log(element)
165 | });`,
166 | output: `5
167 | 1
168 | 8`
169 | },
170 | {
171 | name: 'map',
172 | shortDesc:
173 | ' تقوم بإنشاء مصفوفة جديدة من كل عنصر بإستخدام دالة أقوم بإنشاءها',
174 | desc:
175 | 'تقوم بإنشاء مصفوفة جديدة بإستخدام النتيجة الراجعة من استدعاء دالة معينة على جميع العناصر في هذه المصفوفة.',
176 | example: `let map = arr.map(x => x + 1);
177 | console.log(map);`,
178 | output: `[6, 2, 9]`
179 | },
180 | {
181 | name: 'entries',
182 | shortDesc: 'تنش عنصر تكرار (iterator object)',
183 | desc:
184 | 'تعيد عنصر تكرار جديد للمصفوفة والذي يحتوي على أزواج الـ key/value لكل عنوان (index) في هذه المصفوفة. توجد استخدامات كثيرة للتكرارات (iterators), وكذلك دوال أخرى تستخدم معها, مثل values
و keys
',
185 | example: `let iterator = arr.entries();
186 | console.log(iterator.next().value);`,
187 | output: `[0, 5]
188 |
189 | `
190 | }
191 | ],
192 | find: {
193 | single: [
194 | {
195 | name: 'includes',
196 | shortDesc: 'تعيد إذا كان عنصر معين موجود',
197 | desc:
198 | 'تقرر فيما إذا كانت مصفوفة معينة تحتوي على عنصر معين ، وتعيد true أو false بما يناسب الحالة.',
199 | example: `console.log(arr.includes(1));`,
200 | output: `true`
201 | },
202 | {
203 | name: 'indexOf',
204 | shortDesc: 'العنوان الأول لعنصر معين',
205 | desc:
206 | 'تعيد أول عنوان حيث يمكن العثور على عنصر معين في مصفوفة, أو -1 إذا لم يتم العثور عليه.',
207 | example: `console.log(arr.indexOf(5));`,
208 | output: `0`
209 | },
210 | {
211 | name: 'lastIndexOf',
212 | shortDesc: 'العنوان الأخير لعنصر معين',
213 | desc:
214 | 'تعيد آخر ( أكبر ) عنوان لعنصر معين ضمن مصفوفة مساوي للقيمة المحددة , أو -1 إذا كان غير موجود.',
215 | example: `console.log(arr.lastIndexOf(5));`,
216 | output: `0`
217 | },
218 | {
219 | name: 'find',
220 | shortDesc: 'أول عنصر يطابق شرط معين',
221 | desc:
222 | 'تعيد القيمة التي تم العثور عليها في المصوفة ، إذا وجد عنصر يطابق لدالة الفحص المعينة أو غير معرف ( undefined ) إذا لم يتم العثور عليه. مشابهة لـ findIndex()
, ولكنها تعيد العنصر عوضا عن العنوان (index).',
223 | example: `let isTiny = (el) => el < 2;
224 | console.log(arr.find(isTiny));`,
225 | output: `1`
226 | },
227 | {
228 | name: 'findIndex',
229 | shortDesc: 'أول عنوان (index) للعصر الذي يطابق شرط معين',
230 | desc:
231 | 'تعيد أول عنوان (index) لعنصر معين في مصفوفة إذا طابق دالة الفحص المعينة . أو -1 إذا لم يطابق. مماثلة لـ find()
, ولكنها تعيد العنوان (index) عوضا عن العنصر.',
232 | example: `let isBig = (el) => el > 6;
233 | console.log(arr.findIndex(isBig));`,
234 | output: `2`
235 | },
236 | {
237 | name: 'reduce',
238 | shortDesc: 'قيمة بواسطة تصغير المصفوفة ، من البداية للنهاية',
239 | desc:
240 | 'تنفيذ دالة على مراكم وكل قيمة في المصفوفة ( من اليسار إلى اليمين ) لتقليصها إلى قيمة واحدة.',
241 | example: `let reducer = (a, b) => a + b;
242 | console.log(arr.reduce(reducer));`,
243 | output: `14`
244 | },
245 | {
246 | name: 'reduceRight',
247 | shortDesc: 'قيمة بواسطة تصغير المصفوفة ، من النهاية إلى البداية',
248 | desc:
249 | 'تنفيذ دالة على مراكم وكل قيمة في المصفوفة ( من اليمين إلى اليسار ) لتقليصها إلى قيمة واحدة.',
250 | example: `[arr, [0, 1]].reduceRight((a, b) => {
251 | return a.concat(b)
252 | }, [])`,
253 | output: `[0, 1, 5, 1, 8]`
254 | }
255 | ],
256 | many: [
257 | {
258 | name: 'filter',
259 | shortDesc: 'قيم بناء على شرط أقوم بتحديده',
260 | desc:
261 | 'تعيد مصفوفة جديد تحتوى على جميع عناصر هذه المصفوفة التي نتيجة دالة الترشيح true.',
262 | example: `let filtered = arr.filter(el => el > 4);
263 | console.log(filtered)`,
264 | output: `[5, 8]`
265 | },
266 | {
267 | name: 'every',
268 | shortDesc: 'فيما إذا كانت جميع العناصر تطابق شرط معين أو لا',
269 | desc: 'تعيد (true) إذا كانت جميع القيم تطابق دالة الفحص.',
270 | example: `let isSmall = (el) => el < 10;
271 | console.log(arr.every(isSmall));`,
272 | output: `true`
273 | },
274 | {
275 | name: 'some',
276 | shortDesc: 'فيما إذا طابق عنصر واحد على الأقل شرط معين أو لا',
277 | desc:
278 | 'تعيد (true) إذا طابق على الأقل عنصر واحد من هذه المصفوفة لدالة الفحص.',
279 | example: `let biggerThan4 = (el) => el > 4;
280 | console.log(arr.some(biggerThan4));`,
281 | output: `true`
282 | }
283 | ]
284 | }
285 | }
286 | }
287 |
--------------------------------------------------------------------------------
/store/ar/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "ar",
3 | "long": "Arabic",
4 | "createdBy": "salahaa1"
5 | }
6 |
--------------------------------------------------------------------------------
/store/bg/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | selectedMethod: '',
4 | adding: [
5 | {
6 | name: 'splice',
7 | shortDesc: 'елемент(и) в масив',
8 | desc: 'Добавя и/или премахва елементи от масив.',
9 | example: `arr.splice(2, 0, 'tacos');
10 | console.log(arr);`,
11 | output: `[5, 1, 'tacos', 8]`
12 | },
13 | {
14 | name: 'push',
15 | shortDesc: 'елементи в края на масива',
16 | desc:
17 | 'Добавя един или повече елементи в края на масива и връща новата дължина на масива.',
18 | example: `arr.push(2);
19 | console.log(arr);`,
20 | output: '[5, 1, 8, 2]'
21 | },
22 | {
23 | name: 'unshift',
24 | shortDesc: 'елементи в началото на масива',
25 | desc:
26 | 'Добавя един или повече елементи в началото на масива и връща новата дължина на масива.',
27 | example: `arr.unshift(2, 7);
28 | console.log(arr);`,
29 | output: '[2, 7, 5, 1, 8]'
30 | },
31 | {
32 | name: 'concat',
33 | shortDesc: 'този масив в друг масив(и) и/или стойност(и)',
34 | desc:
35 | 'Връща нов масив, съставен от този масив, свързан с друг масив(и) и/или стойност(и).',
36 | example: `let arr2 = ['a', 'b', 'c'];
37 | let arr3 = arr.concat(arr2);
38 | console.log(arr3);`,
39 | output: `[5, 1, 8, 'a', 'b', 'c']`
40 | }
41 | ],
42 | removing: [
43 | {
44 | name: 'splice',
45 | shortDesc: 'елемент(и) от масив',
46 | desc: 'Добавя и/или премахва елементи от масив.',
47 | example: `arr.splice(2, 1);
48 | console.log(arr);`,
49 | output: `[5, 1]`
50 | },
51 | {
52 | name: 'pop',
53 | shortDesc: 'последният елемент на масива',
54 | desc: 'Премахва последния елемент от масив и връща този елемент.',
55 | example: `arr.pop();
56 | console.log(arr);`,
57 | output: `[5, 1]`
58 | },
59 | {
60 | name: 'shift',
61 | shortDesc: 'първият елемент на масива',
62 | desc: 'Премахва първия елемент от масив и връща този елемент.',
63 | example: `arr.shift();
64 | console.log(arr);`,
65 | output: `[1, 8]`
66 | },
67 | {
68 | name: 'slice',
69 | shortDesc:
70 | 'едно или повече елементи за употреба, оставяйки масива, както е',
71 | desc:
72 | 'Методът slice()
връща плитко копие на част от масив в нов обект от масив. Можете да посочите или само крайния елемент (откъдето започва да е по подразбиране до нула) или и началото, и края, разделени със запетая. Оригиналният масив няма да бъде променен.',
73 | example: `let slicedArr = arr.slice(1);
74 | console.log(arr);
75 | console.log(slicedArr);`,
76 | output: `[5, 1, 8]
77 | [1, 8]`
78 | }
79 | ],
80 | string: [
81 | {
82 | name: 'join',
83 | shortDesc: 'присъединете всички елементи на масива към низ',
84 | desc: `Присъединява всички елементи на масива към низ. Можете да ги присъедините заедно, както е или с нещо между тях, elements.join ('-')
ви дава foo-bar
`,
85 | example: `console.log(arr.join());`,
86 | output: `"5,1,8"`
87 | },
88 | {
89 | name: 'toString',
90 | shortDesc: 'връща низ, представляващ масива',
91 | desc: 'Връща низ, представляващ масива и неговите елементи.',
92 | example: `console.log(arr.toString());`,
93 | output: `"5,1,8"`
94 | },
95 | {
96 | name: 'toLocaleString',
97 | shortDesc: 'връща локализиран низ, представляващ масива',
98 | desc:
99 | 'Това е малко вълшебство. Връща локализиран низ, представляващ масива и неговите елементи. Това е много полезно за дати и валута и има някои странни местни абстракции, така че най-добре да се консултирате с документите, когато го използвате.',
100 | example: `let date = [new Date()];
101 | const arrString = arr.toLocaleString();
102 | const dateString = date.toLocaleString();
103 | console.log(arrString, dateString);`,
104 | output: `"5,1,8 12/26/2017, 6:54:49 PM"`
105 | }
106 | ],
107 | ordering: [
108 | {
109 | name: 'reverse',
110 | shortDesc: 'обръщане на реда на масива',
111 | desc:
112 | 'Обръща реда на елементите на масив на място - първият става последният и последният става първият.',
113 | example: `arr.reverse();
114 | console.log(arr);`,
115 | output: `[8, 1, 5]`
116 | },
117 | {
118 | name: 'sort',
119 | shortDesc: 'сортирайте елементите на масива',
120 | desc: 'Сортира елементите на масив на място и връща масива.',
121 | example: `arr.sort();
122 | console.log(arr);`,
123 | output: `[1, 5, 8]`
124 | }
125 | ],
126 | other: [
127 | {
128 | name: 'length',
129 | shortDesc: 'намерете дължината на масива',
130 | desc: 'Връща броя елементи в този масив.',
131 | example: `console.log(arr.length);`,
132 | output: `3`
133 | },
134 | {
135 | name: 'fill',
136 | shortDesc: 'попълнете всички елементи на масива със статична стойност',
137 | desc:
138 | 'Запълва всички елементи на масива от начален индекс до крайния индекс със статична стойност.',
139 | example: `arr.fill(2);
140 | console.log(arr);`,
141 | output: `[2, 2, 2]`
142 | },
143 | {
144 | name: 'copyWithin',
145 | shortDesc: 'копирайте последователност от масивни елементи в масива.',
146 | desc:
147 | 'Копира последователност от масивни елементи в масива. Можете да посочите или само крайния елемент (откъдето започва да е по подразбиране до нула) или и началото, и края, разделени със запетая.',
148 | example: `arr.copyWithin(1);
149 | console.log(arr);`,
150 | output: `[5, 5, 1]`
151 | }
152 | ],
153 | iterate: [
154 | {
155 | name: 'forEach',
156 | shortDesc: 'изпълнявайки функция, която ще създам за всеки елемент',
157 | desc:
158 | 'Методът forEach() изпълнява една предоставена функция веднъж за всеки елемент на масива.',
159 | example: `arr.forEach((element) => {
160 | console.log(element)
161 | });`,
162 | output: `5
163 | 1
164 | 8`
165 | },
166 | {
167 | name: 'map',
168 | shortDesc:
169 | 'създаване на нов масив от всеки елемент с функция, която създавам',
170 | desc:
171 | 'Създава нов масив с резултатите от извикването на дадена функция на всеки елемент в този масив.',
172 | example: `let map = arr.map(x => x + 1);
173 | console.log(map);`,
174 | output: `[6, 2, 9]`
175 | },
176 | {
177 | name: 'entries',
178 | shortDesc: 'създаване на обект итератор',
179 | desc:
180 | 'Връща нов обект от Array Iterator, който съдържа двойките ключ/стойност за всеки индекс в масива. Има много приложения за итераторите, както и други методи, използвани с него, като values
и keys
',
181 | example: `let iterator = arr.entries();
182 | console.log(iterator.next().value);`,
183 | output: `[0, 5]
184 |
185 | `
186 | }
187 | ],
188 | find: {
189 | single: [
190 | {
191 | name: 'includes',
192 | shortDesc: 'ако има определен елемент',
193 | desc:
194 | 'Определя дали даден масив съдържа определен елемент, връщайки се true или false, както е подходящо.',
195 | example: `console.log(arr.includes(1));`,
196 | output: `true`
197 | },
198 | {
199 | name: 'indexOf',
200 | shortDesc: 'първият индекс на конкретен елемент',
201 | desc:
202 | 'Връща първия индекс, при който даден елемент може да бъде намерен в масива, или -1, ако то не присъства.',
203 | example: `console.log(arr.indexOf(5));`,
204 | output: `0`
205 | },
206 | {
207 | name: 'lastIndexOf',
208 | shortDesc: 'последния индекс на конкретен елемент',
209 | desc:
210 | 'Връща последния (най-голям) индекс на елемент в масива, равен на зададената стойност, или -1, ако не е намерен.',
211 | example: `console.log(arr.lastIndexOf(5));`,
212 | output: `0`
213 | },
214 | {
215 | name: 'find',
216 | shortDesc: 'първият елемент, който удовлетворява едно условие',
217 | desc:
218 | 'Връща намерената стойност в масива, ако елемент в масива удовлетворява предоставената функция за тестване или недефинирана, ако не е намерена. Подобно на findIndex()
, но връща елемента вместо индекса.',
219 | example: `let isTiny = (el) => el < 2;
220 | console.log(arr.find(isTiny));`,
221 | output: `1`
222 | },
223 | {
224 | name: 'findIndex',
225 | shortDesc:
226 | 'първият индекс на елемент, който отговаря на дадено условие',
227 | desc:
228 | 'Връща индекса на първия елемент в масива, който удовлетворява предоставената функция за тестване. В противен случай -1 се връща. Подобно на find()
, но връща индекса вместо елемента.',
229 | example: `let isBig = (el) => el > 6;
230 | console.log(arr.findIndex(isBig));`,
231 | output: `2`
232 | },
233 | {
234 | name: 'reduce',
235 | shortDesc:
236 | 'стойност чрез намаляване на масива, започни за да свършиш',
237 | desc:
238 | 'Прилагайте функция срещу акумулатор и всяка стойност на масива (от ляво на дясно), за да го намалите до единична стойност.',
239 | example: `let reducer = (a, b) => a + b;
240 | console.log(arr.reduce(reducer));`,
241 | output: `14`
242 | },
243 | {
244 | name: 'reduceRight',
245 | shortDesc:
246 | 'стойност чрез намаляване на масива, завърши за да започнеш',
247 | desc:
248 | 'Прилагайте функция срещу акумулатор и всяка стойност на масива (от дясно на ляво), за да го намалите до единична стойност.',
249 | example: `[arr, [0, 1]].reduceRight((a, b) => {
250 | return a.concat(b)
251 | }, [])`,
252 | output: `[0, 1, 5, 1, 8]`
253 | }
254 | ],
255 | many: [
256 | {
257 | name: 'filter',
258 | shortDesc: 'стойности въз основа на състояние, което създавам',
259 | desc:
260 | 'Създава нов масив с всички елементи на този масив, за които предоставената филтрираща функция връща true.',
261 | example: `let filtered = arr.filter(el => el > 4);
262 | console.log(filtered)`,
263 | output: `[5, 8]`
264 | },
265 | {
266 | name: 'every',
267 | shortDesc:
268 | 'независимо от това дали всеки елемент отговаря на дадено условие',
269 | desc:
270 | 'Връща true, ако всеки елемент в този масив удовлетворява предоставената функция за тестване.',
271 | example: `let isSmall = (el) => el < 10;
272 | console.log(arr.every(isSmall));`,
273 | output: `true`
274 | },
275 | {
276 | name: 'some',
277 | shortDesc:
278 | 'независимо дали поне един елемент отговаря на дадено условие',
279 | desc:
280 | 'Връща true, ако поне един елемент в този масив отговаря на предоставената функция за тестване.',
281 | example: `let biggerThan4 = (el) => el > 4;
282 | console.log(arr.some(biggerThan4));`,
283 | output: `true`
284 | }
285 | ]
286 | }
287 | }
288 | }
289 |
--------------------------------------------------------------------------------
/store/bg/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "bg",
3 | "long": "Bulgarian",
4 | "createdBy": "imbyurhan"
5 | }
6 |
--------------------------------------------------------------------------------
/store/cz/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | selectedMethod: '',
4 | adding: [
5 | {
6 | name: 'splice',
7 | shortDesc: 'prvek nebo prvky z/do pole',
8 | desc: 'Přidá anebo odebere prvky z pole.',
9 | example: `arr.splice(2, 0, 'tacos');
10 | console.log(arr);`,
11 | output: `[5, 1, 'tacos', 8]`
12 | },
13 | {
14 | name: 'push',
15 | shortDesc: 'prvky na konec pole',
16 | desc:
17 | 'Přidá jeden nebo více prvků na konec pole a vrátí novou délku pole.',
18 | example: `arr.push(2);
19 | console.log(arr);`,
20 | output: '[5, 1, 8, 2]'
21 | },
22 | {
23 | name: 'unshift',
24 | shortDesc: 'prvky na začátek pole',
25 | desc:
26 | 'Přidá jeden nebo více prvků na začátek pole a vrátí novou délku pole.',
27 | example: `arr.unshift(2, 7);
28 | console.log(arr);`,
29 | output: '[2, 7, 5, 1, 8]'
30 | },
31 | {
32 | name: 'concat',
33 | shortDesc: 'toto pole k jinému poli/polím anebo hodnotě/hodnotám',
34 | desc:
35 | 'Vrátí nové pole skládající z tohoto pole a jiných polí anebo hodnot.',
36 | example: `let arr2 = ['a', 'b', 'c'];
37 | let arr3 = arr.concat(arr2);
38 | console.log(arr3);`,
39 | output: `[5, 1, 8, 'a', 'b', 'c']`
40 | }
41 | ],
42 | removing: [
43 | {
44 | name: 'splice',
45 | shortDesc: 'prvek nebo prvky z pole',
46 | desc: 'Přidá anebo odebere prvky z pole.',
47 | example: `arr.splice(2, 1);
48 | console.log(arr);`,
49 | output: `[5, 1]`
50 | },
51 | {
52 | name: 'pop',
53 | shortDesc: 'poslední prvek pole',
54 | desc:
55 | 'Odebere poslední prvek z pole a vrátí odebraný prvek.',
56 | example: `arr.pop();
57 | console.log(arr);`,
58 | output: `[5, 1]`
59 | },
60 | {
61 | name: 'shift',
62 | shortDesc: 'první prvek pole',
63 | desc:
64 | 'Odebere první prvek z pole a vrátí odebraný prvek.',
65 | example: `arr.shift();
66 | console.log(arr);`,
67 | output: `[1, 8]`
68 | },
69 | {
70 | name: 'slice',
71 | shortDesc:
72 | 'jeden nebo více prvků pro práci beze změny pole',
73 | desc:
74 | 'slice()
metoda vrací mělkou kopii části pole do nového pole. Lze specifikovat buď pouze počáteční prvek s tím, že konec se nastaví na délku pole, anebo konec i začátek oddělené čárkou. Původní pole zůstává beze změny.',
75 | example: `let slicedArr = arr.slice(1);
76 | console.log(arr);
77 | console.log(slicedArr);`,
78 | output: `[5, 1, 8]
79 | [1, 8]`
80 | }
81 | ],
82 | string: [
83 | {
84 | name: 'join',
85 | shortDesc: 'spojit všechny prvky do jednoho řetezce',
86 | desc: `Spojí všechny prvky pole do jednoho řetezce. Lze je spojit dohromady nebo mezi ně něco vložit, elements.join(' -
87 | ')
vrátí foo-bar
`,
88 | example: `console.log(arr.join());`,
89 | output: `"5,1,8"`
90 | },
91 | {
92 | name: 'toString',
93 | shortDesc: 'vrátit řetězec reprezentující pole',
94 | desc: 'Vrací řetězec reprezentující pole a jeho prvky.',
95 | example: `console.log(arr.toString());`,
96 | output: `"5,1,8"`
97 | },
98 | {
99 | name: 'toLocaleString',
100 | shortDesc: 'vrátit lokalizovaný řetězec reprezentující pole',
101 | desc:
102 | 'Tato metoda je divná. Vrací lokalizovaný řetězec reprezentující pole a jeho prvky. To je často použitelné pro data a měny, ale má podivné vestavěné abstrakce, takže před použitím je vhodné se poradit s dokumentací.',
103 | example: `let date = [new Date()];
104 | const arrString = arr.toLocaleString();
105 | const dateString = date.toLocaleString();
106 | console.log(arrString, dateString);`,
107 | output: `"5,1,8 12/26/2017, 6:54:49 PM"`
108 | }
109 | ],
110 | ordering: [
111 | {
112 | name: 'reverse',
113 | shortDesc: 'obrátit pořadí v poli',
114 | desc:
115 | 'Obrátí pořadí prvků pole - první bude poslední a poslední první.',
116 | example: `arr.reverse();
117 | console.log(arr);`,
118 | output: `[8, 1, 5]`
119 | },
120 | {
121 | name: 'sort',
122 | shortDesc: 'seřadit prvky pole',
123 | desc: `Seřadí prvky pole a vrátí seřazené pole.
124 |
125 | Důležitá poznámka: Pokud není porovnávací funkce dodána, compareFunction, tak jsou prvky převedeny na řetězce a ty se porovnávají podle pořadí v Unicode. Např. "Malina" bude před "jahodou". U čísel, 9 je před 80, ale protože jsou čísla převedena na řetězce, tak "80" je před "9" podle Unicode pořadí. Dokumentace obsahuje další objasňující informace.`,
126 | example: `arr.sort();
127 | console.log(arr);`,
128 | output: `[1, 5, 8]`
129 | }
130 | ],
131 | other: [
132 | {
133 | name: 'length',
134 | shortDesc: 'zjistit délku pole',
135 | desc: 'Vrátí počet prvků v poli.',
136 | example: `console.log(arr.length);`,
137 | output: `3`
138 | },
139 | {
140 | name: 'fill',
141 | shortDesc: 'přiřadit všem prvkům pole statickou hodnotu',
142 | desc:
143 | 'Přiřadí všem prvkům pole statickou hodnotu.',
144 | example: `arr.fill(2);
145 | console.log(arr);`,
146 | output: `[2, 2, 2]`
147 | },
148 | {
149 | name: 'copyWithin',
150 | shortDesc: 'zkopírovat řadu prvků v poli uvnitř pole',
151 | desc:
152 | 'Zkopíruje řadu prvků pole uvnitř pole. Lze specifikovat buď koncový prvek, kde počáteční pozice je nula, anebo počateční i koncový prvek, oddělené čárkou.',
153 | example: `arr.copyWithin(1);
154 | console.log(arr);`,
155 | output: `[5, 5, 1]`
156 | }
157 | ],
158 | iterate: [
159 | {
160 | name: 'forEach',
161 | shortDesc: 'spuštění funkce nad každým prvkem',
162 | desc:
163 | 'forEach() metoda spustí předdefinovanou funkci jednou nad každým prvkem pole.',
164 | example: `arr.forEach((element) => {
165 | console.log(element)
166 | });`,
167 | output: `5
168 | 1
169 | 8`
170 | },
171 | {
172 | name: 'map',
173 | shortDesc:
174 | 'funkce, která vytvoří nové pole ze všech prvků',
175 | desc:
176 | 'Vytvoří nové pole, které je výsledkem volání definované funkce nad každým prvkem.',
177 | example: `let map = arr.map(x => x + 1);
178 | console.log(map);`,
179 | output: `[6, 2, 9]`
180 | },
181 | {
182 | name: 'entries',
183 | shortDesc: 'iteračního objektu',
184 | desc:
185 | 'Vrátí nový iterátor pole, který obsahuje klíč-hodnota pár pro každou pozici v poli. Iterátor má mnoho případů užití jak samostatně, tak ve spojení s jinými metodami jako values
nebo keys
',
186 | example: `let iterator = arr.entries();
187 | console.log(iterator.next().value);`,
188 | output: `[0, 5]
189 |
190 | `
191 | }
192 | ],
193 | find: {
194 | single: [
195 | {
196 | name: 'includes',
197 | shortDesc: 'prvek pokud existuje',
198 | desc:
199 | 'Zjistí jestli existuje daný prvek v poli a podle toho vrátí true nebo false.',
200 | example: `console.log(arr.includes(1));`,
201 | output: `true`
202 | },
203 | {
204 | name: 'indexOf',
205 | shortDesc: 'první výskyt daného prvku',
206 | desc:
207 | 'Vrátí první výskyt daného prvku nebo -1 pokud prvek nenalezne.',
208 | example: `console.log(arr.indexOf(5));`,
209 | output: `0`
210 | },
211 | {
212 | name: 'lastIndexOf',
213 | shortDesc: 'poslední výskyt daného prvku',
214 | desc:
215 | 'Vrátí poslední výskyt daného prvku nebo -1 pokud prvek nenalezne.',
216 | example: `console.log(arr.lastIndexOf(5));`,
217 | output: `0`
218 | },
219 | {
220 | name: 'find',
221 | shortDesc: 'první prvek, který splňuje podmínku',
222 | desc:
223 | 'Vrátí nalezenou hodnotu v poli, pokud prvek v poli odpovídá definované testovací funkci nebo undefined pokud nenalezne. Podobné jako findIndex()
, ale vrací prvek místo pozice.',
224 | example: `let isTiny = (el) => el < 2;
225 | console.log(arr.find(isTiny));`,
226 | output: `1`
227 | },
228 | {
229 | name: 'findIndex',
230 | shortDesc: 'první výskyt prvku, který splňuje podmínku',
231 | desc:
232 | 'Vrátí pozici prvního prvku v poli, který splňuje definovanou testovací funkci. V ostatních případech vrací -1. Podobné jako find()
, ale vrací pozici místo prvku.',
233 | example: `let isBig = (el) => el > 6;
234 | console.log(arr.findIndex(isBig));`,
235 | output: `2`
236 | },
237 | {
238 | name: 'reduce',
239 | shortDesc: 'hodnotu po redukci pole z leva do prava',
240 | desc:
241 | 'Použije funkci na střadač (accumulator) a každou hodnotu pole (z leva do prava) redukuje do jedné hodnoty.',
242 | example: `let reducer = (a, b) => a + b;
243 | console.log(arr.reduce(reducer));`,
244 | output: `14`
245 | },
246 | {
247 | name: 'reduceRight',
248 | shortDesc: 'hodnotu po redukci pole z prava do leva',
249 | desc:
250 | 'Použije funkci na střadač (accumulator) a každou hodnotu pole (z prava do leva) redukuje do jedné hodnoty.',
251 | example: `[arr, [0, 1]].reduceRight((a, b) => {
252 | return a.concat(b)
253 | }, [])`,
254 | output: `[0, 1, 5, 1, 8]`
255 | }
256 | ],
257 | many: [
258 | {
259 | name: 'filter',
260 | shortDesc: 'hodnoty, které splňují mnou vytvořenou podmínku',
261 | desc:
262 | 'Vytvoří nové pole se všemi prvky pole, pro které definovaná filtrovací funkce vrátí hodnotu true.',
263 | example: `let filtered = arr.filter(el => el > 4);
264 | console.log(filtered)`,
265 | output: `[5, 8]`
266 | },
267 | {
268 | name: 'every',
269 | shortDesc: 'jestli všechny prvky splňují podmínku',
270 | desc:
271 | 'Vrací true pokud každý prvek odpovídá definované testovací funkci.',
272 | example: `let isSmall = (el) => el < 10;
273 | console.log(arr.every(isSmall));`,
274 | output: `true`
275 | },
276 | {
277 | name: 'some',
278 | shortDesc: 'jestli alespoň jeden prvek splňuje podmínku',
279 | desc:
280 | 'Vrací true pokud alespoň jeden prvek odpovídá definované testovací funkci.',
281 | example: `let biggerThan4 = (el) => el > 4;
282 | console.log(arr.some(biggerThan4));`,
283 | output: `true`
284 | }
285 | ]
286 | }
287 | }
288 | }
289 |
--------------------------------------------------------------------------------
/store/cz/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "cz",
3 | "long": "Czech",
4 | "createdBy": "xgebi"
5 | }
6 |
--------------------------------------------------------------------------------
/store/de/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "de",
3 | "long": "German",
4 | "createdBy": "bahe007, AWolf81, Muescha"
5 | }
6 |
--------------------------------------------------------------------------------
/store/el/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "el",
3 | "long": "Greek",
4 | "createdBy": "loremaps"
5 | }
6 |
--------------------------------------------------------------------------------
/store/en/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "en",
3 | "long": "English",
4 | "createdBy": "sdras"
5 | }
6 |
--------------------------------------------------------------------------------
/store/es/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "es",
3 | "long": "Spanish",
4 | "createdBy": "Gonzalo2310"
5 | }
6 |
--------------------------------------------------------------------------------
/store/fi/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "fi",
3 | "long": "Finnish",
4 | "createdBy": "sjarva"
5 | }
6 |
--------------------------------------------------------------------------------
/store/fr/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "fr",
3 | "long": "French",
4 | "createdBy": "julienmartin"
5 | }
6 |
--------------------------------------------------------------------------------
/store/id/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "id",
3 | "long": "Indonesian",
4 | "createdBy": "galuhsahid"
5 | }
6 |
--------------------------------------------------------------------------------
/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import vuexI18n from 'vuex-i18n'
4 |
5 | // import languages (only state translations)
6 | import ar from './ar/index'
7 | import bg from './bg/index'
8 | import es from './es/index'
9 | import en from './en/index'
10 | import de from './de/index'
11 | import fr from './fr/index'
12 | import fi from './fi/index'
13 | import nl from './nl/index'
14 | import pt from './pt/index'
15 | import zh_cn from './zh_cn/index'
16 | import sr from './sr/index'
17 | import cz from './cz/index'
18 | import ru from './ru/index'
19 | import id from './id/index'
20 | import it from './it/index'
21 | import ua from './ua/index'
22 | import el from './el/index'
23 | import tr from './tr/index'
24 | import ja from './ja/index'
25 |
26 | // import translations of labels
27 | import translationsAr from '../src/locale/ar/index'
28 | import translationsBg from '../src/locale/bg/index'
29 | import translationsEn from '../src/locale/en/index'
30 | import translationsEs from '../src/locale/es/index'
31 | import translationsDe from '../src/locale/de/index'
32 | import translationsFr from '../src/locale/fr/index'
33 | import translationsFi from '../src/locale/fi/index'
34 | import translationsNl from '../src/locale/nl/index'
35 | import translationsPt from '../src/locale/pt/index'
36 | import translationsZhCn from '../src/locale/zh_cn/index'
37 | import translationsCz from '../src/locale/cz/index'
38 | import translationsRu from '../src/locale/ru/index'
39 | import translationsUa from '../src/locale/ua/index'
40 | import translationsId from '../src/locale/id/index'
41 | import translationsSr from '../src/locale/sr/index'
42 | import translationsIt from '../src/locale/it/index'
43 | import translationsEl from '../src/locale/el/index'
44 | import translationsTr from '../src/locale/tr/index'
45 | import translationsJa from '../src/locale/ja/index'
46 |
47 | // create info about langauges
48 | const languages = (ctx => {
49 | let keys = ctx.keys()
50 | let values = keys.map(ctx)
51 | // return keys.reduce((o, k, i) => { o[k] = values[i]; return o; }, {});
52 | const metaFiles = keys.filter((key, val) => key.endsWith('json'))
53 | let res = {}
54 | metaFiles.forEach(key => {
55 | const index = keys.indexOf(key)
56 | const meta = values[index]
57 | res[meta.short] = {
58 | long: meta.long
59 | }
60 | })
61 | return res
62 | })(require.context('./', true, /[a-z]{2}/))
63 |
64 | Vue.use(Vuex)
65 |
66 | const mutations = {
67 | selectionMethod(state, selected) {
68 | state.selectedMethod = selected
69 | },
70 | resetSelection(state) {
71 | state.selectedMethod = ''
72 | },
73 | changeLanguage(state, newLang) {
74 | state.curLanguage = newLang
75 | Vue.i18n.set(newLang)
76 | }
77 | }
78 |
79 | export const store = new Vuex.Store({
80 | modules: {
81 | ar,
82 | bg,
83 | es,
84 | en,
85 | de,
86 | fr,
87 | fi,
88 | nl,
89 | pt,
90 | zh_cn,
91 | id,
92 | sr,
93 | cz,
94 | ru,
95 | ua,
96 | id,
97 | it,
98 | el,
99 | tr,
100 | ja
101 | },
102 | state: {
103 | selectedMethod: undefined,
104 | curLanguage: 'en',
105 | languages
106 | },
107 | mutations
108 | })
109 |
110 | Vue.use(vuexI18n.plugin, store)
111 |
112 | // add translations directly to the application
113 | Vue.i18n.add('ar', translationsAr)
114 | Vue.i18n.add('bg', translationsBg)
115 | Vue.i18n.add('en', translationsEn)
116 | Vue.i18n.add('es', translationsEs)
117 | Vue.i18n.add('de', translationsDe)
118 | Vue.i18n.add('fr', translationsFr)
119 | Vue.i18n.add('fi', translationsFi)
120 | Vue.i18n.add('nl', translationsNl)
121 | Vue.i18n.add('pt', translationsPt)
122 | Vue.i18n.add('zh_cn', translationsZhCn)
123 | Vue.i18n.add('cz', translationsCz)
124 | Vue.i18n.add('ru', translationsRu)
125 | Vue.i18n.add('ua', translationsUa)
126 | Vue.i18n.add('id', translationsId)
127 | Vue.i18n.add('sr', translationsSr)
128 | Vue.i18n.add('it', translationsIt)
129 | Vue.i18n.add('el', translationsEl)
130 | Vue.i18n.add('tr', translationsTr)
131 | Vue.i18n.add('ja', translationsJa)
132 |
133 | Vue.i18n.set(store.state.curLanguage)
134 |
135 | // registering only the current language
136 | // would be also possible but unloading & loading would be required
137 | // at language change --> can be added later (for now load all langauges)
138 | // store.registerModule('de', de);
139 |
--------------------------------------------------------------------------------
/store/it/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "it",
3 | "long": "Italian",
4 | "createdBy": "nicolo-ribaudo"
5 | }
6 |
--------------------------------------------------------------------------------
/store/ja/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | selectedMethod: '',
4 | adding: [
5 | {
6 | name: 'splice',
7 | shortDesc: '配列へ要素を追加 かつ/または 削除',
8 | desc: '配列へ要素を追加する かつ/または 削除します。',
9 | example: `arr.splice(2, 0, 'tacos');
10 | console.log(arr);`,
11 | output: `[5, 1, 'tacos', 8]`
12 | },
13 | {
14 | name: 'push',
15 | shortDesc: '配列の末尾へ要素を追加',
16 | desc:
17 | '一つ以上の要素を配列の末尾へ追加し、新しい配列の長さを返します。',
18 | example: `arr.push(2);
19 | console.log(arr);`,
20 | output: '[5, 1, 8, 2]'
21 | },
22 | {
23 | name: 'unshift',
24 | shortDesc: '配列の先頭へ要素を追加',
25 | desc:
26 | '一つ以上の要素を配列の先頭へ追加し、新しい配列の長さを返します。',
27 | example: `arr.unshift(2, 7);
28 | console.log(arr);`,
29 | output: '[2, 7, 5, 1, 8]'
30 | },
31 | {
32 | name: 'concat',
33 | shortDesc: '他の配列 および/または 値と結合された新しい配列を得る',
34 | desc:
35 | 'この配列と、他の配列 および/または 値と結合された新しい配列を返します。',
36 | example: `let arr2 = ['a', 'b', 'c'];
37 | let arr3 = arr.concat(arr2);
38 | console.log(arr3);`,
39 | output: `[5, 1, 8, 'a', 'b', 'c']`
40 | }
41 | ],
42 | removing: [
43 | {
44 | name: 'splice',
45 | shortDesc: '配列へ要素を追加 かつ/または 削除',
46 | desc: '配列へ要素を追加する かつ/または 削除します。',
47 | example: `arr.splice(2, 1);
48 | console.log(arr);`,
49 | output: `[5, 1]`
50 | },
51 | {
52 | name: 'pop',
53 | shortDesc: '配列の最後の要素を取り出して削除',
54 | desc:
55 | '配列の最後の要素を返し、元の配列からはこの要素を削除します。',
56 | example: `arr.pop();
57 | console.log(arr);`,
58 | output: `[5, 1]`
59 | },
60 | {
61 | name: 'shift',
62 | shortDesc: '配列の最初の要素を取り出して削除',
63 | desc:
64 | '配列の最初の要素を返し、元の配列からはこの要素を削除します。',
65 | example: `arr.shift();
66 | console.log(arr);`,
67 | output: `[1, 8]`
68 | },
69 | {
70 | name: 'slice',
71 | shortDesc:
72 | '元の配列はそのままに、一つ以上の要素を削除した配列を得る',
73 | desc:
74 | 'slice()
メソッドは配列の一部のコピーから新しい配列を作成して返します。開始位置だけ指定しても、開始位置と終了位置の両方をカンマ区切りで指定しても構いません。元の配列に変化はありません。',
75 | example: `let slicedArr = arr.slice(1);
76 | console.log(arr);
77 | console.log(slicedArr);`,
78 | output: `[5, 1, 8]
79 | [1, 8]`
80 | }
81 | ],
82 | string: [
83 | {
84 | name: 'join',
85 | shortDesc: '配列内の全ての要素を結合して文字列にする',
86 | desc: `配列の全ての要素を結合した文字列を返します。そのまま結合することもできますし、間に挟む文字を指定することもできます。elements.join(' -
87 | ')
は foo-bar
を返します。`,
88 | example: `console.log(arr.join());`,
89 | output: `"5,1,8"`
90 | },
91 | {
92 | name: 'toString',
93 | shortDesc: '配列を表す文字列を返す',
94 | desc: '配列を表す文字列を返します。',
95 | example: `console.log(arr.toString());`,
96 | output: `"5,1,8"`
97 | },
98 | {
99 | name: 'toLocaleString',
100 | shortDesc: '配列を表すローカライズされた文字列を返す',
101 | desc:
102 | 'これはちょっと変わったやつです。配列とその要素を表すローカライズされた文字列を返します。日付や通貨を扱うのにとても便利ですが、独特なネイティブの抽象化があります。使用するときはドキュメントを参照してください。',
103 | example: `let date = [new Date()];
104 | const arrString = arr.toLocaleString();
105 | const dateString = date.toLocaleString();
106 | console.log(arrString, dateString);`,
107 | output: `"5,1,8 12/26/2017, 6:54:49 PM"`
108 | }
109 | ],
110 | ordering: [
111 | {
112 | name: 'reverse',
113 | shortDesc: '配列を逆順に並べ替える',
114 | desc:
115 | '配列をその場で逆順に並べ替えます — 最初の要素は最後に、最後の要素は最初になります。',
116 | example: `arr.reverse();
117 | console.log(arr);`,
118 | output: `[8, 1, 5]`
119 | },
120 | {
121 | name: 'sort',
122 | shortDesc: '配列をソートする',
123 | desc: `配列の要素をその場でソートし、ソート済みの配列を返します。
124 |
125 | 重要: 比較用の関数が指定されない場合、要素は文字列に変換された状態におけるUnicodeでの並び順にソートされます。たとえば "Banana" は "cherry" の前に来ます。数値のソートであれば 9 が 80 の前に来ますが、数値が文字列に変換されるとUnicode順になるので "80" は "9" よりも前に来ます。詳しくはドキュメントを参照してください。`,
126 | example: `arr.sort();
127 | console.log(arr);`,
128 | output: `[1, 5, 8]`
129 | }
130 | ],
131 | other: [
132 | {
133 | name: 'length',
134 | shortDesc: '配列の長さを返す',
135 | desc: '配列内の要素の数を返します。',
136 | example: `console.log(arr.length);`,
137 | output: `3`
138 | },
139 | {
140 | name: 'fill',
141 | shortDesc: '静的な値で配列の全ての要素を埋める',
142 | desc:
143 | '配列内の開始インデックスから終了インデックスまでの全要素を、静的な値で置き換えます。',
144 | example: `arr.fill(2);
145 | console.log(arr);`,
146 | output: `[2, 2, 2]`
147 | },
148 | {
149 | name: 'copyWithin',
150 | shortDesc: '配列内の連続した要素を同じ配列内にコピーする',
151 | desc:
152 | '配列内の連続した要素を同じ配列内にコピーします。終了位置の要素だけを指定してもよいですし (開始位置はデフォルト 0 になります) 、開始位置と終了位置の両方をカンマ区切りで指定しても構いません。',
153 | example: `arr.copyWithin(1);
154 | console.log(arr);`,
155 | output: `[5, 5, 1]`
156 | }
157 | ],
158 | iterate: [
159 | {
160 | name: 'forEach',
161 | shortDesc: '各要素に対し関数を実行する',
162 | desc:
163 | 'forEach() メソッドは、指定された関数を各要素に対し1回ずつ実行します。',
164 | example: `arr.forEach((element) => {
165 | console.log(element)
166 | });`,
167 | output: `5
168 | 1
169 | 8`
170 | },
171 | {
172 | name: 'map',
173 | shortDesc:
174 | '各要素を関数に通した結果から新しい配列を作成する',
175 | desc:
176 | '配列内の各要素に対し、与えられた関数を実行した結果をもとに、新しい配列を作成します。',
177 | example: `let map = arr.map(x => x + 1);
178 | console.log(map);`,
179 | output: `[6, 2, 9]`
180 | },
181 | {
182 | name: 'entries',
183 | shortDesc: 'イテレータオブジェクトを作成する',
184 | desc:
185 | '配列のインデックスに用いられるキー/バリューのペアを含む、新しい配列イテレータオブジェクトを返します。values()
や keys()
のような、一緒に使われるメソッドと同様に、イテレータの用途はさまざまです。',
186 | example: `let iterator = arr.entries();
187 | console.log(iterator.next().value);`,
188 | output: `[0, 5]
189 |
190 | `
191 | }
192 | ],
193 | find: {
194 | single: [
195 | {
196 | name: 'includes',
197 | shortDesc: 'ある要素が含まれているかどうかを知る',
198 | desc:
199 | '配列が特定の要素を含んでいるかを判断し、true または false を返します。',
200 | example: `console.log(arr.includes(1));`,
201 | output: `true`
202 | },
203 | {
204 | name: 'indexOf',
205 | shortDesc: '指定した要素の最初のインデックスを得る',
206 | desc:
207 | '指定された要素が配列内に現れる最初のインデックスを返します。もし存在しなければ、-1 を返します。',
208 | example: `console.log(arr.indexOf(5));`,
209 | output: `0`
210 | },
211 | {
212 | name: 'lastIndexOf',
213 | shortDesc: '指定した要素の最後のインデックスを得る',
214 | desc:
215 | '指定された要素が配列内に現れる最後の (最大の) インデックスを返します。もし存在しなければ、-1 を返します。',
216 | example: `console.log(arr.lastIndexOf(5));`,
217 | output: `0`
218 | },
219 | {
220 | name: 'find',
221 | shortDesc: '条件に合致する最初の要素を得る',
222 | desc:
223 | '指定された関数の条件を満たす、配列内の最初の要素を返します。該当する要素がなければ undefined を返します。findIndex()
に似ていますが、インデックスの代わりに要素そのものを返します。',
224 | example: `let isTiny = (el) => el < 2;
225 | console.log(arr.find(isTiny));`,
226 | output: `1`
227 | },
228 | {
229 | name: 'findIndex',
230 | shortDesc: '条件に合致する最初の要素のインデックスを得る',
231 | desc:
232 | '指定された関数の条件を満たす、配列内の最初の要素のインデックスを返します。該当する要素がなければ -1 を返します。find()
に似ていますが、要素そのものの代わりにインデックスを返します。',
233 | example: `let isBig = (el) => el > 6;
234 | console.log(arr.findIndex(isBig));`,
235 | output: `2`
236 | },
237 | {
238 | name: 'reduce',
239 | shortDesc: '配列を最初から最後までreduceした値を得る',
240 | desc:
241 | '配列内の各値とアキュムレータに対し、関数を左から右へ適用して単一の値にします。',
242 | example: `let reducer = (a, b) => a + b;
243 | console.log(arr.reduce(reducer));`,
244 | output: `14`
245 | },
246 | {
247 | name: 'reduceRight',
248 | shortDesc: '配列を最後から最初までreduceした値を得る',
249 | desc:
250 | '配列内の各値とアキュムレータに対し、関数を右から左へ適用して単一の値にします。',
251 | example: `[arr, [0, 1]].reduceRight((a, b) => {
252 | return a.concat(b)
253 | }, [])`,
254 | output: `[0, 1, 5, 1, 8]`
255 | }
256 | ],
257 | many: [
258 | {
259 | name: 'filter',
260 | shortDesc: '指定した条件に合致する値を得る',
261 | desc:
262 | '配列内の全要素のうち、フィルタ関数が true を返す要素を使って新しい配列を作成します。',
263 | example: `let filtered = arr.filter(el => el > 4);
264 | console.log(filtered)`,
265 | output: `[5, 8]`
266 | },
267 | {
268 | name: 'every',
269 | shortDesc: '全ての要素が条件に合致するかどうかを知る',
270 | desc:
271 | '配列内の全ての要素が、指定された関数の条件に合致する場合、true を返します。',
272 | example: `let isSmall = (el) => el < 10;
273 | console.log(arr.every(isSmall));`,
274 | output: `true`
275 | },
276 | {
277 | name: 'some',
278 | shortDesc: '一つでも条件に合致する要素が存在するかどうかを知る',
279 | desc:
280 | '配列内に、一つでも指定された関数の条件に合致する要素が存在する場合、true を返します。',
281 | example: `let biggerThan4 = (el) => el > 4;
282 | console.log(arr.some(biggerThan4));`,
283 | output: `true`
284 | }
285 | ]
286 | }
287 | }
288 | }
289 |
--------------------------------------------------------------------------------
/store/ja/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "ja",
3 | "long": "Japanese",
4 | "createdBy": "meih"
5 | }
6 |
--------------------------------------------------------------------------------
/store/nl/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "nl",
3 | "long": "Dutch",
4 | "createdBy": "glenngijsberts"
5 | }
6 |
--------------------------------------------------------------------------------
/store/pt/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | selectedMethod: '',
4 | adding: [
5 | {
6 | name: 'splice',
7 | shortDesc: 'elemento(s) no array',
8 | desc: 'Adiciona e/ou remove elementos do array.',
9 | example: `arr.splice(2, 0, 'tacos');
10 | console.log(arr);`,
11 | output: `[5, 1, 'tacos', 8]`
12 | },
13 | {
14 | name: 'push',
15 | shortDesc: 'elementos no final do array',
16 | desc:
17 | 'Adiciona um ou mais elementos no final do array e retorna o novo tamanho do array.',
18 | example: `arr.push(2);
19 | console.log(arr);`,
20 | output: '[5, 1, 8, 2]'
21 | },
22 | {
23 | name: 'unshift',
24 | shortDesc: 'elementos no início do array',
25 | desc:
26 | 'Adiciona um ou mais elementos no início do array e retorna o novo tamanho do array.',
27 | example: `arr.unshift(2, 7);
28 | console.log(arr);`,
29 | output: '[2, 7, 5, 1, 8]'
30 | },
31 | {
32 | name: 'concat',
33 | shortDesc: 'este array a outro(s) array(s) e/ou valor(es)',
34 | desc:
35 | 'Retorna um novo array incluindo este array concatenado de outro(s) arrays e/ou valor(es).',
36 | example: `let arr2 = ['a', 'b', 'c'];
37 | let arr3 = arr.concat(arr2);
38 | console.log(arr3);`,
39 | output: `[5, 1, 8, 'a', 'b', 'c']`
40 | }
41 | ],
42 | removing: [
43 | {
44 | name: 'splice',
45 | shortDesc: 'elemento(s) no array',
46 | desc: 'Adiciona e/ou remove elementos do array.',
47 | example: `arr.splice(2, 1);
48 | console.log(arr);`,
49 | output: `[5, 1]`
50 | },
51 | {
52 | name: 'pop',
53 | shortDesc: 'o último elemento do array',
54 | desc: 'Remove o último elemento do array e retorna o elemento.',
55 | example: `arr.pop();
56 | console.log(arr);`,
57 | output: `[5, 1]`
58 | },
59 | {
60 | name: 'shift',
61 | shortDesc: 'o primeiro elemento do array',
62 | desc: 'Remove o primeiro elemento do array e retorna o elemento.',
63 | example: `arr.shift();
64 | console.log(arr);`,
65 | output: `[1, 8]`
66 | },
67 | {
68 | name: 'slice',
69 | shortDesc:
70 | 'um ou mais elementos, mantendo o array original sem alterações',
71 | desc:
72 | 'O método slice()
retorna uma cópia rasa de parte do array em um novo objeto array. Você pode especificar apenas o índice final (deixando o índice inicial assumir o valor padrão zero), ou ambos, o índice inicial e o índice final separados por vírgula. O array original não será modificado.',
73 | example: `let slicedArr = arr.slice(1);
74 | console.log(arr);
75 | console.log(slicedArr);`,
76 | output: `[5, 1, 8]
77 | [1, 8]`
78 | }
79 | ],
80 | string: [
81 | {
82 | name: 'join',
83 | shortDesc: 'unir todos os elementos do array em uma string.',
84 | desc: `Une todos elementos do array em uma string. Você pode unir todos os itens sem delimitadores, ou com algum delimitador entre os elementos, elements.join(' -
85 | ')
retorna foo-bar
`,
86 | example: `console.log(arr.join());`,
87 | output: `"5,1,8"`
88 | },
89 | {
90 | name: 'toString',
91 | shortDesc: 'retornar uma string representando o array.',
92 | desc: 'Retorna uma string representando um array e seus elementos.',
93 | example: `console.log(arr.toString());`,
94 | output: `"5,1,8"`
95 | },
96 | {
97 | name: 'toLocaleString',
98 | shortDesc: 'retornar uma string localizada representando o array.',
99 | desc:
100 | 'Retorna uma string localizada representando um array e seus elementos. É muito útil para datas e moedas com características específicas do locale, recomendo consultar a documentação quando utilizar esta função.',
101 | example: `let date = [new Date()];
102 | const arrString = arr.toLocaleString();
103 | const dateString = date.toLocaleString();
104 | console.log(arrString, dateString);`,
105 | output: `"5,1,8 12/26/2017, 6:54:49 PM"`
106 | }
107 | ],
108 | ordering: [
109 | {
110 | name: 'reverse',
111 | shortDesc: 'inverter a ordem do array',
112 | desc:
113 | 'Inverte a ordem dos elementos do array modificando o array — o primeiro elemento se torna o último, e o último se torna o primeiro.',
114 | example: `arr.reverse();
115 | console.log(arr);`,
116 | output: `[8, 1, 5]`
117 | },
118 | {
119 | name: 'sort',
120 | shortDesc: 'ordenar os itens do array',
121 | desc:
122 | 'Ordena os itens do array modificando o array e retorna o próprio array.',
123 | example: `arr.sort();
124 | console.log(arr);`,
125 | output: `[1, 5, 8]`
126 | }
127 | ],
128 | other: [
129 | {
130 | name: 'length',
131 | shortDesc: 'retornar o comprimento do array',
132 | desc: 'Retorna o número de elementos existentes no array.',
133 | example: `console.log(arr.length);`,
134 | output: `3`
135 | },
136 | {
137 | name: 'fill',
138 | shortDesc:
139 | 'preencher todos os elementos do array com um valor estático',
140 | desc:
141 | 'Preenche todos os elementos do array de um índice inicial até um índice final com valores estáticos.',
142 | example: `arr.fill(2);
143 | console.log(arr);`,
144 | output: `[2, 2, 2]`
145 | },
146 | {
147 | name: 'copyWithin',
148 | shortDesc: 'copiar parte do array dentro do mesmo array.',
149 | desc:
150 | 'Copia parte do array para outra localização dentro deste mesmo array e o retorna, sem alterar seu tamanho. Você pode especificar o índice final (deixando o índice inicial assumir o valor padrão zero), ou ambos, o índice inicial e o índice final separados por vírgula',
151 | example: `arr.copyWithin(1);
152 | console.log(arr);`,
153 | output: `[5, 5, 1]`
154 | }
155 | ],
156 | iterate: [
157 | {
158 | name: 'forEach',
159 | shortDesc: 'executando uma função sobre cada elemento',
160 | desc:
161 | 'O método forEach()
executa uma função fornecida como parâmetro para cada elemento do array.',
162 | example: `arr.forEach((element) => {
163 | console.log(element)
164 | });`,
165 | output: `5
166 | 1
167 | 8`
168 | },
169 | {
170 | name: 'map',
171 | shortDesc:
172 | 'criando um novo array a partir de cada elemento transformado via uma função',
173 | desc:
174 | 'Cria um novo array com o resultado da chamada da função para cada elemento no array.',
175 | example: `let map = arr.map(x => x + 1);
176 | console.log(map);`,
177 | output: `[6, 2, 9]`
178 | },
179 | {
180 | name: 'entries',
181 | shortDesc: 'criando um objeto iterator',
182 | desc:
183 | 'Retorna um novo objeto do tipo Array Iterator que contém pares de chave/valor para cada índice do array. Há diversos usos para iterators, assim como há outros métodos análogos, como o método values
e o método keys
',
184 | example: `let iterator = arr.entries();
185 | console.log(iterator.next().value);`,
186 | output: `[0, 5]
187 |
188 | `
189 | }
190 | ],
191 | find: {
192 | single: [
193 | {
194 | name: 'includes',
195 | shortDesc: 'se um dado elemento existe',
196 | desc:
197 | 'Verifica se um array contém um certo elemento, retornando true ou false.',
198 | example: `console.log(arr.includes(1));`,
199 | output: `true`
200 | },
201 | {
202 | name: 'indexOf',
203 | shortDesc: 'o primeiro índice de um elemento',
204 | desc:
205 | 'Retorna o primeiro índice no qual um dado elemento pode ser encontrado no array, ou retorna -1 se não existe o item.',
206 | example: `console.log(arr.indexOf(5));`,
207 | output: `0`
208 | },
209 | {
210 | name: 'lastIndexOf',
211 | shortDesc: 'o último índice de um elemento',
212 | desc:
213 | 'Retorna o último (maior) índice no qual um dado elemento pode ser encontrado no array, ou retorna -1 se não existe o item.',
214 | example: `console.log(arr.lastIndexOf(5));`,
215 | output: `0`
216 | },
217 | {
218 | name: 'find',
219 | shortDesc: 'o primeiro elemento que satisfaz a condição',
220 | desc:
221 | 'Retorna o valor encontrado no array, se um elemento no array satisfaz o teste da função fornecida como parâmetro, ou retorna undefined se não encontrado. Similar ao método findIndex()
, porém esta função retorna o item ao invés do índice.',
222 | example: `let isTiny = (el) => el < 2;
223 | console.log(arr.find(isTiny));`,
224 | output: `1`
225 | },
226 | {
227 | name: 'findIndex',
228 | shortDesc: 'o primeiro índice de um elemento que satisfaz a condição',
229 | desc:
230 | 'Retorna o índice do primeiro elemento no array que satisfaz o teste da função fornecida como parâmetro. Senão, o valor -1 é retornado. Similar ao método find()
, porém esta função retorna o índice ao invés do item.',
231 | example: `let isBig = (el) => el > 6;
232 | console.log(arr.findIndex(isBig));`,
233 | output: `2`
234 | },
235 | {
236 | name: 'reduce',
237 | shortDesc: 'um valor através da redução do array, início ao fim',
238 | desc:
239 | 'Aplica uma função sobre um acumulador e cada elemento do array (da esquerda para direita) até reduzir a um único valor.',
240 | example: `let reducer = (a, b) => a + b;
241 | console.log(arr.reduce(reducer));`,
242 | output: `14`
243 | },
244 | {
245 | name: 'reduceRight',
246 | shortDesc: 'um valor através da redução do array, fim ao início',
247 | desc:
248 | 'Aplica uma função sobre um acumulador e cada elemento do array (da direta para esquerda) até reduzir a um único valor.',
249 | example: `[arr, [0, 1]].reduceRight((a, b) => {
250 | return a.concat(b)
251 | }, [])`,
252 | output: `[0, 1, 5, 1, 8]`
253 | }
254 | ],
255 | many: [
256 | {
257 | name: 'filter',
258 | shortDesc: 'um valor baseado numa condição que eu criei',
259 | desc:
260 | 'Cria um novo array com todos os elementos do array que satisfazem o teste da função fornecida como parâmetro.',
261 | example: `let filtered = arr.filter(el => el > 4);
262 | console.log(filtered)`,
263 | output: `[5, 8]`
264 | },
265 | {
266 | name: 'every',
267 | shortDesc: 'se todos elementos satisfazem uma condição',
268 | desc:
269 | 'Retorna true se todos elementos no array satisfazem o teste da função fornecida como parâmetro.',
270 | example: `let isSmall = (el) => el < 10;
271 | console.log(arr.every(isSmall));`,
272 | output: `true`
273 | },
274 | {
275 | name: 'some',
276 | shortDesc: 'se pelo menos algum elemento satisfaz uma condição',
277 | desc:
278 | 'Retorna true se pelo menos um elemento no array satisfaz o teste da função fornecida como parâmetro.',
279 | example: `let biggerThan4 = (el) => el > 4;
280 | console.log(arr.some(biggerThan4));`,
281 | output: `true`
282 | }
283 | ]
284 | }
285 | }
286 | }
287 |
--------------------------------------------------------------------------------
/store/pt/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "pt",
3 | "long": "Portuguese",
4 | "createdBy": "welll"
5 | }
6 |
--------------------------------------------------------------------------------
/store/ru/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "ru",
3 | "long": "Russian",
4 | "createdBy": "TheElderMindseeker"
5 | }
6 |
--------------------------------------------------------------------------------
/store/sr/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | selectedMethod: '',
4 | adding: [
5 | {
6 | name: 'splice',
7 | shortDesc: 'element/elemente u niz',
8 | desc: 'Dodaje i/ili uklanja elemente iz niza.',
9 | example: `arr.splice(2, 0, 'tacos');
10 | console.log(arr);`,
11 | output: `[5, 1, 'tacos', 8]`
12 | },
13 | {
14 | name: 'push',
15 | shortDesc: 'elemente na kraj niza',
16 | desc:
17 | 'Dodaje jedan ili više elemenata na kraj niza i vraća novu dužinu niza.',
18 | example: `arr.push(2);
19 | console.log(arr);`,
20 | output: '[5, 1, 8, 2]'
21 | },
22 | {
23 | name: 'unshift',
24 | shortDesc: 'elemente na početak niza',
25 | desc:
26 | 'Dodaje jedan ili više elemenata na početak niza i vraća novu dužinu niza.',
27 | example: `arr.unshift(2, 7);
28 | console.log(arr);`,
29 | output: '[2, 7, 5, 1, 8]'
30 | },
31 | {
32 | name: 'concat',
33 | shortDesc: 'ovaj niz sa drugim nizom/nizovima i/ili vrednošću/vrednostima',
34 | desc:
35 | 'Vraća novi niz koji se sastoji od ovog niza i drugog niza/nizova i/ili vrednosti.',
36 | example: `let arr2 = ['a', 'b', 'c'];
37 | let arr3 = arr.concat(arr2);
38 | console.log(arr3);`,
39 | output: `[5, 1, 8, 'a', 'b', 'c']`
40 | }
41 | ],
42 | removing: [
43 | {
44 | name: 'splice',
45 | shortDesc: 'element/elemente iz niza',
46 | desc: 'Dodaje i/ili uklanja elemente iz niza.',
47 | example: `arr.splice(2, 1);
48 | console.log(arr);`,
49 | output: `[5, 1]`
50 | },
51 | {
52 | name: 'pop',
53 | shortDesc: 'poslednji element niza',
54 | desc:
55 | 'Uklanja poslednji element iz niza i vraća taj element.',
56 | example: `arr.pop();
57 | console.log(arr);`,
58 | output: `[5, 1]`
59 | },
60 | {
61 | name: 'shift',
62 | shortDesc: 'prvi element niza',
63 | desc:
64 | 'Uklanja prvi element iz niza i vraća taj element.',
65 | example: `arr.shift();
66 | console.log(arr);`,
67 | output: `[1, 8]`
68 | },
69 | {
70 | name: 'slice',
71 | shortDesc:
72 | 'jedan ili više elemenata za upotrebu, ostavljajući niz onakvim kakav jeste',
73 | desc:
74 | 'Slice()
metod vraća plitku kopiju porcije niza u novi objekat niza. Možete odrediti ili samo početni element (gde će kraj podrazumevano biti dužina niza) ili i početnu i krajnju vrednost, odvojene zarezom. Originalni niz će ostati neizmenjen.',
75 | example: `let slicedArr = arr.slice(1);
76 | console.log(arr);
77 | console.log(slicedArr);`,
78 | output: `[5, 1, 8]
79 | [1, 8]`
80 | }
81 | ],
82 | string: [
83 | {
84 | name: 'join',
85 | shortDesc: 'pridružim sve elemente niza u jedan string.',
86 | desc: `Pridružuje sve elemente niza u jedan string. Možete ih pridružiti zajedno onakve kakvi jesi, ili sa nečim između, npr. elements.join(' -
87 | ')
proizvodi foo-bar
`,
88 | example: `console.log(arr.join());`,
89 | output: `"5,1,8"`
90 | },
91 | {
92 | name: 'toString',
93 | shortDesc: 'vratim string koji predstavlja niz.',
94 | desc: 'Vraća string koji predstavlja niz i njegove elemente.',
95 | example: `console.log(arr.toString());`,
96 | output: `"5,1,8"`
97 | },
98 | {
99 | name: 'toLocaleString',
100 | shortDesc: 'vratim lokalizovan string koji predstavlja niz.',
101 | desc:
102 | 'Ovo je pomalo čudno. Vraća lokalizovan string koji predstavlja niz i njegove vrednosti. Ovo je veoma korisno za datume i valute, i ima neke čudne prirodne apstrakcije, tako da je najbolje konsultovati dokumentaciju pri njegovom korišćenju.',
103 | example: `let date = [new Date()];
104 | const arrString = arr.toLocaleString();
105 | const dateString = date.toLocaleString();
106 | console.log(arrString, dateString);`,
107 | output: `"5,1,8 12/26/2017, 6:54:49 PM"`
108 | }
109 | ],
110 | ordering: [
111 | {
112 | name: 'reverse',
113 | shortDesc: 'okrenem redosled niza',
114 | desc:
115 | 'Preokreće redosled elemenata datog niza — prvi element postaje zadnji, a zadnji postaje prvi.',
116 | example: `arr.reverse();
117 | console.log(arr);`,
118 | output: `[8, 1, 5]`
119 | },
120 | {
121 | name: 'sort',
122 | shortDesc: 'sortiram elemente niza',
123 | desc: `Sortira elemente datog niza i vraća niz.
124 |
125 | Važna napomena:Ako compareFunction nije obezbeđena, elementi su sortirani konvertovanjem u stringove i poređenjem stringova u Unicode kodnom redosledu. Na primer, "Banana" dolazi pre "cherry". U numeričkom sortiranju, 9 dolazi pre 80, ali zbog toga što su brojevi konvertovani u stringove, "80" dolazi pre "9" u Unicode redosledu. Dokumentacija sadrži više informacija koje ovo pojašnjavaju.`,
126 | example: `arr.sort();
127 | console.log(arr);`,
128 | output: `[1, 5, 8]`
129 | }
130 | ],
131 | other: [
132 | {
133 | name: 'length',
134 | shortDesc: 'pronađem dužinu niza',
135 | desc: 'Vraća broj elemenata datog niza.',
136 | example: `console.log(arr.length);`,
137 | output: `3`
138 | },
139 | {
140 | name: 'fill',
141 | shortDesc: 'popunim sve elemente niza statičkom vrednošću',
142 | desc:
143 | 'Popunjava sve elemente niza od početnog indeksa do krajnjeg indeksa sa statičkom vrednošću.',
144 | example: `arr.fill(2);
145 | console.log(arr);`,
146 | output: `[2, 2, 2]`
147 | },
148 | {
149 | name: 'copyWithin',
150 | shortDesc: 'kopiram sekvencu elemenata nizu unutar niza.',
151 | desc:
152 | 'Kopira sekvencu elemenata niza unutar niza. Možete odrediti ili krajnji element (gde će početak podrazumevano biti nula) ili i početnu i krajnju vrednost, odvojene zarezom.',
153 | example: `arr.copyWithin(1);
154 | console.log(arr);`,
155 | output: `[5, 5, 1]`
156 | }
157 | ],
158 | iterate: [
159 | {
160 | name: 'forEach',
161 | shortDesc: 'izvršavanju funkcije koju ću da kreiram za svaki element',
162 | desc:
163 | 'forEach() metod izvršava datu funkciju nad svakim elementom niza jedanput.',
164 | example: `arr.forEach((element) => {
165 | console.log(element)
166 | });`,
167 | output: `5
168 | 1
169 | 8`
170 | },
171 | {
172 | name: 'map',
173 | shortDesc:
174 | 'kreiranju novog niza od svakog elementa sa funkcijom koju kreiram',
175 | desc:
176 | 'Kreira novi niz sa rezultatima pozvane funkcije nad svakim elementom u ovom nizu.',
177 | example: `let map = arr.map(x => x + 1);
178 | console.log(map);`,
179 | output: `[6, 2, 9]`
180 | },
181 | {
182 | name: 'entries',
183 | shortDesc: 'kreiranjem iterator objekta',
184 | desc:
185 | 'Vraća novi Array Iterrator objekat koji sadrži key/value parove za svaki indeks u nizu. Postoji dosta upotreba iteratora, kao i drugih metoda u sprezi sa njima, kao npr. values
i keys
',
186 | example: `let iterator = arr.entries();
187 | console.log(iterator.next().value);`,
188 | output: `[0, 5]
189 |
190 | `
191 | }
192 | ],
193 | find: {
194 | single: [
195 | {
196 | name: 'includes',
197 | shortDesc: 'ako postoji određeni element',
198 | desc:
199 | 'Ustanovljava da li niz sadrži određeni element, vraćajuću true ili false vrednosti.',
200 | example: `console.log(arr.includes(1));`,
201 | output: `true`
202 | },
203 | {
204 | name: 'indexOf',
205 | shortDesc: 'prvi indeks određenog elementa',
206 | desc:
207 | 'Vraća prvi indeks na kom se dati element može pronaći u nizu, ili -1 ako on nije prisutan.',
208 | example: `console.log(arr.indexOf(5));`,
209 | output: `0`
210 | },
211 | {
212 | name: 'lastIndexOf',
213 | shortDesc: 'zadnji indeks određenog elementa',
214 | desc:
215 | 'Vraća zadnji (najveći) indeks određenog elementa u nizu koji je jednak određenoj vrednosti, ili -1 ako nijedan nije pronađen.',
216 | example: `console.log(arr.lastIndexOf(5));`,
217 | output: `0`
218 | },
219 | {
220 | name: 'find',
221 | shortDesc: 'prvi element koji zadovoljava određen uslov',
222 | desc:
223 | 'Vraća pronađenu vrednost unutar niza, ako element u nizu zadovoljava datu test funkciju ili undefined ako nije pronađen. Slično kao findIndex()
, s tim što vraća vrednost umesto indeks.',
224 | example: `let isTiny = (el) => el < 2;
225 | console.log(arr.find(isTiny));`,
226 | output: `1`
227 | },
228 | {
229 | name: 'findIndex',
230 | shortDesc: 'prvi indeks elementa koji zadovoljava određen uslov',
231 | desc:
232 | 'Vraća indeks prvog elementa u nizu koji zadovoljava datu test funkciju. U suprotnom vraća -1. Slično kao find()
, s tim što vraća indeks umesto vrednosti.',
233 | example: `let isBig = (el) => el > 6;
234 | console.log(arr.findIndex(isBig));`,
235 | output: `2`
236 | },
237 | {
238 | name: 'reduce',
239 | shortDesc: 'vrednost redukujući niz, od početka do kraja',
240 | desc:
241 | 'Primenjuje funkciju na akumulator i svaku vrednost niza (sa leva na desno) kako bi je smanjio na jednu vrednost.',
242 | example: `let reducer = (a, b) => a + b;
243 | console.log(arr.reduce(reducer));`,
244 | output: `14`
245 | },
246 | {
247 | name: 'reduceRight',
248 | shortDesc: 'vrednost redukujući niz, od kraja do početka',
249 | desc:
250 | 'Primenjuje funkciju na akumulator i svaku vrednost niza (sa desna na levo) kako bi je smanjio na jednu vrednost.',
251 | example: `[arr, [0, 1]].reduceRight((a, b) => {
252 | return a.concat(b)
253 | }, [])`,
254 | output: `[0, 1, 5, 1, 8]`
255 | }
256 | ],
257 | many: [
258 | {
259 | name: 'filter',
260 | shortDesc: 'vrednosti na osnovu uslova koji ja zadam',
261 | desc:
262 | 'Kreira novi niz sa svim elementima ovog niza za koji data filter funkcija vraća true.',
263 | example: `let filtered = arr.filter(el => el > 4);
264 | console.log(filtered)`,
265 | output: `[5, 8]`
266 | },
267 | {
268 | name: 'every',
269 | shortDesc: 'da li svaki element zadovoljava određen uslov ili ne',
270 | desc:
271 | 'Vraća true ako svaki element u ovom nizu zadovoljava datu test funkciju',
272 | example: `let isSmall = (el) => el < 10;
273 | console.log(arr.every(isSmall));`,
274 | output: `true`
275 | },
276 | {
277 | name: 'some',
278 | shortDesc: 'da li barem jedan element zadovoljava određen uslov ili ne',
279 | desc:
280 | 'Vraća true ako barem jedan element u ovom nizu zadovoljava datu test funkciju',
281 | example: `let biggerThan4 = (el) => el > 4;
282 | console.log(arr.some(biggerThan4));`,
283 | output: `true`
284 | }
285 | ]
286 | }
287 | }
288 | }
289 |
--------------------------------------------------------------------------------
/store/sr/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "sr",
3 | "long": "Serbian",
4 | "createdBy": "bdimitrovski"
5 | }
6 |
--------------------------------------------------------------------------------
/store/tr/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | selectedMethod: '',
4 | adding: [
5 | {
6 | name: 'splice',
7 | shortDesc: 'dizideki elemanlar',
8 | desc: 'Dizideki elemanlardan ekle ya da sil.',
9 | example: `arr.splice(2, 0, 'tacos');
10 | console.log(arr);`,
11 | output: `[5, 1, 'tacos', 8]`
12 | },
13 | {
14 | name: 'push',
15 | shortDesc: 'dizinin sonundaki elemanlar',
16 | desc:
17 | 'Bir dizinin sonuna bir veya daha fazla öğe ekler ve dizinin yeni uzunluğunu döndürür',
18 | example: `arr.push(2);
19 | console.log(arr);`,
20 | output: '[5, 1, 8, 2]'
21 | },
22 | {
23 | name: 'unshift',
24 | shortDesc: 'bir dizinin önündeki öğeler',
25 | desc:
26 | 'Bir dizinin önüne bir veya daha fazla öğe ekler ve dizinin yeni uzunluğunu döndürür',
27 | example: `arr.unshift(2, 7);
28 | console.log(arr);`,
29 | output: '[2, 7, 5, 1, 8]'
30 | },
31 | {
32 | name: 'concat',
33 | shortDesc: 'dizi başka bir dizi(ler) / değer(ler)',
34 | desc:
35 | 'Diğer dizi (ler) ve / veya değer (ler) ile birleştirilen bu diziden oluşan yeni bir dizi döndürür.',
36 | example: `let arr2 = ['a', 'b', 'c'];
37 | let arr3 = arr.concat(arr2);
38 | console.log(arr3);`,
39 | output: `[5, 1, 8, 'a', 'b', 'c']`
40 | }
41 | ],
42 | removing: [
43 | {
44 | name: 'splice',
45 | shortDesc: 'dizideki elemanlar',
46 | desc: 'Dizideki elemanlardan ekle ya da sil.',
47 | example: `arr.splice(2, 1);
48 | console.log(arr);`,
49 | output: `[5, 1]`
50 | },
51 | {
52 | name: 'pop',
53 | shortDesc: 'dizinin son elemanı',
54 | desc:
55 | 'Dizinin son elemanını siler ve geri kalanı geri döndürür.',
56 | example: `arr.pop();
57 | console.log(arr);`,
58 | output: `[5, 1]`
59 | },
60 | {
61 | name: 'shift',
62 | shortDesc: 'dizinin ilk elemanı',
63 | desc:
64 | 'Dizinin ilk elemanını siler ve geri kalanı geri döndürür',
65 | example: `arr.shift();
66 | console.log(arr);`,
67 | output: `[1, 8]`
68 | },
69 | {
70 | name: 'slice',
71 | shortDesc:
72 | 'diziyi olduğu bırakmak için bir ya da daha fazla elemanın kullanımı',
73 | desc:
74 | ' slice () code> yöntemi, bir dizinin bir bölümünün bir kopyasını yeni bir dizi nesnesine döndürür .Yalnızca başlangıç öğesini (dizinin sonuna kadar sonlanacağı nokta) veya virgülle ayrılmış hem başlangıç hem de son ögesini belirtebilirsiniz. Bununda yeni bir dizi elde edersiniz, bu orijinal dizi değişmeyecektir.',
75 | example: `let slicedArr = arr.slice(1);
76 | console.log(arr);
77 | console.log(slicedArr);`,
78 | output: `[5, 1, 8]
79 | [1, 8]`
80 | }
81 | ],
82 | string: [
83 | {
84 | name: 'join',
85 | shortDesc: 'dizinin tüm elemanlarını bir string haline getir',
86 | desc: `Dizinin tüm elemanlarını bir string haline getirir.
87 | elements.join(' - ')
kodu çıktı olarak foo-bar
kodunu verir.`,
88 | example: `console.log(arr.join());`,
89 | output: `"5,1,8"`
90 | },
91 | {
92 | name: 'toString',
93 | shortDesc: 'bir diziyi temsil eden bir string döndür',
94 | desc: 'Geriye diziyi ve öğelerini temsil eden bir string döndürür.',
95 | example: `console.log(arr.toString());`,
96 | output: `"5,1,8"`
97 | },
98 | {
99 | name: 'toLocaleString',
100 | shortDesc: 'bir diziyi temsil eden yerelleştirilmiş bir string döndür',
101 | desc:
102 | 'Bu biraz delice. Diziyi temsil eden yerelleştirilmiş bir string döndürür. Bu string, tarihler, para birimleri gibi durumlar için çok kullanışlıdır.',
103 | example: `let date = [new Date()];
104 | const arrString = arr.toLocaleString();
105 | const dateString = date.toLocaleString();
106 | console.log(arrString, dateString);`,
107 | output: `"5,1,8 12/26/2017, 6:54:49 PM"`
108 | }
109 | ],
110 | ordering: [
111 | {
112 | name: 'reverse',
113 | shortDesc: 'dizinin sıralamasını tersine çevir',
114 | desc:
115 | 'Bir dizinin elemanlarının sırasını tersine çevirir - ilki sonuncu olur ve sonuncu ilk olur.',
116 | example: `arr.reverse();
117 | console.log(arr);`,
118 | output: `[8, 1, 5]`
119 | },
120 | {
121 | name: 'sort',
122 | shortDesc: 'dizinin elemanlarını sırala',
123 | desc: `Bir dizinin elemanlarını yerinde sıralar ve geriye diziyi döndürür.
124 |
125 | Önemli Not: Eğer compareFunction desteklenmiyorsa, elemanlar stringe dönüştürülüp Unicode kod sırasına göre sıralanır. Örneğin, 'Banana' elemanı 'cherry' elemanından önce gelir. Sayısal bir sıralamada 9, 80'den önce gelir ancak Unicode düzeninde 80, 9'dan önce gelir. Dökümanlarda daha fazla bilgiye ulaşabilirsiniz.`,
126 | example: `arr.sort();
127 | console.log(arr);`,
128 | output: `[1, 5, 8]`
129 | }
130 | ],
131 | other: [
132 | {
133 | name: 'length',
134 | shortDesc: 'dizinin uzunluğunu bul',
135 | desc: 'Geriye dizinin elemanlarının sayısını döndürür.',
136 | example: `console.log(arr.length);`,
137 | output: `3`
138 | },
139 | {
140 | name: 'fill',
141 | shortDesc: 'dizinin tüm öğelerini statik bir değerle doldur',
142 | desc:
143 | 'Bir dizinin tüm öğelerini bir başlangıç noktasından bir bitiş noktasına kadar statik değer ile doldurur.',
144 | example: `arr.fill(2);
145 | console.log(arr);`,
146 | output: `[2, 2, 2]`
147 | },
148 | {
149 | name: 'copyWithin',
150 | shortDesc: 'dizi içindeki dizi elemanlarının bir dizisini kopyala',
151 | desc:
152 | 'Dizideki dizi öğelerinin bir dizisini kopyalar. Yalnızca bitiş öğesinin (başlangıçta sıfıra varsayılan olarak sıfır) veya hem başlangıç hem de son, virgülle ayrılmış olarak belirtebilirsiniz.',
153 | example: `arr.copyWithin(1);
154 | console.log(arr);`,
155 | output: `[5, 5, 1]`
156 | }
157 | ],
158 | iterate: [
159 | {
160 | name: 'forEach',
161 | shortDesc: 'her eleman için yapılacak bir işlevi yürüt',
162 | desc:
163 | 'ForEach () yöntemi, her dizi elemanı için bir kez sağlanan bir işlevi yürütür.',
164 | example: `arr.forEach((element) => {
165 | console.log(element)
166 | });`,
167 | output: `5
168 | 1
169 | 8`
170 | },
171 | {
172 | name: 'map',
173 | shortDesc:
174 | 'bir fonksiyon ile her ögeden yeni bir dizi oluştur',
175 | desc:
176 | 'Bu dizideki her öğede sağlanan bir fonksiyon çağırmanın sonuçlarıyla yeni bir dizi oluşturur.',
177 | example: `let map = arr.map(x => x + 1);
178 | console.log(map);`,
179 | output: `[6, 2, 9]`
180 | },
181 | {
182 | name: 'entries',
183 | shortDesc: 'bir yineleyici obje oluştur',
184 | desc:
185 | 'Dizideki her dizinin anahtar / değer çiftlerini içeren yeni bir Array Iterator nesnesi döndürür. Yineleyiciler için, bununla birlikte kullanılan diğer yöntemlerin yanı sıra values code> ve keys code> gibi birçok kullanım alanı vardır.',
186 | example: `let iterator = arr.entries();
187 | console.log(iterator.next().value);`,
188 | output: `[0, 5]
189 |
190 | `
191 | }
192 | ],
193 | find: {
194 | single: [
195 | {
196 | name: 'includes',
197 | shortDesc: 'belli bir element var ise',
198 | desc:
199 | 'Bir dizinin belirli bir öğeyi içerip içermediğini, uygun olduğunda true veya false döndürüp döndürmeyeceğini belirler.',
200 | example: `console.log(arr.includes(1));`,
201 | output: `true`
202 | },
203 | {
204 | name: 'indexOf',
205 | shortDesc: 'bir elemanın ilk indeksini bulur',
206 | desc:
207 | 'Belirli bir öğenin dizide bulunabileceği ilk dizini bulur veya mevcut değilse -1 değerini döndürür.',
208 | example: `console.log(arr.indexOf(5));`,
209 | output: `0`
210 | },
211 | {
212 | name: 'lastIndexOf',
213 | shortDesc: 'bir elemanın son indeksini bulur',
214 | desc:
215 | 'Dizideki bir öğenin belirtilen değere eşit olan son (en büyük) indeksini veya hiçbiri bulunamazsa -1 değerini döndürür.',
216 | example: `console.log(arr.lastIndexOf(5));`,
217 | output: `0`
218 | },
219 | {
220 | name: 'find',
221 | shortDesc: 'bir koşulu karşılayan ilk durum',
222 | desc:
223 | 'Dizideki bir öğe sağlanan test işlevini karşılarsa veya bulunmazsa tanımlanmamışsa dizideki bulunan değeri döndürür. findIndex () code> öğesine benzer, ancak indeks yerine öğeyi döndürür.',
224 | example: `let isTiny = (el) => el < 2;
225 | console.log(arr.find(isTiny));`,
226 | output: `1`
227 | },
228 | {
229 | name: 'findIndex',
230 | shortDesc: 'bir koşulu karşılayan bir elemanın ilk indeksi',
231 | desc:
232 | 'Sağlanan test işlevini karşılayan dizideki ilk öğenin dizinini döndürür. Aksi takdirde -1 iade edilir. find () code> öğesine benzer, ancak öğenin yerine dizini döndürür..',
233 | example: `let isBig = (el) => el > 6;
234 | console.log(arr.findIndex(isBig));`,
235 | output: `2`
236 | },
237 | {
238 | name: 'reduce',
239 | shortDesc: 'diziden bir değeri indirge (Soldan sağa)',
240 | desc:
241 | 'Bir akümülatöre ve dizinin her bir değerine (soldan sağa) bir işlevi tek bir değere indirgemek için uygulayın.',
242 | example: `let reducer = (a, b) => a + b;
243 | console.log(arr.reduce(reducer));`,
244 | output: `14`
245 | },
246 | {
247 | name: 'reduceRight',
248 | shortDesc: 'diziden bir değeri indirge (Sağdan sola)',
249 | desc:
250 | 'Bir akümülatöre ve dizinin her bir değerine (sağdan sola) bir işlevi tek bir değere indirgemek için uygulayın.',
251 | example: `[arr, [0, 1]].reduceRight((a, b) => {
252 | return a.concat(b)
253 | }, [])`,
254 | output: `[0, 1, 5, 1, 8]`
255 | }
256 | ],
257 | many: [
258 | {
259 | name: 'filter',
260 | shortDesc: 'bir koşula göre filtreleme yap',
261 | desc:
262 | 'Sağlanan filtreleme işlevinin doğru olarak döndüğü bu dizinin tüm öğelerini içeren yeni bir dizi oluşturur.',
263 | example: `let filtered = arr.filter(el => el > 4);
264 | console.log(filtered)`,
265 | output: `[5, 8]`
266 | },
267 | {
268 | name: 'every',
269 | shortDesc: 'her eleman için bir koşulu kontrol et',
270 | desc:
271 | 'Bu dizideki her öğe sağlanan test işlevini karşılarsa true değerini döndürür.',
272 | example: `let isSmall = (el) => el < 10;
273 | console.log(arr.every(isSmall));`,
274 | output: `true`
275 | },
276 | {
277 | name: 'some',
278 | shortDesc: 'en az bir eleman için koşulu kontrol et',
279 | desc:
280 | 'Bu dizideki en az bir eleman sağlanan sınama işlevini karşılarsa true değerini döndürür.',
281 | example: `let biggerThan4 = (el) => el > 4;
282 | console.log(arr.some(biggerThan4));`,
283 | output: `true`
284 | }
285 | ]
286 | }
287 | }
288 | }
289 |
--------------------------------------------------------------------------------
/store/tr/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "tr",
3 | "long": "Türkçe",
4 | "createdBy": "ahmetozantekin"
5 | }
6 |
--------------------------------------------------------------------------------
/store/ua/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "ua",
3 | "long": "Ukrainian",
4 | "createdBy": "doubledare704"
5 | }
6 |
--------------------------------------------------------------------------------
/store/zh_cn/index.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | selectedMethod: '',
4 | adding: [
5 | {
6 | name: 'splice',
7 | shortDesc: '一个或多个元素到数组',
8 | desc: '添加、删除或替换数组中的元素。',
9 | example: `arr.splice(2, 0, 'tacos');
10 | console.log(arr);`,
11 | output: `[5, 1, 'tacos', 8]`
12 | },
13 | {
14 | name: 'push',
15 | shortDesc: '元素到数组的末尾',
16 | desc:
17 | '将一个或多个元素添加到数组的末尾,并返回数组的新长度。',
18 | example: `arr.push(2);
19 | console.log(arr);`,
20 | output: '[5, 1, 8, 2]'
21 | },
22 | {
23 | name: 'unshift',
24 | shortDesc: '元素到数组的开头',
25 | desc:
26 | '将一个或多个元素添加到数组的开头,并返回数组的新长度。',
27 | example: `arr.unshift(2, 7);
28 | console.log(arr);`,
29 | output: '[2, 7, 5, 1, 8]'
30 | },
31 | {
32 | name: 'concat',
33 | shortDesc: '其他数组或值到这个数组',
34 | desc:
35 | '返回由这个数组与其他数组或值组成的新数组。',
36 | example: `let arr2 = ['a', 'b', 'c'];
37 | let arr3 = arr.concat(arr2);
38 | console.log(arr3);`,
39 | output: `[5, 1, 8, 'a', 'b', 'c']`
40 | }
41 | ],
42 | removing: [
43 | {
44 | name: 'splice',
45 | shortDesc: '数组中一个或多个元素',
46 | desc: '添加、删除或替换数组中的元素。',
47 | example: `arr.splice(2, 1);
48 | console.log(arr);`,
49 | output: `[5, 1]`
50 | },
51 | {
52 | name: 'pop',
53 | shortDesc: '数组的最后一个元素',
54 | desc:
55 | '从数组中删除最后一个元素并返回该元素。',
56 | example: `arr.pop();
57 | console.log(arr);`,
58 | output: `[5, 1]`
59 | },
60 | {
61 | name: 'shift',
62 | shortDesc: '数组的第一个元素',
63 | desc:
64 | '从数组中移除第一个元素并返回该元素。',
65 | example: `arr.shift();
66 | console.log(arr);`,
67 | output: `[1, 8]`
68 | },
69 | {
70 | name: 'slice',
71 | shortDesc:
72 | '一个或多个才能使用,保持原数组不变。',
73 | desc:
74 | 'slice()
方法返回一个新的数组,是对原数组部分的浅拷贝。可以只传入 begin
开始位置参数( end
结束位置将默认为数组的长度),或者都传入 slice(begin, end)
。原数组不会被修改。',
75 | example: `let slicedArr = arr.slice(1);
76 | console.log(arr);
77 | console.log(slicedArr);`,
78 | output: `[5, 1, 8]
79 | [1, 8]`
80 | }
81 | ],
82 | string: [
83 | {
84 | name: 'join',
85 | shortDesc: '把数组中的所有元素转换为字符串',
86 | desc: `把数组中的所有元素转换为字符串。可以按原样,或者在中间加入elements.join('-')
返回foo-bar
`,
87 | example: `console.log(arr.join());`,
88 | output: `"5,1,8"`
89 | },
90 | {
91 | name: 'toString',
92 | shortDesc: '返回一个表示数组的字符串。',
93 | desc: '返回表示数组和它元素的字符串。',
94 | example: `console.log(arr.toString());`,
95 | output: `"5,1,8"`
96 | },
97 | {
98 | name: 'toLocaleString',
99 | shortDesc: '返回表示该数组的本地化字符串。',
100 | desc:
101 | '这个有点怪。返回表示数组及其元素的本地化字符串。这对日期和货币是非常有用,有一些奇怪的原生抽象,所以最好使用时参考文档。',
102 | example: `let date = [new Date()];
103 | const arrString = arr.toLocaleString();
104 | const dateString = date.toLocaleString();
105 | console.log(arrString, dateString);`,
106 | output: `"5,1,8 12/26/2017, 6:54:49 PM"`
107 | }
108 | ],
109 | ordering: [
110 | {
111 | name: 'reverse',
112 | shortDesc: '反转数组中的元素顺序。',
113 | desc:
114 | '反转数组中元素的顺序 - 第一个变成最后一个,最后一个变成第一个。',
115 | example: `arr.reverse();
116 | console.log(arr);`,
117 | output: `[8, 1, 5]`
118 | },
119 | {
120 | name: 'sort',
121 | shortDesc: '对数组中元素进行排序。',
122 | desc: `对数组中的元素进行排序并返回数组。
123 |
124 | 注意:如果没有给出用于比较的函数,数组中的元素会被转换成字符串后再比较,然后以 Unicode 的顺序进行排序。在对数字进行排序的时候,9 本来应该排在 80 前面,但因为数字会被转换成字符串,而按照 Unicode 的顺序,“80”会排在“9”前面。详细信息可查看文档。`,
125 | example: `arr.sort();
126 | console.log(arr);`,
127 | output: `[1, 5, 8]`
128 | }
129 | ],
130 | other: [
131 | {
132 | name: 'length',
133 | shortDesc: '查询数组的长度',
134 | desc: '返回数组中元素的数目。',
135 | example: `console.log(arr.length);`,
136 | output: `3`
137 | },
138 | {
139 | name: 'fill',
140 | shortDesc: '用静态值填充数组的所有元素',
141 | desc:
142 | '用一个静态值从开始索引到结束索引填充数组的所有元素。',
143 | example: `arr.fill(2);
144 | console.log(arr);`,
145 | output: `[2, 2, 2]`
146 | },
147 | {
148 | name: 'copyWithin',
149 | shortDesc: '复制数组中的一系列数组元素。',
150 | desc:
151 | '复制数组中的一系列数组元素。可以只传入 end
结束位置参数( begin
开始位置将默认为 0),或者都传入 copyWithin(begin, end)
',
152 | example: `arr.copyWithin(1);
153 | console.log(arr);`,
154 | output: `[5, 5, 1]`
155 | }
156 | ],
157 | iterate: [
158 | {
159 | name: 'forEach',
160 | shortDesc: '为每个元素都执行一次回调函数。',
161 | desc:
162 | 'The forEach() 方法为每个元素都执行一次回调函数。',
163 | example: `arr.forEach((element) => {
164 | console.log(element)
165 | });`,
166 | output: `5
167 | 1
168 | 8`
169 | },
170 | {
171 | name: 'map',
172 | shortDesc:
173 | '回调函数处理每个元素并利用返回一个新数组',
174 | desc:
175 | '通过指定函数处理数组的每个元素,并返回处理后的数组。',
176 | example: `let map = arr.map(x => x + 1);
177 | console.log(map);`,
178 | output: `[6, 2, 9]`
179 | },
180 | {
181 | name: 'entries',
182 | shortDesc: '创建一个迭代器对象',
183 | desc:
184 | 'entries() 返回一个遍历器对象,用来遍历[键名, 键值]组成的数组。迭代器有很多用途,还有其他与之结合使用的方法,如values
和 keys
方法',
185 | example: `let iterator = arr.entries();
186 | console.log(iterator.next().value);`,
187 | output: `[0, 5]
188 |
189 | `
190 | }
191 | ],
192 | find: {
193 | single: [
194 | {
195 | name: 'includes',
196 | shortDesc: '某个元素是否存在',
197 | desc:
198 | '确定数组是否包含某个元素,并根据需要返回true或false。',
199 | example: `console.log(arr.includes(1));`,
200 | output: `true`
201 | },
202 | {
203 | name: 'indexOf',
204 | shortDesc: '给定元素的第一个索引',
205 | desc:
206 | '返回数组中可以找到给定元素的第一个索引,如果不存在则返回-1。',
207 | example: `console.log(arr.indexOf(5));`,
208 | output: `0`
209 | },
210 | {
211 | name: 'lastIndexOf',
212 | shortDesc: '给定元素的最后一个索引',
213 | desc:
214 | '返回一个给定元素最后出现的位置,如果不存在则返回-1。',
215 | example: `console.log(arr.lastIndexOf(5));`,
216 | output: `0`
217 | },
218 | {
219 | name: 'find',
220 | shortDesc: '满足条件的第一个元素',
221 | desc:
222 | '如果数组中的元素满足提供的回调函数,则返回数组中找到的值。如果未找到,则返回undefined。类似于findIndex()
,但它返回的是项目而不是索引。',
223 | example: `let isTiny = (el) => el < 2;
224 | console.log(arr.find(isTiny));`,
225 | output: `1`
226 | },
227 | {
228 | name: 'findIndex',
229 | shortDesc: '满足条件的第一个元素的索引',
230 | desc:
231 | '返回数组中满足提供的回调函数的第一个元素的索引,否则返回-1,与 find() code>类似,但它返回索引而不是项目。',
232 | example: `let isBig = (el) => el > 6;
233 | console.log(arr.findIndex(isBig));`,
234 | output: `2`
235 | },
236 | {
237 | name: 'reduce',
238 | shortDesc: '从头到尾将数组元素计算为一个值',
239 | desc:
240 | '接收一个函数作为累加器,数组中的每个值(从左到右)开始缩减,最终计算为一个值。',
241 | example: `let reducer = (a, b) => a + b;
242 | console.log(arr.reduce(reducer));`,
243 | output: `14`
244 | },
245 | {
246 | name: 'reduceRight',
247 | shortDesc: '从尾到头将数组元素计算为一个值。',
248 | desc:
249 | '接收一个函数作为累加器,数组中的每个值(从右到左)开始缩减,最终计算为一个值。',
250 | example: `[arr, [0, 1]].reduceRight((a, b) => {
251 | return a.concat(b)
252 | }, [])`,
253 | output: `[0, 1, 5, 1, 8]`
254 | }
255 | ],
256 | many: [
257 | {
258 | name: 'filter',
259 | shortDesc: '返回符合条件所有元素的数组',
260 | desc:
261 | '创建一个新的数组,新数组中的元素是通过检查指定数组中符合条件的所有元素。',
262 | example: `let filtered = arr.filter(el => el > 4);
263 | console.log(filtered)`,
264 | output: `[5, 8]`
265 | },
266 | {
267 | name: 'every',
268 | shortDesc: '每个元素是否都符合条件',
269 | desc:
270 | '如果数组中的每个元素满足指定函数,则返回true。',
271 | example: `let isSmall = (el) => el < 10;
272 | console.log(arr.every(isSmall));`,
273 | output: `true`
274 | },
275 | {
276 | name: 'some',
277 | shortDesc: '至少有一个元素符合指定条件',
278 | desc:
279 | '如果数组中的至少一个元素满足指定函数,则返回true。',
280 | example: `let biggerThan4 = (el) => el > 4;
281 | console.log(arr.some(biggerThan4));`,
282 | output: `true`
283 | }
284 | ]
285 | }
286 | }
287 | }
288 |
--------------------------------------------------------------------------------
/store/zh_cn/meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "short": "zh_cn",
3 | "long": "Chinese (Simplified)",
4 | "createdBy": "proYang and g-plane"
5 | }
6 |
--------------------------------------------------------------------------------