diff options
| author | Ben Beltran <ben@nsovocal.com> | 2015-09-28 12:39:59 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2015-09-28 12:39:59 -0500 |
| commit | 455f099b504ec07dd492ab31987ae05a6f6774c7 (patch) | |
| tree | 22b0c7fd8e492733b97e661750a2d79c46da451d /atom/packages/vim-mode | |
| parent | 24c7594d62d8d7fbbcdb64b11ce4adc5d8e6991a (diff) | |
Adds atom packages
Diffstat (limited to 'atom/packages/vim-mode')
893 files changed, 17410 insertions, 677 deletions
diff --git a/atom/packages/vim-mode/.travis.yml b/atom/packages/vim-mode/.travis.yml index d73c8e2..20cfe51 100644 --- a/atom/packages/vim-mode/.travis.yml +++ b/atom/packages/vim-mode/.travis.yml @@ -9,3 +9,7 @@ script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package. git: depth: 10 + +branches: + only: + - master diff --git a/atom/packages/vim-mode/CHANGELOG.md b/atom/packages/vim-mode/CHANGELOG.md index 2fea87b..c179811 100644 --- a/atom/packages/vim-mode/CHANGELOG.md +++ b/atom/packages/vim-mode/CHANGELOG.md @@ -1,35 +1,84 @@ ## HEAD +## 0.60 + +* Fixed an issue where commands that took one character of input didn't + work with characters composed via IME - @jacekkopecky +* Fixed an issue where the '%' motion would select the wrong range + when moving backwards - @jacekkopecky + +## 0.59 + +* Fixed an issue where normal Atom commands and mouse drags couldn't + move the cursor to the end of a line - @jacekkopecky + +## 0.58 + +* Fixed repetition of commands executed in visual mode - @jacekkopecky +* Fixed repetition of indentation commands - @mleeds95 +* Fixed `cc` command's behavior on the file's only line @jacekkopecky +* Fixed key-binding for return-from-tag - @bronson +* Implemented shared 'f' and 't' state between editors - @jacekkopecky +* Added insert-mode commands for copying line above and below - @jacekkopecky +* Fixed an exception when prefixing a text object with a count - @jacekkopecky +* Fixed handling of blank lines in the `ip` and `ap` text objects - @MarkusSN + +## 0.57 + +* Added replace ('R') mode! - @jacekkopecky +* Added the `iW` and `aW` text objects! - @jacekkopecky +* Made the 't' operator behave correctly when the cursor was already on the + searched character - @jacekkopecky +* Fixed the position of the cursor after pasting with 'p' - @jacekkopecky + +## 0.56 + +* Renamed 'command mode' to 'normal mode' - @coolwanglu + +## 0.55 + +* Fixed indentation commands so that they exit visual mode - @bronson +* Implemented horizontal scrolling commands `z s` and `z e` - @jacekkopecky + +## 0.54 + +* Fixed an error where repeating an insertion command would not handle + characters inserted by packages like autocomplete or bracket-matcher - @jacekkopecky + +## 0.53 + +* Fixed an exception that would occur when using `.` to repeat in certain cases. + ## 0.52 -* Fix incorrect cursor motion when exiting visual mode w/ a reversed +* Fixed incorrect cursor motion when exiting visual mode w/ a reversed selection - @t9md -* Add setting to configure the regexp used for numbers and the `ctrl-a` +* Added setting to configure the regexp used for numbers and the `ctrl-a` and `ctrl-x` keybindings - @jacekkopecky ## 0.50 -* Fix cursor position after `dd` command - @bronson +* Fixed cursor position after `dd` command - @bronson * Implement `ap` text-object differently than `ip` - MarkusSN ## 0.49 -* Fix an issue that caused the cursor to move left incorrectly when near +* Fixed an issue that caused the cursor to move left incorrectly when near the end of a line. ## 0.48 -* Fix usages of deprecated APIs +* Fixed usages of deprecated APIs ## 0.47 -* Fix usages of deprecated APIs - @hitsmaxft, @jacekkopecky +* Fixed usages of deprecated APIs - @hitsmaxft, @jacekkopecky ## 0.46 -* Fix issues with deleting when there are multiple selections - @jacekkopecky -* Add paragraph text-objects 'ip' and 'ap' - @t9md -* Fix use of a deprecated method - @akonwi +* Fixed issues with deleting when there are multiple selections - @jacekkopecky +* Added paragraph text-objects 'ip' and 'ap' - @t9md +* Fixed use of a deprecated method - @akonwi ## 0.45 diff --git a/atom/packages/vim-mode/README.md b/atom/packages/vim-mode/README.md index 1562a91..200a3bb 100644 --- a/atom/packages/vim-mode/README.md +++ b/atom/packages/vim-mode/README.md @@ -10,15 +10,14 @@ run `apm install vim-mode` from the command line. ### Current Status -Sizable portions of Vim's command mode work as you'd expect, including +Sizable portions of Vim's normal mode work as you'd expect, including many complex combinations. Even so, this package is far from finished (Vim wasn't built in a day). If you want the vim ex line (for `:w`, `:s`, etc.), you can try [ex-mode](https://atom.io/packages/ex-mode) which works in conjuction with this plugin. -Currently, vim-mode requires soft line wraps to be disabled, and has some issues -with international keyboard layouts. +Currently, vim-mode has some issues with international keyboard layouts. If there's a feature of Vim you're missing, it might just be that you use it more often than other developers. Adding a feature can be quick and easy. Check @@ -28,7 +27,7 @@ to see examples of community contributions. We're looking forward to yours, too. ### Documentation * [Overview](https://github.com/atom/vim-mode/blob/master/docs/overview.md) -* [Motions](https://github.com/atom/vim-mode/blob/master/docs/motions.md) +* [Motions and Text Objects](https://github.com/atom/vim-mode/blob/master/docs/motions.md) * [Operators](https://github.com/atom/vim-mode/blob/master/docs/operators.md) * [Windows](https://github.com/atom/vim-mode/blob/master/docs/windows.md) * [Scrolling](https://github.com/atom/vim-mode/blob/master/docs/scrolling.md) diff --git a/atom/packages/vim-mode/docs/motions.md b/atom/packages/vim-mode/docs/motions.md index 77442e6..ab77fdd 100644 --- a/atom/packages/vim-mode/docs/motions.md +++ b/atom/packages/vim-mode/docs/motions.md @@ -35,3 +35,25 @@ * [;](http://vimhelp.appspot.com/motion.txt.html#%3B) * [,](http://vimhelp.appspot.com/motion.txt.html#%2C) * [/ and ?](http://vimhelp.appspot.com/pattern.txt.html#search-commands) (including `//` and `??`) + +## Implemented Text Objects + +[Vim text objects](http://vimhelp.appspot.com/motion.txt.html#object-select) + +* ``a "`` ``i "`` +* ``a '`` ``i '`` +* ``a ``` ``i ``` +* ``a (`` ``i (`` +* ``a )`` ``i )`` +* ``a <`` ``i <`` +* ``a >`` ``i >`` +* ``a [`` ``i [`` +* ``a ]`` ``i ]`` +* ``a {`` ``i {`` +* ``a }`` ``i }`` +* ``a b`` ``i b`` +* ``a B`` ``i B`` +* ``a p`` ``i p`` +* ``a w`` ``i w`` +* ``a W`` ``i W`` +* ``i t`` diff --git a/atom/packages/vim-mode/docs/operators.md b/atom/packages/vim-mode/docs/operators.md index d816daa..dbfc45e 100644 --- a/atom/packages/vim-mode/docs/operators.md +++ b/atom/packages/vim-mode/docs/operators.md @@ -15,7 +15,7 @@ * `c2c` - repeated linewise * `C` - change to the end of the line * [Adding and subtracting](http://vimhelp.appspot.com/change.txt.html#CTRL-A) - * `ctrl-a` and `ctrl-x` in command mode to increase/decrease numbers in text + * `ctrl-a` and `ctrl-x` in normal mode to increase/decrease numbers in text * [Yank](http://vimhelp.appspot.com/change.txt.html#yank) * `vwy` - works in visual mode * `yw` - with a motion @@ -26,13 +26,17 @@ * Indent/Outdent/Auto-indent * `vw>` - works in visual mode * `>>` - indent current line one level + * `>2>` - repeated linewise + * `v2>` - repeat indent operation in visual mode * `<<` - outdent current line one level + * `<2<` - repeated linewise + * `v2<` - repeat outdent operation in visual mode * `==` - auto-indents current line * [Put](http://vimhelp.appspot.com/change.txt.html#p) * `p` - default register * `P` - pastes the default register before the current cursor. - * `"ap` - supports registers (only named a-h, pending more - advanced atom keymap support) + * `"ap` - supports registers + * `ctrl-r a` or `ctrl-r "` etc. - supports pasting register content in insert mode * [Join](http://vimhelp.appspot.com/change.txt.html#J) * `J` - joins the current line with the immediately following line. * [Mark](http://vimhelp.appspot.com/motion.txt.html#m) diff --git a/atom/packages/vim-mode/docs/overview.md b/atom/packages/vim-mode/docs/overview.md index 3f91ea9..c59176c 100644 --- a/atom/packages/vim-mode/docs/overview.md +++ b/atom/packages/vim-mode/docs/overview.md @@ -1,8 +1,14 @@ ## Overview -* There are only currently two modes, command mode and insert mode. +* There are only currently two modes, normal mode and insert mode. * Motions have repeat support, `d3w` will delete three words. * Insert mode can be entered using `i`, `I`, `a`, `A`, `o`, or `O`. + * The following commands are supported in insert mode: + * `ctrl-y` to copy the character right above the cursor + * `ctrl-e` to copy the character right below the cursor (**disabled by default**, see note 1 below) +* Replace mode can be entered using `R` + * Limitations: + * If repeating with `.` gets a bit confused (e.g. by multiple cursors or when more than one line was typed), please report it with steps to reproduce if you can. * Registers are a work in progress * What Exists: * `a-z` - Named registers @@ -13,3 +19,13 @@ * What Doesn't Exist: * default buffer doesn't yet save on delete operations. * Setting `wrapLeftRightMotion` acts like VIM's whichwrap=h,l,<,> + + +#### Notes + +1. To enable the VIM key binding `ctrl-e` to copy the character right below the cursor, please put this in your `keymap.cson`: + +``` +'atom-text-editor.vim-mode.insert-mode': + 'ctrl-e': 'vim-mode:copy-from-line-below' +``` diff --git a/atom/packages/vim-mode/docs/scrolling.md b/atom/packages/vim-mode/docs/scrolling.md index 348b395..bfd0506 100644 --- a/atom/packages/vim-mode/docs/scrolling.md +++ b/atom/packages/vim-mode/docs/scrolling.md @@ -12,3 +12,5 @@ * [zz](http://vimhelp.appspot.com/scroll.txt.html#zz) * [z-](http://vimhelp.appspot.com/scroll.txt.html#z-) * [zb](http://vimhelp.appspot.com/scroll.txt.html#zb) +* [zs](http://vimhelp.appspot.com/scroll.txt.html#zs) +* [ze](http://vimhelp.appspot.com/scroll.txt.html#ze) diff --git a/atom/packages/vim-mode/keymaps/vim-mode.cson b/atom/packages/vim-mode/keymaps/vim-mode.cson index 1a58c49..d8d3fec 100644 --- a/atom/packages/vim-mode/keymaps/vim-mode.cson +++ b/atom/packages/vim-mode/keymaps/vim-mode.cson @@ -1,18 +1,83 @@ 'atom-text-editor.vim-mode': - 'escape': 'vim-mode:reset-command-mode' - 'ctrl-c': 'vim-mode:reset-command-mode' - 'ctrl-[': 'vim-mode:reset-command-mode' + 'escape': 'vim-mode:reset-normal-mode' + 'ctrl-c': 'vim-mode:reset-normal-mode' + 'ctrl-[': 'vim-mode:reset-normal-mode' -'atom-text-editor.vim-mode:not(.command-mode)': - 'escape': 'vim-mode:activate-command-mode' - 'ctrl-[': 'vim-mode:activate-command-mode' +'atom-text-editor.vim-mode:not(.normal-mode)': + 'escape': 'vim-mode:activate-normal-mode' + 'ctrl-[': 'vim-mode:activate-normal-mode' -'.platform-darwin atom-text-editor.vim-mode:not(.command-mode)': - 'ctrl-c': 'vim-mode:activate-command-mode' +'.platform-darwin atom-text-editor.vim-mode:not(.normal-mode)': + 'ctrl-c': 'vim-mode:activate-normal-mode' 'atom-text-editor.vim-mode.insert-mode': 'ctrl-w': 'editor:delete-to-beginning-of-word' 'ctrl-u': 'editor:delete-to-beginning-of-line' + 'ctrl-y': 'vim-mode:copy-from-line-above' + # disabled for compatibility with the common binding for going to the end of the line + # 'ctrl-e': 'vim-mode:copy-from-line-below' + + 'ctrl-r a': 'vim-mode:insert-mode-put' + 'ctrl-r b': 'vim-mode:insert-mode-put' + 'ctrl-r c': 'vim-mode:insert-mode-put' + 'ctrl-r d': 'vim-mode:insert-mode-put' + 'ctrl-r e': 'vim-mode:insert-mode-put' + 'ctrl-r f': 'vim-mode:insert-mode-put' + 'ctrl-r g': 'vim-mode:insert-mode-put' + 'ctrl-r h': 'vim-mode:insert-mode-put' + 'ctrl-r i': 'vim-mode:insert-mode-put' + 'ctrl-r j': 'vim-mode:insert-mode-put' + 'ctrl-r k': 'vim-mode:insert-mode-put' + 'ctrl-r l': 'vim-mode:insert-mode-put' + 'ctrl-r m': 'vim-mode:insert-mode-put' + 'ctrl-r n': 'vim-mode:insert-mode-put' + 'ctrl-r o': 'vim-mode:insert-mode-put' + 'ctrl-r p': 'vim-mode:insert-mode-put' + 'ctrl-r q': 'vim-mode:insert-mode-put' + 'ctrl-r r': 'vim-mode:insert-mode-put' + 'ctrl-r s': 'vim-mode:insert-mode-put' + 'ctrl-r t': 'vim-mode:insert-mode-put' + 'ctrl-r u': 'vim-mode:insert-mode-put' + 'ctrl-r v': 'vim-mode:insert-mode-put' + 'ctrl-r w': 'vim-mode:insert-mode-put' + 'ctrl-r x': 'vim-mode:insert-mode-put' + 'ctrl-r y': 'vim-mode:insert-mode-put' + 'ctrl-r z': 'vim-mode:insert-mode-put' + 'ctrl-r A': 'vim-mode:insert-mode-put' + 'ctrl-r B': 'vim-mode:insert-mode-put' + 'ctrl-r C': 'vim-mode:insert-mode-put' + 'ctrl-r D': 'vim-mode:insert-mode-put' + 'ctrl-r E': 'vim-mode:insert-mode-put' + 'ctrl-r F': 'vim-mode:insert-mode-put' + 'ctrl-r G': 'vim-mode:insert-mode-put' + 'ctrl-r H': 'vim-mode:insert-mode-put' + 'ctrl-r I': 'vim-mode:insert-mode-put' + 'ctrl-r J': 'vim-mode:insert-mode-put' + 'ctrl-r K': 'vim-mode:insert-mode-put' + 'ctrl-r L': 'vim-mode:insert-mode-put' + 'ctrl-r M': 'vim-mode:insert-mode-put' + 'ctrl-r N': 'vim-mode:insert-mode-put' + 'ctrl-r O': 'vim-mode:insert-mode-put' + 'ctrl-r P': 'vim-mode:insert-mode-put' + 'ctrl-r Q': 'vim-mode:insert-mode-put' + 'ctrl-r R': 'vim-mode:insert-mode-put' + 'ctrl-r S': 'vim-mode:insert-mode-put' + 'ctrl-r T': 'vim-mode:insert-mode-put' + 'ctrl-r U': 'vim-mode:insert-mode-put' + 'ctrl-r V': 'vim-mode:insert-mode-put' + 'ctrl-r W': 'vim-mode:insert-mode-put' + 'ctrl-r X': 'vim-mode:insert-mode-put' + 'ctrl-r Y': 'vim-mode:insert-mode-put' + 'ctrl-r Z': 'vim-mode:insert-mode-put' + 'ctrl-r *': 'vim-mode:insert-mode-put' + 'ctrl-r +': 'vim-mode:insert-mode-put' + 'ctrl-r %': 'vim-mode:insert-mode-put' + 'ctrl-r _': 'vim-mode:insert-mode-put' + 'ctrl-r "': 'vim-mode:insert-mode-put' + 'ctrl-r escape': 'abort!' + +'atom-text-editor.vim-mode.replace-mode': + 'backspace': 'vim-mode:replace-mode-backspace' 'atom-text-editor.vim-mode:not(.insert-mode)': 'h': 'vim-mode:move-left' @@ -55,6 +120,8 @@ 'z z': 'vim-mode:scroll-cursor-to-middle-leave' 'z -': 'vim-mode:scroll-cursor-to-bottom' 'z b': 'vim-mode:scroll-cursor-to-bottom-leave' + 'z s': 'vim-mode:scroll-cursor-to-left' + 'z e': 'vim-mode:scroll-cursor-to-right' 'z M': 'editor:fold-all' 'z R': 'editor:unfold-all' 'z c': 'editor:fold-current-row' @@ -143,8 +210,9 @@ '8': 'vim-mode:repeat-prefix' '9': 'vim-mode:repeat-prefix' -'atom-text-editor.vim-mode.command-mode': +'atom-text-editor.vim-mode.normal-mode': 'i': 'vim-mode:activate-insert-mode' + 'R': 'vim-mode:activate-replace-mode' 'v': 'vim-mode:activate-characterwise-visual-mode' 'V': 'vim-mode:activate-linewise-visual-mode' 'ctrl-v': 'vim-mode:activate-blockwise-visual-mode' @@ -162,7 +230,7 @@ '.': 'vim-mode:repeat' 'ctrl-]': 'symbols-view:go-to-declaration' - 'ctrl-T': 'symbols-view:return-from-declaration' + 'ctrl-t': 'symbols-view:return-from-declaration' 'ctrl-a': 'vim-mode:increase' 'ctrl-x': 'vim-mode:decrease' @@ -226,6 +294,7 @@ 'atom-text-editor.vim-mode.operator-pending-mode, atom-text-editor.vim-mode.visual-mode': 'i w': 'vim-mode:select-inside-word' + 'i W': 'vim-mode:select-inside-whole-word' 'i "': 'vim-mode:select-inside-double-quotes' 'i \'': 'vim-mode:select-inside-single-quotes' 'i `': 'vim-mode:select-inside-back-ticks' @@ -242,6 +311,7 @@ 'i b': 'vim-mode:select-inside-parentheses' 'i p': 'vim-mode:select-inside-paragraph' 'a w': 'vim-mode:select-a-word' + 'a W': 'vim-mode:select-a-whole-word' 'a "': 'vim-mode:select-around-double-quotes' 'a \'': 'vim-mode:select-around-single-quotes' 'a `': 'vim-mode:select-around-back-ticks' @@ -256,7 +326,7 @@ 'a )': 'vim-mode:select-around-parentheses' 'a b': 'vim-mode:select-around-parentheses' 'a p': 'vim-mode:select-around-paragraph' - 'x': 'vim-mode:reset-command-mode' + 'x': 'vim-mode:reset-normal-mode' 'atom-text-editor.vim-mode.visual-mode': 'x': 'vim-mode:delete' diff --git a/atom/packages/vim-mode/lib/global-vim-state.coffee b/atom/packages/vim-mode/lib/global-vim-state.coffee index 25da977..acda507 100644 --- a/atom/packages/vim-mode/lib/global-vim-state.coffee +++ b/atom/packages/vim-mode/lib/global-vim-state.coffee @@ -3,3 +3,4 @@ class GlobalVimState registers: {} searchHistory: [] currentSearch: {} + currentFind: null diff --git a/atom/packages/vim-mode/lib/insert-mode.coffee b/atom/packages/vim-mode/lib/insert-mode.coffee new file mode 100644 index 0000000..d600e7e --- /dev/null +++ b/atom/packages/vim-mode/lib/insert-mode.coffee @@ -0,0 +1,19 @@ +copyCharacterFromAbove = (editor, vimState) -> + editor.transact -> + for cursor in editor.getCursors() + {row, column} = cursor.getScreenPosition() + continue if row is 0 + range = [[row-1, column], [row-1, column+1]] + cursor.selection.insertText(editor.getTextInBufferRange(editor.bufferRangeForScreenRange(range))) + +copyCharacterFromBelow = (editor, vimState) -> + editor.transact -> + for cursor in editor.getCursors() + {row, column} = cursor.getScreenPosition() + range = [[row+1, column], [row+1, column+1]] + cursor.selection.insertText(editor.getTextInBufferRange(editor.bufferRangeForScreenRange(range))) + +module.exports = { + copyCharacterFromAbove, + copyCharacterFromBelow +} diff --git a/atom/packages/vim-mode/lib/motions/find-motion.coffee b/atom/packages/vim-mode/lib/motions/find-motion.coffee index 58685d7..2a577a8 100644 --- a/atom/packages/vim-mode/lib/motions/find-motion.coffee +++ b/atom/packages/vim-mode/lib/motions/find-motion.coffee @@ -3,14 +3,27 @@ {Point, Range} = require 'atom' class Find extends MotionWithInput - constructor: (@editor, @vimState) -> + operatesInclusively: true + + constructor: (@editor, @vimState, opts={}) -> super(@editor, @vimState) - @vimState.currentFind = this - @viewModel = new ViewModel(this, class: 'find', singleChar: true, hidden: true) - @backwards = false - @repeatReversed = false @offset = 0 - @repeated = false + + if not opts.repeated + @viewModel = new ViewModel(this, class: 'find', singleChar: true, hidden: true) + @backwards = false + @repeated = false + @vimState.globalVimState.currentFind = this + + else + @repeated = true + + orig = @vimState.globalVimState.currentFind + @backwards = orig.backwards + @complete = orig.complete + @input = orig.input + + @reverse() if opts.reverse match: (cursor, count) -> currentPosition = cursor.getBufferPosition() @@ -38,17 +51,22 @@ class Find extends MotionWithInput if (match = @match(cursor, count))? cursor.setBufferPosition(match) - repeat: (opts={}) -> - opts.reverse = !!opts.reverse - @repeated = true - if opts.reverse isnt @repeatReversed - @reverse() - @repeatReversed = opts.reverse - this - class Till extends Find - constructor: (@editor, @vimState) -> - super(@editor, @vimState) + constructor: (@editor, @vimState, opts={}) -> + super(@editor, @vimState, opts) @offset = 1 + match: -> + @selectAtLeastOne = false + retval = super + if retval? and not @backwards + @selectAtLeastOne = true + retval + + moveSelectionInclusively: (selection, count, options) -> + super + if selection.isEmpty() and @selectAtLeastOne + selection.modifySelection -> + selection.cursor.moveRight() + module.exports = {Find, Till} diff --git a/atom/packages/vim-mode/lib/motions/general-motions.coffee b/atom/packages/vim-mode/lib/motions/general-motions.coffee index 47a3cc7..b5cd627 100644 --- a/atom/packages/vim-mode/lib/motions/general-motions.coffee +++ b/atom/packages/vim-mode/lib/motions/general-motions.coffee @@ -11,7 +11,7 @@ class MotionError @name = 'Motion Error' class Motion - operatesInclusively: true + operatesInclusively: false operatesLinewise: false constructor: (@editor, @vimState) -> @@ -20,7 +20,9 @@ class Motion value = for selection in @editor.getSelections() if @isLinewise() @moveSelectionLinewise(selection, count, options) - else if @isInclusive() + else if @vimState.mode is 'visual' + @moveSelectionVisual(selection, count, options) + else if @operatesInclusively @moveSelectionInclusively(selection, count, options) else @moveSelection(selection, count, options) @@ -61,10 +63,27 @@ class Motion selection.setBufferRange([[newStartRow, 0], [newEndRow + 1, 0]]) moveSelectionInclusively: (selection, count, options) -> + return @moveSelectionVisual(selection, count, options) unless selection.isEmpty() + + selection.modifySelection => + @moveCursor(selection.cursor, count, options) + return if selection.isEmpty() + + if selection.isReversed() + # for backward motion, add the original starting character of the motion + {start, end} = selection.getBufferRange() + selection.setBufferRange([start, [end.row, end.column + 1]]) + else + # for forward motion, add the ending character of the motion + selection.cursor.moveRight() + + moveSelectionVisual: (selection, count, options) -> selection.modifySelection => range = selection.getBufferRange() [oldStart, oldEnd] = [range.start, range.end] + # in visual mode, atom cursor is after the last selected character, + # so here put cursor in the expected place for the following motion wasEmpty = selection.isEmpty() wasReversed = selection.isReversed() unless wasEmpty or wasReversed @@ -72,6 +91,7 @@ class Motion @moveCursor(selection.cursor, count, options) + # put cursor back after the last character so it is also selected isEmpty = selection.isEmpty() isReversed = selection.isReversed() unless isEmpty or isReversed @@ -80,23 +100,25 @@ class Motion range = selection.getBufferRange() [newStart, newEnd] = [range.start, range.end] + # if we reversed or emptied a normal selection + # we need to select again the last character deselected above the motion if (isReversed or isEmpty) and not (wasReversed or wasEmpty) selection.setBufferRange([newStart, [newEnd.row, oldStart.column + 1]]) + + # if we re-reversed a reversed non-empty selection, + # we need to keep the last character of the old selection selected if wasReversed and not wasEmpty and not isReversed - selection.setBufferRange([[newStart.row, oldEnd.column - 1], newEnd]) + selection.setBufferRange([[oldEnd.row, oldEnd.column - 1], newEnd]) + + # keep a single-character selection non-reversed + range = selection.getBufferRange() + [newStart, newEnd] = [range.start, range.end] + if selection.isReversed() and newStart.row is newEnd.row and newStart.column + 1 is newEnd.column + selection.setBufferRange(range, reversed: false) moveSelection: (selection, count, options) -> selection.modifySelection => @moveCursor(selection.cursor, count, options) - ensureCursorIsWithinLine: (cursor) -> - return if @vimState.mode is 'visual' or not cursor.selection.isEmpty() - {goalColumn} = cursor - {row, column} = cursor.getBufferPosition() - lastColumn = cursor.getCurrentLineBufferRange().end.column - if column >= lastColumn - 1 - cursor.setBufferPosition([row, Math.max(lastColumn - 1, 0)]) - cursor.goalColumn ?= goalColumn - isComplete: -> true isRecordable: -> false @@ -107,21 +129,41 @@ class Motion else @operatesLinewise - isInclusive: -> - @vimState.mode is 'visual' or @operatesInclusively - class CurrentSelection extends Motion constructor: (@editor, @vimState) -> super(@editor, @vimState) - @selection = @editor.getSelectedBufferRanges() + @lastSelectionRange = @editor.getSelectedBufferRange() + @wasLinewise = @isLinewise() execute: (count=1) -> _.times(count, -> true) select: (count=1) -> - @editor.setSelectedBufferRanges(@selection) + # in visual mode, the current selections are already there + # if we're not in visual mode, we are repeating some operation and need to re-do the selections + unless @vimState.mode is 'visual' + if @wasLinewise + @selectLines() + else + @selectCharacters() + _.times(count, -> true) + selectLines: -> + lastSelectionExtent = @lastSelectionRange.getExtent() + for selection in @editor.getSelections() + cursor = selection.cursor.getBufferPosition() + selection.setBufferRange [[cursor.row, 0], [cursor.row + lastSelectionExtent.row, 0]] + return + + selectCharacters: -> + lastSelectionExtent = @lastSelectionRange.getExtent() + for selection in @editor.getSelections() + {start} = selection.getBufferRange() + newEnd = start.traverse(lastSelectionExtent) + selection.setBufferRange([start, newEnd]) + return + # Public: Generic class for motions that require extra input class MotionWithInput extends Motion constructor: (@editor, @vimState) -> @@ -139,16 +181,11 @@ class MotionWithInput extends Motion @complete = true class MoveLeft extends Motion - operatesInclusively: false - moveCursor: (cursor, count=1) -> - _.times count, => + _.times count, -> cursor.moveLeft() if not cursor.isAtBeginningOfLine() or settings.wrapLeftRightMotion() - @ensureCursorIsWithinLine(cursor) class MoveRight extends Motion - operatesInclusively: false - moveCursor: (cursor, count=1) -> _.times count, => wrapToNextLine = settings.wrapLeftRightMotion() @@ -159,16 +196,14 @@ class MoveRight extends Motion cursor.moveRight() unless cursor.isAtEndOfLine() cursor.moveRight() if wrapToNextLine and cursor.isAtEndOfLine() - @ensureCursorIsWithinLine(cursor) class MoveUp extends Motion operatesLinewise: true moveCursor: (cursor, count=1) -> - _.times count, => + _.times count, -> unless cursor.getScreenRow() is 0 cursor.moveUp() - @ensureCursorIsWithinLine(cursor) class MoveDown extends Motion operatesLinewise: true @@ -177,18 +212,13 @@ class MoveDown extends Motion _.times count, => unless cursor.getScreenRow() is @editor.getLastScreenRow() cursor.moveDown() - @ensureCursorIsWithinLine(cursor) class MoveToPreviousWord extends Motion - operatesInclusively: false - moveCursor: (cursor, count=1) -> _.times count, -> cursor.moveToBeginningOfWord() class MoveToPreviousWholeWord extends Motion - operatesInclusively: false - moveCursor: (cursor, count=1) -> _.times count, => cursor.moveToBeginningOfWord() @@ -205,7 +235,6 @@ class MoveToPreviousWholeWord extends Motion class MoveToNextWord extends Motion wordRegex: null - operatesInclusively: false moveCursor: (cursor, count=1, options) -> _.times count, => @@ -236,6 +265,7 @@ class MoveToNextWholeWord extends MoveToNextWord wordRegex: WholeWordOrEmptyLineRegex class MoveToEndOfWord extends Motion + operatesInclusively: true wordRegex: null moveCursor: (cursor, count=1) -> @@ -260,8 +290,6 @@ class MoveToEndOfWholeWord extends MoveToEndOfWord wordRegex: WholeWordRegex class MoveToNextParagraph extends Motion - operatesInclusively: false - moveCursor: (cursor, count=1) -> _.times count, -> cursor.moveToBeginningOfNextParagraph() @@ -284,8 +312,6 @@ class MoveToAbsoluteLine extends MoveToLine cursor.moveToEndOfLine() if cursor.getBufferColumn() is 0 class MoveToRelativeLine extends MoveToLine - operatesLinewise: true - moveCursor: (cursor, count=1) -> {row, column} = cursor.getBufferPosition() cursor.setBufferPosition([row + (count - 1), 0]) @@ -300,15 +326,11 @@ class MoveToScreenLine extends MoveToLine cursor.setScreenPosition([@getDestinationRow(count), 0]) class MoveToBeginningOfLine extends Motion - operatesInclusively: false - moveCursor: (cursor, count=1) -> _.times count, -> cursor.moveToBeginningOfLine() class MoveToFirstCharacterOfLine extends Motion - operatesInclusively: false - moveCursor: (cursor, count=1) -> _.times count, -> cursor.moveToBeginningOfLine() @@ -316,22 +338,18 @@ class MoveToFirstCharacterOfLine extends Motion class MoveToFirstCharacterOfLineAndDown extends Motion operatesLinewise: true - operatesInclusively: true - moveCursor: (cursor, count=0) -> + moveCursor: (cursor, count=1) -> _.times count-1, -> cursor.moveDown() cursor.moveToBeginningOfLine() cursor.moveToFirstCharacterOfLine() class MoveToLastCharacterOfLine extends Motion - operatesInclusively: false - moveCursor: (cursor, count=1) -> - _.times count, => + _.times count, -> cursor.moveToEndOfLine() cursor.goalColumn = Infinity - @ensureCursorIsWithinLine(cursor) class MoveToLastNonblankCharacterOfLineAndDown extends Motion operatesInclusively: true @@ -354,7 +372,6 @@ class MoveToLastNonblankCharacterOfLineAndDown extends Motion class MoveToFirstCharacterOfLineUp extends Motion operatesLinewise: true - operatesInclusively: true moveCursor: (cursor, count=1) -> _.times count, -> @@ -398,7 +415,7 @@ class MoveToBottomOfScreen extends MoveToScreenLine lastScreenRow - offset class MoveToMiddleOfScreen extends MoveToScreenLine - getDestinationRow: (count) -> + getDestinationRow: -> firstScreenRow = @editorElement.getFirstVisibleScreenRow() lastScreenRow = @editorElement.getLastVisibleScreenRow() height = lastScreenRow - firstScreenRow @@ -428,7 +445,7 @@ class ScrollKeepingCursor extends MoveToLine {row, column} = @editor.getCursorScreenPosition() @currentFirstScreenRow - @previousFirstScreenRow + row - scrollScreen: (count = 1) -> + scrollScreen: (count=1) -> @previousFirstScreenRow = @editorElement.getFirstVisibleScreenRow() destination = @scrollDestination(count) @editor.setScrollTop(destination) diff --git a/atom/packages/vim-mode/lib/motions/move-to-mark-motion.coffee b/atom/packages/vim-mode/lib/motions/move-to-mark-motion.coffee index 0187620..3603e1e 100644 --- a/atom/packages/vim-mode/lib/motions/move-to-mark-motion.coffee +++ b/atom/packages/vim-mode/lib/motions/move-to-mark-motion.coffee @@ -4,8 +4,6 @@ module.exports = class MoveToMark extends MotionWithInput - operatesInclusively: false - constructor: (@editor, @vimState, @linewise=true) -> super(@editor, @vimState) @operatesLinewise = @linewise diff --git a/atom/packages/vim-mode/lib/motions/search-motion.coffee b/atom/packages/vim-mode/lib/motions/search-motion.coffee index 11761ad..fa65e19 100644 --- a/atom/packages/vim-mode/lib/motions/search-motion.coffee +++ b/atom/packages/vim-mode/lib/motions/search-motion.coffee @@ -6,8 +6,6 @@ SearchViewModel = require '../view-models/search-view-model' settings = require '../settings' class SearchBase extends MotionWithInput - operatesInclusively: false - constructor: (@editor, @vimState, options = {}) -> super(@editor, @vimState) @reverse = @initiallyReversed = false @@ -27,6 +25,8 @@ class SearchBase extends MotionWithInput atom.beep() scan: (cursor) -> + return [] if @input.characters is "" + currentPosition = cursor.getBufferPosition() [rangesBefore, rangesAfter] = [[], []] @@ -75,6 +75,16 @@ class Search extends SearchBase constructor: (@editor, @vimState) -> super(@editor, @vimState) @viewModel = new SearchViewModel(this) + @updateViewModel() + + reversed: => + @initiallyReversed = @reverse = true + @updateCurrentSearch() + @updateViewModel() + this + + updateViewModel: -> + @viewModel.update(@initiallyReversed) class SearchCurrentWord extends SearchBase @keywordRegex: null diff --git a/atom/packages/vim-mode/lib/operators/general-operators.coffee b/atom/packages/vim-mode/lib/operators/general-operators.coffee index dd99256..9547941 100644 --- a/atom/packages/vim-mode/lib/operators/general-operators.coffee +++ b/atom/packages/vim-mode/lib/operators/general-operators.coffee @@ -12,11 +12,8 @@ class Operator vimState: null motion: null complete: null - selectOptions: null - # selectOptions - The options object to pass through to the motion when - # selecting. - constructor: (@editor, @vimState, {@selectOptions}={}) -> + constructor: (@editor, @vimState) -> @complete = false # Public: Determines when the command can be executed. @@ -76,14 +73,9 @@ class OperatorWithInput extends Operator # class Delete extends Operator register: null - allowEOL: null - # allowEOL - Determines whether the cursor should be allowed to rest on the - # end of line character or not. - constructor: (@editor, @vimState, {@allowEOL, @selectOptions}={}) -> + constructor: (@editor, @vimState) -> @complete = false - @selectOptions ?= {} - @selectOptions.requireEOL ?= true @register = settings.defaultRegister() # Public: Deletes the text selected by the given motion. @@ -92,27 +84,28 @@ class Delete extends Operator # # Returns nothing. execute: (count) -> - if _.contains(@motion.select(count, @selectOptions), true) + if _.contains(@motion.select(count), true) @setTextRegister(@register, @editor.getSelectedText()) - for selection in @editor.getSelections() - selection.deleteSelectedText() + @editor.transact => + for selection in @editor.getSelections() + selection.deleteSelectedText() for cursor in @editor.getCursors() if @motion.isLinewise?() cursor.skipLeadingWhitespace() else cursor.moveLeft() if cursor.isAtEndOfLine() and not cursor.isAtBeginningOfLine() - @vimState.activateCommandMode() + @vimState.activateNormalMode() # # It toggles the case of everything selected by the following motion # class ToggleCase extends Operator - constructor: (@editor, @vimState, {@complete, @selectOptions}={}) -> + constructor: (@editor, @vimState, {@complete}={}) -> - execute: (count=1) -> + execute: (count) -> if @motion? - if _.contains(@motion.select(count, @selectOptions), true) + if _.contains(@motion.select(count), true) @editor.replaceSelectedText {}, (text) -> text.split('').map((char) -> lower = char.toLowerCase() @@ -126,7 +119,7 @@ class ToggleCase extends Operator for cursor in @editor.getCursors() point = cursor.getBufferPosition() lineLength = @editor.lineTextForBufferRow(point.row).length - cursorCount = Math.min(count, lineLength - point.column) + cursorCount = Math.min(count ? 1, lineLength - point.column) _.times cursorCount, => point = cursor.getBufferPosition() @@ -140,35 +133,35 @@ class ToggleCase extends Operator cursor.moveRight() unless point.column >= lineLength - 1 - @vimState.activateCommandMode() + @vimState.activateNormalMode() # # In visual mode or after `g` with a motion, it makes the selection uppercase # class UpperCase extends Operator - constructor: (@editor, @vimState, {@selectOptions}={}) -> + constructor: (@editor, @vimState) -> @complete = false - execute: (count=1) -> - if _.contains(@motion.select(count, @selectOptions), true) + execute: (count) -> + if _.contains(@motion.select(count), true) @editor.replaceSelectedText {}, (text) -> text.toUpperCase() - @vimState.activateCommandMode() + @vimState.activateNormalMode() # # In visual mode or after `g` with a motion, it makes the selection lowercase # class LowerCase extends Operator - constructor: (@editor, @vimState, {@selectOptions}={}) -> + constructor: (@editor, @vimState) -> @complete = false - execute: (count=1) -> - if _.contains(@motion.select(count, @selectOptions), true) + execute: (count) -> + if _.contains(@motion.select(count), true) @editor.replaceSelectedText {}, (text) -> text.toLowerCase() - @vimState.activateCommandMode() + @vimState.activateNormalMode() # # It copies everything selected by the following motion. @@ -176,7 +169,7 @@ class LowerCase extends Operator class Yank extends Operator register: null - constructor: (@editor, @vimState, {@allowEOL, @selectOptions}={}) -> + constructor: (@editor, @vimState) -> @register = settings.defaultRegister() # Public: Copies the text selected by the given motion. @@ -185,13 +178,20 @@ class Yank extends Operator # # Returns nothing. execute: (count) -> + oldTop = @editor.getScrollTop() + oldLeft = @editor.getScrollLeft() + oldLastCursorPosition = @editor.getCursorBufferPosition() + originalPositions = @editor.getCursorBufferPositions() if _.contains(@motion.select(count), true) text = @editor.getSelectedText() startPositions = _.pluck(@editor.getSelectedBufferRanges(), "start") newPositions = for originalPosition, i in originalPositions - if startPositions[i] and (@vimState.mode is 'visual' or not @motion.isLinewise?()) - Point.min(startPositions[i], originalPositions[i]) + if startPositions[i] + position = Point.min(startPositions[i], originalPositions[i]) + if @vimState.mode isnt 'visual' and @motion.isLinewise?() + position = new Point(position.row, originalPositions[i].column) + position else originalPosition else @@ -201,13 +201,18 @@ class Yank extends Operator @setTextRegister(@register, text) @editor.setSelectedBufferRanges(newPositions.map (p) -> new Range(p, p)) - @vimState.activateCommandMode() + + if oldLastCursorPosition.isEqual(@editor.getCursorBufferPosition()) + @editor.setScrollLeft(oldLeft) + @editor.setScrollTop(oldTop) + + @vimState.activateNormalMode() # # It combines the current line with the following line. # class Join extends Operator - constructor: (@editor, @vimState, {@selectOptions}={}) -> @complete = true + constructor: (@editor, @vimState) -> @complete = true # Public: Combines the current with the following lines # @@ -218,13 +223,13 @@ class Join extends Operator @editor.transact => _.times count, => @editor.joinLines() - @vimState.activateCommandMode() + @vimState.activateNormalMode() # # Repeat the last operation # class Repeat extends Operator - constructor: (@editor, @vimState, {@selectOptions}={}) -> @complete = true + constructor: (@editor, @vimState) -> @complete = true isRecordable: -> false @@ -237,7 +242,7 @@ class Repeat extends Operator # It creates a mark at the current cursor position # class Mark extends OperatorWithInput - constructor: (@editor, @vimState, {@selectOptions}={}) -> + constructor: (@editor, @vimState) -> super(@editor, @vimState) @viewModel = new ViewModel(this, class: 'mark', singleChar: true, hidden: true) @@ -247,7 +252,7 @@ class Mark extends OperatorWithInput # Returns nothing. execute: -> @vimState.setMark(@input.characters, @editor.getCursorBufferPosition()) - @vimState.activateCommandMode() + @vimState.activateNormalMode() module.exports = { Operator, OperatorWithInput, OperatorError, Delete, ToggleCase, diff --git a/atom/packages/vim-mode/lib/operators/indent-operators.coffee b/atom/packages/vim-mode/lib/operators/indent-operators.coffee index 0ad37e0..ba3c155 100644 --- a/atom/packages/vim-mode/lib/operators/indent-operators.coffee +++ b/atom/packages/vim-mode/lib/operators/indent-operators.coffee @@ -1,17 +1,24 @@ +_ = require 'underscore-plus' {Operator} = require './general-operators' class AdjustIndentation extends Operator - execute: (count=1) -> + execute: (count) -> mode = @vimState.mode @motion.select(count) - {start} = @editor.getSelectedBufferRange() + originalRanges = @editor.getSelectedBufferRanges() - @indent() + if mode is 'visual' + @editor.transact => + _.times(count ? 1, => @indent()) + else + @indent() - if mode isnt 'visual' - @editor.setCursorBufferPosition([start.row, 0]) - @editor.moveToFirstCharacterOfLine() - @vimState.activateCommandMode() + @editor.clearSelections() + @editor.getLastCursor().setBufferPosition([originalRanges.shift().start.row, 0]) + for range in originalRanges + @editor.addCursorAtBufferPosition([range.start.row, 0]) + @editor.moveToFirstCharacterOfLine() + @vimState.activateNormalMode() class Indent extends AdjustIndentation indent: -> diff --git a/atom/packages/vim-mode/lib/operators/input.coffee b/atom/packages/vim-mode/lib/operators/input.coffee index 3821045..0fee121 100644 --- a/atom/packages/vim-mode/lib/operators/input.coffee +++ b/atom/packages/vim-mode/lib/operators/input.coffee @@ -1,3 +1,4 @@ +Motions = require '../motions/index' {Operator, Delete} = require './general-operators' _ = require 'underscore-plus' settings = require '../settings' @@ -18,7 +19,7 @@ class Insert extends Operator execute: -> if @typingCompleted return unless @typedText? and @typedText.length > 0 - @editor.insertText(@typedText, normalizeLineEndings: true) + @editor.insertText(@typedText, normalizeLineEndings: true, autoIndent: true) for cursor in @editor.getCursors() cursor.moveLeft() unless cursor.isAtBeginningOfLine() else @@ -28,6 +29,26 @@ class Insert extends Operator inputOperator: -> true +class ReplaceMode extends Insert + + execute: -> + if @typingCompleted + return unless @typedText? and @typedText.length > 0 + @editor.transact => + @editor.insertText(@typedText, normalizeLineEndings: true) + toDelete = @typedText.length - @countChars('\n', @typedText) + for selection in @editor.getSelections() + count = toDelete + selection.delete() while count-- and not selection.cursor.isAtEndOfLine() + for cursor in @editor.getCursors() + cursor.moveLeft() unless cursor.isAtBeginningOfLine() + else + @vimState.activateReplaceMode() + @typingCompleted = true + + countChars: (char, string) -> + string.split(char).length - 1 + class InsertAfter extends Insert execute: -> @editor.moveRight() unless @editor.getLastCursor().isAtEndOfLine() @@ -45,7 +66,7 @@ class InsertAtBeginningOfLine extends Insert super class InsertAboveWithNewline extends Insert - execute: (count=1) -> + execute: -> @vimState.setInsertionCheckpoint() unless @typingCompleted @editor.insertNewlineAbove() @editor.getLastCursor().skipLeadingWhitespace() @@ -60,7 +81,7 @@ class InsertAboveWithNewline extends Insert @typingCompleted = true class InsertBelowWithNewline extends Insert - execute: (count=1) -> + execute: -> @vimState.setInsertionCheckpoint() unless @typingCompleted @editor.insertNewlineBelow() @editor.getLastCursor().skipLeadingWhitespace() @@ -81,7 +102,7 @@ class Change extends Insert standalone: false register: null - constructor: (@editor, @vimState, {@selectOptions}={}) -> + constructor: (@editor, @vimState) -> @register = settings.defaultRegister() # Public: Changes the text selected by the given motion. @@ -90,67 +111,29 @@ class Change extends Insert # # Returns nothing. execute: (count) -> - # If we've typed, we're being repeated. If we're being repeated, - # undo transactions are already handled. - @vimState.setInsertionCheckpoint() unless @typingCompleted - if _.contains(@motion.select(count, excludeWhitespace: true), true) + # If we've typed, we're being repeated. If we're being repeated, + # undo transactions are already handled. + @vimState.setInsertionCheckpoint() unless @typingCompleted + @setTextRegister(@register, @editor.getSelectedText()) - if @motion.isLinewise?() - @editor.insertNewline() - @editor.moveLeft() + if @motion.isLinewise?() and not @typingCompleted + for selection in @editor.getSelections() + if selection.getBufferRange().end.row is 0 + selection.deleteSelectedText() + else + selection.insertText("\n", autoIndent: true) + selection.cursor.moveLeft() else for selection in @editor.getSelections() selection.deleteSelectedText() - return super if @typingCompleted - - @vimState.activateInsertMode() - @typingCompleted = true - -class Substitute extends Insert - register: null - - constructor: (@editor, @vimState, {@selectOptions}={}) -> - @register = settings.defaultRegister() + return super if @typingCompleted - execute: (count=1) -> - @vimState.setInsertionCheckpoint() unless @typingCompleted - _.times count, => - @editor.selectRight() - @setTextRegister(@register, @editor.getSelectedText()) - @editor.delete() - - if @typingCompleted - @typedText = @typedText.trimLeft() - return super - - @vimState.activateInsertMode() - @typingCompleted = true - -class SubstituteLine extends Insert - register: null - - constructor: (@editor, @vimState, {@selectOptions}={}) -> - @register = settings.defaultRegister() - - execute: (count=1) -> - @vimState.setInsertionCheckpoint() unless @typingCompleted - @editor.moveToBeginningOfLine() - _.times count, => - @editor.selectToEndOfLine() - @editor.selectRight() - @setTextRegister(@register, @editor.getSelectedText()) - @editor.delete() - @editor.insertNewlineAbove() - @editor.getLastCursor().skipLeadingWhitespace() - - if @typingCompleted - @typedText = @typedText.trimLeft() - return super - - @vimState.activateInsertMode() - @typingCompleted = true + @vimState.activateInsertMode() + @typingCompleted = true + else + @vimState.activateNormalMode() # Takes a transaction and turns it into a string of what was typed. # This class is an implementation detail of Insert @@ -225,7 +208,6 @@ module.exports = { InsertAtBeginningOfLine, InsertAboveWithNewline, InsertBelowWithNewline, - Change, - Substitute, - SubstituteLine + ReplaceMode, + Change } diff --git a/atom/packages/vim-mode/lib/operators/put-operator.coffee b/atom/packages/vim-mode/lib/operators/put-operator.coffee index 63151f1..611d6fa 100644 --- a/atom/packages/vim-mode/lib/operators/put-operator.coffee +++ b/atom/packages/vim-mode/lib/operators/put-operator.coffee @@ -9,7 +9,7 @@ module.exports = class Put extends Operator register: null - constructor: (@editor, @vimState, {@location, @selectOptions}={}) -> + constructor: (@editor, @vimState, {@location}={}) -> @location ?= 'after' @complete = true @register = settings.defaultRegister() @@ -58,9 +58,9 @@ class Put extends Operator @editor.setCursorScreenPosition(originalPosition) @editor.moveToFirstCharacterOfLine() - @vimState.activateCommandMode() if type isnt 'linewise' @editor.moveLeft() + @vimState.activateNormalMode() # Private: Helper to determine if the editor is currently on the last row. # diff --git a/atom/packages/vim-mode/lib/operators/replace-operator.coffee b/atom/packages/vim-mode/lib/operators/replace-operator.coffee index 52157d0..9cf44b3 100644 --- a/atom/packages/vim-mode/lib/operators/replace-operator.coffee +++ b/atom/packages/vim-mode/lib/operators/replace-operator.coffee @@ -5,7 +5,7 @@ _ = require 'underscore-plus' module.exports = class Replace extends OperatorWithInput - constructor: (@editor, @vimState, {@selectOptions}={}) -> + constructor: (@editor, @vimState) -> super(@editor, @vimState) @viewModel = new ViewModel(this, class: 'replace', hidden: true, singleChar: true, defaultText: '\n') @@ -16,7 +16,7 @@ class Replace extends OperatorWithInput if @vimState.mode is "visual" @vimState.resetVisualMode() else - @vimState.activateCommandMode() + @vimState.activateNormalMode() return @@ -47,4 +47,4 @@ class Replace extends OperatorWithInput @editor.moveDown() @editor.moveToFirstCharacterOfLine() - @vimState.activateCommandMode() + @vimState.activateNormalMode() diff --git a/atom/packages/vim-mode/lib/prefixes.coffee b/atom/packages/vim-mode/lib/prefixes.coffee index b29bc92..c910963 100644 --- a/atom/packages/vim-mode/lib/prefixes.coffee +++ b/atom/packages/vim-mode/lib/prefixes.coffee @@ -27,7 +27,7 @@ class Prefix @composedObject.select?(@count) isLinewise: -> - @composedObject.isLinewise() + @composedObject.isLinewise?() # # Used to track the number of times either a motion or operator should diff --git a/atom/packages/vim-mode/lib/scroll.coffee b/atom/packages/vim-mode/lib/scroll.coffee index 1bc1258..275f0f9 100644 --- a/atom/packages/vim-mode/lib/scroll.coffee +++ b/atom/packages/vim-mode/lib/scroll.coffee @@ -84,5 +84,27 @@ class ScrollCursorToBottom extends ScrollCursor moveToFirstNonBlank: -> @editor.moveToFirstCharacterOfLine() +class ScrollHorizontal + isComplete: -> true + isRecordable: -> false + constructor: (@editorElement) -> + @editor = @editorElement.getModel() + cursorPos = @editor.getCursorScreenPosition() + @pixel = @editorElement.pixelPositionForScreenPosition(cursorPos).left + @cursor = @editor.getLastCursor() + + putCursorOnScreen: -> + @editor.scrollToCursorPosition({center: false}) + +class ScrollCursorToLeft extends ScrollHorizontal + execute: -> + @editor.setScrollLeft(@pixel) + @putCursorOnScreen() + +class ScrollCursorToRight extends ScrollHorizontal + execute: -> + @editor.setScrollRight(@pixel) + @putCursorOnScreen() + module.exports = {ScrollDown, ScrollUp, ScrollCursorToTop, ScrollCursorToMiddle, - ScrollCursorToBottom} + ScrollCursorToBottom, ScrollCursorToLeft, ScrollCursorToRight} diff --git a/atom/packages/vim-mode/lib/status-bar-manager.coffee b/atom/packages/vim-mode/lib/status-bar-manager.coffee index 82e35e1..080e4bf 100644 --- a/atom/packages/vim-mode/lib/status-bar-manager.coffee +++ b/atom/packages/vim-mode/lib/status-bar-manager.coffee @@ -1,9 +1,7 @@ -{Disposable, CompositeDisposable} = require 'event-kit' - ContentsByMode = 'insert': ["status-bar-vim-mode-insert", "Insert"] 'insert.replace': ["status-bar-vim-mode-insert", "Replace"] - 'command': ["status-bar-vim-mode-command", "Command"] + 'normal': ["status-bar-vim-mode-normal", "Normal"] 'visual': ["status-bar-vim-mode-visual", "Visual"] 'visual.characterwise': ["status-bar-vim-mode-visual", "Visual"] 'visual.linewise': ["status-bar-vim-mode-visual", "Visual Line"] @@ -27,6 +25,11 @@ class StatusBarManager [klass, text] = newContents @element.className = klass @element.textContent = text + else + @hide() + + hide: -> + @element.className = 'hidden' # Private diff --git a/atom/packages/vim-mode/lib/text-objects.coffee b/atom/packages/vim-mode/lib/text-objects.coffee index 6d9741b..bf38605 100644 --- a/atom/packages/vim-mode/lib/text-objects.coffee +++ b/atom/packages/vim-mode/lib/text-objects.coffee @@ -1,5 +1,7 @@ {Range} = require 'atom' AllWhitespace = /^\s$/ +WholeWordRegex = /\S+/ +{mergeRanges} = require './utils' class TextObject constructor: (@editor, @state) -> @@ -7,11 +9,21 @@ class TextObject isComplete: -> true isRecordable: -> false + execute: -> @select.apply(this, arguments) + class SelectInsideWord extends TextObject select: -> - @editor.selectWordsContainingCursors() + for selection in @editor.getSelections() + selection.expandOverWord() [true] +class SelectInsideWholeWord extends TextObject + select: -> + for selection in @editor.getSelections() + range = selection.cursor.getCurrentWordBufferRange({wordRegex: WholeWordRegex}) + selection.setBufferRange(mergeRanges(selection.getBufferRange(), range)) + true + # SelectInsideQuotes and the next class defined (SelectInsideBrackets) are # almost-but-not-quite-repeated code. They are different because of the depth # checks in the bracket matcher. @@ -76,7 +88,7 @@ class SelectInsideQuotes extends TextObject ++ start.column # skip the opening quote end = @findClosingQuote(start) if end? - selection.setBufferRange([start, end]) + selection.setBufferRange(mergeRanges(selection.getBufferRange(), [start, end])) not selection.isEmpty() # SelectInsideBrackets and the previous class defined (SelectInsideQuotes) are @@ -126,13 +138,13 @@ class SelectInsideBrackets extends TextObject ++ start.column # skip the opening quote end = @findClosingBracket(start) if end? - selection.setBufferRange([start, end]) + selection.setBufferRange(mergeRanges(selection.getBufferRange(), [start, end])) not selection.isEmpty() class SelectAWord extends TextObject select: -> for selection in @editor.getSelections() - selection.selectWord() + selection.expandOverWord() loop endPoint = selection.getBufferRange().end char = @editor.getTextInRange(Range.fromPointWithDelta(endPoint, 0, 1)) @@ -140,25 +152,56 @@ class SelectAWord extends TextObject selection.selectRight() true -class SelectInsideParagraph extends TextObject - constructor: (@editor, @inclusive) -> +class SelectAWholeWord extends TextObject select: -> for selection in @editor.getSelections() - range = selection.cursor.getCurrentParagraphBufferRange() - if range? - selection.setBufferRange(range) - selection.selectToBeginningOfNextParagraph() + range = selection.cursor.getCurrentWordBufferRange({wordRegex: WholeWordRegex}) + selection.setBufferRange(mergeRanges(selection.getBufferRange(), range)) + loop + endPoint = selection.getBufferRange().end + char = @editor.getTextInRange(Range.fromPointWithDelta(endPoint, 0, 1)) + break unless AllWhitespace.test(char) + selection.selectRight() true -class SelectAParagraph extends TextObject - constructor: (@editor, @inclusive) -> +class Paragraph extends TextObject + select: -> for selection in @editor.getSelections() - range = selection.cursor.getCurrentParagraphBufferRange() - if range? - selection.setBufferRange(range) - selection.selectToBeginningOfNextParagraph() - selection.selectDown() - true + @selectParagraph(selection) + + # Return a range delimted by the start or the end of a paragraph + paragraphDelimitedRange: (startPoint) -> + inParagraph = @isParagraphLine(@editor.lineTextForBufferRow(startPoint.row)) + upperRow = @searchLines(startPoint.row, -1, inParagraph) + lowerRow = @searchLines(startPoint.row, @editor.getLineCount(), inParagraph) + new Range([upperRow + 1, 0], [lowerRow, 0]) + + searchLines: (startRow, rowLimit, startedInParagraph) -> + for currentRow in [startRow..rowLimit] + line = @editor.lineTextForBufferRow(currentRow) + if startedInParagraph isnt @isParagraphLine(line) + return currentRow + rowLimit + + isParagraphLine: (line) -> (/\S/.test(line)) + +class SelectInsideParagraph extends Paragraph + selectParagraph: (selection) -> + oldRange = selection.getBufferRange() + startPoint = selection.cursor.getBufferPosition() + newRange = @paragraphDelimitedRange(startPoint) + selection.setBufferRange(mergeRanges(oldRange, newRange)) + true + +class SelectAParagraph extends Paragraph + selectParagraph: (selection) -> + oldRange = selection.getBufferRange() + startPoint = selection.cursor.getBufferPosition() + newRange = @paragraphDelimitedRange(startPoint) + nextRange = @paragraphDelimitedRange(newRange.end) + selection.setBufferRange(mergeRanges(oldRange, [newRange.start, nextRange.end])) + true -module.exports = {TextObject, SelectInsideWord, SelectInsideQuotes, SelectInsideBrackets, SelectAWord, SelectInsideParagraph, SelectAParagraph} +module.exports = {TextObject, SelectInsideWord, SelectInsideWholeWord, SelectInsideQuotes, + SelectInsideBrackets, SelectAWord, SelectAWholeWord, SelectInsideParagraph, SelectAParagraph} diff --git a/atom/packages/vim-mode/lib/utils.coffee b/atom/packages/vim-mode/lib/utils.coffee index 362b65d..5a26310 100644 --- a/atom/packages/vim-mode/lib/utils.coffee +++ b/atom/packages/vim-mode/lib/utils.coffee @@ -1,3 +1,5 @@ +{Range} = require 'atom' + module.exports = # Public: Determines if a string should be considered linewise or character # @@ -12,3 +14,14 @@ module.exports = 'linewise' else 'character' + + # Public: return a union of two ranges, or simply the newRange if the oldRange is empty. + # + # Returns a Range + mergeRanges: (oldRange, newRange) -> + oldRange = Range.fromObject oldRange + newRange = Range.fromObject newRange + if oldRange.isEmpty() + newRange + else + oldRange.union(newRange) diff --git a/atom/packages/vim-mode/lib/view-models/search-view-model.coffee b/atom/packages/vim-mode/lib/view-models/search-view-model.coffee index 8787210..8e63fd2 100644 --- a/atom/packages/vim-mode/lib/view-models/search-view-model.coffee +++ b/atom/packages/vim-mode/lib/view-models/search-view-model.coffee @@ -40,3 +40,11 @@ class SearchViewModel extends ViewModel atom.beep() super(view) @vimState.pushSearchHistory(@view.value) + + update: (reverse) -> + if reverse + @view.classList.add('reverse-search-input') + @view.classList.remove('search-input') + else + @view.classList.add('search-input') + @view.classList.remove('reverse-search-input') diff --git a/atom/packages/vim-mode/lib/view-models/view-model.coffee b/atom/packages/vim-mode/lib/view-models/view-model.coffee index 9cc63e1..b9da169 100644 --- a/atom/packages/vim-mode/lib/view-models/view-model.coffee +++ b/atom/packages/vim-mode/lib/view-models/view-model.coffee @@ -1,10 +1,10 @@ -VimCommandModeInputElement = require './vim-command-mode-input-element' +VimNormalModeInputElement = require './vim-normal-mode-input-element' class ViewModel constructor: (@operation, opts={}) -> {@editor, @vimState} = @operation - @view = new VimCommandModeInputElement().initialize(this, opts) - @editor.commandModeInputView = @view + @view = new VimNormalModeInputElement().initialize(this, atom.views.getView(@editor), opts) + @editor.normalModeInputView = @view @vimState.onDidFailToCompose => @view.remove() confirm: (view) -> @@ -13,6 +13,7 @@ class ViewModel cancel: (view) -> if @vimState.isOperatorPending() @vimState.pushOperations(new Input('')) + delete @editor.normalModeInputView class Input constructor: (@characters) -> diff --git a/atom/packages/vim-mode/lib/view-models/vim-command-mode-input-element.coffee b/atom/packages/vim-mode/lib/view-models/vim-normal-mode-input-element.coffee index 4fd0c52..2371753 100644 --- a/atom/packages/vim-mode/lib/view-models/vim-command-mode-input-element.coffee +++ b/atom/packages/vim-mode/lib/view-models/vim-normal-mode-input-element.coffee @@ -1,29 +1,25 @@ -class VimCommandModeInputElement extends HTMLDivElement +class VimNormalModeInputElement extends HTMLDivElement createdCallback: -> - @className = "command-mode-input" + @className = "normal-mode-input" - @editorContainer = document.createElement("div") - @editorContainer.className = "editor-container" - - @appendChild(@editorContainer) - - initialize: (@viewModel, opts = {}) -> + initialize: (@viewModel, @mainEditorElement, opts = {}) -> if opts.class? - @editorContainer.classList.add(opts.class) - - if opts.hidden - @editorContainer.style.height = "0px" + @classList.add(opts.class) @editorElement = document.createElement "atom-text-editor" @editorElement.classList.add('editor') @editorElement.getModel().setMini(true) @editorElement.setAttribute('mini', '') - @editorContainer.appendChild(@editorElement) + @appendChild(@editorElement) @singleChar = opts.singleChar @defaultText = opts.defaultText ? '' - @panel = atom.workspace.addBottomPanel(item: this, priority: 100) + if opts.hidden + @classList.add('vim-hidden-normal-mode-input') + @mainEditorElement.parentNode.appendChild(this) + else + @panel = atom.workspace.addBottomPanel(item: this, priority: 100) @focus() @handleEvents() @@ -32,8 +28,11 @@ class VimCommandModeInputElement extends HTMLDivElement handleEvents: -> if @singleChar? + compositing = false @editorElement.getModel().getBuffer().onDidChange (e) => - @confirm() if e.newText + @confirm() if e.newText and not compositing + @editorElement.addEventListener 'compositionstart', -> compositing = true + @editorElement.addEventListener 'compositionend', -> compositing = false else atom.commands.add(@editorElement, 'editor:newline', @confirm.bind(this)) @@ -55,10 +54,13 @@ class VimCommandModeInputElement extends HTMLDivElement removePanel: -> atom.workspace.getActivePane().activate() - @panel.destroy() + if @panel? + @panel.destroy() + else + this.remove() module.exports = -document.registerElement("vim-command-mode-input" +document.registerElement("vim-normal-mode-input" extends: "div", - prototype: VimCommandModeInputElement.prototype + prototype: VimNormalModeInputElement.prototype ) diff --git a/atom/packages/vim-mode/lib/vim-mode.coffee b/atom/packages/vim-mode/lib/vim-mode.coffee index 660fba0..b8ef936 100644 --- a/atom/packages/vim-mode/lib/vim-mode.coffee +++ b/atom/packages/vim-mode/lib/vim-mode.coffee @@ -16,7 +16,7 @@ module.exports = @vimStatesByEditor = new WeakMap @disposables.add atom.workspace.observeTextEditors (editor) => - return if editor.isMini() or @vimStatesByEditor.get(editor) + return if editor.isMini() or @getEditorState(editor) vimState = new VimState( atom.views.getView(editor), @@ -28,6 +28,8 @@ module.exports = @vimStatesByEditor.set(editor, vimState) vimState.onDidDestroy => @vimStates.delete(vimState) + @disposables.add atom.workspace.onDidChangeActivePaneItem @updateToPaneItem.bind(this) + @disposables.add new Disposable => @vimStates.forEach (vimState) -> vimState.destroy() @@ -46,6 +48,13 @@ module.exports = @disposables.add new Disposable => @statusBarManager.detach() + updateToPaneItem: (item) -> + vimState = @getEditorState(item) if item? + if vimState? + vimState.updateStatusBar() + else + @statusBarManager.hide() + provideVimMode: -> getGlobalState: @getGlobalState.bind(this) getEditorState: @getEditorState.bind(this) diff --git a/atom/packages/vim-mode/lib/vim-state.coffee b/atom/packages/vim-mode/lib/vim-state.coffee index a45551c..db59ee5 100644 --- a/atom/packages/vim-mode/lib/vim-state.coffee +++ b/atom/packages/vim-mode/lib/vim-state.coffee @@ -1,3 +1,4 @@ +Grim = require 'grim' _ = require 'underscore-plus' {Point, Range} = require 'atom' {Emitter, Disposable, CompositeDisposable} = require 'event-kit' @@ -6,6 +7,7 @@ settings = require './settings' Operators = require './operators/index' Prefixes = require './prefixes' Motions = require './motions/index' +InsertMode = require './insert-mode' TextObjects = require './text-objects' Utils = require './utils' @@ -18,6 +20,7 @@ class VimState mode: null submode: null destroyed: false + replaceModeListener: null constructor: (@editorElement, @statusBarManager, @globalVimState) -> @emitter = new Emitter @@ -28,52 +31,56 @@ class VimState @marks = {} @subscriptions.add @editor.onDidDestroy => @destroy() - @subscriptions.add @editor.onDidChangeSelectionRange _.debounce(=> - return unless @editor? - if @editor.getSelections().every((selection) -> selection.isEmpty()) - @activateCommandMode() if @mode is 'visual' - else - @activateVisualMode('characterwise') if @mode is 'command' - , 100) + @editorElement.addEventListener 'mouseup', @checkSelections + if atom.commands.onDidDispatch? + @subscriptions.add atom.commands.onDidDispatch (e) => + if e.target is @editorElement + @checkSelections() @editorElement.classList.add("vim-mode") - @setupCommandMode() + @setupNormalMode() if settings.startInInsertMode() @activateInsertMode() else - @activateCommandMode() + @activateNormalMode() destroy: -> unless @destroyed @destroyed = true - @emitter.emit 'did-destroy' @subscriptions.dispose() if @editor.isAlive() @deactivateInsertMode() @editorElement.component?.setInputEnabled(true) @editorElement.classList.remove("vim-mode") - @editorElement.classList.remove("command-mode") + @editorElement.classList.remove("normal-mode") + @editorElement.removeEventListener 'mouseup', @checkSelections @editor = null @editorElement = null + @emitter.emit 'did-destroy' # Private: Creates the plugin's bindings # # Returns nothing. - setupCommandMode: -> + setupNormalMode: -> @registerCommands - 'activate-command-mode': => @activateCommandMode() + 'activate-normal-mode': => @activateNormalMode() 'activate-linewise-visual-mode': => @activateVisualMode('linewise') 'activate-characterwise-visual-mode': => @activateVisualMode('characterwise') 'activate-blockwise-visual-mode': => @activateVisualMode('blockwise') - 'reset-command-mode': => @resetCommandMode() + 'reset-normal-mode': => @resetNormalMode() 'repeat-prefix': (e) => @repeatPrefix(e) 'reverse-selections': (e) => @reverseSelections(e) 'undo': (e) => @undo(e) + 'replace-mode-backspace': => @replaceModeUndo() + 'insert-mode-put': (e) => @insertRegister(@registerName(e)) + 'copy-from-line-above': => InsertMode.copyCharacterFromAbove(@editor, this) + 'copy-from-line-below': => InsertMode.copyCharacterFromBelow(@editor, this) @registerOperationCommands 'activate-insert-mode': => new Operators.Insert(@editor, this) - 'substitute': => new Operators.Substitute(@editor, this) - 'substitute-line': => new Operators.SubstituteLine(@editor, this) + 'activate-replace-mode': => new Operators.ReplaceMode(@editor, this) + 'substitute': => [new Operators.Change(@editor, this), new Motions.MoveRight(@editor, this)] + 'substitute-line': => [new Operators.Change(@editor, this), new Motions.MoveToRelativeLine(@editor, this)] 'insert-after': => new Operators.InsertAfter(@editor, this) 'insert-after-end-of-line': => new Operators.InsertAfterEndOfLine(@editor, this) 'insert-at-beginning-of-line': => new Operators.InsertAtBeginningOfLine(@editor, this) @@ -135,7 +142,10 @@ class VimState 'scroll-full-screen-up': => new Motions.ScrollFullUpKeepCursor(@editorElement, this) 'scroll-half-screen-down': => new Motions.ScrollHalfDownKeepCursor(@editorElement, this) 'scroll-full-screen-down': => new Motions.ScrollFullDownKeepCursor(@editorElement, this) + 'scroll-cursor-to-left': => new Scroll.ScrollCursorToLeft(@editorElement) + 'scroll-cursor-to-right': => new Scroll.ScrollCursorToRight(@editorElement) 'select-inside-word': => new TextObjects.SelectInsideWord(@editor) + 'select-inside-whole-word': => new TextObjects.SelectInsideWholeWord(@editor) 'select-inside-double-quotes': => new TextObjects.SelectInsideQuotes(@editor, '"', false) 'select-inside-single-quotes': => new TextObjects.SelectInsideQuotes(@editor, '\'', false) 'select-inside-back-ticks': => new TextObjects.SelectInsideQuotes(@editor, '`', false) @@ -146,6 +156,7 @@ class VimState 'select-inside-parentheses': => new TextObjects.SelectInsideBrackets(@editor, '(', ')', false) 'select-inside-paragraph': => new TextObjects.SelectInsideParagraph(@editor, false) 'select-a-word': => new TextObjects.SelectAWord(@editor) + 'select-a-whole-word': => new TextObjects.SelectAWholeWord(@editor) 'select-around-double-quotes': => new TextObjects.SelectInsideQuotes(@editor, '"', true) 'select-around-single-quotes': => new TextObjects.SelectInsideQuotes(@editor, '\'', true) 'select-around-back-ticks': => new TextObjects.SelectInsideQuotes(@editor, '`', true) @@ -165,8 +176,8 @@ class VimState 'find-backwards': (e) => new Motions.Find(@editor, this).reverse() 'till': (e) => new Motions.Till(@editor, this) 'till-backwards': (e) => new Motions.Till(@editor, this).reverse() - 'repeat-find': (e) => @currentFind.repeat() if @currentFind? - 'repeat-find-reverse': (e) => @currentFind.repeat(reverse: true) if @currentFind? + 'repeat-find': (e) => new @globalVimState.currentFind.constructor(@editor, this, repeated: true) if @globalVimState.currentFind + 'repeat-find-reverse': (e) => new @globalVimState.currentFind.constructor(@editor, this, repeated: true, reverse: true) if @globalVimState.currentFind 'replace': (e) => new Operators.Replace(@editor, this) 'search': (e) => new Motions.Search(@editor, this) 'reverse-search': (e) => (new Motions.Search(@editor, this)).reversed() @@ -210,7 +221,7 @@ class VimState # if we have started an operation that responds to canComposeWith check if it can compose # with the operation we're going to push onto the stack if (topOp = @topOperation())? and topOp.canComposeWith? and not topOp.canComposeWith(operation) - @resetCommandMode() + @resetNormalMode() @emitter.emit('failed-to-compose') break @@ -237,7 +248,7 @@ class VimState undo: -> @editor.undo() - @activateCommandMode() + @activateNormalMode() # Private: Processes the command if the last operation is complete. # @@ -247,7 +258,7 @@ class VimState return unless @topOperation().isComplete() - if @mode is 'command' and @topOperation() instanceof Operators.Operator + if @mode is 'normal' and @topOperation() instanceof Operators.Operator @activateOperatorPendingMode() return @@ -258,7 +269,7 @@ class VimState @processOpStack() catch e if (e instanceof Operators.OperatorError) or (e instanceof Motions.MotionError) - @resetCommandMode() + @resetNormalMode() else throw e else @@ -278,6 +289,8 @@ class VimState # Returns the value of the given register or undefined if it hasn't # been set. getRegister: (name) -> + if name is '"' + name = settings.defaultRegister() if name in ['*', '+'] text = atom.clipboard.read() type = Utils.copyType(text) @@ -312,6 +325,8 @@ class VimState # # Returns nothing. setRegister: (name, value) -> + if name is '"' + name = settings.defaultRegister() if name in ['*', '+'] atom.clipboard.write(value.text) else if name is '_' @@ -368,43 +383,73 @@ class VimState # Mode Switching ############################################################################## - # Private: Used to enable command mode. + # Private: Used to enable normal mode. # # Returns nothing. - activateCommandMode: -> + activateNormalMode: -> @deactivateInsertMode() @deactivateVisualMode() - @mode = 'command' + @mode = 'normal' @submode = null - @changeModeClass('command-mode') + @changeModeClass('normal-mode') @clearOpStack() selection.clear(autoscroll: false) for selection in @editor.getSelections() - for cursor in @editor.getCursors() - if cursor.isAtEndOfLine() and not cursor.isAtBeginningOfLine() - cursor.moveLeft() + @ensureCursorsWithinLine() @updateStatusBar() + # TODO: remove this method and bump the `vim-mode` service version number. + activateCommandMode: -> + Grim.deprecate("Use ::activateNormalMode instead") + @activateNormalMode() + # Private: Used to enable insert mode. # # Returns nothing. - activateInsertMode: -> + activateInsertMode: (subtype = null) -> @mode = 'insert' @editorElement.component.setInputEnabled(true) @setInsertionCheckpoint() - @submode = null + @submode = subtype @changeModeClass('insert-mode') @updateStatusBar() + activateReplaceMode: -> + @activateInsertMode('replace') + @replaceModeCounter = 0 + @editorElement.classList.add('replace-mode') + @subscriptions.add @replaceModeListener = @editor.onWillInsertText @replaceModeInsertHandler + @subscriptions.add @replaceModeUndoListener = @editor.onDidInsertText @replaceModeUndoHandler + + replaceModeInsertHandler: (event) => + chars = event.text?.split('') or [] + selections = @editor.getSelections() + for char in chars + continue if char is '\n' + for selection in selections + selection.delete() unless selection.cursor.isAtEndOfLine() + return + + replaceModeUndoHandler: (event) => + @replaceModeCounter++ + + replaceModeUndo: -> + if @replaceModeCounter > 0 + @editor.undo() + @editor.undo() + @editor.moveLeft() + @replaceModeCounter-- + setInsertionCheckpoint: -> @insertionCheckpoint = @editor.createCheckpoint() unless @insertionCheckpoint? deactivateInsertMode: -> return unless @mode in [null, 'insert'] @editorElement.component.setInputEnabled(false) + @editorElement.classList.remove('replace-mode') @editor.groupChangesSinceCheckpoint(@insertionCheckpoint) changes = getChangesSinceCheckpoint(@editor.buffer, @insertionCheckpoint) item = @inputOperator(@history[0]) @@ -413,6 +458,13 @@ class VimState item.confirmChanges(changes) for cursor in @editor.getCursors() cursor.moveLeft() unless cursor.isAtBeginningOfLine() + if @replaceModeListener? + @replaceModeListener.dispose() + @subscriptions.remove @replaceModeListener + @replaceModeListener = null + @replaceModeUndoListener.dispose() + @subscriptions.remove @replaceModeUndoListener + @replaceModeUndoListener = null deactivateVisualMode: -> return unless @mode is 'visual' @@ -440,7 +492,7 @@ class VimState # * activate-linewise-visual-mode if @mode is 'visual' if @submode is type - @activateCommandMode() + @activateNormalMode() return @submode = type @@ -486,25 +538,25 @@ class VimState activateOperatorPendingMode: -> @deactivateInsertMode() @mode = 'operator-pending' - @submodule = null + @submode = null @changeModeClass('operator-pending-mode') @updateStatusBar() changeModeClass: (targetMode) -> - for mode in ['command-mode', 'insert-mode', 'visual-mode', 'operator-pending-mode'] + for mode in ['normal-mode', 'insert-mode', 'visual-mode', 'operator-pending-mode'] if mode is targetMode @editorElement.classList.add(mode) else @editorElement.classList.remove(mode) - # Private: Resets the command mode back to it's initial state. + # Private: Resets the normal mode back to it's initial state. # # Returns nothing. - resetCommandMode: -> + resetNormalMode: -> @clearOpStack() @editor.clearSelections() - @activateCommandMode() + @activateNormalMode() # Private: A generic way to create a Register prefix based on the event. # @@ -512,11 +564,19 @@ class VimState # # Returns nothing. registerPrefix: (e) -> + new Prefixes.Register(@registerName(e)) + + # Private: Gets a register name from a keyboard event + # + # e - The event + # + # Returns the name of the register + registerName: (e) -> keyboardEvent = e.originalEvent?.originalEvent ? e.originalEvent name = atom.keymaps.keystrokeForKeyboardEvent(keyboardEvent) if name.lastIndexOf('shift-', 0) is 0 name = name.slice(6) - new Prefixes.Register(name) + name # Private: A generic way to create a Number prefix based on the event. # @@ -535,8 +595,8 @@ class VimState @pushOperations(new Prefixes.Repeat(num)) reverseSelections: -> + reversed = not @editor.getLastSelection().isReversed() for selection in @editor.getSelections() - reversed = not selection.isReversed() selection.setBufferRange(selection.getBufferRange(), {reversed}) # Private: Figure out whether or not we are in a repeat sequence or we just @@ -581,6 +641,34 @@ class VimState updateStatusBar: -> @statusBarManager.update(@mode, @submode) + # Private: insert the contents of the register in the editor + # + # name - the name of the register to insert + # + # Returns nothing. + insertRegister: (name) -> + text = @getRegister(name)?.text + @editor.insertText(text) if text? + + # Private: ensure the mode follows the state of selections + checkSelections: => + return unless @editor? + if @editor.getSelections().every((selection) -> selection.isEmpty()) + @ensureCursorsWithinLine() if @mode is 'normal' + @activateNormalMode() if @mode is 'visual' + else + @activateVisualMode('characterwise') if @mode is 'normal' + + # Private: ensure the cursor stays within the line as appropriate + ensureCursorsWithinLine: => + for cursor in @editor.getCursors() + {goalColumn} = cursor + if cursor.isAtEndOfLine() and not cursor.isAtBeginningOfLine() + cursor.moveLeft() + cursor.goalColumn = goalColumn + + @editor.mergeCursors() + # This uses private APIs and may break if TextBuffer is refactored. # Package authors - copy and paste this code at your own risk. getChangesSinceCheckpoint = (buffer, checkpoint) -> diff --git a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/package.json b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/package.json index 3f09c82..03d81db 100644 --- a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/package.json +++ b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/package.json @@ -54,5 +54,6 @@ ], "directories": {}, "_shasum": "da184c535d18d8ee7ba2aa229b914009fae11309", - "_resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz" + "_resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz", + "readme": "ERROR: No README data found!" } diff --git a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/package.json b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/package.json index 2b40fe8..01d6532 100644 --- a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/package.json +++ b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/package.json @@ -69,5 +69,6 @@ "tarball": "http://registry.npmjs.org/es5-ext/-/es5-ext-0.10.7.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.7.tgz" + "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.7.tgz", + "readme": "ERROR: No README data found!" } diff --git a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/package.json b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/package.json index e913854..b861638 100644 --- a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/package.json +++ b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/package.json @@ -61,5 +61,6 @@ "tarball": "http://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz" + "_resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz", + "readme": "ERROR: No README data found!" } diff --git a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/package.json b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/package.json index 6a09929..0efffea 100644 --- a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/package.json +++ b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/package.json @@ -58,5 +58,6 @@ "tarball": "http://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz" + "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz", + "readme": "ERROR: No README data found!" } diff --git a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/package.json b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/package.json index e4b0cff..07973df 100644 --- a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/package.json +++ b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/package.json @@ -59,5 +59,6 @@ "tarball": "http://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz" + "_resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz", + "readme": "ERROR: No README data found!" } diff --git a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/mixto/package.json b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/mixto/package.json index e675518..be85e24 100644 --- a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/mixto/package.json +++ b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/mixto/package.json @@ -9,7 +9,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/atom/mixto" + "url": "git+https://github.com/atom/mixto.git" }, "keywords": [ "mixin", @@ -60,5 +60,7 @@ ], "directories": {}, "_shasum": "c320ef61b52f2898f522e17d8bbc6d506d8425b6", - "_resolved": "https://registry.npmjs.org/mixto/-/mixto-1.0.0.tgz" + "_resolved": "https://registry.npmjs.org/mixto/-/mixto-1.0.0.tgz", + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/atom/mixto" } diff --git a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/property-accessors/package.json b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/property-accessors/package.json index 63150bc..66179a4 100644 --- a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/property-accessors/package.json +++ b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/property-accessors/package.json @@ -9,7 +9,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/atom/property-accessors" + "url": "git+https://github.com/atom/property-accessors.git" }, "keywords": [ "property", @@ -70,5 +70,6 @@ "tarball": "http://registry.npmjs.org/property-accessors/-/property-accessors-1.1.3.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/property-accessors/-/property-accessors-1.1.3.tgz" + "_resolved": "https://registry.npmjs.org/property-accessors/-/property-accessors-1.1.3.tgz", + "readme": "ERROR: No README data found!" } diff --git a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/package.json b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/package.json index 436e2d7..53b6b8a 100644 --- a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/package.json +++ b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/node_modules/emissary/package.json @@ -9,7 +9,7 @@ }, "repository": { "type": "git", - "url": "http://github.com/atom/emissary.git" + "url": "git+ssh://git@github.com/atom/emissary.git" }, "bugs": { "url": "https://github.com/atom/emissary/issues" @@ -73,5 +73,6 @@ "tarball": "http://registry.npmjs.org/emissary/-/emissary-1.3.3.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/emissary/-/emissary-1.3.3.tgz" + "_resolved": "https://registry.npmjs.org/emissary/-/emissary-1.3.3.tgz", + "readme": "ERROR: No README data found!" } diff --git a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/package.json b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/package.json index ae85b41..92f075a 100644 --- a/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/package.json +++ b/atom/packages/vim-mode/node_modules/event-kit/node_modules/grim/package.json @@ -9,7 +9,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/atom/grim.git" + "url": "git+https://github.com/atom/grim.git" }, "bugs": { "url": "https://github.com/atom/grim/issues" @@ -69,5 +69,6 @@ "tarball": "http://registry.npmjs.org/grim/-/grim-0.12.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/grim/-/grim-0.12.0.tgz" + "_resolved": "https://registry.npmjs.org/grim/-/grim-0.12.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/atom/packages/vim-mode/node_modules/event-kit/package.json b/atom/packages/vim-mode/node_modules/event-kit/package.json index d19b561..5f4b745 100644 --- a/atom/packages/vim-mode/node_modules/event-kit/package.json +++ b/atom/packages/vim-mode/node_modules/event-kit/package.json @@ -9,7 +9,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/atom/event-kit.git" + "url": "git+https://github.com/atom/event-kit.git" }, "bugs": { "url": "https://github.com/atom/event-kit/issues" @@ -69,5 +69,6 @@ "tarball": "http://registry.npmjs.org/event-kit/-/event-kit-0.7.2.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/event-kit/-/event-kit-0.7.2.tgz" + "_resolved": "https://registry.npmjs.org/event-kit/-/event-kit-0.7.2.tgz", + "readme": "ERROR: No README data found!" } diff --git a/atom/packages/vim-mode/node_modules/grim/LICENSE.md b/atom/packages/vim-mode/node_modules/grim/LICENSE.md new file mode 100644 index 0000000..4d231b4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/LICENSE.md @@ -0,0 +1,20 @@ +Copyright (c) 2014 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/atom/packages/vim-mode/node_modules/grim/README.md b/atom/packages/vim-mode/node_modules/grim/README.md new file mode 100644 index 0000000..c7a023c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/README.md @@ -0,0 +1,21 @@ +# Grim [](https://travis-ci.org/atom/grim) + +Log deprecate calls + +## Installing + +```sh +npm install grim +``` + +## Usage + +```javascript +Grim = require('grim') + +function someOldMethod() { + Grim.deprecate("Use theNewMethod instead.") +} +``` + +To view all calls to deprecated methods use `Grim.logDeprecations()` or get direct access to the deprecated calls by using `Grim.getDeprecations()` diff --git a/atom/packages/vim-mode/node_modules/grim/lib/deprecation.js b/atom/packages/vim-mode/node_modules/grim/lib/deprecation.js new file mode 100644 index 0000000..fa39865 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/lib/deprecation.js @@ -0,0 +1,149 @@ +(function() { + var Deprecation, SourceMapCache; + + SourceMapCache = {}; + + module.exports = Deprecation = (function() { + Deprecation.getFunctionNameFromCallsite = function(callsite) {}; + + Deprecation.deserialize = function(_arg) { + var deprecation, fileName, lineNumber, message, stack, stacks, _i, _len; + message = _arg.message, fileName = _arg.fileName, lineNumber = _arg.lineNumber, stacks = _arg.stacks; + deprecation = new Deprecation(message, fileName, lineNumber); + for (_i = 0, _len = stacks.length; _i < _len; _i++) { + stack = stacks[_i]; + deprecation.addStack(stack, stack.metadata); + } + return deprecation; + }; + + function Deprecation(message, fileName, lineNumber) { + this.message = message; + this.fileName = fileName; + this.lineNumber = lineNumber; + this.callCount = 0; + this.stackCount = 0; + this.stacks = {}; + this.stackCallCounts = {}; + } + + Deprecation.prototype.getFunctionNameFromCallsite = function(callsite) { + var _ref, _ref1, _ref2; + if (callsite.functionName != null) { + return callsite.functionName; + } + if (callsite.isToplevel()) { + return (_ref = callsite.getFunctionName()) != null ? _ref : '<unknown>'; + } else { + if (callsite.isConstructor()) { + return "new " + (callsite.getFunctionName()); + } else if (callsite.getMethodName() && !callsite.getFunctionName()) { + return callsite.getMethodName(); + } else { + return "" + (callsite.getTypeName()) + "." + ((_ref1 = (_ref2 = callsite.getMethodName()) != null ? _ref2 : callsite.getFunctionName()) != null ? _ref1 : '<anonymous>'); + } + } + }; + + Deprecation.prototype.getLocationFromCallsite = function(callsite) { + var column, fileName, line; + if (callsite.location != null) { + return callsite.location; + } + if (callsite.isNative()) { + return "native"; + } else if (callsite.isEval()) { + return "eval at " + (this.getLocationFromCallsite(callsite.getEvalOrigin())); + } else { + fileName = callsite.getFileName(); + line = callsite.getLineNumber(); + column = callsite.getColumnNumber(); + return "" + fileName + ":" + line + ":" + column; + } + }; + + Deprecation.prototype.getFileNameFromCallSite = function(callsite) { + var _ref; + return (_ref = callsite.fileName) != null ? _ref : callsite.getFileName(); + }; + + Deprecation.prototype.getOriginName = function() { + return this.originName; + }; + + Deprecation.prototype.getMessage = function() { + return this.message; + }; + + Deprecation.prototype.getStacks = function() { + var location, parsedStack, parsedStacks, stack, _ref; + parsedStacks = []; + _ref = this.stacks; + for (location in _ref) { + stack = _ref[location]; + parsedStack = this.parseStack(stack); + parsedStack.callCount = this.stackCallCounts[location]; + parsedStack.metadata = stack.metadata; + parsedStacks.push(parsedStack); + } + return parsedStacks; + }; + + Deprecation.prototype.getStackCount = function() { + return this.stackCount; + }; + + Deprecation.prototype.getCallCount = function() { + return this.callCount; + }; + + Deprecation.prototype.addStack = function(stack, metadata) { + var callerLocation, _base, _base1; + if (this.originName == null) { + this.originName = this.getFunctionNameFromCallsite(stack[0]); + } + if (this.fileName == null) { + this.fileName = this.getFileNameFromCallSite(stack[0]); + } + if (this.lineNumber == null) { + this.lineNumber = typeof (_base = stack[0]).getLineNumber === "function" ? _base.getLineNumber() : void 0; + } + this.callCount++; + stack.metadata = metadata; + callerLocation = this.getLocationFromCallsite(stack[1]); + if (this.stacks[callerLocation] == null) { + this.stacks[callerLocation] = stack; + this.stackCount++; + } + if ((_base1 = this.stackCallCounts)[callerLocation] == null) { + _base1[callerLocation] = 0; + } + return this.stackCallCounts[callerLocation]++; + }; + + Deprecation.prototype.parseStack = function(stack) { + return stack.map((function(_this) { + return function(callsite) { + return { + functionName: _this.getFunctionNameFromCallsite(callsite), + location: _this.getLocationFromCallsite(callsite), + fileName: _this.getFileNameFromCallSite(callsite) + }; + }; + })(this)); + }; + + Deprecation.prototype.serialize = function() { + return { + message: this.getMessage(), + lineNumber: this.lineNumber, + fileName: this.fileName, + stacks: this.getStacks() + }; + }; + + return Deprecation; + + })(); + +}).call(this); diff --git a/atom/packages/vim-mode/node_modules/grim/lib/grim.js b/atom/packages/vim-mode/node_modules/grim/lib/grim.js new file mode 100644 index 0000000..52ca968 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/lib/grim.js @@ -0,0 +1,105 @@ +(function() { + var Deprecation, Emitter, grim; + + Emitter = require('emissary').Emitter; + + Deprecation = require('./deprecation'); + + if (global.__grim__ == null) { + grim = global.__grim__ = { + deprecations: {}, + includeDeprecatedAPIs: true, + getDeprecations: function() { + var deprecation, deprecations, deprecationsByLineNumber, deprecationsByPackage, fileName, lineNumber, packageName, _ref; + deprecations = []; + _ref = grim.deprecations; + for (fileName in _ref) { + deprecationsByLineNumber = _ref[fileName]; + for (lineNumber in deprecationsByLineNumber) { + deprecationsByPackage = deprecationsByLineNumber[lineNumber]; + for (packageName in deprecationsByPackage) { + deprecation = deprecationsByPackage[packageName]; + deprecations.push(deprecation); + } + } + } + return deprecations; + }, + getDeprecationsLength: function() { + return this.getDeprecations().length; + }, + clearDeprecations: function() { + grim.deprecations = {}; + }, + logDeprecations: function() { + var deprecation, deprecations, _i, _len; + deprecations = this.getDeprecations(); + deprecations.sort(function(a, b) { + return b.getCallCount() - a.getCallCount(); + }); + console.warn("\nCalls to deprecated functions\n-----------------------------"); + for (_i = 0, _len = deprecations.length; _i < _len; _i++) { + deprecation = deprecations[_i]; + console.warn("(" + (deprecation.getCallCount()) + ") " + (deprecation.getOriginName()) + " : " + (deprecation.getMessage()), deprecation); + } + }, + deprecate: function(message, metadata) { + var deprecation, deprecationSite, error, fileName, lineNumber, originalPrepareStackTrace, originalStackTraceLimit, packageName, stack, _base, _base1, _base2, _ref; + originalStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 7; + error = new Error; + Error.captureStackTrace(error); + Error.stackTraceLimit = originalStackTraceLimit; + originalPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function(error, stack) { + return stack; + }; + stack = error.stack.slice(1); + Error.prepareStackTrace = originalPrepareStackTrace; + deprecationSite = stack[0]; + fileName = deprecationSite.getFileName(); + lineNumber = deprecationSite.getLineNumber(); + packageName = (_ref = metadata != null ? metadata.packageName : void 0) != null ? _ref : ""; + if ((_base = grim.deprecations)[fileName] == null) { + _base[fileName] = {}; + } + if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) { + _base1[lineNumber] = {}; + } + if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) { + _base2[packageName] = new Deprecation(message); + } + deprecation = grim.deprecations[fileName][lineNumber][packageName]; + deprecation.addStack(stack, metadata); + grim.emit("updated", deprecation); + }, + addSerializedDeprecation: function(serializedDeprecation) { + var deprecation, fileName, lineNumber, message, packageName, stack, stacks, _base, _base1, _base2, _i, _len, _ref, _ref1, _ref2; + deprecation = Deprecation.deserialize(serializedDeprecation); + message = deprecation.getMessage(); + fileName = deprecation.fileName, lineNumber = deprecation.lineNumber; + stacks = deprecation.getStacks(); + packageName = (_ref = (_ref1 = stacks[0]) != null ? (_ref2 = _ref1.metadata) != null ? _ref2.packageName : void 0 : void 0) != null ? _ref : ""; + if ((_base = grim.deprecations)[fileName] == null) { + _base[fileName] = {}; + } + if ((_base1 = grim.deprecations[fileName])[lineNumber] == null) { + _base1[lineNumber] = {}; + } + if ((_base2 = grim.deprecations[fileName][lineNumber])[packageName] == null) { + _base2[packageName] = new Deprecation(message, fileName, lineNumber); + } + deprecation = grim.deprecations[fileName][lineNumber][packageName]; + for (_i = 0, _len = stacks.length; _i < _len; _i++) { + stack = stacks[_i]; + deprecation.addStack(stack, stack.metadata); + } + grim.emit("updated", deprecation); + } + }; + Emitter.extend(grim); + } + + module.exports = global.__grim__; + +}).call(this); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/LICENSE.md b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/LICENSE.md new file mode 100644 index 0000000..493db50 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/LICENSE.md @@ -0,0 +1,20 @@ +Copyright (c) 2013 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/README.md b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/README.md new file mode 100644 index 0000000..9415c13 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/README.md @@ -0,0 +1,49 @@ +# Emissary – Mixins for Events [](https://travis-ci.org/atom/emissary) + +**Achtung!** This library is currently used in Atom and various Atom dependencies, but our long-term plan is to transition away from it in favor of the simpler [event-kit](https://github.com/atom/event-kit) library. Don't depend on supporting this library forever. + +**Achtung Again!** The Subscriber mixin requires ES6 Harmony WeakMaps. To enable them, run your program with the `node --harmony_collections` flag. If you're using it in a node framework such as jasmine, run its script with the flag enabled as follows: `node --harmony-collections .bin/jasmine-node specs`. + +## Emitter + +Emitter is backward-compatible with Node's event emitter, but offers more functionality. You can construct standalone `Emitter` instances or use it as a mixin. + +* `Emitter.extend(object)` + Turns the given object into an emitter by adding the appropriate methods. + +* `Emitter.includeInto(class)` + Turns the class into an emitter by extending its prototype. + +* `::on(eventNames, handler)` + Subscribe to one or more events. Events names are separated by spaces, and can optionally be namespaced with a dot-suffix. E.g. `event1 event2.namespace`. + +* `::once(eventName, handler)` + Like `::on`, but only fires the handler once before unsubscribing automatically. + +* `::off(eventNames[, handler])` + Unsubscribe to one or more events. Event names are separated by spaces. Passing a non-namespaced event name unsubscribes from every namespace for that event. Passing only a namespace unsubscribes from that entire namespace. Passing a handler removes only a subscription corresponding to the given event name(s) and that handler. + +* `::emit(eventName[, data...])` + Emit an event with the given name. If the event name is namespaced, only calls handlers for the event associated with the namespace, otherwise it fires all handlers. Handlers are called with zero or more data arguments provided after the event name. + +* `::pauseEvents()` + Buffers events instead of emitting them until `::resumeEvents` is called. + +* `::resumeEvents()` + Emits all events buffered since pausing and resumes normal emitting behavior. + +* `::getSubscriptionCount()` + Get the total number of handlers registered on the emitter. + +## Subscriber + +Subscriber works in partnership with an emitter or any object supporting subscription cancellation with `.off`. This includes standard Node event emitters and jQuery objects. + +* `::subscribe(object, eventNames, handler)` + Subscribe to the given event name(s) on the given object. + +* `::subscribeWith(object, methodName, eventNames, handler)` + Subscribe to the given object with a method other than `.on`. + +* `::unsubscribe([object])` + Cancel subscriptions previously registered with `::subscribe`. If an object is given, only unsubscribe from that object. If called without an object, unsubscribe from everything. diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/behavior.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/behavior.js new file mode 100644 index 0000000..863c2f2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/behavior.js @@ -0,0 +1,120 @@ +(function() { + var Behavior, PropertyAccessors, Signal, helpers, isEqual, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + __slice = [].slice; + + isEqual = require('underscore-plus').isEqual; + + PropertyAccessors = require('property-accessors'); + + Signal = require('./signal'); + + module.exports = Behavior = (function(_super) { + __extends(Behavior, _super); + + PropertyAccessors.includeInto(Behavior); + + function Behavior() { + var args, subscribeCallback, _ref; + args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; + if (typeof ((_ref = args[0]) != null ? _ref.call : void 0) !== 'function') { + this.value = args.shift(); + } + Behavior.__super__.constructor.call(this, subscribeCallback = args.shift()); + } + + Behavior.prototype.retained = function() { + var _this = this; + this.subscribe(this, 'value-internal', function(value) { + return _this.value = value; + }); + this.subscribe(this, 'value-subscription-added', function(handler) { + return handler(_this.value); + }); + return typeof this.subscribeCallback === "function" ? this.subscribeCallback() : void 0; + }; + + Behavior.prototype.emit = function() { + var args, name; + name = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (name === 'value') { + this.emit.apply(this, ['value-internal'].concat(__slice.call(args))); + } + return Behavior.__super__.emit.apply(this, arguments); + }; + + Behavior.prototype.getValue = function() { + if (!(this.retainCount > 0)) { + throw new Error("Subscribe to or retain this behavior before calling getValue"); + } + return this.value; + }; + + Behavior.prototype.and = function(right) { + return helpers.combine(this, right, (function(leftValue, rightValue) { + return leftValue && rightValue; + })).distinctUntilChanged(); + }; + + Behavior.prototype.or = function(right) { + return helpers.combine(this, right, (function(leftValue, rightValue) { + return leftValue || rightValue; + })).distinctUntilChanged(); + }; + + Behavior.prototype.toBehavior = function() { + return this; + }; + + Behavior.prototype.lazyAccessor('changes', function() { + var source; + source = this; + return new Signal(function() { + var gotFirst, + _this = this; + gotFirst = false; + return this.subscribe(source, 'value', function() { + var metadata, value; + value = arguments[0], metadata = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (gotFirst) { + _this.emitValue.apply(_this, [value].concat(__slice.call(metadata))); + } + return gotFirst = true; + }); + }); + }); + + Behavior.prototype.becomes = function(predicateOrTargetValue) { + var predicate, targetValue; + if (typeof predicateOrTargetValue !== 'function') { + targetValue = predicateOrTargetValue; + return this.becomes(function(value) { + return isEqual(value, targetValue); + }); + } + predicate = predicateOrTargetValue; + return this.map(function(value) { + return !!predicate(value); + }).distinctUntilChanged().changes; + }; + + Behavior.prototype.becomesLessThan = function(targetValue) { + return this.becomes(function(value) { + return value < targetValue; + }); + }; + + Behavior.prototype.becomesGreaterThan = function(targetValue) { + return this.becomes(function(value) { + return value > targetValue; + }); + }; + + return Behavior; + + })(Signal); + + helpers = require('./helpers'); + +}).call(this); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/emissary.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/emissary.js new file mode 100644 index 0000000..9ba21f4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/emissary.js @@ -0,0 +1,14 @@ +(function() { + var combine; + + combine = require('./helpers').combine; + + module.exports = { + Emitter: require('./emitter'), + Subscriber: require('./subscriber'), + Signal: require('./signal'), + Behavior: require('./behavior'), + combine: combine + }; + +}).call(this); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/emitter.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/emitter.js new file mode 100644 index 0000000..0e999db --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/emitter.js @@ -0,0 +1,384 @@ +(function() { + var Emitter, Mixin, Signal, Subscription, removeFromArray, subscriptionRemovedPattern, _ref, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + __slice = [].slice; + + Mixin = require('mixto'); + + Signal = null; + + Subscription = null; + + subscriptionRemovedPattern = /^(last-)?.+-subscription-removed$/; + + module.exports = Emitter = (function(_super) { + __extends(Emitter, _super); + + function Emitter() { + _ref = Emitter.__super__.constructor.apply(this, arguments); + return _ref; + } + + Emitter.prototype.eventHandlersByEventName = null; + + Emitter.prototype.eventHandlersByNamespace = null; + + Emitter.prototype.subscriptionCounts = null; + + Emitter.prototype.pauseCountsByEventName = null; + + Emitter.prototype.queuedEventsByEventName = null; + + Emitter.prototype.globalPauseCount = null; + + Emitter.prototype.globalQueuedEvents = null; + + Emitter.prototype.signalsByEventName = null; + + Emitter.prototype.on = function(eventNames, handler) { + var eventName, namespace, _base, _base1, _base2, _i, _len, _ref1, _ref2; + _ref1 = eventNames.split(/\s+/); + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + eventName = _ref1[_i]; + if (!(eventName !== '')) { + continue; + } + _ref2 = eventName.split('.'), eventName = _ref2[0], namespace = _ref2[1]; + this.emit("" + eventName + "-subscription-will-be-added", handler); + if (this.incrementSubscriptionCount(eventName) === 1) { + this.emit("first-" + eventName + "-subscription-will-be-added", handler); + } + if (this.eventHandlersByEventName == null) { + this.eventHandlersByEventName = {}; + } + if ((_base = this.eventHandlersByEventName)[eventName] == null) { + _base[eventName] = []; + } + this.eventHandlersByEventName[eventName].push(handler); + if (namespace) { + if (this.eventHandlersByNamespace == null) { + this.eventHandlersByNamespace = {}; + } + if ((_base1 = this.eventHandlersByNamespace)[namespace] == null) { + _base1[namespace] = {}; + } + if ((_base2 = this.eventHandlersByNamespace[namespace])[eventName] == null) { + _base2[eventName] = []; + } + this.eventHandlersByNamespace[namespace][eventName].push(handler); + } + this.emit("" + eventName + "-subscription-added", handler); + } + if (Subscription == null) { + Subscription = require('./subscription'); + } + return new Subscription(this, eventNames, handler); + }; + + Emitter.prototype.once = function(eventName, handler) { + var subscription; + return subscription = this.on(eventName, function() { + var args; + args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; + subscription.off(); + return handler.apply(null, args); + }); + }; + + Emitter.prototype.signal = function(eventName) { + var _base; + if (Signal == null) { + Signal = require('./signal'); + } + if (this.signalsByEventName == null) { + this.signalsByEventName = {}; + } + return (_base = this.signalsByEventName)[eventName] != null ? (_base = this.signalsByEventName)[eventName] : _base[eventName] = Signal.fromEmitter(this, eventName); + }; + + Emitter.prototype.behavior = function(eventName, initialValue) { + return this.signal(eventName).toBehavior(initialValue); + }; + + Emitter.prototype.emit = function(eventName, payload) { + var handler, handlers, queuedEvents, _i, _len, _ref1, _ref2, _ref3; + if (arguments.length > 2 || /\s|\./.test(eventName)) { + return this.emitSlow.apply(this, arguments); + } else { + if (this.globalQueuedEvents != null) { + return this.globalQueuedEvents.push([eventName, payload]); + } else { + if (queuedEvents = (_ref1 = this.queuedEventsByEventName) != null ? _ref1[eventName] : void 0) { + return queuedEvents.push([eventName, payload]); + } else if (handlers = (_ref2 = this.eventHandlersByEventName) != null ? _ref2[eventName] : void 0) { + _ref3 = handlers.slice(); + for (_i = 0, _len = _ref3.length; _i < _len; _i++) { + handler = _ref3[_i]; + handler(payload); + } + return this.emit("after-" + eventName, payload); + } + } + } + }; + + Emitter.prototype.emitSlow = function() { + var args, eventName, handlers, namespace, queuedEvents, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6; + eventName = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (this.globalQueuedEvents) { + return this.globalQueuedEvents.push([eventName].concat(__slice.call(args))); + } else { + _ref1 = eventName.split('.'), eventName = _ref1[0], namespace = _ref1[1]; + if (namespace) { + if (queuedEvents = (_ref2 = this.queuedEventsByEventName) != null ? _ref2[eventName] : void 0) { + return queuedEvents.push(["" + eventName + "." + namespace].concat(__slice.call(args))); + } else if (handlers = (_ref3 = this.eventHandlersByNamespace) != null ? (_ref4 = _ref3[namespace]) != null ? _ref4[eventName] : void 0 : void 0) { + (function(func, args, ctor) { + ctor.prototype = func.prototype; + var child = new ctor, result = func.apply(child, args); + return Object(result) === result ? result : child; + })(Array, handlers, function(){}).forEach(function(handler) { + return handler.apply(null, args); + }); + return this.emit.apply(this, ["after-" + eventName].concat(__slice.call(args))); + } + } else { + if (queuedEvents = (_ref5 = this.queuedEventsByEventName) != null ? _ref5[eventName] : void 0) { + return queuedEvents.push([eventName].concat(__slice.call(args))); + } else if (handlers = (_ref6 = this.eventHandlersByEventName) != null ? _ref6[eventName] : void 0) { + (function(func, args, ctor) { + ctor.prototype = func.prototype; + var child = new ctor, result = func.apply(child, args); + return Object(result) === result ? result : child; + })(Array, handlers, function(){}).forEach(function(handler) { + return handler.apply(null, args); + }); + return this.emit.apply(this, ["after-" + eventName].concat(__slice.call(args))); + } + } + } + }; + + Emitter.prototype.off = function(eventNames, handler) { + var eventHandlers, eventName, handlers, namespace, namespaceHandlers, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref1, _ref10, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; + if (eventNames) { + _ref1 = eventNames.split(/\s+/); + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + eventName = _ref1[_i]; + if (!(eventName !== '')) { + continue; + } + _ref2 = eventName.split('.'), eventName = _ref2[0], namespace = _ref2[1]; + if (eventName === '') { + eventName = void 0; + } + if (namespace) { + if (eventName) { + handlers = (_ref3 = (_ref4 = this.eventHandlersByNamespace) != null ? (_ref5 = _ref4[namespace]) != null ? _ref5[eventName] : void 0 : void 0) != null ? _ref3 : []; + if (handler != null) { + removeFromArray(handlers, handler); + this.off(eventName, handler); + } else { + _ref6 = (function(func, args, ctor) { + ctor.prototype = func.prototype; + var child = new ctor, result = func.apply(child, args); + return Object(result) === result ? result : child; + })(Array, handlers, function(){}); + for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) { + handler = _ref6[_j]; + removeFromArray(handlers, handler); + this.off(eventName, handler); + } + } + } else { + namespaceHandlers = (_ref7 = (_ref8 = this.eventHandlersByNamespace) != null ? _ref8[namespace] : void 0) != null ? _ref7 : {}; + if (handler != null) { + for (eventName in namespaceHandlers) { + handlers = namespaceHandlers[eventName]; + removeFromArray(handlers, handler); + this.off(eventName, handler); + } + } else { + for (eventName in namespaceHandlers) { + handlers = namespaceHandlers[eventName]; + _ref9 = (function(func, args, ctor) { + ctor.prototype = func.prototype; + var child = new ctor, result = func.apply(child, args); + return Object(result) === result ? result : child; + })(Array, handlers, function(){}); + for (_k = 0, _len2 = _ref9.length; _k < _len2; _k++) { + handler = _ref9[_k]; + removeFromArray(handlers, handler); + this.off(eventName, handler); + } + } + } + } + } else { + eventHandlers = (_ref10 = this.eventHandlersByEventName) != null ? _ref10[eventName] : void 0; + if (eventHandlers == null) { + return; + } + if (handler == null) { + for (_l = 0, _len3 = eventHandlers.length; _l < _len3; _l++) { + handler = eventHandlers[_l]; + this.off(eventName, handler); + } + return; + } + if (removeFromArray(eventHandlers, handler)) { + this.decrementSubscriptionCount(eventName); + this.emit("" + eventName + "-subscription-removed", handler); + if (this.getSubscriptionCount(eventName) === 0) { + this.emit("last-" + eventName + "-subscription-removed", handler); + delete this.eventHandlersByEventName[eventName]; + } + } + } + } + } else { + for (eventName in this.eventHandlersByEventName) { + if (!subscriptionRemovedPattern.test(eventName)) { + this.off(eventName); + } + } + for (eventName in this.eventHandlersByEventName) { + this.off(eventName); + } + return this.eventHandlersByNamespace = {}; + } + }; + + Emitter.prototype.pauseEvents = function(eventNames) { + var eventName, _base, _base1, _i, _len, _ref1, _results; + if (eventNames) { + _ref1 = eventNames.split(/\s+/); + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + eventName = _ref1[_i]; + if (!(eventName !== '')) { + continue; + } + if (this.pauseCountsByEventName == null) { + this.pauseCountsByEventName = {}; + } + if (this.queuedEventsByEventName == null) { + this.queuedEventsByEventName = {}; + } + if ((_base = this.pauseCountsByEventName)[eventName] == null) { + _base[eventName] = 0; + } + this.pauseCountsByEventName[eventName]++; + _results.push((_base1 = this.queuedEventsByEventName)[eventName] != null ? (_base1 = this.queuedEventsByEventName)[eventName] : _base1[eventName] = []); + } + return _results; + } else { + if (this.globalPauseCount == null) { + this.globalPauseCount = 0; + } + if (this.globalQueuedEvents == null) { + this.globalQueuedEvents = []; + } + return this.globalPauseCount++; + } + }; + + Emitter.prototype.resumeEvents = function(eventNames) { + var event, eventName, queuedEvents, _i, _j, _len, _len1, _ref1, _ref2, _results, _results1; + if (eventNames) { + _ref1 = eventNames.split(/\s+/); + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + eventName = _ref1[_i]; + if (eventName !== '') { + if (((_ref2 = this.pauseCountsByEventName) != null ? _ref2[eventName] : void 0) > 0 && --this.pauseCountsByEventName[eventName] === 0) { + queuedEvents = this.queuedEventsByEventName[eventName]; + this.queuedEventsByEventName[eventName] = null; + _results.push((function() { + var _j, _len1, _results1; + _results1 = []; + for (_j = 0, _len1 = queuedEvents.length; _j < _len1; _j++) { + event = queuedEvents[_j]; + _results1.push(this.emit.apply(this, event)); + } + return _results1; + }).call(this)); + } else { + _results.push(void 0); + } + } + } + return _results; + } else { + for (eventName in this.pauseCountsByEventName) { + this.resumeEvents(eventName); + } + if (this.globalPauseCount > 0 && --this.globalPauseCount === 0) { + queuedEvents = this.globalQueuedEvents; + this.globalQueuedEvents = null; + _results1 = []; + for (_j = 0, _len1 = queuedEvents.length; _j < _len1; _j++) { + event = queuedEvents[_j]; + _results1.push(this.emit.apply(this, event)); + } + return _results1; + } + } + }; + + Emitter.prototype.incrementSubscriptionCount = function(eventName) { + var _base; + if (this.subscriptionCounts == null) { + this.subscriptionCounts = {}; + } + if ((_base = this.subscriptionCounts)[eventName] == null) { + _base[eventName] = 0; + } + return ++this.subscriptionCounts[eventName]; + }; + + Emitter.prototype.decrementSubscriptionCount = function(eventName) { + var count; + count = --this.subscriptionCounts[eventName]; + if (count === 0) { + delete this.subscriptionCounts[eventName]; + } + return count; + }; + + Emitter.prototype.getSubscriptionCount = function(eventName) { + var count, name, total, _ref1, _ref2, _ref3; + if (eventName != null) { + return (_ref1 = (_ref2 = this.subscriptionCounts) != null ? _ref2[eventName] : void 0) != null ? _ref1 : 0; + } else { + total = 0; + _ref3 = this.subscriptionCounts; + for (name in _ref3) { + count = _ref3[name]; + total += count; + } + return total; + } + }; + + Emitter.prototype.hasSubscriptions = function(eventName) { + return this.getSubscriptionCount(eventName) > 0; + }; + + return Emitter; + + })(Mixin); + + removeFromArray = function(array, element) { + var index; + index = array.indexOf(element); + if (index > -1) { + array.splice(index, 1); + return true; + } else { + return false; + } + }; + +}).call(this); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/helpers.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/helpers.js new file mode 100644 index 0000000..89df58c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/helpers.js @@ -0,0 +1,55 @@ +(function() { + var Behavior, combineArray, combineWithFunction, + __slice = [].slice; + + Behavior = require('./behavior'); + + exports.combine = function() { + var args; + args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; + if (args.length === 1 && Array.isArray(args[0])) { + return combineArray(args[0]); + } else if (typeof args[args.length - 1] === 'function') { + return combineWithFunction(args); + } else { + throw new Error("Invalid object type"); + } + }; + + combineArray = function(array) { + var behavior; + return behavior = new Behavior(function() { + var element, i, outputArray, ready, _i, _len, + _this = this; + outputArray = array.slice(); + ready = false; + for (i = _i = 0, _len = array.length; _i < _len; i = ++_i) { + element = array[i]; + if (element.constructor.name === 'Behavior') { + (function(element, i) { + return _this.subscribe(element.onValue(function(value, metadata) { + if (ready) { + outputArray = outputArray.slice(); + } + outputArray[i] = value; + if (ready) { + return _this.emitValue(outputArray, metadata); + } + })); + })(element, i); + } + } + ready = true; + return this.emitValue(outputArray); + }); + }; + + combineWithFunction = function(args) { + var fn; + fn = args.pop(); + return combineArray(args).map(function(argsArray) { + return fn.apply(null, argsArray); + }); + }; + +}).call(this); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/signal.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/signal.js new file mode 100644 index 0000000..368f63a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/signal.js @@ -0,0 +1,292 @@ +(function() { + var Behavior, Emitter, Signal, Subscriber, isEqual, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + __slice = [].slice; + + isEqual = require('underscore-plus').isEqual; + + Emitter = require('./emitter'); + + Subscriber = require('./subscriber'); + + Behavior = null; + + module.exports = Signal = (function(_super) { + __extends(Signal, _super); + + Subscriber.includeInto(Signal); + + Signal.fromEmitter = function(emitter, eventName) { + return new Signal(function() { + var _this = this; + return this.subscribe(emitter, eventName, function() { + var metadata, value; + value = arguments[0], metadata = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + return _this.emitValue.apply(_this, [value].concat(__slice.call(metadata))); + }); + }); + }; + + function Signal(subscribeCallback) { + var _this = this; + this.subscribeCallback = subscribeCallback; + this.retainCount = 0; + this.on('value-subscription-will-be-added', function() { + return _this.retain(); + }); + this.on('value-subscription-removed', function() { + return _this.release(); + }); + } + + Signal.prototype.isSignal = true; + + Signal.prototype.retained = function() { + return typeof this.subscribeCallback === "function" ? this.subscribeCallback() : void 0; + }; + + Signal.prototype.released = function() { + return this.unsubscribe(); + }; + + Signal.prototype.retain = function() { + if (++this.retainCount === 1) { + if (typeof this.retained === "function") { + this.retained(); + } + } + return this; + }; + + Signal.prototype.release = function() { + if (--this.retainCount === 0) { + if (typeof this.released === "function") { + this.released(); + } + } + return this; + }; + + Signal.prototype.onValue = function(handler) { + return this.on('value', handler); + }; + + Signal.prototype.emitValue = function(value, metadata) { + if (metadata == null) { + metadata = {}; + } + if (metadata.source == null) { + metadata.source = this; + } + return this.emit('value', value, metadata); + }; + + Signal.prototype.toBehavior = function(initialValue) { + var source; + source = this; + return this.buildBehavior(initialValue, function() { + var _this = this; + return this.subscribe(source, 'value', function() { + var metadata, value; + value = arguments[0], metadata = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + return _this.emitValue.apply(_this, [value].concat(__slice.call(metadata))); + }); + }); + }; + + Signal.prototype.changes = function() { + return this; + }; + + Signal.prototype.injectMetadata = function(fn) { + var source; + source = this; + return new this.constructor(function() { + var _this = this; + return this.subscribe(source, 'value', function(value, metadata) { + var k, newMetadata, v; + newMetadata = fn(value, metadata); + for (k in newMetadata) { + v = newMetadata[k]; + metadata[k] = v; + } + return _this.emitValue(value, metadata); + }); + }); + }; + + Signal.prototype.filter = function(predicate) { + var source; + source = this; + return new this.constructor(function() { + var _this = this; + return this.subscribe(source, 'value', function() { + var metadata, value; + value = arguments[0], metadata = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (predicate.call(value, value)) { + return _this.emitValue.apply(_this, [value].concat(__slice.call(metadata))); + } + }); + }); + }; + + Signal.prototype.filterDefined = function() { + return this.filter(function(value) { + return value != null; + }); + }; + + Signal.prototype.map = function(fn) { + var property, source; + if (typeof fn === 'string') { + property = fn; + fn = function(value) { + return value != null ? value[property] : void 0; + }; + } + source = this; + return new this.constructor(function() { + var _this = this; + return this.subscribe(source, 'value', function() { + var metadata, value; + value = arguments[0], metadata = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + return _this.emitValue.apply(_this, [fn.call(value, value)].concat(__slice.call(metadata))); + }); + }); + }; + + Signal.prototype["switch"] = function(fn) { + var source; + source = this.map(fn); + return new this.constructor(function() { + var currentSignal, + _this = this; + currentSignal = null; + return this.subscribe(source, 'value', function(newSignal, outerMetadata) { + if (currentSignal != null) { + _this.unsubscribe(currentSignal); + } + currentSignal = newSignal; + if (currentSignal != null) { + return _this.subscribe(currentSignal, 'value', function(value, innerMetadata) { + return _this.emitValue(value, innerMetadata); + }); + } else { + return _this.emitValue(void 0, outerMetadata); + } + }); + }); + }; + + Signal.prototype.skipUntil = function(predicateOrTargetValue) { + var doneSkipping, predicate, targetValue; + if (typeof predicateOrTargetValue !== 'function') { + targetValue = predicateOrTargetValue; + return this.skipUntil(function(value) { + return isEqual(value, targetValue); + }); + } + predicate = predicateOrTargetValue; + doneSkipping = false; + return this.filter(function(value) { + if (doneSkipping) { + return true; + } + if (predicate(value)) { + return doneSkipping = true; + } else { + return false; + } + }); + }; + + Signal.prototype.scan = function(initialValue, fn) { + var source; + source = this; + return this.buildBehavior(initialValue, function() { + var oldValue, + _this = this; + oldValue = initialValue; + return this.subscribe(source, 'value', function() { + var metadata, newValue; + newValue = arguments[0], metadata = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + return _this.emitValue.apply(_this, [(oldValue = fn(oldValue, newValue))].concat(__slice.call(metadata))); + }); + }); + }; + + Signal.prototype.diff = function(initialValue, fn) { + var source; + source = this; + return this.buildBehavior(function() { + var oldValue, + _this = this; + oldValue = initialValue; + return this.subscribe(source, 'value', function() { + var fnOldValue, metadata, newValue; + newValue = arguments[0], metadata = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + fnOldValue = oldValue; + oldValue = newValue; + return _this.emitValue.apply(_this, [fn(fnOldValue, newValue)].concat(__slice.call(metadata))); + }); + }); + }; + + Signal.prototype.distinctUntilChanged = function() { + var source; + source = this; + return new this.constructor(function() { + var oldValue, receivedValue, + _this = this; + receivedValue = false; + oldValue = void 0; + return this.subscribe(source, 'value', function() { + var metadata, newValue; + newValue = arguments[0], metadata = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (receivedValue) { + if (isEqual(oldValue, newValue)) { + return oldValue = newValue; + } else { + oldValue = newValue; + return _this.emitValue.apply(_this, [newValue].concat(__slice.call(metadata))); + } + } else { + receivedValue = true; + oldValue = newValue; + return _this.emitValue.apply(_this, [newValue].concat(__slice.call(metadata))); + } + }); + }); + }; + + Signal.prototype.equals = function(expected) { + return this.map(function(actual) { + return isEqual(actual, expected); + }).distinctUntilChanged(); + }; + + Signal.prototype.isDefined = function() { + return this.map(function(value) { + return value != null; + }).distinctUntilChanged(); + }; + + Signal.prototype.buildBehavior = function() { + var args; + args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; + if (Behavior == null) { + Behavior = require('./behavior'); + } + return (function(func, args, ctor) { + ctor.prototype = func.prototype; + var child = new ctor, result = func.apply(child, args); + return Object(result) === result ? result : child; + })(Behavior, args, function(){}); + }; + + return Signal; + + })(Emitter); + +}).call(this); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/subscriber.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/subscriber.js new file mode 100644 index 0000000..25016be --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/subscriber.js @@ -0,0 +1,109 @@ +(function() { + var Mixin, Signal, Subscriber, Subscription, WeakMap, _ref, _ref1, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + __slice = [].slice; + + Mixin = require('mixto'); + + Signal = null; + + WeakMap = (_ref = global.WeakMap) != null ? _ref : require('es6-weak-map'); + + Subscription = require('./subscription'); + + module.exports = Subscriber = (function(_super) { + __extends(Subscriber, _super); + + function Subscriber() { + _ref1 = Subscriber.__super__.constructor.apply(this, arguments); + return _ref1; + } + + Subscriber.prototype.subscribeWith = function(eventEmitter, methodName, args) { + var callback, eventNames; + if (eventEmitter[methodName] == null) { + throw new Error("Object does not have method '" + methodName + "' with which to subscribe"); + } + eventEmitter[methodName].apply(eventEmitter, args); + eventNames = args[0]; + callback = args[args.length - 1]; + return this.addSubscription(new Subscription(eventEmitter, eventNames, callback)); + }; + + Subscriber.prototype.addSubscription = function(subscription) { + var emitter; + if (this._subscriptions == null) { + this._subscriptions = []; + } + this._subscriptions.push(subscription); + emitter = subscription.emitter; + if (emitter != null) { + if (this._subscriptionsByObject == null) { + this._subscriptionsByObject = new WeakMap; + } + if (this._subscriptionsByObject.has(emitter)) { + this._subscriptionsByObject.get(emitter).push(subscription); + } else { + this._subscriptionsByObject.set(emitter, [subscription]); + } + } + return subscription; + }; + + Subscriber.prototype.subscribe = function() { + var args, eventEmitterOrSubscription; + eventEmitterOrSubscription = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (args.length === 0) { + return this.addSubscription(eventEmitterOrSubscription); + } else { + if (args.length === 1 && eventEmitterOrSubscription.isSignal) { + args.unshift('value'); + } + return this.subscribeWith(eventEmitterOrSubscription, 'on', args); + } + }; + + Subscriber.prototype.subscribeToCommand = function() { + var args, eventEmitter; + eventEmitter = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + return this.subscribeWith(eventEmitter, 'command', args); + }; + + Subscriber.prototype.unsubscribe = function(object) { + var index, subscription, _i, _j, _len, _len1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + if (object != null) { + _ref4 = (_ref2 = (_ref3 = this._subscriptionsByObject) != null ? _ref3.get(object) : void 0) != null ? _ref2 : []; + for (_i = 0, _len = _ref4.length; _i < _len; _i++) { + subscription = _ref4[_i]; + if (typeof subscription.dispose === 'function') { + subscription.dispose(); + } else { + subscription.off(); + } + index = this._subscriptions.indexOf(subscription); + if (index >= 0) { + this._subscriptions.splice(index, 1); + } + } + return (_ref5 = this._subscriptionsByObject) != null ? _ref5["delete"](object) : void 0; + } else { + _ref7 = (_ref6 = this._subscriptions) != null ? _ref6 : []; + for (_j = 0, _len1 = _ref7.length; _j < _len1; _j++) { + subscription = _ref7[_j]; + if (typeof subscription.dispose === 'function') { + subscription.dispose(); + } else { + subscription.off(); + } + } + this._subscriptions = null; + return this._subscriptionsByObject = null; + } + }; + + return Subscriber; + + })(Mixin); + +}).call(this); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/subscription.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/subscription.js new file mode 100644 index 0000000..b1d749f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/lib/subscription.js @@ -0,0 +1,40 @@ +(function() { + var Emitter, Subscription, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + + Emitter = require('./emitter'); + + module.exports = Subscription = (function(_super) { + __extends(Subscription, _super); + + Subscription.prototype.cancelled = false; + + function Subscription(emitter, eventNames, handler) { + this.emitter = emitter; + this.eventNames = eventNames; + this.handler = handler; + } + + Subscription.prototype.off = function() { + return this.dispose(); + }; + + Subscription.prototype.dispose = function() { + var unsubscribe, _ref; + if (this.cancelled) { + return; + } + unsubscribe = (_ref = this.emitter.off) != null ? _ref : this.emitter.removeListener; + unsubscribe.call(this.emitter, this.eventNames, this.handler); + this.emitter = null; + this.handler = null; + this.cancelled = true; + return this.emit('cancelled'); + }; + + return Subscription; + + })(Emitter); + +}).call(this); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/.lint b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/.lint new file mode 100644 index 0000000..cf54d81 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/.lint @@ -0,0 +1,11 @@ +@root + +module + +tabs +indent 2 +maxlen 100 + +ass +nomen +plusplus diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/.npmignore b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/.npmignore new file mode 100644 index 0000000..155e41f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/npm-debug.log +/.lintcache diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/.travis.yml b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/.travis.yml new file mode 100644 index 0000000..08f04a1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/.travis.yml @@ -0,0 +1,10 @@ +sudo: false # use faster docker infrastructure +language: node_js +node_js: + - 0.10 + - 0.12 + - iojs + +notifications: + email: + - medikoo+es6-weak-map@medikoo.com diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/CHANGES b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/CHANGES new file mode 100644 index 0000000..3394408 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/CHANGES @@ -0,0 +1,24 @@ +v0.1.4 -- 2015.04.13 +* Republish v0.1.2 as v0.1.4 due to breaking changes + (v0.1.3 should have been published as next major) + +v0.1.3 -- 2015.04.12 +* Update up to changes in specification (require new, remove clear method) +* Improve native implementation validation +* Configure lint scripts +* Rename LICENCE to LICENSE + +v0.1.2 -- 2014.09.01 +* Use internal random and unique id generator instead of external (time-uuid based). + Global uniqueness is not needed in scope of this module. Fixes #1 + +v0.1.1 -- 2014.05.15 +* Improve valid WeakMap detection + +v0.1.0 -- 2014.04.29 +* Assure to depend only npm hosted dependencies +* Update to use latest versions of dependencies +* Use ES6 symbols internally + +v0.0.0 -- 2013.10.24 +Initial (dev version) diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/LICENCE b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/LICENCE new file mode 100644 index 0000000..aaf3528 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/LICENCE @@ -0,0 +1,19 @@ +Copyright (C) 2013 Mariusz Nowak (www.medikoo.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/README.md b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/README.md new file mode 100644 index 0000000..dd91b46 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/README.md @@ -0,0 +1,65 @@ +# es6-weak-map +## WeakMap collection as specified in ECMAScript6 + +_Roughly inspired by Mark Miller's and Kris Kowal's [WeakMap implementation](https://github.com/drses/weak-map)_. + +Differences are: +- Assumes compliant ES5 environment (no weird ES3 workarounds or hacks) +- Well modularized CJS style +- Based on one solution. + +### Limitations + +- Will fail on non extensible objects provided as keys +- While `clear` method is provided, it's not perfectly spec compliant. If some objects were saved as _values_, they need to be removed via `delete`. Otherwise they'll remain infinitely attached to _key_ object (that means, they'll be free for GC only if _key_ object was collected as well). + +### Installation + + $ npm install es6-weak-map + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +If you want to make sure your environment implements `WeakMap`, do: + +```javascript +require('es6-weak-map/implement'); +``` + +If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `WeakMap` on global scope, do: + +```javascript +var WeakMap = require('es6-weak-map'); +``` + +If you strictly want to use polyfill even if native `WeakMap` exists, do: + +```javascript +var WeakMap = require('es6-weak-map/polyfill'); +``` + +#### API + +Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap-objects). Still if you want quick look, follow example: + +```javascript +var WeakMap = require('es6-weak-map'); + +var map = new WeakMap(); +var obj = {}; + +map.set(obj, 'foo'); // map +map.get(obj); // 'foo' +map.has(obj); // true +map.delete(obj); // true +map.get(obj); // undefined +map.has(obj); // false +map.set(obj, 'bar'); // map +map.clear(); // undefined +map.has(obj); // false +``` + +## Tests [](https://travis-ci.org/medikoo/es6-weak-map) + + $ npm test diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/implement.js new file mode 100644 index 0000000..6c3f306 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(require('es5-ext/global'), 'WeakMap', + { value: require('./polyfill'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/index.js new file mode 100644 index 0000000..5edc4cc --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? + WeakMap : require('./polyfill'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-implemented.js new file mode 100644 index 0000000..455ff81 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-implemented.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = function () { + var map; + if (typeof WeakMap !== 'function') return false; + map = new WeakMap(); + if (typeof map.set !== 'function') return false; + if (map.set({}, 1) !== map) return false; + if (typeof map.clear !== 'function') return false; + if (typeof map.delete !== 'function') return false; + if (typeof map.has !== 'function') return false; + + return true; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-native-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-native-implemented.js new file mode 100644 index 0000000..b3fe5a5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-native-implemented.js @@ -0,0 +1,10 @@ +// Exports true if environment provides native `WeakMap` implementation, +// whatever that is. + +'use strict'; + +module.exports = (function () { + if (typeof WeakMap === 'undefined') return false; + return (Object.prototype.toString.call(WeakMap.prototype) === + '[object WeakMap]'); +}()); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-weak-map.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-weak-map.js new file mode 100644 index 0000000..10bb2a1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-weak-map.js @@ -0,0 +1,13 @@ +'use strict'; + +var toStringTagSymbol = require('es6-symbol').toStringTag + + , toString = Object.prototype.toString + , id = '[object WeakMap]' + , Global = (typeof WeakMap === 'undefined') ? null : WeakMap; + +module.exports = function (x) { + return (x && ((Global && (x instanceof Global)) || + (toString.call(x) === id) || (x[toStringTagSymbol] === 'WeakMap'))) || + false; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/.lint b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/.lint new file mode 100644 index 0000000..858b753 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/.lint @@ -0,0 +1,12 @@ +@root + +es5 +module + +tabs +indent 2 +maxlen 80 + +ass +nomen +plusplus diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/.npmignore b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/.npmignore new file mode 100644 index 0000000..155e41f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/npm-debug.log +/.lintcache diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/.travis.yml b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/.travis.yml new file mode 100644 index 0000000..50008b2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +node_js: + - 0.8 + - 0.10 + - 0.11 + +notifications: + email: + - medikoo+d@medikoo.com diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/CHANGES b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/CHANGES new file mode 100644 index 0000000..45233f7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/CHANGES @@ -0,0 +1,7 @@ +v0.1.1 -- 2014.04.24 +- Add `autoBind` and `lazy` utilities +- Allow to pass other options to be merged onto created descriptor. + Useful when used with other custom utilties + +v0.1.0 -- 2013.06.20 +Initial (derived from es5-ext project) diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/LICENCE b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/LICENCE new file mode 100644 index 0000000..aaf3528 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/LICENCE @@ -0,0 +1,19 @@ +Copyright (C) 2013 Mariusz Nowak (www.medikoo.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/README.md b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/README.md new file mode 100644 index 0000000..872d493 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/README.md @@ -0,0 +1,108 @@ +# D - Property descriptor factory + +_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._ + +Defining properties with descriptors is very verbose: + +```javascript +var Account = function () {}; +Object.defineProperties(Account.prototype, { + deposit: { value: function () { + /* ... */ + }, configurable: true, enumerable: false, writable: true }, + whithdraw: { value: function () { + /* ... */ + }, configurable: true, enumerable: false, writable: true }, + balance: { get: function () { + /* ... */ + }, configurable: true, enumerable: false } +}); +``` + +D cuts that to: + +```javascript +var d = require('d'); + +var Account = function () {}; +Object.defineProperties(Account.prototype, { + deposit: d(function () { + /* ... */ + }), + whithdraw: d(function () { + /* ... */ + }), + balance: d.gs(function () { + /* ... */ + }) +}); +``` + +By default, created descriptor follow characteristics of native ES5 properties, and defines values as: + +```javascript +{ configurable: true, enumerable: false, writable: true } +``` + +You can overwrite it by preceding _value_ argument with instruction: +```javascript +d('c', value); // { configurable: true, enumerable: false, writable: false } +d('ce', value); // { configurable: true, enumerable: true, writable: false } +d('e', value); // { configurable: false, enumerable: true, writable: false } + +// Same way for get/set: +d.gs('e', value); // { configurable: false, enumerable: true } +``` + +### Other utilities + +#### autoBind(obj, props) _(d/auto-bind)_ + +Define methods which will be automatically bound to its instances + +```javascript +var d = require('d'); +var autoBind = require('d/auto-bind'); + +var Foo = function () { this._count = 0; }; +autoBind(Foo.prototype, { + increment: d(function () { ++this._count; }); +}); + +var foo = new Foo(); + +// Increment foo counter on each domEl click +domEl.addEventListener('click', foo.increment, false); +``` + +#### lazy(obj, props) _(d/lazy)_ + +Define lazy properties, which will be resolved on first access + +```javascript +var d = require('d'); +var lazy = require('d/lazy'); + +var Foo = function () {}; +lazy(Foo.prototype, { + items: d(function () { return []; }) +}); + +var foo = new Foo(); +foo.items.push(1, 2); // foo.items array created +``` + +## Installation +### NPM + +In your project path: + + $ npm install d + +### Browser + +You can easily bundle _D_ for browser with [modules-webmake](https://github.com/medikoo/modules-webmake) + +## Tests [](https://travis-ci.org/medikoo/d) + + $ npm test diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/auto-bind.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/auto-bind.js new file mode 100644 index 0000000..1b00dba --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/auto-bind.js @@ -0,0 +1,31 @@ +'use strict'; + +var copy = require('es5-ext/object/copy') + , map = require('es5-ext/object/map') + , callable = require('es5-ext/object/valid-callable') + , validValue = require('es5-ext/object/valid-value') + + , bind = Function.prototype.bind, defineProperty = Object.defineProperty + , hasOwnProperty = Object.prototype.hasOwnProperty + , define; + +define = function (name, desc, bindTo) { + var value = validValue(desc) && callable(desc.value), dgs; + dgs = copy(desc); + delete dgs.writable; + delete dgs.value; + dgs.get = function () { + if (hasOwnProperty.call(this, name)) return value; + desc.value = bind.call(value, (bindTo == null) ? this : this[bindTo]); + defineProperty(this, name, desc); + return this[name]; + }; + return dgs; +}; + +module.exports = function (props/*, bindTo*/) { + var bindTo = arguments[1]; + return map(props, function (desc, name) { + return define(name, desc, bindTo); + }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/index.js new file mode 100644 index 0000000..076ae46 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/index.js @@ -0,0 +1,63 @@ +'use strict'; + +var assign = require('es5-ext/object/assign') + , normalizeOpts = require('es5-ext/object/normalize-options') + , isCallable = require('es5-ext/object/is-callable') + , contains = require('es5-ext/string/#/contains') + + , d; + +d = module.exports = function (dscr, value/*, options*/) { + var c, e, w, options, desc; + if ((arguments.length < 2) || (typeof dscr !== 'string')) { + options = value; + value = dscr; + dscr = null; + } else { + options = arguments[2]; + } + if (dscr == null) { + c = w = true; + e = false; + } else { + c = contains.call(dscr, 'c'); + e = contains.call(dscr, 'e'); + w = contains.call(dscr, 'w'); + } + + desc = { value: value, configurable: c, enumerable: e, writable: w }; + return !options ? desc : assign(normalizeOpts(options), desc); +}; + +d.gs = function (dscr, get, set/*, options*/) { + var c, e, options, desc; + if (typeof dscr !== 'string') { + options = set; + set = get; + get = dscr; + dscr = null; + } else { + options = arguments[3]; + } + if (get == null) { + get = undefined; + } else if (!isCallable(get)) { + options = get; + get = set = undefined; + } else if (set == null) { + set = undefined; + } else if (!isCallable(set)) { + options = set; + set = undefined; + } + if (dscr == null) { + c = true; + e = false; + } else { + c = contains.call(dscr, 'c'); + e = contains.call(dscr, 'e'); + } + + desc = { get: get, set: set, configurable: c, enumerable: e }; + return !options ? desc : assign(normalizeOpts(options), desc); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/lazy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/lazy.js new file mode 100644 index 0000000..61e4665 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/lazy.js @@ -0,0 +1,111 @@ +'use strict'; + +var map = require('es5-ext/object/map') + , isCallable = require('es5-ext/object/is-callable') + , validValue = require('es5-ext/object/valid-value') + , contains = require('es5-ext/string/#/contains') + + , call = Function.prototype.call + , defineProperty = Object.defineProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor + , getPrototypeOf = Object.getPrototypeOf + , hasOwnProperty = Object.prototype.hasOwnProperty + , cacheDesc = { configurable: false, enumerable: false, writable: false, + value: null } + , define; + +define = function (name, options) { + var value, dgs, cacheName, desc, writable = false, resolvable + , flat; + options = Object(validValue(options)); + cacheName = options.cacheName; + flat = options.flat; + if (cacheName == null) cacheName = name; + delete options.cacheName; + value = options.value; + resolvable = isCallable(value); + delete options.value; + dgs = { configurable: Boolean(options.configurable), + enumerable: Boolean(options.enumerable) }; + if (name !== cacheName) { + dgs.get = function () { + if (hasOwnProperty.call(this, cacheName)) return this[cacheName]; + cacheDesc.value = resolvable ? call.call(value, this, options) : value; + cacheDesc.writable = writable; + defineProperty(this, cacheName, cacheDesc); + cacheDesc.value = null; + if (desc) defineProperty(this, name, desc); + return this[cacheName]; + }; + } else if (!flat) { + dgs.get = function self() { + var ownDesc; + if (hasOwnProperty.call(this, name)) { + ownDesc = getOwnPropertyDescriptor(this, name); + // It happens in Safari, that getter is still called after property + // was defined with a value, following workarounds that + if (ownDesc.hasOwnProperty('value')) return ownDesc.value; + if ((typeof ownDesc.get === 'function') && (ownDesc.get !== self)) { + return ownDesc.get.call(this); + } + return value; + } + desc.value = resolvable ? call.call(value, this, options) : value; + defineProperty(this, name, desc); + desc.value = null; + return this[name]; + }; + } else { + dgs.get = function self() { + var base = this, ownDesc; + if (hasOwnProperty.call(this, name)) { + // It happens in Safari, that getter is still called after property + // was defined with a value, following workarounds that + ownDesc = getOwnPropertyDescriptor(this, name); + if (ownDesc.hasOwnProperty('value')) return ownDesc.value; + if ((typeof ownDesc.get === 'function') && (ownDesc.get !== self)) { + return ownDesc.get.call(this); + } + } + while (!hasOwnProperty.call(base, name)) base = getPrototypeOf(base); + desc.value = resolvable ? call.call(value, base, options) : value; + defineProperty(base, name, desc); + desc.value = null; + return base[name]; + }; + } + dgs.set = function (value) { + dgs.get.call(this); + this[cacheName] = value; + }; + if (options.desc) { + desc = { + configurable: contains.call(options.desc, 'c'), + enumerable: contains.call(options.desc, 'e') + }; + if (cacheName === name) { + desc.writable = contains.call(options.desc, 'w'); + desc.value = null; + } else { + writable = contains.call(options.desc, 'w'); + desc.get = dgs.get; + desc.set = dgs.set; + } + delete options.desc; + } else if (cacheName === name) { + desc = { + configurable: Boolean(options.configurable), + enumerable: Boolean(options.enumerable), + writable: Boolean(options.writable), + value: null + }; + } + delete options.configurable; + delete options.enumerable; + delete options.writable; + return dgs; +}; + +module.exports = function (props) { + return map(props, function (desc, name) { return define(name, desc); }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/package.json b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/package.json new file mode 100644 index 0000000..03d81db --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/package.json @@ -0,0 +1,59 @@ +{ + "name": "d", + "version": "0.1.1", + "description": "Property descriptor factory", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "scripts": { + "test": "node node_modules/tad/bin/tad" + }, + "repository": { + "type": "git", + "url": "git://github.com/medikoo/d.git" + }, + "keywords": [ + "descriptor", + "es", + "ecmascript", + "ecma", + "property", + "descriptors", + "meta", + "properties" + ], + "dependencies": { + "es5-ext": "~0.10.2" + }, + "devDependencies": { + "tad": "~0.1.21" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/medikoo/d/issues" + }, + "homepage": "https://github.com/medikoo/d", + "_id": "d@0.1.1", + "dist": { + "shasum": "da184c535d18d8ee7ba2aa229b914009fae11309", + "tarball": "http://registry.npmjs.org/d/-/d-0.1.1.tgz" + }, + "_from": "d@>=0.1.1 <0.2.0", + "_npmVersion": "1.4.3", + "_npmUser": { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + }, + "maintainers": [ + { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + } + ], + "directories": {}, + "_shasum": "da184c535d18d8ee7ba2aa229b914009fae11309", + "_resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/test/auto-bind.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/test/auto-bind.js new file mode 100644 index 0000000..89edfb8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/test/auto-bind.js @@ -0,0 +1,12 @@ +'use strict'; + +var d = require('../'); + +module.exports = function (t, a) { + var o = Object.defineProperties({}, t({ + bar: d(function () { return this === o; }), + bar2: d(function () { return this; }) + })); + + a.deep([(o.bar)(), (o.bar2)()], [true, o]); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/test/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/test/index.js new file mode 100644 index 0000000..3db0af1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/test/index.js @@ -0,0 +1,182 @@ +'use strict'; + +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +module.exports = function (t, a) { + var o, c, cg, cs, ce, ceg, ces, cew, cw, e, eg, es, ew, v, vg, vs, w, df, dfg + , dfs; + + o = Object.create(Object.prototype, { + c: t('c', c = {}), + cgs: t.gs('c', cg = function () {}, cs = function () {}), + ce: t('ce', ce = {}), + cegs: t.gs('ce', ceg = function () {}, ces = function () {}), + cew: t('cew', cew = {}), + cw: t('cw', cw = {}), + e: t('e', e = {}), + egs: t.gs('e', eg = function () {}, es = function () {}), + ew: t('ew', ew = {}), + v: t('', v = {}), + vgs: t.gs('', vg = function () {}, vs = function () {}), + w: t('w', w = {}), + + df: t(df = {}), + dfgs: t.gs(dfg = function () {}, dfs = function () {}) + }); + + return { + c: function (a) { + var d = getOwnPropertyDescriptor(o, 'c'); + a(d.value, c, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, 'cgs'); + a(d.value, undefined, "GS Value"); + a(d.get, cg, "GS Get"); + a(d.set, cs, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + ce: function (a) { + var d = getOwnPropertyDescriptor(o, 'ce'); + a(d.value, ce, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, 'cegs'); + a(d.value, undefined, "GS Value"); + a(d.get, ceg, "GS Get"); + a(d.set, ces, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, true, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + cew: function (a) { + var d = getOwnPropertyDescriptor(o, 'cew'); + a(d.value, cew, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, true, "Writable"); + }, + cw: function (a) { + var d = getOwnPropertyDescriptor(o, 'cw'); + a(d.value, cw, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + }, + e: function (a) { + var d = getOwnPropertyDescriptor(o, 'e'); + a(d.value, e, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, 'egs'); + a(d.value, undefined, "GS Value"); + a(d.get, eg, "GS Get"); + a(d.set, es, "GS Set"); + a(d.configurable, false, "GS Configurable"); + a(d.enumerable, true, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + ew: function (a) { + var d = getOwnPropertyDescriptor(o, 'ew'); + a(d.value, ew, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, true, "Writable"); + }, + v: function (a) { + var d = getOwnPropertyDescriptor(o, 'v'); + a(d.value, v, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, 'vgs'); + a(d.value, undefined, "GS Value"); + a(d.get, vg, "GS Get"); + a(d.set, vs, "GS Set"); + a(d.configurable, false, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + w: function (a) { + var d = getOwnPropertyDescriptor(o, 'w'); + a(d.value, w, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + }, + d: function (a) { + var d = getOwnPropertyDescriptor(o, 'df'); + a(d.value, df, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + + d = getOwnPropertyDescriptor(o, 'dfgs'); + a(d.value, undefined, "GS Value"); + a(d.get, dfg, "GS Get"); + a(d.set, dfs, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + Options: { + v: function (a) { + var x = {}, d = t(x, { foo: true }); + a.deep(d, { configurable: true, enumerable: false, writable: true, + value: x, foo: true }, "No descriptor"); + d = t('c', 'foo', { marko: 'elo' }); + a.deep(d, { configurable: true, enumerable: false, writable: false, + value: 'foo', marko: 'elo' }, "Descriptor"); + }, + gs: function (a) { + var gFn = function () {}, sFn = function () {}, d; + d = t.gs(gFn, sFn, { foo: true }); + a.deep(d, { configurable: true, enumerable: false, get: gFn, set: sFn, + foo: true }, "No descriptor"); + d = t.gs(null, sFn, { foo: true }); + a.deep(d, { configurable: true, enumerable: false, get: undefined, + set: sFn, foo: true }, "No descriptor: Just set"); + d = t.gs(gFn, { foo: true }); + a.deep(d, { configurable: true, enumerable: false, get: gFn, + set: undefined, foo: true }, "No descriptor: Just get"); + + d = t.gs('e', gFn, sFn, { bar: true }); + a.deep(d, { configurable: false, enumerable: true, get: gFn, set: sFn, + bar: true }, "Descriptor"); + d = t.gs('e', null, sFn, { bar: true }); + a.deep(d, { configurable: false, enumerable: true, get: undefined, + set: sFn, bar: true }, "Descriptor: Just set"); + d = t.gs('e', gFn, { bar: true }); + a.deep(d, { configurable: false, enumerable: true, get: gFn, + set: undefined, bar: true }, "Descriptor: Just get"); + } + } + }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/test/lazy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/test/lazy.js new file mode 100644 index 0000000..8266deb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/test/lazy.js @@ -0,0 +1,77 @@ +'use strict'; + +var d = require('../') + + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +module.exports = function (t, a) { + var Foo = function () {}, i = 1, o, o2, desc; + Object.defineProperties(Foo.prototype, t({ + bar: d(function () { return ++i; }), + bar2: d(function () { return this.bar + 23; }), + bar3: d(function () { return this.bar2 + 34; }, { desc: 'ew' }), + bar4: d(function () { return this.bar3 + 12; }, { cacheName: '_bar4_' }), + bar5: d(function () { return this.bar4 + 3; }, + { cacheName: '_bar5_', desc: 'e' }) + })); + + desc = getOwnPropertyDescriptor(Foo.prototype, 'bar'); + a(desc.configurable, true, "Configurable: default"); + a(desc.enumerable, false, "Enumerable: default"); + + o = new Foo(); + a.deep([o.bar, o.bar2, o.bar3, o.bar4, o.bar5], [2, 25, 59, 71, 74], + "Values"); + + a.deep(getOwnPropertyDescriptor(o, 'bar3'), { configurable: false, + enumerable: true, writable: true, value: 59 }, "Desc"); + a(o.hasOwnProperty('bar4'), false, "Cache not exposed"); + desc = getOwnPropertyDescriptor(o, 'bar5'); + a.deep(desc, { configurable: false, + enumerable: true, get: desc.get, set: desc.set }, "Cache & Desc: desc"); + + o2 = Object.create(o); + o2.bar = 30; + o2.bar3 = 100; + + a.deep([o2.bar, o2.bar2, o2.bar3, o2.bar4, o2.bar5], [30, 25, 100, 112, 115], + "Extension Values"); + + Foo = function () {}; + Object.defineProperties(Foo.prototype, t({ + test: d('w', function () { return 'raz'; }), + test2: d('', function () { return 'raz'; }, { desc: 'w' }), + test3: d('', function () { return 'raz'; }, + { cacheName: '__test3__', desc: 'w' }), + test4: d('w', 'bar') + })); + + o = new Foo(); + o.test = 'marko'; + a.deep(getOwnPropertyDescriptor(o, 'test'), + { configurable: false, enumerable: false, writable: true, value: 'marko' }, + "Set before get"); + o.test2 = 'marko2'; + a.deep(getOwnPropertyDescriptor(o, 'test2'), + { configurable: false, enumerable: false, writable: true, value: 'marko2' }, + "Set before get: Custom desc"); + o.test3 = 'marko3'; + a.deep(getOwnPropertyDescriptor(o, '__test3__'), + { configurable: false, enumerable: false, writable: true, value: 'marko3' }, + "Set before get: Custom cache name"); + a(o.test4, 'bar', "Resolve by value"); + + a.h1("Flat"); + Object.defineProperties(Foo.prototype, t({ + flat: d(function () { return 'foo'; }, { flat: true }), + flat2: d(function () { return 'bar'; }, { flat: true }) + })); + + a.h2("Instance"); + a(o.flat, 'foo', "Value"); + a(o.hasOwnProperty('flat'), false, "Instance"); + a(Foo.prototype.flat, 'foo', "Prototype"); + + a.h2("Direct"); + a(Foo.prototype.flat2, 'bar'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.lint b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.lint new file mode 100644 index 0000000..d1da610 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.lint @@ -0,0 +1,38 @@ +@root + +module + +indent 2 +maxlen 100 +tabs + +ass +continue +forin +nomen +plusplus +vars + +./global.js +./function/_define-length.js +./function/#/copy.js +./object/unserialize.js +./test/function/valid-function.js +evil + +./math/_pack-ieee754.js +./math/_unpack-ieee754.js +./math/clz32/shim.js +./math/imul/shim.js +./number/to-uint32.js +./string/#/at.js +bitwise + +./math/fround/shim.js +predef+ Float32Array + +./object/first-key.js +forin + +./test/reg-exp/#/index.js +predef+ __dirname diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.lintignore b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.lintignore new file mode 100644 index 0000000..ed703ed --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.lintignore @@ -0,0 +1,8 @@ +/string/#/normalize/_data.js +/test/boolean/is-boolean.js +/test/date/is-date.js +/test/number/is-number.js +/test/object/is-copy.js +/test/object/is-object.js +/test/reg-exp/is-reg-exp.js +/test/string/is-string.js diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.npmignore b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.npmignore new file mode 100644 index 0000000..eb09b50 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/.lintcache +/npm-debug.log diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.travis.yml b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.travis.yml new file mode 100644 index 0000000..a183dbc --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/.travis.yml @@ -0,0 +1,15 @@ +sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +language: node_js +node_js: + - 0.10 + - 0.12 + - iojs + +before_install: + - mkdir node_modules; ln -s ../ node_modules/es5-ext + +notifications: + email: + - medikoo+es5-ext@medikoo.com + +script: "npm test && npm run lint" diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/CHANGES b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/CHANGES new file mode 100644 index 0000000..5d0ace5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/CHANGES @@ -0,0 +1,611 @@ +v0.10.7 -- 2015.04.22 +* New utlitities. They're convention differs from v0.10, as they were supposed to land in v1. + Still they're non breaking and start the conventions to be used in v1 + * Object.validateArrayLike + * Object.validateArrayLikeObject + * Object.validateStringifiable + * Object.validateStringifiableValue + * Universal utilities for array-like/iterable objects + * Iterable.is + * Iterable.validate + * Iterable.validateObject + * Iterable.forEach +* Fix camelToHyphen resolution, it must be absolutely reversable by hyphenToCamel +* Fix calculations of large numbers in Math.tanh +* Fix algorithm of Math.sinh +* Fix indexes to not use real symbols +* Fix length of String.fromCodePoint +* Fix tests of Array#copyWithin +* Update Travis CI configuration + +v0.10.6 -- 2015.02.02 +* Fix handling of infinite values in Math.trunc +* Fix handling of getters in Object.normalizeOptions + +v0.10.5 -- 2015.01.20 +* Add Function#toStringTokens +* Add Object.serialize and Object.unserialize +* Add String.randomUniq +* Fix Strin#camelToHyphen issue with tokens that end with digit +* Optimise Number.isInteger logic +* Improve documentation +* Configure lint scripts +* Fix spelling of LICENSE + +v0.10.4 -- 2014.04.30 +* Assure maximum spec compliance of Array.of and Array.from (thanks @mathiasbynens) +* Improve documentations + +v0.10.3 -- 2014.04.29 +Provide accurate iterators handling: +* Array.from improvements: + * Assure right unicode symbols resolution when processing strings in Array.from + * Rely on ES6 symbol shim and use native @@iterator Symbol if provided by environment +* Add methods: + * Array.prototype.entries + * Array.prototype.keys + * Array.prototype.values + * Array.prototype[@@iterator] + * String.prototype[@@iterator] + +Improve documentation + +v0.10.2 -- 2014.04.24 +- Simplify and deprecate `isCallable`. It seems in ES5 based engines there are + no callable objects which are `typeof obj !== 'function'` +- Update Array.from map callback signature (up to latest resolution of TC39) +- Improve documentation + +v0.10.1 -- 2014.04.14 +Bump version for npm +(Workaround for accidental premature publish & unpublish of v0.10.0 a while ago) + +v0.10.0 -- 2014.04.13 +Major update: +- All methods and function specified for ECMAScript 6 are now introduced as + shims accompanied with functions through which (optionally) they can be + implementend on native objects +- Filename convention was changed to shorter and strictly lower case names. e.g. + `lib/String/prototype/starts-with` became `string/#/starts-with` +- Generated functions are guaranteed to have expected length +- Objects with null prototype (created via `Object.create(null)`) are widely + supported (older version have crashed due to implied `obj.hasOwnProperty` and + related invocations) +- Support array subclasses +- When handling lists do not limit its length to Uint32 range +- Use newly introduced `Object.eq` for strict equality in place of `Object.is` +- Iteration of Object have been improved so properties that were hidden or + removed after iteration started are not iterated. + +Additions: +- `Array.isPlainArray` +- `Array.validArray` +- `Array.prototype.concat` (as updated with ES6) +- `Array.prototype.copyWithin` (as introduced with ES6) +- `Array.prototype.fill` (as introduced with ES6) +- `Array.prototype.filter` (as updated with ES6) +- `Array.prototype.findIndex` (as introduced with ES6) +- `Array.prototype.map` (as updated with ES6) +- `Array.prototype.separate` +- `Array.prototype.slice` (as updated with ES6) +- `Array.prototype.splice` (as updated with ES6) +- `Function.prototype.copy` +- `Math.acosh` (as introduced with ES6) +- `Math.atanh` (as introduced with ES6) +- `Math.cbrt` (as introduced with ES6) +- `Math.clz32` (as introduced with ES6) +- `Math.cosh` (as introduced with ES6) +- `Math.expm1` (as introduced with ES6) +- `Math.fround` (as introduced with ES6) +- `Math.hypot` (as introduced with ES6) +- `Math.imul` (as introduced with ES6) +- `Math.log2` (as introduced with ES6) +- `Math.log10` (as introduced with ES6) +- `Math.log1p` (as introduced with ES6) +- `Math.sinh` (as introduced with ES6) +- `Math.tanh` (as introduced with ES6) +- `Math.trunc` (as introduced with ES6) +- `Number.EPSILON` (as introduced with ES6) +- `Number.MIN_SAFE_INTEGER` (as introduced with ES6) +- `Number.MAX_SAFE_INTEGER` (as introduced with ES6) +- `Number.isFinite` (as introduced with ES6) +- `Number.isInteger` (as introduced with ES6) +- `Number.isSafeInteger` (as introduced with ES6) +- `Object.create` (with fix for V8 issue which disallows prototype turn of + objects derived from null +- `Object.eq` - Less restrictive version of `Object.is` based on SameValueZero + algorithm +- `Object.firstKey` +- `Object.keys` (as updated with ES6) +- `Object.mixinPrototypes` +- `Object.primitiveSet` +- `Object.setPrototypeOf` (as introduced with ES6) +- `Object.validObject` +- `RegExp.escape` +- `RegExp.prototype.match` (as introduced with ES6) +- `RegExp.prototype.replace` (as introduced with ES6) +- `RegExp.prototype.search` (as introduced with ES6) +- `RegExp.prototype.split` (as introduced with ES6) +- `RegExp.prototype.sticky` (as introduced with ES6) +- `RegExp.prototype.unicode` (as introduced with ES6) +- `String.fromCodePoint` (as introduced with ES6) +- `String.raw` (as introduced with ES6) +- `String.prototype.at` +- `String.prototype.codePointAt` (as introduced with ES6) +- `String.prototype.normalize` (as introduced with ES6) +- `String.prototype.plainReplaceAll` + +Removals: +- `reserved` set +- `Array.prototype.commonLeft` +- `Function.insert` +- `Function.remove` +- `Function.prototype.silent` +- `Function.prototype.wrap` +- `Object.descriptor` Move to external `d` project. + See: https://github.com/medikoo/d +- `Object.diff` +- `Object.extendDeep` +- `Object.reduce` +- `Object.values` +- `String.prototype.trimCommonLeft` + +Renames: +- `Function.i` into `Function.identity` +- `Function.k` into `Function.constant` +- `Number.toInt` into `Number.toInteger` +- `Number.toUint` into `Number.toPosInteger` +- `Object.extend` into `Object.assign` (as introduced in ES 6) +- `Object.extendProperties` into `Object.mixin`, with improved internal + handling, so it matches temporarily specified `Object.mixin` for ECMAScript 6 +- `Object.isList` into `Object.isArrayLike` +- `Object.mapToArray` into `Object.toArray` (with fixed function length) +- `Object.toPlainObject` into `Object.normalizeOptions` (as this is the real + use case where we use this function) +- `Function.prototype.chain` into `Function.prototype.compose` +- `Function.prototype.match` into `Function.prototype.spread` +- `String.prototype.format` into `String.formatMethod` + +Improvements & Fixes: +- Remove workaround for primitive values handling in object iterators +- `Array.from`: Update so it follows ES 6 spec +- `Array.prototype.compact`: filters just null and undefined values + (not all falsies) +- `Array.prototype.eIndexOf` and `Array.prototype.eLastIndexOf`: fix position + handling, improve internals +- `Array.prototype.find`: return undefined not null, in case of not found + (follow ES 6) +- `Array.prototype.remove` fix function length +- `Error.custom`: simplify, Custom class case is addressed by outer + `error-create` project -> https://github.com/medikoo/error-create +- `Error.isError` true only for Error instances (remove detection of host + Exception objects) +- `Number.prototype.pad`: Normalize negative pad +- `Object.clear`: Handle errors same way as in `Object.assign` +- `Object.compact`: filters just null and undefined values (not all falsies) +- `Object.compare`: Take into account NaN values +- `Object.copy`: Split into `Object.copy` and `Object.copyDeep` +- `Object.isCopy`: Separate into `Object.isCopy` and `Object.isCopyDeep`, where + `isCopyDeep` handles nested plain objects and plain arrays only +- `String.prototype.endsWith`: Adjust up to ES6 specification +- `String.prototype.repeat`: Adjust up to ES6 specification and improve algorithm +- `String.prototype.simpleReplace`: Rename into `String.prototype.plainReplace` +- `String.prototype.startsWith`: Adjust up to ES6 specification +- Update lint rules, and adjust code to that +- Update Travis CI configuration +- Remove Makefile (it's cross-env utility) + +v0.9.2 -- 2013.03.11 +Added: +* Array.prototype.isCopy +* Array.prototype.isUniq +* Error.CustomError +* Function.validFunction +* Object.extendDeep +* Object.descriptor.binder +* Object.safeTraverse +* RegExp.validRegExp +* String.prototype.capitalize +* String.prototype.simpleReplace + +Fixed: +* Fix Array.prototype.diff for sparse arrays +* Accept primitive objects as input values in Object iteration methods and + Object.clear, Object.count, Object.diff, Object.extend, + Object.getPropertyNames, Object.values +* Pass expected arguments to callbacks of Object.filter, Object.mapKeys, + Object.mapToArray, Object.map +* Improve callable callback support in Object.mapToArray + +v0.9.1 -- 2012.09.17 +* Object.reduce - reduce for hash-like collections +* Accapt any callable object as callback in Object.filter, mapKeys and map +* Convention cleanup + +v0.9.0 -- 2012.09.13 +We're getting to real solid API + +Removed: +* Function#memoize - it's grown up to be external package, to be soon published + as 'memoizee' +* String.guid - it doesn't fit es5-ext (extensions) concept, will be provided as + external package +# Function.arguments - obsolete +# Function.context - obsolete +# Function#flip - not readable when used, so it was never used +# Object.clone - obsolete and confusing + +Added: +* String#camelToHyphen - String format convertion + +Renamed: +* String#dashToCamelCase -> String#hyphenToCamel + +Fixes: +* Object.isObject - Quote names in literals that match reserved keywords + (older implementations crashed on that) +* String#repeat - Do not accept negative values (coerce them to 1) + +Improvements: +* Array#remove - Accepts many arguments, we can now remove many values at once +* Object iterators (forEach, map, some) - Compare function invoked with scope + object bound to this +* Function#curry - Algorithm cleanup +* Object.isCopy - Support for all types, not just plain objects +* Object.isPlainObject - Support for cross-frame objects +* Do not memoize any of the functions, it shouldn't be decided internally +* Remove Object.freeze calls in reserved, it's not up to convention +* Improved documentation +* Better linting (hard-core approach using both JSLint mod and JSHint) +* Optional arguments are now documented in funtions signature + +v0.8.2 -- 2012.06.22 +Fix errors in Array's intersection and exclusion methods, related to improper +usage of contains method + +v0.8.1 -- 2012.06.13 +Reorganized internal logic of Function.prototype.memoize. So it's more safe now +and clears cache properly. Additionally preventCache option was provided. + +v0.8.0 -- 2012.05.28 +Again, major overhaul. Probably last experimental stuff was trashed, all API +looks more like standard extensions now. + +Changes: +* Turn all Object.prototype extensions into functions and move them to Object +namespace. We learned that extending Object.prototype is bad idea in any case. +* Rename Function.prototype.curry into Function.prototype.partial. This function + is really doing partial application while currying is slightly different + concept. +* Convert Function.prototype.ncurry to new implementation of + Function.prototype.curry, it now serves real curry concept additionaly it + covers use cases for aritize and hold, which were removed. +* Rename Array's peek to last, and provide support for sparse arrays in it +* Rename Date's monthDaysCount into daysInMonth +* Simplify object iterators, now order of iteration can be configured with just + compareFn argument (no extra byKeys option) +* Rename Object.isDuplicate to Object.isCopy +* Rename Object.isEqual to Object.is which is compatible with future 'is' + keyword +* Function.memoize is now Function.prototype.memoize. Additionally clear cache + functionality is added, and access to original arguments object. +* Rename validation functions: assertNotNull to validValue, assertCallable to + validCallable. validValue was moved to Object namespace. On success they now + return validated value instead of true, it supports better composition. + Additionally created Date.validDate and Error.validError +* All documentation is now held in README.md not in code files. +* Move guid to String namespace. All guids now start with numbers. +* Array.generate: fill argument is now optional +* Object.toArray is now Array.from (as new ES6 specification draft suggests) +* All methods that rely on indexOf or lastIndexOf, now rely on egal (Object.is) + versions of them (eIndexOf, eLastIndexOf) +* Turn all get* functions that returned methods into actuall methods (get* + functionality can still be achieved with help of Function.prototype.partial). + So: Date.getFormat is now Date.prototype.format, + Number.getPad is now Number.prototype.pad, + String.getFormat is now String.prototype.format, + String.getIndent is now String.prototype.indent, + String.getPad is now String.prototype.pad +* Refactored Object.descriptor, it is now just two functions, main one and + main.gs, main is for describing values, and gs for describing getters and + setters. Configuration is passed with first argument as string e.g. 'ce' for + configurable and enumerable. If no configuration string is provided then by + default it returns configurable and writable but not enumerable for value or + configurable but not enumerable for getter/setter +* Function.prototype.silent now returns prepared function (it was + expected to be fixed for 0.7) +* Reserved keywords map (reserved) is now array not hash. +* Object.merge is now Object.extend (while former Object.extend was completely + removed) - 'extend' implies that we change object, not creating new one (as + 'merge' may imply). Similarily Object.mergeProperties was renamed to + Object.extendProperties +* Position argument support in Array.prototype.contains and + String.prototype.contains (so it follows ES6 specification draft) +* endPosition argument support in String.prototype.endsWith and fromPosition + argument support in String.prototype.startsWith (so it follows ES6 + specification draft) +* Better and cleaner String.prototype.indent implementation. No default value + for indent string argument, optional nest value (defaults to 1), remove + nostart argument +* Correct length values for most methods (so they reflect length of similar + methods in standard) +* Length argument is now optional in number and string pad methods. +* Improve arguments validation in general, so it adheres to standard conventions +* Fixed format of package.json + +Removed methods and functions: +* Object.prototype.slice - Object is not ordered collection, so slice doesn't + make sense. +* Function's rcurry, rncurry, s - too cumbersome for JS, not many use cases for + that +* Function.prototype.aritize and Function.prototype.hold - same functionality + can be achieved with new Function.prototype.curry +* Function.prototype.log - provided more generic Function.prototype.wrap for + same use case +* getNextIdGenerator - no use case for that (String.guid should be used if + needed) +* Object.toObject - Can be now acheived with Object(validValue(x)) +* Array.prototype.someValue - no real use case (personally used once and + case was already controversial) +* Date.prototype.duration - moved to external package +* Number.getAutoincrement - No real use case +* Object.prototype.extend, Object.prototype.override, + Object.prototype.plainCreate, Object.prototype.plainExtend - It was probably + too complex, same should be achieved just with Object.create, + Object.descriptor and by saving references to super methods in local scope. +* Object.getCompareBy - Functions should be created individually for each use + case +* Object.get, Object.getSet, Object.set, Object.unset - Not many use cases and + same can be easily achieved with simple inline function +* String.getPrefixWith - Not real use case for something that can be easily + achieved with '+' operator +* Object.isPrimitive - It's just negation of Object.isObject +* Number.prototype.isLess, Number.prototype.isLessOrEqual - they shouldn't be in + Number namespace and should rather be addressed with simple inline functions. +* Number.prototype.subtract - Should rather be addressed with simple inline + function + +New methods and functions: +* Array.prototype.lastIndex - Returns last declared index in array +* String.prototype.last - last for strings +* Function.prototype.wrap - Wrap function with other, it allows to specify + before and after behavior transform return value or prevent original function + from being called. +* Math.sign - Returns sign of a number (already in ES6 specification draft) +* Number.toInt - Converts value to integer (already in ES6 specification draft) +* Number.isNaN - Returns true if value is NaN (already in ES6 specification + draft) +* Number.toUint - Converts value to unsigned integer +* Number.toUint32 - Converts value to 32bit unsigned integer +* Array.prototype.eIndexOf, eLastIndexOf - Egal version (that uses Object.is) of + standard methods (all methods that were using native indexOf or lastIndexOf + now uses eIndexOf and elastIndexOf respectively) +* Array.of - as it's specified for ES6 + +Fixes: +* Fixed binarySearch so it always returns valid list index +* Object.isList - it failed on lists that are callable (e.g. NodeList in Nitro + engine) +* Object.map now supports third argument for callback + +v0.7.1 -- 2012.01.05 +New methods: +* Array.prototype.firstIndex - returns first valid index of array (for + sparse arrays it may not be '0' + +Improvements: +* Array.prototype.first - now returns value for index returned by firstIndex +* Object.prototype.mapToArray - can be called without callback, then array of + key-value pairs is returned + +Fixes +* Array.prototype.forEachRight, object's length read through UInt32 conversion + +v0.7.0 -- 2011.12.27 +Major update. +Stepped back from experimental ideas and introduced more standard approach +taking example from how ES5 methods and functions are designed. One exceptions +is that, we don’t refrain from declaring methods for Object.prototype - it’s up +to developer whether how he decides to use it in his context (as function or as +method). + +In general: +* Removed any method 'functionalization' and functionalize method itself. + es5-ext declares plain methods, which can be configured to work as functions + with call.bind(method) - see documentation. +* Removed separation of Object methods for ES5 (with descriptors) and + ES3 (plain) - we're following ES5 idea on that, some methods are intended just + for enumerable properties and some are for all properties, all are declared + for Object.prototype +* Removed separation of Array generic (collected in List folder) and not generic + methods (collected in Array folder). Now all methods are generic and are in + Array/prototype folder. This separation also meant, that methods in Array are + usually destructive. We don’t do that separation now, there’s generally no use + case for destructive iterators, we should be fine with one version of each + method, (same as ES5 is fine with e.g. one, non destructive 'filter' method) +* Folder structure resembles tree of native ES5 Objects +* All methods are written with ES5 conventions in mind, it means that most + methods are generic and can be run on any object. In more detail: + ** Array.prototype and Object.prototype methods can be run on any object (any + not null or undefined value), + ** Date.prototype methods should be called only on Date instances. + ** Function.prototype methods can be called on any callable objects (not + necessarily functions) + ** Number.prototype & String.prototype methods can be called on any value, in + case of Number it it’ll be degraded to number, in case of string it’ll be + degraded to string. +* Travis CI support (only for Node v0.6 branch, as v0.4 has buggy V8 version) + +Improvements for existing functions and methods: +* Function.memoize (was Function.cache) is now fully generic, can operate on any + type of arguments and it’s NaN safe (all NaN objects are considered equal) +* Method properties passed to Object.prototype.extend or + Object.prototype.override can aside of _super optionally take prototype object + via _proto argument +* Object iterators: forEach, mapToArray and every can now iterate in specified + order +* pluck, invoke and other functions that return reusable functions or methods + have now their results memoized. + +New methods: +* Global: assertNotNull, getNextIdGenerator, guid, isEqual, isPrimitive, + toObject +* Array: generate +* Array.prototype: binarySearch, clear, contains, diff, exclusion, find, first, + forEachRight, group, indexesOf, intersection, remove, someRight, someValue +* Boolean: isBoolean +* Date: isDate +* Function: arguments, context, insert, isArguments, remove +* Function.prototype: not, silent +* Number: getAutoincrement, isNumber +* Number.prototype: isLessOrEqual, isLess, subtract +* Object: assertCallable, descriptor (functions for clean descriptors), + getCompareBy, isCallable, isObject +* Object.prototype: clone (real clone), compact, count, diff, empty, + getPropertyNames, get, keyOf, mapKeys, override, plainCreate, plainExtend, + slice, some, unset +* RegExp: isRegExp +* String: getPrefixWith, isString +* String.prototype: caseInsensitiveCompare, contains, isNumeric + +Renamed methods: +* Date.clone -> Date.prototype.copy +* Date.format -> Date.getFormat +* Date/day/floor -> Date.prototype.floorDay +* Date/month/floor -> Date.prototype.floorMonth +* Date/month/year -> Date.prototype.floorYear +* Function.cache -> Function.memoize +* Function.getApplyArg -> Function.prototype.match +* Function.sequence -> Function.prototype.chain +* List.findSameStartLength -> Array.prototype.commonLeft +* Number.pad -> Number.getPad +* Object/plain/clone -> Object.prototype.copy +* Object/plain/elevate -> Object.prototype.flatten +* Object/plain/same -> Object.prototype.isDuplicate +* Object/plain/setValue -> Object.getSet +* String.format -> String.getFormat +* String.indent -> String.getIndent +* String.pad -> String.getPad +* String.trimLeftStr -> String.prototype.trimCommonLeft +* Object.merge -> Object.prototype.mergeProperties +* Object/plain/pluck -> Object.prototype.get +* Array.clone is now Array.prototype.copy and can be used also on any array-like + objects +* List.isList -> Object.isList +* List.toArray -> Object.prototype.toArray +* String/convert/dashToCamelCase -> String.prototype.dashToCamelCase + +Removed methods: +* Array.compact - removed destructive version (that operated on same array), we + have now non destructive version as Array.prototype.compact. +* Function.applyBind -> use apply.bind directly +* Function.bindBind -> use bind.bind directly +* Function.callBind -> use call.bind directly +* Fuction.clone -> no valid use case +* Function.dscope -> controversial approach, shouldn’t be considered seriously +* Function.functionalize -> It was experimental but standards are standards +* List/sort/length -> It can be easy obtained by Object.getCompareBy(‘length’) +* List.concat -> Concat’s for array-like’s makes no sense, just convert to array + first +* List.every -> Use Array.prototype.every directly +* List.filter -> Use Array.prototype.filter directly +* List.forEach -> User Array.prototype.forEach directly +* List.isListObject -> No valid use case, do: isList(list) && (typeof list === + 'object’) +* List.map -> Use Array.prototype.map directly +* List.reduce -> Use Array.prototype.reduce directly +* List.shiftSame -> Use Array.prototype.commonLeft and do slice +* List.slice -> Use Array.prototype.slice directly +* List.some -> Use Array.prototype.some directly +* Object.bindMethods -> it was version that considered descriptors, we have now + Object.prototype.bindMethods which operates only on enumerable properties +* Object.every -> version that considered all properties, we have now + Object.prototype.every which iterates only enumerables +* Object.invoke -> no use case +* Object.mergeDeep -> no use case +* Object.pluck -> no use case +* Object.same -> it considered descriptors, now there’s only Object.isDuplicate + which compares only enumerable properties +* Object.sameType -> no use case +* Object.toDescriptor and Object.toDescriptors -> replaced by much nicer + Object.descriptor functions +* Object/plain/link -> no use case (it was used internally only by + Object/plain/merge) +* Object/plain/setTrue -> now easily configurable by more universal + Object.getSet(true) +* String.trimRightStr -> Eventually String.prototype.trimCommonRight will be + added + +v0.6.3 -- 2011.12.12 +* Cleared npm warning for misnamed property in package.json + +v0.6.2 -- 2011.08.12 +* Calling String.indent without scope (global scope then) now treated as calling + it with null scope, it allows more direct invocations when using default nest + string: indent().call(str, nest) + +v0.6.1 -- 2011.08.08 +* Added TAD test suite to devDependencies, configured test commands. + Tests can be run with 'make test' or 'npm test' + +v0.6.0 -- 2011.08.07 +New methods: +* Array: clone, compact (in place) +* Date: format, duration, clone, monthDaysCount, day.floor, month.floor, + year.floor +* Function: getApplyArg, , ncurry, rncurry, hold, cache, log +* List: findSameStartLength, shiftSame, peek, isListObject +* Number: pad +* Object: sameType, toString, mapToArray, mergeDeep, toDescriptor, + toDescriptors, invoke +* String: startsWith, endsWith, indent, trimLeftStr, trimRightStr, pad, format + +Fixed: +* Object.extend does now prototypal extend as exptected +* Object.merge now tries to overwrite only configurable properties +* Function.flip + +Improved: +* Faster List.toArray +* Better global retrieval +* Functionalized all Function methods +* Renamed bindApply and bindCall to applyBind and callBind +* Removed Function.inherit (as it's unintuitive curry clone) +* Straightforward logic in Function.k +* Fixed naming of some tests files (letter case issue) +* Renamed Function.saturate into Function.lock +* String.dashToCamelCase digits support +* Strings now considered as List objects +* Improved List.compact +* Concise logic for List.concat +* Test wit TAD in clean ES5 context + +v0.5.1 -- 2011.07.11 +* Function's bindBind, bindCall and bindApply now more versatile + +v0.5.0 -- 2011.07.07 +* Removed Object.is and List.apply +* Renamed Object.plain.is to Object.plain.isPlainObject (keep naming convention + consistent) +* Improved documentation + +v0.4.0 -- 2011.07.05 +* Take most functions on Object to Object.plain to keep them away from object + descriptors +* Object functions with ES5 standard in mind (object descriptors) + +v0.3.0 -- 2011.06.24 +* New functions +* Consistent file naming (dash instead of camelCase) + +v0.2.1 -- 2011.05.28 +* Renamed Functions.K and Function.S to to lowercase versions (use consistent + naming) + +v0.2.0 -- 2011.05.28 +* Renamed Array folder to List (as its generic functions for array-like objects) +* Added Makefile +* Added various functions + +v0.1.0 -- 2011.05.24 +* Initial version diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/LICENSE b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/LICENSE new file mode 100644 index 0000000..de39071 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2011-2015 Mariusz Nowak (www.medikoo.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/README.md b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/README.md new file mode 100644 index 0000000..11d8a34 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/README.md @@ -0,0 +1,993 @@ +# es5-ext +## ECMAScript 5 extensions +### (with respect to ECMAScript 6 standard) + +Shims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind. + +It's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board. + +When used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims. + +### Installation + + $ npm install es5-ext + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +#### ECMAScript 6 features + +You can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already). + +```javascript +require('es5-ext/array/from/implement'); +Array.from('foo'); // ['f', 'o', 'o'] +``` + +You can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not. + +```javascript +var aFrom = require('es5-ext/array/from'); +aFrom('foo'); // ['f', 'o', 'o'] +``` + +If you want to use shim unconditionally (even if native implementation exists) do: + +```javascript +var aFrom = require('es5-ext/array/from/shim'); +aFrom('foo'); // ['f', 'o', 'o'] +``` + +##### List of ES6 shims + +It's about properties introduced with ES6 and those that have been updated in new spec. + +- `Array.from` -> `require('es5-ext/array/from')` +- `Array.of` -> `require('es5-ext/array/of')` +- `Array.prototype.concat` -> `require('es5-ext/array/#/concat')` +- `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')` +- `Array.prototype.entries` -> `require('es5-ext/array/#/entries')` +- `Array.prototype.fill` -> `require('es5-ext/array/#/fill')` +- `Array.prototype.filter` -> `require('es5-ext/array/#/filter')` +- `Array.prototype.find` -> `require('es5-ext/array/#/find')` +- `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')` +- `Array.prototype.keys` -> `require('es5-ext/array/#/keys')` +- `Array.prototype.map` -> `require('es5-ext/array/#/map')` +- `Array.prototype.slice` -> `require('es5-ext/array/#/slice')` +- `Array.prototype.splice` -> `require('es5-ext/array/#/splice')` +- `Array.prototype.values` -> `require('es5-ext/array/#/values')` +- `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')` +- `Math.acosh` -> `require('es5-ext/math/acosh')` +- `Math.asinh` -> `require('es5-ext/math/asinh')` +- `Math.atanh` -> `require('es5-ext/math/atanh')` +- `Math.cbrt` -> `require('es5-ext/math/cbrt')` +- `Math.clz32` -> `require('es5-ext/math/clz32')` +- `Math.cosh` -> `require('es5-ext/math/cosh')` +- `Math.exmp1` -> `require('es5-ext/math/expm1')` +- `Math.fround` -> `require('es5-ext/math/fround')` +- `Math.hypot` -> `require('es5-ext/math/hypot')` +- `Math.imul` -> `require('es5-ext/math/imul')` +- `Math.log1p` -> `require('es5-ext/math/log1p')` +- `Math.log2` -> `require('es5-ext/math/log2')` +- `Math.log10` -> `require('es5-ext/math/log10')` +- `Math.sign` -> `require('es5-ext/math/sign')` +- `Math.signh` -> `require('es5-ext/math/signh')` +- `Math.tanh` -> `require('es5-ext/math/tanh')` +- `Math.trunc` -> `require('es5-ext/math/trunc')` +- `Number.EPSILON` -> `require('es5-ext/number/epsilon')` +- `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')` +- `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')` +- `Number.isFinite` -> `require('es5-ext/number/is-finite')` +- `Number.isInteger` -> `require('es5-ext/number/is-integer')` +- `Number.isNaN` -> `require('es5-ext/number/is-nan')` +- `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')` +- `Object.assign` -> `require('es5-ext/object/assign')` +- `Object.keys` -> `require('es5-ext/object/keys')` +- `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')` +- `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')` +- `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')` +- `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')` +- `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')` +- `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')` +- `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')` +- `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')` +- `String.raw` -> `require('es5-ext/string/raw')` +- `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')` +- `String.prototype.contains` -> `require('es5-ext/string/#/contains')` +- `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')` +- `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')` +- `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')` +- `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')` +- `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')` + +#### Non ECMAScript standard features + +__es5-ext__ provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes: + +```javascript +Object.defineProperty(Function.prototype, 'partial', { value: require('es5-ext/function/#/partial'), + configurable: true, enumerable: false, writable: true }); +Object.defineProperty(Array.prototype, 'flatten', { value: require('es5-ext/array/#/flatten'), + configurable: true, enumerable: false, writable: true }); +Object.defineProperty(String.prototype, 'capitalize', { value: require('es5-ext/string/#/capitalize'), + configurable: true, enumerable: false, writable: true }); +``` + +See [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you. + +__Important:__ Remember to __not__ extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine __only__ if you're the _owner_ of the global scope, so e.g. in final project you lead development of. + +When you're in situation when native extensions are not good idea, then you should use methods indirectly: + + +```javascript +var flatten = require('es5-ext/array/#/flatten'); + +flatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +for better convenience you can turn methods into functions: + + +```javascript +var call = Function.prototype.call +var flatten = call.bind(require('es5-ext/array/#/flatten')); + +flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +You can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application + +```javascript +var util = {}; +util.partial = call.bind(require('es5-ext/function/#/partial')); +util.flatten = call.bind(require('es5-ext/array/#/flatten')); +util.startsWith = call.bind(require('es5-ext/string/#/starts-with')); + +util.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +As with native ones most methods are generic and can be run on any type of object. + +## API + +### Global extensions + +#### global _(es5-ext/global)_ + +Object that represents global scope + +### Array Constructor extensions + +#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). +Returns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned. + +#### generate([length[, …fill]]) _(es5-ext/array/generate)_ + +Generate an array of pre-given _length_ built of repeated arguments. + +#### isPlainArray(x) _(es5-ext/array/is-plain-array)_ + +Returns true if object is plain array (not instance of one of the Array's extensions). + +#### of([…items]) _(es5-ext/array/of)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). +Create an array from given arguments. + +#### toArray(obj) _(es5-ext/array/to-array)_ + +Returns array representation of `obj`. If `obj` is already an array, `obj` is returned back. + +#### validArray(obj) _(es5-ext/array/valid-array)_ + +Returns `obj` if it's an array, otherwise throws `TypeError` + +### Array Prototype extensions + +#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_ + +In __sorted__ list search for index of item for which _compareFn_ returns value closest to _0_. +It's variant of binary search algorithm + +#### arr.clear() _(es5-ext/array/#/clear)_ + +Clears the array + +#### arr.compact() _(es5-ext/array/#/compact)_ + +Returns a copy of the context with all non-values (`null` or `undefined`) removed. + +#### arr.concat() _(es5-ext/array/#/concat)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). +ES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context. + +#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_ + +Whether list contains the given value. + +#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin). + +#### arr.diff(other) _(es5-ext/array/#/diff)_ + +Returns the array of elements that are present in context list but not present in other list. + +#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_ + +_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision + +#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_ + +_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision + +#### arr.entries() _(es5-ext/array/#/entries)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). +Returns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value. + +#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_ + +Returns the array of elements that are found only in one of the lists (either context list or list provided in arguments). + +#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill). + +#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). +ES6's version of `filter`, returns array of same type as the context. + +#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). +Return first element for which given function returns true + +#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). +Return first index for which given function returns true + +#### arr.first() _(es5-ext/array/#/first)_ + +Returns value for first defined index + +#### arr.firstIndex() _(es5-ext/array/#/first-index)_ + +Returns first declared index of the array + +#### arr.flatten() _(es5-ext/array/#/flatten)_ + +Returns flattened version of the array + +#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_ + +`forEach` starting from last element + +#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_ + +Group list elements by value returned by _cb_ function + +#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_ + +Returns array of all indexes of given value + +#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_ + +Computes the array of values that are the intersection of all lists (context list and lists given in arguments) + +#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_ + +Returns true if both context and _other_ lists have same content + +#### arr.isUniq() _(es5-ext/array/#/is-uniq)_ + +Returns true if all values in array are unique + +#### arr.keys() _(es5-ext/array/#/keys)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). +Returns iterator object, which traverses all array indexes. + +#### arr.last() _(es5-ext/array/#/last)_ + +Returns value of last defined index + +#### arr.lastIndex() _(es5-ext/array/#/last)_ + +Returns last defined index of the array + +#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). +ES6's version of `map`, returns array of same type as the context. + +#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_ + +Remove values from the array + +#### arr.separate(sep) _(es5-ext/array/#/separate)_ + +Returns array with items separated with `sep` value + +#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). +ES6's version of `slice`, returns array of same type as the context. + +#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_ + +`some` starting from last element + +#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). +ES6's version of `splice`, returns array of same type as the context. + +#### arr.uniq() _(es5-ext/array/#/uniq)_ + +Returns duplicate-free version of the array + +#### arr.values() _(es5-ext/array/#/values)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). +Returns iterator object which traverses all array values. + +#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). +Returns iterator object which traverses all array values. + +### Boolean Constructor extensions + +#### isBoolean(x) _(es5-ext/boolean/is-boolean)_ + +Whether value is boolean + +### Date Constructor extensions + +#### isDate(x) _(es5-ext/date/is-date)_ + +Whether value is date instance + +#### validDate(x) _(es5-ext/date/valid-date)_ + +If given object is not date throw TypeError in other case return it. + +### Date Prototype extensions + +#### date.copy(date) _(es5-ext/date/#/copy)_ + +Returns a copy of the date object + +#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_ + +Returns number of days of date's month + +#### date.floorDay() _(es5-ext/date/#/floor-day)_ + +Sets the date time to 00:00:00.000 + +#### date.floorMonth() _(es5-ext/date/#/floor-month)_ + +Sets date day to 1 and date time to 00:00:00.000 + +#### date.floorYear() _(es5-ext/date/#/floor-year)_ + +Sets date month to 0, day to 1 and date time to 00:00:00.000 + +#### date.format(pattern) _(es5-ext/date/#/format)_ + +Formats date up to given string. Supported patterns: + +* `%Y` - Year with century, 1999, 2003 +* `%y` - Year without century, 99, 03 +* `%m` - Month, 01..12 +* `%d` - Day of the month 01..31 +* `%H` - Hour (24-hour clock), 00..23 +* `%M` - Minute, 00..59 +* `%S` - Second, 00..59 +* `%L` - Milliseconds, 000..999 + +### Error Constructor extensions + +#### custom(message/*, code, ext*/) _(es5-ext/error/custom)_ + +Creates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object) + +#### isError(x) _(es5-ext/error/is-error)_ + +Whether value is an error (instance of `Error`). + +#### validError(x) _(es5-ext/error/valid-error)_ + +If given object is not error throw TypeError in other case return it. + +### Error Prototype extensions + +#### err.throw() _(es5-ext/error/#/throw)_ + +Throws error + +### Function Constructor extensions + +Some of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele + +#### constant(x) _(es5-ext/function/constant)_ + +Returns a constant function that returns pregiven argument + +_k(x)(y) =def x_ + +#### identity(x) _(es5-ext/function/identity)_ + +Identity function. Returns first argument + +_i(x) =def x_ + +#### invoke(name[, …args]) _(es5-ext/function/invoke)_ + +Returns a function that takes an object as an argument, and applies object's +_name_ method to arguments. +_name_ can be name of the method or method itself. + +_invoke(name, …args)(object, …args2) =def object\[name\]\(…args, …args2\)_ + +#### isArguments(x) _(es5-ext/function/is-arguments)_ + +Whether value is arguments object + +#### isFunction(arg) _(es5-ext/function/is-function)_ + +Wether value is instance of function + +#### noop() _(es5-ext/function/noop)_ + +No operation function + +#### pluck(name) _(es5-ext/function/pluck)_ + +Returns a function that takes an object, and returns the value of its _name_ +property + +_pluck(name)(obj) =def obj[name]_ + +#### validFunction(arg) _(es5-ext/function/valid-function)_ + +If given object is not function throw TypeError in other case return it. + +### Function Prototype extensions + +Some of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele + +#### fn.compose([…fns]) _(es5-ext/function/#/compose)_ + +Applies the functions in reverse argument-list order. + +_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_ + +#### fn.copy() _(es5-ext/function/#/copy)_ + +Produces copy of given function + +#### fn.curry([n]) _(es5-ext/function/#/curry)_ + +Invoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. +If _n_ is not provided then it defaults to context function length + +_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_ + +#### fn.lock([…args]) _(es5-ext/function/#/lock)_ + +Returns a function that applies the underlying function to _args_, and ignores its own arguments. + +_f.lock(…args)(…args2) =def f(…args)_ + +_Named after it's counterpart in Google Closure_ + +#### fn.not() _(es5-ext/function/#/not)_ + +Returns a function that returns boolean negation of value returned by underlying function. + +_f.not()(…args) =def !f(…args)_ + +#### fn.partial([…args]) _(es5-ext/function/#/partial)_ + +Returns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args. + +_f.partial(…args1)(…args2) =def f(…args1, …args2)_ + +#### fn.spread() _(es5-ext/function/#/spread)_ + +Returns a function that applies underlying function with first list argument + +_f.match()(args) =def f.apply(null, args)_ + +#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_ + +Serializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties. + +### Math extensions + +#### acosh(x) _(es5-ext/math/acosh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh). + +#### asinh(x) _(es5-ext/math/asinh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh). + +#### atanh(x) _(es5-ext/math/atanh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh). + +#### cbrt(x) _(es5-ext/math/cbrt)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt). + +#### clz32(x) _(es5-ext/math/clz32)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32). + +#### cosh(x) _(es5-ext/math/cosh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh). + +#### expm1(x) _(es5-ext/math/expm1)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1). + +#### fround(x) _(es5-ext/math/fround)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround). + +#### hypot([…values]) _(es5-ext/math/hypot)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot). + +#### imul(x, y) _(es5-ext/math/imul)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul). + +#### log1p(x) _(es5-ext/math/log1p)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p). + +#### log2(x) _(es5-ext/math/log2)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2). + +#### log10(x) _(es5-ext/math/log10)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10). + +#### sign(x) _(es5-ext/math/sign)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign). + +#### sinh(x) _(es5-ext/math/sinh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh). + +#### tanh(x) _(es5-ext/math/tanh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh). + +#### trunc(x) _(es5-ext/math/trunc)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc). + +### Number Constructor extensions + +#### EPSILON _(es5-ext/number/epsilon)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon). + +The difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16. + +#### isFinite(x) _(es5-ext/number/is-finite)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). +Whether value is finite. Differs from global isNaN that it doesn't do type coercion. + +#### isInteger(x) _(es5-ext/number/is-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). +Whether value is integer. + +#### isNaN(x) _(es5-ext/number/is-nan)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). +Whether value is NaN. Differs from global isNaN that it doesn't do type coercion. + +#### isNumber(x) _(es5-ext/number/is-number)_ + +Whether given value is number + +#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger). + +#### MAX_SAFE_INTEGER _(es5-ext/number/max-safe-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). +The value of Number.MAX_SAFE_INTEGER is 9007199254740991. + +#### MIN_SAFE_INTEGER _(es5-ext/number/min-safe-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). +The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1). + +#### toInteger(x) _(es5-ext/number/to-integer)_ + +Converts value to integer + +#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_ + +Converts value to positive integer. If provided value is less than 0, then 0 is returned + +#### toUint32(x) _(es5-ext/number/to-uint32)_ + +Converts value to unsigned 32 bit integer. This type is used for array lengths. +See: http://www.2ality.com/2012/02/js-integers.html + +### Number Prototype extensions + +#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_ + +Pad given number with zeros. Returns string + +### Object Constructor extensions + +#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). +Extend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten. + +#### clear(obj) _(es5-ext/object/clear)_ + +Remove all enumerable own properties of the object + +#### compact(obj) _(es5-ext/object/compact)_ + +Returns copy of the object with all enumerable properties that have no falsy values + +#### compare(obj1, obj2) _(es5-ext/object/compare)_ + +Universal cross-type compare function. To be used for e.g. array sort. + +#### copy(obj) _(es5-ext/object/copy)_ + +Returns copy of the object with all enumerable properties. + +#### copyDeep(obj) _(es5-ext/object/copy-deep)_ + +Returns deep copy of the object with all enumerable properties. + +#### count(obj) _(es5-ext/object/count)_ + +Counts number of enumerable own properties on object + +#### create(obj[, properties]) _(es5-ext/object/create)_ + +`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804). + +When `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined. + +It's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype. + +Use only for objects that you plan to switch prototypes of and be aware of limitations of this workaround. + +#### eq(x, y) _(es5-ext/object/eq)_ + +Whether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. + +#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_ + +Analogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. +Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_ + +Analogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value. + +#### firstKey(obj) _(es5-ext/object/first-key)_ + +Returns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object. + +#### flatten(obj) _(es5-ext/object/flatten)_ + +Returns new object, with flatten properties of input object + +_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_ + +#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_ + +Analogous to Array.prototype.forEach. Calls a function for each key-value pair found in object +Optionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### getPropertyNames() _(es5-ext/object/get-property-names)_ + +Get all (not just own) property names of the object + +#### is(x, y) _(es5-ext/object/is)_ + +Whether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. + +#### isArrayLike(x) _(es5-ext/object/is-array-like)_ + +Whether object is array-like object + +#### isCopy(x, y) _(es5-ext/object/is-copy)_ + +Two values are considered a copy of same value when all of their own enumerable properties have same values. + +#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_ + +Deep comparision of objects + +#### isEmpty(obj) _(es5-ext/object/is-empty)_ + +True if object doesn't have any own enumerable property + +#### isObject(arg) _(es5-ext/object/is-object)_ + +Whether value is not primitive + +#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_ + +Whether object is plain object, its protototype should be Object.prototype and it cannot be host object. + +#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_ + +Search object for value + +#### keys(obj) _(es5-ext/object/keys)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). +ES6's version of `keys`, doesn't throw on primitive input + +#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_ + +Analogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object. + +#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_ + +Create new object with same values, but remapped keys + +#### mixin(target, source) _(es5-ext/object/mixin)_ + +Extend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten). +_It was for a moment part of ECMAScript 6 draft._ + +#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_ + +Extends _target_, with all source and source's prototype properties. +Useful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support). + +#### normalizeOptions(options) _(es5-ext/object/normalize-options)_ + +Normalizes options object into flat plain object. + +Useful for functions in which we either need to keep options object for future reference or need to modify it for internal use. + +- It never returns input `options` object back (always a copy is created) +- `options` can be undefined in such case empty plain object is returned. +- Copies all enumerable properties found down prototype chain. + +#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_ + +Creates `null` prototype based plain object, and sets on it all property names provided in arguments to true. + +#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_ + +Safe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator + +#### serialize(value) _(es5-ext/object/serialize)_ + +Serialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions. + +#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). +If native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed. + +#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_ + +Analogous to Array.prototype.some Returns true if any key-value pair satisfies the provided +testing function. +Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_ + +Creates an array of results of calling a provided function on every key-value pair in this object. +Optionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### unserialize(str) _(es5-ext/object/unserialize)_ + +Userializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize) + +#### validCallable(x) _(es5-ext/object/valid-callable)_ + +If given object is not callable throw TypeError in other case return it. + +#### validObject(x) _(es5-ext/object/valid-object)_ + +Throws error if given value is not an object, otherwise it is returned. + +#### validValue(x) _(es5-ext/object/valid-value)_ + +Throws error if given value is `null` or `undefined`, otherwise returns value. + +### RegExp Constructor extensions + +#### escape(str) _(es5-ext/reg-exp/escape)_ + +Escapes string to be used in regular expression + +#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_ + +Whether object is regular expression + +#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_ + +If object is regular expression it is returned, otherwise TypeError is thrown. + +### RegExp Prototype extensions + +#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_ + +Whether regular expression has `sticky` flag. + +It's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented. + +#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_ + +Whether regular expression has `unicode` flag. + +It's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented. + +#### re.match(string) _(es5-ext/reg-exp/#/match)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match). + +#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace). + +#### re.search(string) _(es5-ext/reg-exp/#/search)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search). + +#### re.split(string) _(es5-ext/reg-exp/#/search)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split). + +#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). +It's a getter, so only `implement` and `is-implemented` modules are provided. + +#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). +It's a getter, so only `implement` and `is-implemented` modules are provided. + +### String Constructor extensions + +#### formatMethod(fMap) _(es5-ext/string/format-method)_ + +Creates format method. It's used e.g. to create `Date.prototype.format` method + +#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint) + +#### isString(x) _(es5-ext/string/is-string)_ + +Whether object is string + +#### randomUniq() _(es5-ext/string/random-uniq)_ + +Returns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice) + +#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw) + +### String Prototype extensions + +#### str.at(pos) _(es5-ext/string/#/at)_ + +_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_ + +Returns a string at given position in Unicode-safe manner. +Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at). + +#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_ + +Convert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree. +Useful when converting names from js property convention into filename convention. + +#### str.capitalize() _(es5-ext/string/#/capitalize)_ + +Capitalize first character of a string + +#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_ + +Case insensitive compare + +#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat) + +Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt). + +#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains) + +Whether string contains given string. + +#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). +Whether strings ends with given string + +#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_ + +Convert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree. +Useful when converting names from filename convention to js property name convention. + +#### str.indent(str[, count]) _(es5-ext/string/#/indent)_ + +Indents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times). + +#### str.last() _(es5-ext/string/#/last)_ + +Return last character + +#### str.normalize([form]) _(es5-ext/string/#/normalize)_ + +[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). +Returns the Unicode Normalization Form of a given string. +Based on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js) + +#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_ + +Pad string with _fill_. +If _length_ si given than _fill_ is reapated _length_ times. +If _length_ is negative then pad is applied from right. + +#### str.repeat(n) _(es5-ext/string/#/repeat)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). +Repeat given string _n_ times + +#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_ + +Simple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case). + +#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_ + +Simple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _$_ characters escape in such case). + +#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). +Whether strings starts with given string + +#### str[@@iterator] _(es5-ext/string/#/@@iterator)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). +Returns iterator object which traverses all string characters (with respect to unicode symbols) + +### Tests [](https://travis-ci.org/medikoo/es5-ext) + + $ npm test diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/implement.js new file mode 100644 index 0000000..0f714a1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, require('es6-symbol').iterator, { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/index.js new file mode 100644 index 0000000..a694626 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Array.prototype[require('es6-symbol').iterator] : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..72eb1f8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/is-implemented.js @@ -0,0 +1,16 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator; + +module.exports = function () { + var arr = ['foo', 1], iterator, result; + if (typeof arr[iteratorSymbol] !== 'function') return false; + iterator = arr[iteratorSymbol](); + if (!iterator) return false; + if (typeof iterator.next !== 'function') return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== 'foo') return false; + if (result.done !== false) return false; + return true; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/shim.js new file mode 100644 index 0000000..ff295df --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/shim.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../values/shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/_compare-by-length.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/_compare-by-length.js new file mode 100644 index 0000000..d8343ce --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/_compare-by-length.js @@ -0,0 +1,9 @@ +// Used internally to sort array of lists by length + +'use strict'; + +var toPosInt = require('../../number/to-pos-integer'); + +module.exports = function (a, b) { + return toPosInt(a.length) - toPosInt(b.length); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/binary-search.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/binary-search.js new file mode 100644 index 0000000..8eb4567 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/binary-search.js @@ -0,0 +1,28 @@ +'use strict'; + +var toPosInt = require('../../number/to-pos-integer') + , callable = require('../../object/valid-callable') + , value = require('../../object/valid-value') + + , floor = Math.floor; + +module.exports = function (compareFn) { + var length, low, high, middle; + + value(this); + callable(compareFn); + + length = toPosInt(this.length); + low = 0; + high = length - 1; + + while (low <= high) { + middle = floor((low + high) / 2); + if (compareFn(this[middle]) < 0) high = middle - 1; + else low = middle + 1; + } + + if (high < 0) return 0; + if (high >= length) return length - 1; + return high; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/clear.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/clear.js new file mode 100644 index 0000000..3587bdf --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/clear.js @@ -0,0 +1,12 @@ +// Inspired by Google Closure: +// http://closure-library.googlecode.com/svn/docs/ +// closure_goog_array_array.js.html#goog.array.clear + +'use strict'; + +var value = require('../../object/valid-value'); + +module.exports = function () { + value(this).length = 0; + return this; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/compact.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/compact.js new file mode 100644 index 0000000..d529d5a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/compact.js @@ -0,0 +1,9 @@ +// Inspired by: http://documentcloud.github.com/underscore/#compact + +'use strict'; + +var filter = Array.prototype.filter; + +module.exports = function () { + return filter.call(this, function (val) { return val != null; }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/implement.js new file mode 100644 index 0000000..80c67cb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'concat', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/index.js new file mode 100644 index 0000000..db205ea --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? + Array.prototype.concat : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/is-implemented.js new file mode 100644 index 0000000..cab8bc9 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +var SubArray = require('../../_sub-array-dummy-safe'); + +module.exports = function () { + return (new SubArray()).concat('foo') instanceof SubArray; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/shim.js new file mode 100644 index 0000000..8b28e4a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/shim.js @@ -0,0 +1,39 @@ +'use strict'; + +var isPlainArray = require('../../is-plain-array') + , toPosInt = require('../../../number/to-pos-integer') + , isObject = require('../../../object/is-object') + + , isArray = Array.isArray, concat = Array.prototype.concat + , forEach = Array.prototype.forEach + + , isSpreadable; + +isSpreadable = function (value) { + if (!value) return false; + if (!isObject(value)) return false; + if (value['@@isConcatSpreadable'] !== undefined) { + return Boolean(value['@@isConcatSpreadable']); + } + return isArray(value); +}; + +module.exports = function (item/*, …items*/) { + var result; + if (!this || !isArray(this) || isPlainArray(this)) { + return concat.apply(this, arguments); + } + result = new this.constructor(this.length); + forEach.call(this, function (val, i) { result[i] = val; }); + forEach.call(arguments, function (arg) { + var base; + if (isSpreadable(arg)) { + base = result.length; + result.length += toPosInt(arg.length); + forEach.call(arg, function (val, i) { result[base + i] = val; }); + return; + } + result.push(arg); + }); + return result; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/contains.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/contains.js new file mode 100644 index 0000000..4a2f9f6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/contains.js @@ -0,0 +1,7 @@ +'use strict'; + +var indexOf = require('./e-index-of'); + +module.exports = function (searchElement/*, position*/) { + return indexOf.call(this, searchElement, arguments[1]) > -1; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/implement.js new file mode 100644 index 0000000..eedbad7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'copyWithin', + { value: require('./shim'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/index.js new file mode 100644 index 0000000..bb89d0b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? + Array.prototype.copyWithin : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/is-implemented.js new file mode 100644 index 0000000..8f17e06 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5]; + if (typeof arr.copyWithin !== 'function') return false; + return String(arr.copyWithin(1, 3)) === '1,4,5,4,5'; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/shim.js new file mode 100644 index 0000000..c0bfb8b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/shim.js @@ -0,0 +1,39 @@ +// Taken from: https://github.com/paulmillr/es6-shim/ + +'use strict'; + +var toInteger = require('../../../number/to-integer') + , toPosInt = require('../../../number/to-pos-integer') + , validValue = require('../../../object/valid-value') + + , hasOwnProperty = Object.prototype.hasOwnProperty + , max = Math.max, min = Math.min; + +module.exports = function (target, start/*, end*/) { + var o = validValue(this), end = arguments[2], l = toPosInt(o.length) + , to, from, fin, count, direction; + + target = toInteger(target); + start = toInteger(start); + end = (end === undefined) ? l : toInteger(end); + + to = target < 0 ? max(l + target, 0) : min(target, l); + from = start < 0 ? max(l + start, 0) : min(start, l); + fin = end < 0 ? max(l + end, 0) : min(end, l); + count = min(fin - from, l - to); + direction = 1; + + if ((from < to) && (to < (from + count))) { + direction = -1; + from += count - 1; + to += count - 1; + } + while (count > 0) { + if (hasOwnProperty.call(o, from)) o[to] = o[from]; + else delete o[from]; + from += direction; + to += direction; + count -= 1; + } + return o; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/diff.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/diff.js new file mode 100644 index 0000000..a1f9541 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/diff.js @@ -0,0 +1,13 @@ +'use strict'; + +var value = require('../../object/valid-value') + , contains = require('./contains') + + , filter = Array.prototype.filter; + +module.exports = function (other) { + (value(this) && value(other)); + return filter.call(this, function (item) { + return !contains.call(other, item); + }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-index-of.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-index-of.js new file mode 100644 index 0000000..80864d0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-index-of.js @@ -0,0 +1,29 @@ +'use strict'; + +var toPosInt = require('../../number/to-pos-integer') + , value = require('../../object/valid-value') + + , indexOf = Array.prototype.indexOf + , hasOwnProperty = Object.prototype.hasOwnProperty + , abs = Math.abs, floor = Math.floor; + +module.exports = function (searchElement/*, fromIndex*/) { + var i, l, fromIndex, val; + if (searchElement === searchElement) { //jslint: ignore + return indexOf.apply(this, arguments); + } + + l = toPosInt(value(this).length); + fromIndex = arguments[1]; + if (isNaN(fromIndex)) fromIndex = 0; + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); + + for (i = fromIndex; i < l; ++i) { + if (hasOwnProperty.call(this, i)) { + val = this[i]; + if (val !== val) return i; //jslint: ignore + } + } + return -1; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-last-index-of.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-last-index-of.js new file mode 100644 index 0000000..4fc536b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-last-index-of.js @@ -0,0 +1,29 @@ +'use strict'; + +var toPosInt = require('../../number/to-pos-integer') + , value = require('../../object/valid-value') + + , lastIndexOf = Array.prototype.lastIndexOf + , hasOwnProperty = Object.prototype.hasOwnProperty + , abs = Math.abs, floor = Math.floor; + +module.exports = function (searchElement/*, fromIndex*/) { + var i, fromIndex, val; + if (searchElement === searchElement) { //jslint: ignore + return lastIndexOf.apply(this, arguments); + } + + value(this); + fromIndex = arguments[1]; + if (isNaN(fromIndex)) fromIndex = (toPosInt(this.length) - 1); + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); + + for (i = fromIndex; i >= 0; --i) { + if (hasOwnProperty.call(this, i)) { + val = this[i]; + if (val !== val) return i; //jslint: ignore + } + } + return -1; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/implement.js new file mode 100644 index 0000000..490de60 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'entries', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/index.js new file mode 100644 index 0000000..292792c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? + Array.prototype.entries : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/is-implemented.js new file mode 100644 index 0000000..e186c17 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/is-implemented.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = function () { + var arr = [1, 'foo'], iterator, result; + if (typeof arr.entries !== 'function') return false; + iterator = arr.entries(); + if (!iterator) return false; + if (typeof iterator.next !== 'function') return false; + result = iterator.next(); + if (!result || !result.value) return false; + if (result.value[0] !== 0) return false; + if (result.value[1] !== 1) return false; + if (result.done !== false) return false; + return true; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/shim.js new file mode 100644 index 0000000..c052b53 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/shim.js @@ -0,0 +1,4 @@ +'use strict'; + +var ArrayIterator = require('es6-iterator/array'); +module.exports = function () { return new ArrayIterator(this, 'key+value'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/exclusion.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/exclusion.js new file mode 100644 index 0000000..f08adc8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/exclusion.js @@ -0,0 +1,27 @@ +'use strict'; + +var value = require('../../object/valid-value') + , aFrom = require('../from') + , toArray = require('../to-array') + , contains = require('./contains') + , byLength = require('./_compare-by-length') + + , filter = Array.prototype.filter, push = Array.prototype.push; + +module.exports = function (/*…lists*/) { + var lists, seen, result; + if (!arguments.length) return aFrom(this); + push.apply(lists = [this], arguments); + lists.forEach(value); + seen = []; + result = []; + lists.sort(byLength).forEach(function (list) { + result = result.filter(function (item) { + return !contains.call(list, item); + }).concat(filter.call(list, function (x) { + return !contains.call(seen, x); + })); + push.apply(seen, toArray(list)); + }); + return result; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/implement.js new file mode 100644 index 0000000..2251191 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'fill', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/index.js new file mode 100644 index 0000000..36c1f66 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? + Array.prototype.fill : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/is-implemented.js new file mode 100644 index 0000000..b8e5468 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.fill !== 'function') return false; + return String(arr.fill(-1, -3)) === '1,2,3,-1,-1,-1'; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/shim.js new file mode 100644 index 0000000..45823be --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/shim.js @@ -0,0 +1,21 @@ +// Taken from: https://github.com/paulmillr/es6-shim/ + +'use strict'; + +var toInteger = require('../../../number/to-integer') + , toPosInt = require('../../../number/to-pos-integer') + , validValue = require('../../../object/valid-value') + + , max = Math.max, min = Math.min; + +module.exports = function (value/*, start, end*/) { + var o = validValue(this), start = arguments[1], end = arguments[2] + , l = toPosInt(o.length), relativeStart, i; + + start = (start === undefined) ? 0 : toInteger(start); + end = (end === undefined) ? l : toInteger(end); + + relativeStart = start < 0 ? max(l + start, 0) : min(start, l); + for (i = relativeStart; i < l && i < end; ++i) o[i] = value; + return o; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/implement.js new file mode 100644 index 0000000..090c5f1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'filter', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/index.js new file mode 100644 index 0000000..bcf0268 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? + Array.prototype.filter : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/is-implemented.js new file mode 100644 index 0000000..5577273 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/is-implemented.js @@ -0,0 +1,9 @@ +'use strict'; + +var SubArray = require('../../_sub-array-dummy-safe') + + , pass = function () { return true; }; + +module.exports = function () { + return (new SubArray()).filter(pass) instanceof SubArray; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/shim.js new file mode 100644 index 0000000..b0116de --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/shim.js @@ -0,0 +1,22 @@ +'use strict'; + +var isPlainArray = require('../../is-plain-array') + , callable = require('../../../object/valid-callable') + + , isArray = Array.isArray, filter = Array.prototype.filter + , forEach = Array.prototype.forEach, call = Function.prototype.call; + +module.exports = function (callbackFn/*, thisArg*/) { + var result, thisArg, i; + if (!this || !isArray(this) || isPlainArray(this)) { + return filter.apply(this, arguments); + } + callable(callbackFn); + thisArg = arguments[1]; + result = new this.constructor(); + i = 0; + forEach.call(this, function (val, j, self) { + if (call.call(callbackFn, thisArg, val, j, self)) result[i++] = val; + }); + return result; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/implement.js new file mode 100644 index 0000000..556cb84 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'findIndex', + { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/index.js new file mode 100644 index 0000000..03a987e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? + Array.prototype.findIndex : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/is-implemented.js new file mode 100644 index 0000000..dbd3c81 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/is-implemented.js @@ -0,0 +1,9 @@ +'use strict'; + +var fn = function (x) { return x > 3; }; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.findIndex !== 'function') return false; + return arr.findIndex(fn) === 3; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/shim.js new file mode 100644 index 0000000..957939f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/shim.js @@ -0,0 +1,20 @@ +'use strict'; + +var callable = require('../../../object/valid-callable') + , value = require('../../../object/valid-value') + + , some = Array.prototype.some, apply = Function.prototype.apply; + +module.exports = function (predicate/*, thisArg*/) { + var k, self; + self = Object(value(this)); + callable(predicate); + + return some.call(self, function (value, index) { + if (apply.call(predicate, this, arguments)) { + k = index; + return true; + } + return false; + }, arguments[1]) ? k : -1; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/implement.js new file mode 100644 index 0000000..0f37104 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'find', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/index.js new file mode 100644 index 0000000..96819d0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? + Array.prototype.find : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/is-implemented.js new file mode 100644 index 0000000..cc7ec77 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/is-implemented.js @@ -0,0 +1,9 @@ +'use strict'; + +var fn = function (x) { return x > 3; }; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.find !== 'function') return false; + return arr.find(fn) === 4; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/shim.js new file mode 100644 index 0000000..c7ee906 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/shim.js @@ -0,0 +1,8 @@ +'use strict'; + +var findIndex = require('../find-index/shim'); + +module.exports = function (predicate/*, thisArg*/) { + var index = findIndex.apply(this, arguments); + return (index === -1) ? undefined : this[index]; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first-index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first-index.js new file mode 100644 index 0000000..7a9e4c3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first-index.js @@ -0,0 +1,16 @@ +'use strict'; + +var toPosInt = require('../../number/to-pos-integer') + , value = require('../../object/valid-value') + + , hasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var i, l; + if (!(l = toPosInt(value(this).length))) return null; + i = 0; + while (!hasOwnProperty.call(this, i)) { + if (++i === l) return null; + } + return i; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first.js new file mode 100644 index 0000000..11df571 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first.js @@ -0,0 +1,9 @@ +'use strict'; + +var firstIndex = require('./first-index'); + +module.exports = function () { + var i; + if ((i = firstIndex.call(this)) !== null) return this[i]; + return undefined; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/flatten.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/flatten.js new file mode 100644 index 0000000..c95407d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/flatten.js @@ -0,0 +1,12 @@ +'use strict'; + +var isArray = Array.isArray, forEach = Array.prototype.forEach + , push = Array.prototype.push; + +module.exports = function flatten() { + var r = []; + forEach.call(this, function (x) { + push.apply(r, isArray(x) ? flatten.call(x) : [x]); + }); + return r; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/for-each-right.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/for-each-right.js new file mode 100644 index 0000000..2f0ffae --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/for-each-right.js @@ -0,0 +1,20 @@ +'use strict'; + +var toPosInt = require('../../number/to-pos-integer') + , callable = require('../../object/valid-callable') + , value = require('../../object/valid-value') + + , hasOwnProperty = Object.prototype.hasOwnProperty + , call = Function.prototype.call; + +module.exports = function (cb/*, thisArg*/) { + var i, self, thisArg; + + self = Object(value(this)); + callable(cb); + thisArg = arguments[1]; + + for (i = toPosInt(self.length); i >= 0; --i) { + if (hasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/group.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/group.js new file mode 100644 index 0000000..fbb178c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/group.js @@ -0,0 +1,23 @@ +// Inspired by Underscore's groupBy: +// http://documentcloud.github.com/underscore/#groupBy + +'use strict'; + +var callable = require('../../object/valid-callable') + , value = require('../../object/valid-value') + + , forEach = Array.prototype.forEach, apply = Function.prototype.apply; + +module.exports = function (cb/*, thisArg*/) { + var r; + + (value(this) && callable(cb)); + + r = {}; + forEach.call(this, function (v) { + var key = apply.call(cb, this, arguments); + if (!r.hasOwnProperty(key)) r[key] = []; + r[key].push(v); + }, arguments[1]); + return r; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/index.js new file mode 100644 index 0000000..97ef65c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/index.js @@ -0,0 +1,40 @@ +'use strict'; + +module.exports = { + '@@iterator': require('./@@iterator'), + binarySearch: require('./binary-search'), + clear: require('./clear'), + compact: require('./compact'), + concat: require('./concat'), + contains: require('./contains'), + copyWithin: require('./copy-within'), + diff: require('./diff'), + eIndexOf: require('./e-index-of'), + eLastIndexOf: require('./e-last-index-of'), + entries: require('./entries'), + exclusion: require('./exclusion'), + fill: require('./fill'), + filter: require('./filter'), + find: require('./find'), + findIndex: require('./find-index'), + first: require('./first'), + firstIndex: require('./first-index'), + flatten: require('./flatten'), + forEachRight: require('./for-each-right'), + keys: require('./keys'), + group: require('./group'), + indexesOf: require('./indexes-of'), + intersection: require('./intersection'), + isCopy: require('./is-copy'), + isUniq: require('./is-uniq'), + last: require('./last'), + lastIndex: require('./last-index'), + map: require('./map'), + remove: require('./remove'), + separate: require('./separate'), + slice: require('./slice'), + someRight: require('./some-right'), + splice: require('./splice'), + uniq: require('./uniq'), + values: require('./values') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/indexes-of.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/indexes-of.js new file mode 100644 index 0000000..6b89157 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/indexes-of.js @@ -0,0 +1,12 @@ +'use strict'; + +var indexOf = require('./e-index-of'); + +module.exports = function (value/*, fromIndex*/) { + var r = [], i, fromIndex = arguments[1]; + while ((i = indexOf.call(this, value, fromIndex)) !== -1) { + r.push(i); + fromIndex = i + 1; + } + return r; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/intersection.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/intersection.js new file mode 100644 index 0000000..fadcb52 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/intersection.js @@ -0,0 +1,19 @@ +'use strict'; + +var value = require('../../object/valid-value') + , contains = require('./contains') + , byLength = require('./_compare-by-length') + + , filter = Array.prototype.filter, push = Array.prototype.push + , slice = Array.prototype.slice; + +module.exports = function (/*…list*/) { + var lists; + if (!arguments.length) slice.call(this); + push.apply(lists = [this], arguments); + lists.forEach(value); + lists.sort(byLength); + return lists.reduce(function (a, b) { + return filter.call(a, function (x) { return contains.call(b, x); }); + }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-copy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-copy.js new file mode 100644 index 0000000..ac7c79b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-copy.js @@ -0,0 +1,21 @@ +'use strict'; + +var toPosInt = require('../../number/to-pos-integer') + , eq = require('../../object/eq') + , value = require('../../object/valid-value') + + , hasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (other) { + var i, l; + (value(this) && value(other)); + l = toPosInt(this.length); + if (l !== toPosInt(other.length)) return false; + for (i = 0; i < l; ++i) { + if (hasOwnProperty.call(this, i) !== hasOwnProperty.call(other, i)) { + return false; + } + if (!eq(this[i], other[i])) return false; + } + return true; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-uniq.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-uniq.js new file mode 100644 index 0000000..b14f461 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-uniq.js @@ -0,0 +1,12 @@ +'use strict'; + +var indexOf = require('./e-index-of') + + , every = Array.prototype.every + , isFirst; + +isFirst = function (value, index) { + return indexOf.call(this, value) === index; +}; + +module.exports = function () { return every.call(this, isFirst, this); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/implement.js new file mode 100644 index 0000000..e18e617 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'keys', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/index.js new file mode 100644 index 0000000..2f89cff --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? + Array.prototype.keys : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/is-implemented.js new file mode 100644 index 0000000..06bd87b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/is-implemented.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = function () { + var arr = [1, 'foo'], iterator, result; + if (typeof arr.keys !== 'function') return false; + iterator = arr.keys(); + if (!iterator) return false; + if (typeof iterator.next !== 'function') return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== 0) return false; + if (result.done !== false) return false; + return true; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/shim.js new file mode 100644 index 0000000..83773f6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/shim.js @@ -0,0 +1,4 @@ +'use strict'; + +var ArrayIterator = require('es6-iterator/array'); +module.exports = function () { return new ArrayIterator(this, 'key'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last-index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last-index.js new file mode 100644 index 0000000..a191d6e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last-index.js @@ -0,0 +1,16 @@ +'use strict'; + +var toPosInt = require('../../number/to-pos-integer') + , value = require('../../object/valid-value') + + , hasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var i, l; + if (!(l = toPosInt(value(this).length))) return null; + i = l - 1; + while (!hasOwnProperty.call(this, i)) { + if (--i === -1) return null; + } + return i; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last.js new file mode 100644 index 0000000..bf9d2f2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last.js @@ -0,0 +1,9 @@ +'use strict'; + +var lastIndex = require('./last-index'); + +module.exports = function () { + var i; + if ((i = lastIndex.call(this)) !== null) return this[i]; + return undefined; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/implement.js new file mode 100644 index 0000000..3aabb87 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'map', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/index.js new file mode 100644 index 0000000..66f6660 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? + Array.prototype.map : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/is-implemented.js new file mode 100644 index 0000000..c328b47 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +var identity = require('../../../function/identity') + , SubArray = require('../../_sub-array-dummy-safe'); + +module.exports = function () { + return (new SubArray()).map(identity) instanceof SubArray; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/shim.js new file mode 100644 index 0000000..2ee7313 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/shim.js @@ -0,0 +1,21 @@ +'use strict'; + +var isPlainArray = require('../../is-plain-array') + , callable = require('../../../object/valid-callable') + + , isArray = Array.isArray, map = Array.prototype.map + , forEach = Array.prototype.forEach, call = Function.prototype.call; + +module.exports = function (callbackFn/*, thisArg*/) { + var result, thisArg; + if (!this || !isArray(this) || isPlainArray(this)) { + return map.apply(this, arguments); + } + callable(callbackFn); + thisArg = arguments[1]; + result = new this.constructor(this.length); + forEach.call(this, function (val, i, self) { + result[i] = call.call(callbackFn, thisArg, val, i, self); + }); + return result; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/remove.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/remove.js new file mode 100644 index 0000000..dcf8433 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/remove.js @@ -0,0 +1,12 @@ +'use strict'; + +var indexOf = require('./e-index-of') + + , forEach = Array.prototype.forEach, splice = Array.prototype.splice; + +module.exports = function (item/*, …item*/) { + forEach.call(arguments, function (item) { + var index = indexOf.call(this, item); + if (index !== -1) splice.call(this, index, 1); + }, this); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/separate.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/separate.js new file mode 100644 index 0000000..dc974b8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/separate.js @@ -0,0 +1,10 @@ +'use strict'; + +var forEach = Array.prototype.forEach; + +module.exports = function (sep) { + var result = []; + forEach.call(this, function (val, i) { result.push(val, sep); }); + result.pop(); + return result; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/implement.js new file mode 100644 index 0000000..cd488a0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'slice', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/index.js new file mode 100644 index 0000000..72200ca --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Array.prototype.slice : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/is-implemented.js new file mode 100644 index 0000000..ec1985e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +var SubArray = require('../../_sub-array-dummy-safe'); + +module.exports = function () { + return (new SubArray()).slice() instanceof SubArray; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/shim.js new file mode 100644 index 0000000..2761a1a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/shim.js @@ -0,0 +1,35 @@ +'use strict'; + +var toInteger = require('../../../number/to-integer') + , toPosInt = require('../../../number/to-pos-integer') + , isPlainArray = require('../../is-plain-array') + + , isArray = Array.isArray, slice = Array.prototype.slice + , hasOwnProperty = Object.prototype.hasOwnProperty, max = Math.max; + +module.exports = function (start, end) { + var length, result, i; + if (!this || !isArray(this) || isPlainArray(this)) { + return slice.apply(this, arguments); + } + length = toPosInt(this.length); + start = toInteger(start); + if (start < 0) start = max(length + start, 0); + else if (start > length) start = length; + if (end === undefined) { + end = length; + } else { + end = toInteger(end); + if (end < 0) end = max(length + end, 0); + else if (end > length) end = length; + } + if (start > end) start = end; + result = new this.constructor(end - start); + i = 0; + while (start !== end) { + if (hasOwnProperty.call(this, start)) result[i] = this[start]; + ++i; + ++start; + } + return result; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/some-right.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/some-right.js new file mode 100644 index 0000000..de7460d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/some-right.js @@ -0,0 +1,22 @@ +'use strict'; + +var callable = require('../../object/valid-callable') + , value = require('../../object/valid-value') + + , hasOwnProperty = Object.prototype.hasOwnProperty + , call = Function.prototype.call; + +module.exports = function (cb/*, thisArg*/) { + var i, self, thisArg; + self = Object(value(this)); + callable(cb); + thisArg = arguments[1]; + + for (i = self.length; i >= 0; --i) { + if (hasOwnProperty.call(self, i) && + call.call(cb, thisArg, self[i], i, self)) { + return true; + } + } + return false; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/implement.js new file mode 100644 index 0000000..aab1f8e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'splice', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/index.js new file mode 100644 index 0000000..e8ecf3c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Array.prototype.splice : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/is-implemented.js new file mode 100644 index 0000000..ffddaa8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +var SubArray = require('../../_sub-array-dummy-safe'); + +module.exports = function () { + return (new SubArray()).splice(0) instanceof SubArray; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/shim.js new file mode 100644 index 0000000..a8505a2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var isPlainArray = require('../../is-plain-array') + + , isArray = Array.isArray, splice = Array.prototype.splice + , forEach = Array.prototype.forEach; + +module.exports = function (start, deleteCount/*, …items*/) { + var arr = splice.apply(this, arguments), result; + if (!this || !isArray(this) || isPlainArray(this)) return arr; + result = new this.constructor(arr.length); + forEach.call(arr, function (val, i) { result[i] = val; }); + return result; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/uniq.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/uniq.js new file mode 100644 index 0000000..db01465 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/uniq.js @@ -0,0 +1,13 @@ +'use strict'; + +var indexOf = require('./e-index-of') + + , filter = Array.prototype.filter + + , isFirst; + +isFirst = function (value, index) { + return indexOf.call(this, value) === index; +}; + +module.exports = function () { return filter.call(this, isFirst, this); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/implement.js new file mode 100644 index 0000000..237281f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array.prototype, 'values', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/index.js new file mode 100644 index 0000000..c0832c3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? Array.prototype.values : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/is-implemented.js new file mode 100644 index 0000000..cc0c629 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/is-implemented.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = function () { + var arr = ['foo', 1], iterator, result; + if (typeof arr.values !== 'function') return false; + iterator = arr.values(); + if (!iterator) return false; + if (typeof iterator.next !== 'function') return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== 'foo') return false; + if (result.done !== false) return false; + return true; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/shim.js new file mode 100644 index 0000000..f6555fd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/shim.js @@ -0,0 +1,4 @@ +'use strict'; + +var ArrayIterator = require('es6-iterator/array'); +module.exports = function () { return new ArrayIterator(this, 'value'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_is-extensible.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_is-extensible.js new file mode 100644 index 0000000..6123206 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_is-extensible.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = (function () { + var SubArray = require('./_sub-array-dummy'), arr; + + if (!SubArray) return false; + arr = new SubArray(); + if (!Array.isArray(arr)) return false; + if (!(arr instanceof SubArray)) return false; + + arr[34] = 'foo'; + return (arr.length === 35); +}()); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy-safe.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy-safe.js new file mode 100644 index 0000000..5baf8a8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy-safe.js @@ -0,0 +1,23 @@ +'use strict'; + +var setPrototypeOf = require('../object/set-prototype-of') + , isExtensible = require('./_is-extensible'); + +module.exports = (function () { + var SubArray; + + if (isExtensible) return require('./_sub-array-dummy'); + + if (!setPrototypeOf) return null; + SubArray = function () { + var arr = Array.apply(this, arguments); + setPrototypeOf(arr, SubArray.prototype); + return arr; + }; + setPrototypeOf(SubArray, Array); + SubArray.prototype = Object.create(Array.prototype, { + constructor: { value: SubArray, enumerable: false, writable: true, + configurable: true } + }); + return SubArray; +}()); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy.js new file mode 100644 index 0000000..a926d1a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy.js @@ -0,0 +1,16 @@ +'use strict'; + +var setPrototypeOf = require('../object/set-prototype-of'); + +module.exports = (function () { + var SubArray; + + if (!setPrototypeOf) return null; + SubArray = function () { Array.apply(this, arguments); }; + setPrototypeOf(SubArray, Array); + SubArray.prototype = Object.create(Array.prototype, { + constructor: { value: SubArray, enumerable: false, writable: true, + configurable: true } + }); + return SubArray; +}()); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/implement.js new file mode 100644 index 0000000..f3411b1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array, 'from', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/index.js new file mode 100644 index 0000000..3b99cda --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Array.from + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/is-implemented.js new file mode 100644 index 0000000..63ff2a5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/is-implemented.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function () { + var from = Array.from, arr, result; + if (typeof from !== 'function') return false; + arr = ['raz', 'dwa']; + result = from(arr); + return Boolean(result && (result !== arr) && (result[1] === 'dwa')); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/shim.js new file mode 100644 index 0000000..a90ba2f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/shim.js @@ -0,0 +1,106 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator + , isArguments = require('../../function/is-arguments') + , isFunction = require('../../function/is-function') + , toPosInt = require('../../number/to-pos-integer') + , callable = require('../../object/valid-callable') + , validValue = require('../../object/valid-value') + , isString = require('../../string/is-string') + + , isArray = Array.isArray, call = Function.prototype.call + , desc = { configurable: true, enumerable: true, writable: true, value: null } + , defineProperty = Object.defineProperty; + +module.exports = function (arrayLike/*, mapFn, thisArg*/) { + var mapFn = arguments[1], thisArg = arguments[2], Constructor, i, j, arr, l, code, iterator + , result, getIterator, value; + + arrayLike = Object(validValue(arrayLike)); + + if (mapFn != null) callable(mapFn); + if (!this || (this === Array) || !isFunction(this)) { + // Result: Plain array + if (!mapFn) { + if (isArguments(arrayLike)) { + // Source: Arguments + l = arrayLike.length; + if (l !== 1) return Array.apply(null, arrayLike); + arr = new Array(1); + arr[0] = arrayLike[0]; + return arr; + } + if (isArray(arrayLike)) { + // Source: Array + arr = new Array(l = arrayLike.length); + for (i = 0; i < l; ++i) arr[i] = arrayLike[i]; + return arr; + } + } + arr = []; + } else { + // Result: Non plain array + Constructor = this; + } + + if (!isArray(arrayLike)) { + if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) { + // Source: Iterator + iterator = callable(getIterator).call(arrayLike); + if (Constructor) arr = new Constructor(); + result = iterator.next(); + i = 0; + while (!result.done) { + value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value; + if (!Constructor) { + arr[i] = value; + } else { + desc.value = value; + defineProperty(arr, i, desc); + } + result = iterator.next(); + ++i; + } + l = i; + } else if (isString(arrayLike)) { + // Source: String + l = arrayLike.length; + if (Constructor) arr = new Constructor(); + for (i = 0, j = 0; i < l; ++i) { + value = arrayLike[i]; + if ((i + 1) < l) { + code = value.charCodeAt(0); + if ((code >= 0xD800) && (code <= 0xDBFF)) value += arrayLike[++i]; + } + value = mapFn ? call.call(mapFn, thisArg, value, j) : value; + if (!Constructor) { + arr[j] = value; + } else { + desc.value = value; + defineProperty(arr, j, desc); + } + ++j; + } + l = j; + } + } + if (l === undefined) { + // Source: array or array-like + l = toPosInt(arrayLike.length); + if (Constructor) arr = new Constructor(l); + for (i = 0; i < l; ++i) { + value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i]; + if (!Constructor) { + arr[i] = value; + } else { + desc.value = value; + defineProperty(arr, i, desc); + } + } + } + if (Constructor) { + desc.value = null; + arr.length = l; + } + return arr; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/generate.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/generate.js new file mode 100644 index 0000000..5e06675 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/generate.js @@ -0,0 +1,20 @@ +'use strict'; + +var toPosInt = require('../number/to-pos-integer') + , value = require('../object/valid-value') + + , slice = Array.prototype.slice; + +module.exports = function (length/*, …fill*/) { + var arr, l; + length = toPosInt(value(length)); + if (length === 0) return []; + + arr = (arguments.length < 2) ? [undefined] : + slice.call(arguments, 1, 1 + length); + + while ((l = arr.length) < length) { + arr = arr.concat(arr.slice(0, length - l)); + } + return arr; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/index.js new file mode 100644 index 0000000..7a68678 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/index.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = { + '#': require('./#'), + from: require('./from'), + generate: require('./generate'), + isPlainArray: require('./is-plain-array'), + of: require('./of'), + toArray: require('./to-array'), + validArray: require('./valid-array') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/is-plain-array.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/is-plain-array.js new file mode 100644 index 0000000..6b37e40 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/is-plain-array.js @@ -0,0 +1,11 @@ +'use strict'; + +var isArray = Array.isArray, getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (obj) { + var proto; + if (!obj || !isArray(obj)) return false; + proto = getPrototypeOf(obj); + if (!isArray(proto)) return false; + return !isArray(getPrototypeOf(proto)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/implement.js new file mode 100644 index 0000000..bf2a5a5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Array, 'of', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/index.js new file mode 100644 index 0000000..07ee54d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Array.of + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/is-implemented.js new file mode 100644 index 0000000..4390a10 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function () { + var of = Array.of, result; + if (typeof of !== 'function') return false; + result = of('foo', 'bar'); + return Boolean(result && (result[1] === 'bar')); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/shim.js new file mode 100644 index 0000000..de72bc9 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/shim.js @@ -0,0 +1,19 @@ +'use strict'; + +var isFunction = require('../../function/is-function') + + , slice = Array.prototype.slice, defineProperty = Object.defineProperty + , desc = { configurable: true, enumerable: true, writable: true, value: null }; + +module.exports = function (/*…items*/) { + var result, i, l; + if (!this || (this === Array) || !isFunction(this)) return slice.call(arguments); + result = new this(l = arguments.length); + for (i = 0; i < l; ++i) { + desc.value = arguments[i]; + defineProperty(result, i, desc); + } + desc.value = null; + result.length = l; + return result; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/to-array.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/to-array.js new file mode 100644 index 0000000..ce908dd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/to-array.js @@ -0,0 +1,9 @@ +'use strict'; + +var from = require('./from') + + , isArray = Array.isArray; + +module.exports = function (arrayLike) { + return isArray(arrayLike) ? arrayLike : from(arrayLike); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/valid-array.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/valid-array.js new file mode 100644 index 0000000..d86a8f5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/valid-array.js @@ -0,0 +1,8 @@ +'use strict'; + +var isArray = Array.isArray; + +module.exports = function (value) { + if (isArray(value)) return value; + throw new TypeError(value + " is not an array"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/boolean/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/boolean/index.js new file mode 100644 index 0000000..c193b94 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/boolean/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + isBoolean: require('./is-boolean') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/boolean/is-boolean.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/boolean/is-boolean.js new file mode 100644 index 0000000..5d1a802 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/boolean/is-boolean.js @@ -0,0 +1,10 @@ +'use strict'; + +var toString = Object.prototype.toString + + , id = toString.call(true); + +module.exports = function (x) { + return (typeof x === 'boolean') || ((typeof x === 'object') && + ((x instanceof Boolean) || (toString.call(x) === id))); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/copy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/copy.js new file mode 100644 index 0000000..69e2eb0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/copy.js @@ -0,0 +1,5 @@ +'use strict'; + +var getTime = Date.prototype.getTime; + +module.exports = function () { return new Date(getTime.call(this)); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/days-in-month.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/days-in-month.js new file mode 100644 index 0000000..e780efe --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/days-in-month.js @@ -0,0 +1,17 @@ +'use strict'; + +var getMonth = Date.prototype.getMonth; + +module.exports = function () { + switch (getMonth.call(this)) { + case 1: + return this.getFullYear() % 4 ? 28 : 29; + case 3: + case 5: + case 8: + case 10: + return 30; + default: + return 31; + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-day.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-day.js new file mode 100644 index 0000000..0c9eb8b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-day.js @@ -0,0 +1,8 @@ +'use strict'; + +var setHours = Date.prototype.setHours; + +module.exports = function () { + setHours.call(this, 0, 0, 0, 0); + return this; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-month.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-month.js new file mode 100644 index 0000000..7328c25 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-month.js @@ -0,0 +1,8 @@ +'use strict'; + +var floorDay = require('./floor-day'); + +module.exports = function () { + floorDay.call(this).setDate(1); + return this; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-year.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-year.js new file mode 100644 index 0000000..9c50853 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-year.js @@ -0,0 +1,8 @@ +'use strict'; + +var floorMonth = require('./floor-month'); + +module.exports = function () { + floorMonth.call(this).setMonth(0); + return this; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/format.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/format.js new file mode 100644 index 0000000..15bd95f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/format.js @@ -0,0 +1,21 @@ +'use strict'; + +var pad = require('../../number/#/pad') + , date = require('../valid-date') + + , format; + +format = require('../../string/format-method')({ + Y: function () { return String(this.getFullYear()); }, + y: function () { return String(this.getFullYear()).slice(-2); }, + m: function () { return pad.call(this.getMonth() + 1, 2); }, + d: function () { return pad.call(this.getDate(), 2); }, + H: function () { return pad.call(this.getHours(), 2); }, + M: function () { return pad.call(this.getMinutes(), 2); }, + S: function () { return pad.call(this.getSeconds(), 2); }, + L: function () { return pad.call(this.getMilliseconds(), 3); } +}); + +module.exports = function (pattern) { + return format.call(date(this), pattern); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/index.js new file mode 100644 index 0000000..f71b295 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + copy: require('./copy'), + daysInMonth: require('./days-in-month'), + floorDay: require('./floor-day'), + floorMonth: require('./floor-month'), + floorYear: require('./floor-year'), + format: require('./format') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/index.js new file mode 100644 index 0000000..eac33fb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/index.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = { + '#': require('./#'), + isDate: require('./is-date'), + validDate: require('./valid-date') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/is-date.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/is-date.js new file mode 100644 index 0000000..6ba236e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/is-date.js @@ -0,0 +1,9 @@ +'use strict'; + +var toString = Object.prototype.toString + + , id = toString.call(new Date()); + +module.exports = function (x) { + return (x && ((x instanceof Date) || (toString.call(x) === id))) || false; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/valid-date.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/valid-date.js new file mode 100644 index 0000000..7d1a9b6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/valid-date.js @@ -0,0 +1,8 @@ +'use strict'; + +var isDate = require('./is-date'); + +module.exports = function (x) { + if (!isDate(x)) throw new TypeError(x + " is not a Date object"); + return x; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/#/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/#/index.js new file mode 100644 index 0000000..b984aa9 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/#/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + throw: require('./throw') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/#/throw.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/#/throw.js new file mode 100644 index 0000000..7e15ebd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/#/throw.js @@ -0,0 +1,5 @@ +'use strict'; + +var error = require('../valid-error'); + +module.exports = function () { throw error(this); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/custom.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/custom.js new file mode 100644 index 0000000..bbc2dc2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/custom.js @@ -0,0 +1,20 @@ +'use strict'; + +var assign = require('../object/assign') + + , captureStackTrace = Error.captureStackTrace; + +exports = module.exports = function (message/*, code, ext*/) { + var err = new Error(), code = arguments[1], ext = arguments[2]; + if (ext == null) { + if (code && (typeof code === 'object')) { + ext = code; + code = null; + } + } + if (ext != null) assign(err, ext); + err.message = String(message); + if (code != null) err.code = String(code); + if (captureStackTrace) captureStackTrace(err, exports); + return err; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/index.js new file mode 100644 index 0000000..62984b5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/index.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = { + '#': require('./#'), + custom: require('./custom'), + isError: require('./is-error'), + validError: require('./valid-error') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/is-error.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/is-error.js new file mode 100644 index 0000000..422705f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/is-error.js @@ -0,0 +1,9 @@ +'use strict'; + +var toString = Object.prototype.toString + + , id = toString.call(new Error()); + +module.exports = function (x) { + return (x && ((x instanceof Error) || (toString.call(x)) === id)) || false; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/valid-error.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/valid-error.js new file mode 100644 index 0000000..0bef768 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/valid-error.js @@ -0,0 +1,8 @@ +'use strict'; + +var isError = require('./is-error'); + +module.exports = function (x) { + if (!isError(x)) throw new TypeError(x + " is not an Error object"); + return x; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/compose.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/compose.js new file mode 100644 index 0000000..1da5e01 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/compose.js @@ -0,0 +1,20 @@ +'use strict'; + +var callable = require('../../object/valid-callable') + , aFrom = require('../../array/from') + + , apply = Function.prototype.apply, call = Function.prototype.call + , callFn = function (arg, fn) { return call.call(fn, this, arg); }; + +module.exports = function (fn/*, …fnn*/) { + var fns, first; + if (!fn) callable(fn); + fns = [this].concat(aFrom(arguments)); + fns.forEach(callable); + fns = fns.reverse(); + first = fns[0]; + fns = fns.slice(1); + return function (arg) { + return fns.reduce(callFn, apply.call(first, this, arguments)); + }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/copy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/copy.js new file mode 100644 index 0000000..e1467f7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/copy.js @@ -0,0 +1,15 @@ +'use strict'; + +var mixin = require('../../object/mixin') + , validFunction = require('../valid-function') + + , re = /^\s*function\s*([\0-'\)-\uffff]+)*\s*\(([\0-\(\*-\uffff]*)\)\s*\{/; + +module.exports = function () { + var match = String(validFunction(this)).match(re), fn; + + fn = new Function('fn', 'return function ' + match[1].trim() + '(' + + match[2] + ') { return fn.apply(this, arguments); };')(this); + try { mixin(fn, this); } catch (ignore) {} + return fn; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/curry.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/curry.js new file mode 100644 index 0000000..943d6fa --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/curry.js @@ -0,0 +1,24 @@ +'use strict'; + +var toPosInt = require('../../number/to-pos-integer') + , callable = require('../../object/valid-callable') + , defineLength = require('../_define-length') + + , slice = Array.prototype.slice, apply = Function.prototype.apply + , curry; + +curry = function self(fn, length, preArgs) { + return defineLength(function () { + var args = preArgs ? + preArgs.concat(slice.call(arguments, 0, length - preArgs.length)) : + slice.call(arguments, 0, length); + return (args.length === length) ? apply.call(fn, this, args) : + self(fn, length, args); + }, preArgs ? (length - preArgs.length) : length); +}; + +module.exports = function (/*length*/) { + var length = arguments[0]; + return curry(callable(this), + isNaN(length) ? toPosInt(this.length) : toPosInt(length)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/index.js new file mode 100644 index 0000000..8d0da00 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/index.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = { + compose: require('./compose'), + copy: require('./copy'), + curry: require('./curry'), + lock: require('./lock'), + not: require('./not'), + partial: require('./partial'), + spread: require('./spread'), + toStringTokens: require('./to-string-tokens') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/lock.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/lock.js new file mode 100644 index 0000000..91e1a65 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/lock.js @@ -0,0 +1,12 @@ +'use strict'; + +var callable = require('../../object/valid-callable') + + , apply = Function.prototype.apply; + +module.exports = function (/*…args*/) { + var fn = callable(this) + , args = arguments; + + return function () { return apply.call(fn, this, args); }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/not.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/not.js new file mode 100644 index 0000000..c6dbe97 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/not.js @@ -0,0 +1,14 @@ +'use strict'; + +var callable = require('../../object/valid-callable') + , defineLength = require('../_define-length') + + , apply = Function.prototype.apply; + +module.exports = function () { + var fn = callable(this); + + return defineLength(function () { + return !apply.call(fn, this, arguments); + }, fn.length); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/partial.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/partial.js new file mode 100644 index 0000000..bf31a35 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/partial.js @@ -0,0 +1,16 @@ +'use strict'; + +var callable = require('../../object/valid-callable') + , aFrom = require('../../array/from') + , defineLength = require('../_define-length') + + , apply = Function.prototype.apply; + +module.exports = function (/*…args*/) { + var fn = callable(this) + , args = aFrom(arguments); + + return defineLength(function () { + return apply.call(fn, this, args.concat(aFrom(arguments))); + }, fn.length - args.length); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/spread.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/spread.js new file mode 100644 index 0000000..d7c93b7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/spread.js @@ -0,0 +1,10 @@ +'use strict'; + +var callable = require('../../object/valid-callable') + + , apply = Function.prototype.apply; + +module.exports = function () { + var fn = callable(this); + return function (args) { return apply.call(fn, this, args); }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/to-string-tokens.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/to-string-tokens.js new file mode 100644 index 0000000..67afeae --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/to-string-tokens.js @@ -0,0 +1,11 @@ +'use strict'; + +var validFunction = require('../valid-function') + + , re = new RegExp('^\\s*function[\\0-\'\\)-\\uffff]*' + + '\\(([\\0-\\(\\*-\\uffff]*)\\)\\s*\\{([\\0-\\uffff]*)\\}\\s*$'); + +module.exports = function () { + var data = String(validFunction(this)).match(re); + return { args: data[1], body: data[2] }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/_define-length.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/_define-length.js new file mode 100644 index 0000000..496ea62 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/_define-length.js @@ -0,0 +1,44 @@ +'use strict'; + +var toPosInt = require('../number/to-pos-integer') + + , test = function (a, b) {}, desc, defineProperty + , generate, mixin; + +try { + Object.defineProperty(test, 'length', { configurable: true, writable: false, + enumerable: false, value: 1 }); +} catch (ignore) {} + +if (test.length === 1) { + // ES6 + desc = { configurable: true, writable: false, enumerable: false }; + defineProperty = Object.defineProperty; + module.exports = function (fn, length) { + length = toPosInt(length); + if (fn.length === length) return fn; + desc.value = length; + return defineProperty(fn, 'length', desc); + }; +} else { + mixin = require('../object/mixin'); + generate = (function () { + var cache = []; + return function (l) { + var args, i = 0; + if (cache[l]) return cache[l]; + args = []; + while (l--) args.push('a' + (++i).toString(36)); + return new Function('fn', 'return function (' + args.join(', ') + + ') { return fn.apply(this, arguments); };'); + }; + }()); + module.exports = function (src, length) { + var target; + length = toPosInt(length); + if (src.length === length) return src; + target = generate(length)(src); + try { mixin(target, src); } catch (ignore) {} + return target; + }; +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/constant.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/constant.js new file mode 100644 index 0000000..10f1e20 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/constant.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (x) { + return function () { return x; }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/identity.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/identity.js new file mode 100644 index 0000000..a9289f0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/identity.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (x) { return x; }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/index.js new file mode 100644 index 0000000..cfad3f3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/index.js @@ -0,0 +1,15 @@ +// Export all modules. + +'use strict'; + +module.exports = { + '#': require('./#'), + constant: require('./constant'), + identity: require('./identity'), + invoke: require('./invoke'), + isArguments: require('./is-arguments'), + isFunction: require('./is-function'), + noop: require('./noop'), + pluck: require('./pluck'), + validFunction: require('./valid-function') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/invoke.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/invoke.js new file mode 100644 index 0000000..9195afd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/invoke.js @@ -0,0 +1,15 @@ +'use strict'; + +var isCallable = require('../object/is-callable') + , value = require('../object/valid-value') + + , slice = Array.prototype.slice, apply = Function.prototype.apply; + +module.exports = function (name/*, …args*/) { + var args = slice.call(arguments, 1), isFn = isCallable(name); + return function (obj) { + value(obj); + return apply.call(isFn ? name : obj[name], obj, + args.concat(slice.call(arguments, 1))); + }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/is-arguments.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/is-arguments.js new file mode 100644 index 0000000..9a29855 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/is-arguments.js @@ -0,0 +1,7 @@ +'use strict'; + +var toString = Object.prototype.toString + + , id = toString.call((function () { return arguments; }())); + +module.exports = function (x) { return (toString.call(x) === id); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/is-function.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/is-function.js new file mode 100644 index 0000000..ab4399c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/is-function.js @@ -0,0 +1,9 @@ +'use strict'; + +var toString = Object.prototype.toString + + , id = toString.call(require('./noop')); + +module.exports = function (f) { + return (typeof f === "function") && (toString.call(f) === id); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/noop.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/noop.js new file mode 100644 index 0000000..aa43bae --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/noop.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function () {}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/pluck.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/pluck.js new file mode 100644 index 0000000..7f70a30 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/pluck.js @@ -0,0 +1,7 @@ +'use strict'; + +var value = require('../object/valid-value'); + +module.exports = function (name) { + return function (o) { return value(o)[name]; }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/valid-function.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/valid-function.js new file mode 100644 index 0000000..05fdee2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/valid-function.js @@ -0,0 +1,8 @@ +'use strict'; + +var isFunction = require('./is-function'); + +module.exports = function (x) { + if (!isFunction(x)) throw new TypeError(x + " is not a function"); + return x; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/global.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/global.js new file mode 100644 index 0000000..872a40e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/global.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = new Function("return this")(); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/index.js new file mode 100644 index 0000000..db9a760 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/index.js @@ -0,0 +1,17 @@ +'use strict'; + +module.exports = { + global: require('./global'), + + array: require('./array'), + boolean: require('./boolean'), + date: require('./date'), + error: require('./error'), + function: require('./function'), + iterable: require('./iterable'), + math: require('./math'), + number: require('./number'), + object: require('./object'), + regExp: require('./reg-exp'), + string: require('./string') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/for-each.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/for-each.js new file mode 100644 index 0000000..f1e2042 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/for-each.js @@ -0,0 +1,12 @@ +'use strict'; + +var forOf = require('es6-iterator/for-of') + , isIterable = require('es6-iterator/is-iterable') + , iterable = require('./validate') + + , forEach = Array.prototype.forEach; + +module.exports = function (target, cb/*, thisArg*/) { + if (isIterable(iterable(target))) forOf(target, cb, arguments[2]); + else forEach.call(target, cb, arguments[2]); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/index.js new file mode 100644 index 0000000..a3e16a5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/index.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = { + forEach: require('./for-each'), + is: require('./is'), + validate: require('./validate'), + validateObject: require('./validate-object') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/is.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/is.js new file mode 100644 index 0000000..bb8bf28 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/is.js @@ -0,0 +1,10 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator + , isArrayLike = require('../object/is-array-like'); + +module.exports = function (x) { + if (x == null) return false; + if (typeof x[iteratorSymbol] === 'function') return true; + return isArrayLike(x); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate-object.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate-object.js new file mode 100644 index 0000000..988a6ad --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate-object.js @@ -0,0 +1,9 @@ +'use strict'; + +var isObject = require('../object/is-object') + , is = require('./is'); + +module.exports = function (x) { + if (is(x) && isObject(x)) return x; + throw new TypeError(x + " is not an iterable or array-like object"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate.js new file mode 100644 index 0000000..1be6d7f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate.js @@ -0,0 +1,8 @@ +'use strict'; + +var is = require('./is'); + +module.exports = function (x) { + if (is(x)) return x; + throw new TypeError(x + " is not an iterable or array-like"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/_pack-ieee754.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/_pack-ieee754.js new file mode 100644 index 0000000..eecda56 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/_pack-ieee754.js @@ -0,0 +1,82 @@ +// Credit: https://github.com/paulmillr/es6-shim/ + +'use strict'; + +var abs = Math.abs, floor = Math.floor, log = Math.log, min = Math.min + , pow = Math.pow, LN2 = Math.LN2 + , roundToEven; + +roundToEven = function (n) { + var w = floor(n), f = n - w; + if (f < 0.5) return w; + if (f > 0.5) return w + 1; + return w % 2 ? w + 1 : w; +}; + +module.exports = function (v, ebits, fbits) { + var bias = (1 << (ebits - 1)) - 1, s, e, f, i, bits, str, bytes; + + // Compute sign, exponent, fraction + if (isNaN(v)) { + // NaN + // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping + e = (1 << ebits) - 1; + f = pow(2, fbits - 1); + s = 0; + } else if (v === Infinity || v === -Infinity) { + e = (1 << ebits) - 1; + f = 0; + s = (v < 0) ? 1 : 0; + } else if (v === 0) { + e = 0; + f = 0; + s = (1 / v === -Infinity) ? 1 : 0; + } else { + s = v < 0; + v = abs(v); + + if (v >= pow(2, 1 - bias)) { + e = min(floor(log(v) / LN2), 1023); + f = roundToEven(v / pow(2, e) * pow(2, fbits)); + if (f / pow(2, fbits) >= 2) { + e = e + 1; + f = 1; + } + if (e > bias) { + // Overflow + e = (1 << ebits) - 1; + f = 0; + } else { + // Normal + e = e + bias; + f = f - pow(2, fbits); + } + } else { + // Subnormal + e = 0; + f = roundToEven(v / pow(2, 1 - bias - fbits)); + } + } + + // Pack sign, exponent, fraction + bits = []; + for (i = fbits; i; i -= 1) { + bits.push(f % 2 ? 1 : 0); + f = floor(f / 2); + } + for (i = ebits; i; i -= 1) { + bits.push(e % 2 ? 1 : 0); + e = floor(e / 2); + } + bits.push(s ? 1 : 0); + bits.reverse(); + str = bits.join(''); + + // Bits to bytes + bytes = []; + while (str.length) { + bytes.push(parseInt(str.substring(0, 8), 2)); + str = str.substring(8); + } + return bytes; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/_unpack-ieee754.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/_unpack-ieee754.js new file mode 100644 index 0000000..c9f26f2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/_unpack-ieee754.js @@ -0,0 +1,33 @@ +// Credit: https://github.com/paulmillr/es6-shim/ + +'use strict'; + +var pow = Math.pow; + +module.exports = function (bytes, ebits, fbits) { + // Bytes to bits + var bits = [], i, j, b, str, + bias, s, e, f; + + for (i = bytes.length; i; i -= 1) { + b = bytes[i - 1]; + for (j = 8; j; j -= 1) { + bits.push(b % 2 ? 1 : 0); + b = b >> 1; + } + } + bits.reverse(); + str = bits.join(''); + + // Unpack sign, exponent, fraction + bias = (1 << (ebits - 1)) - 1; + s = parseInt(str.substring(0, 1), 2) ? -1 : 1; + e = parseInt(str.substring(1, 1 + ebits), 2); + f = parseInt(str.substring(1 + ebits), 2); + + // Produce number + if (e === (1 << ebits) - 1) return f !== 0 ? NaN : s * Infinity; + if (e > 0) return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); + if (f !== 0) return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); + return s < 0 ? -0 : 0; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/implement.js new file mode 100644 index 0000000..f48ad11 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'acosh', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/index.js new file mode 100644 index 0000000..00ddea6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.acosh + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/is-implemented.js new file mode 100644 index 0000000..363f0d8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var acosh = Math.acosh; + if (typeof acosh !== 'function') return false; + return acosh(2) === 1.3169578969248166; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/shim.js new file mode 100644 index 0000000..89a24b5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/shim.js @@ -0,0 +1,12 @@ +'use strict'; + +var log = Math.log, sqrt = Math.sqrt; + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x < 1) return NaN; + if (x === 1) return 0; + if (x === Infinity) return x; + return log(x + sqrt(x * x - 1)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/implement.js new file mode 100644 index 0000000..21f64d5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'asinh', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/index.js new file mode 100644 index 0000000..d415144 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.asinh + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/is-implemented.js new file mode 100644 index 0000000..6c205f4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var asinh = Math.asinh; + if (typeof asinh !== 'function') return false; + return asinh(2) === 1.4436354751788103; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/shim.js new file mode 100644 index 0000000..42fbf14 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/shim.js @@ -0,0 +1,15 @@ +'use strict'; + +var log = Math.log, sqrt = Math.sqrt; + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x === 0) return x; + if (!isFinite(x)) return x; + if (x < 0) { + x = -x; + return -log(x + sqrt(x * x + 1)); + } + return log(x + sqrt(x * x + 1)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/implement.js new file mode 100644 index 0000000..1a48513 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'atanh', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/index.js new file mode 100644 index 0000000..785b3de --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.atanh + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/is-implemented.js new file mode 100644 index 0000000..dbaf18e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var atanh = Math.atanh; + if (typeof atanh !== 'function') return false; + return atanh(0.5) === 0.5493061443340549; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/shim.js new file mode 100644 index 0000000..531e289 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var log = Math.log; + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x < -1) return NaN; + if (x > 1) return NaN; + if (x === -1) return -Infinity; + if (x === 1) return Infinity; + if (x === 0) return x; + return 0.5 * log((1 + x) / (1 - x)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/implement.js new file mode 100644 index 0000000..3a12dde --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'cbrt', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/index.js new file mode 100644 index 0000000..89f966d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.cbrt + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/is-implemented.js new file mode 100644 index 0000000..69809f3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var cbrt = Math.cbrt; + if (typeof cbrt !== 'function') return false; + return cbrt(2) === 1.2599210498948732; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/shim.js new file mode 100644 index 0000000..bca1960 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/shim.js @@ -0,0 +1,12 @@ +'use strict'; + +var pow = Math.pow; + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x === 0) return x; + if (!isFinite(x)) return x; + if (x < 0) return -pow(-x, 1 / 3); + return pow(x, 1 / 3); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/implement.js new file mode 100644 index 0000000..339df33 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'clz32', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/index.js new file mode 100644 index 0000000..1687b33 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.clz32 + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/is-implemented.js new file mode 100644 index 0000000..ccc8f71 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var clz32 = Math.clz32; + if (typeof clz32 !== 'function') return false; + return clz32(1000) === 22; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/shim.js new file mode 100644 index 0000000..2a582da --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/shim.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (value) { + value = value >>> 0; + return value ? 32 - value.toString(2).length : 32; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/implement.js new file mode 100644 index 0000000..f90d830 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'cosh', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/index.js new file mode 100644 index 0000000..000636a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.cosh + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/is-implemented.js new file mode 100644 index 0000000..c796bcb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var cosh = Math.cosh; + if (typeof cosh !== 'function') return false; + return cosh(1) === 1.5430806348152437; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/shim.js new file mode 100644 index 0000000..f9062bd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/shim.js @@ -0,0 +1,11 @@ +'use strict'; + +var exp = Math.exp; + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x === 0) return 1; + if (!isFinite(x)) return Infinity; + return (exp(x) + exp(-x)) / 2; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/implement.js new file mode 100644 index 0000000..fc20c8c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'expm1', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/index.js new file mode 100644 index 0000000..4c1bc77 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.expm1 + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/is-implemented.js new file mode 100644 index 0000000..3b106d5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var expm1 = Math.expm1; + if (typeof expm1 !== 'function') return false; + return expm1(1).toFixed(15) === '1.718281828459045'; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/shim.js new file mode 100644 index 0000000..9c8c236 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/shim.js @@ -0,0 +1,16 @@ +// Thanks: https://github.com/monolithed/ECMAScript-6 + +'use strict'; + +var exp = Math.exp; + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x === 0) return x; + if (x === Infinity) return Infinity; + if (x === -Infinity) return -1; + + if ((x > -1.0e-6) && (x < 1.0e-6)) return x + x * x / 2; + return exp(x) - 1; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/implement.js new file mode 100644 index 0000000..c55b26c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'fround', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/index.js new file mode 100644 index 0000000..a077ed0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.fround + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/is-implemented.js new file mode 100644 index 0000000..ffbf094 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var fround = Math.fround; + if (typeof fround !== 'function') return false; + return fround(1.337) === 1.3370000123977661; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/shim.js new file mode 100644 index 0000000..f2c86e4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/shim.js @@ -0,0 +1,33 @@ +// Credit: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js + +'use strict'; + +var toFloat32; + +if (typeof Float32Array !== 'undefined') { + toFloat32 = (function () { + var float32Array = new Float32Array(1); + return function (x) { + float32Array[0] = x; + return float32Array[0]; + }; + }()); +} else { + toFloat32 = (function () { + var pack = require('../_pack-ieee754') + , unpack = require('../_unpack-ieee754'); + + return function (x) { + return unpack(pack(x, 8, 23), 8, 23); + }; + }()); +} + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x === 0) return x; + if (!isFinite(x)) return x; + + return toFloat32(x); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/implement.js new file mode 100644 index 0000000..b27fda7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'hypot', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/index.js new file mode 100644 index 0000000..334bc58 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.hypot + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/is-implemented.js new file mode 100644 index 0000000..e75c5d3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var hypot = Math.hypot; + if (typeof hypot !== 'function') return false; + return hypot(3, 4) === 5; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/shim.js new file mode 100644 index 0000000..3d0988b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/shim.js @@ -0,0 +1,34 @@ +// Thanks for hints: https://github.com/paulmillr/es6-shim + +'use strict'; + +var some = Array.prototype.some, abs = Math.abs, sqrt = Math.sqrt + + , compare = function (a, b) { return b - a; } + , divide = function (x) { return x / this; } + , add = function (sum, number) { return sum + number * number; }; + +module.exports = function (val1, val2/*, …valn*/) { + var result, numbers; + if (!arguments.length) return 0; + some.call(arguments, function (val) { + if (isNaN(val)) { + result = NaN; + return; + } + if (!isFinite(val)) { + result = Infinity; + return true; + } + if (result !== undefined) return; + val = Number(val); + if (val === 0) return; + if (!numbers) numbers = [abs(val)]; + else numbers.push(abs(val)); + }); + if (result !== undefined) return result; + if (!numbers) return 0; + + numbers.sort(compare); + return numbers[0] * sqrt(numbers.map(divide, numbers[0]).reduce(add, 0)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/implement.js new file mode 100644 index 0000000..ed207bd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'imul', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/index.js new file mode 100644 index 0000000..41e5d5f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.imul + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/is-implemented.js new file mode 100644 index 0000000..d8495de --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var imul = Math.imul; + if (typeof imul !== 'function') return false; + return imul(-1, 8) === -8; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/shim.js new file mode 100644 index 0000000..8fd8a8d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/shim.js @@ -0,0 +1,13 @@ +// Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference +// /Global_Objects/Math/imul + +'use strict'; + +module.exports = function (x, y) { + var xh = (x >>> 16) & 0xffff, xl = x & 0xffff + , yh = (y >>> 16) & 0xffff, yl = y & 0xffff; + + // the shift by 0 fixes the sign on the high part + // the final |0 converts the unsigned value into a signed value + return ((xl * yl) + (((xh * yl + xl * yh) << 16) >>> 0) | 0); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/index.js new file mode 100644 index 0000000..d112d0b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/index.js @@ -0,0 +1,21 @@ +'use strict'; + +module.exports = { + acosh: require('./acosh'), + asinh: require('./asinh'), + atanh: require('./atanh'), + cbrt: require('./cbrt'), + clz32: require('./clz32'), + cosh: require('./cosh'), + expm1: require('./expm1'), + fround: require('./fround'), + hypot: require('./hypot'), + imul: require('./imul'), + log10: require('./log10'), + log2: require('./log2'), + log1p: require('./log1p'), + sign: require('./sign'), + sinh: require('./sinh'), + tanh: require('./tanh'), + trunc: require('./trunc') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/implement.js new file mode 100644 index 0000000..dd96edd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'log10', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/index.js new file mode 100644 index 0000000..a9eee51 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.log10 + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/is-implemented.js new file mode 100644 index 0000000..c7f40ee --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var log10 = Math.log10; + if (typeof log10 !== 'function') return false; + return log10(2) === 0.3010299956639812; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/shim.js new file mode 100644 index 0000000..fc77287 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var log = Math.log, LOG10E = Math.LOG10E; + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x < 0) return NaN; + if (x === 0) return -Infinity; + if (x === 1) return 0; + if (x === Infinity) return Infinity; + + return log(x) * LOG10E; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/implement.js new file mode 100644 index 0000000..f62f91f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'log1p', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/index.js new file mode 100644 index 0000000..107b114 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.log1p + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/is-implemented.js new file mode 100644 index 0000000..61e9097 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var log1p = Math.log1p; + if (typeof log1p !== 'function') return false; + return log1p(1) === 0.6931471805599453; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/shim.js new file mode 100644 index 0000000..10acebc --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/shim.js @@ -0,0 +1,17 @@ +// Thanks: https://github.com/monolithed/ECMAScript-6/blob/master/ES6.js + +'use strict'; + +var log = Math.log; + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x < -1) return NaN; + if (x === -1) return -Infinity; + if (x === 0) return x; + if (x === Infinity) return Infinity; + + if (x > -1.0e-8 && x < 1.0e-8) return (x - x * x / 2); + return log(1 + x); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/implement.js new file mode 100644 index 0000000..8483f09 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'log2', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/index.js new file mode 100644 index 0000000..87e9050 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.log2 + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/is-implemented.js new file mode 100644 index 0000000..802322f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var log2 = Math.log2; + if (typeof log2 !== 'function') return false; + return log2(3).toFixed(15) === '1.584962500721156'; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/shim.js new file mode 100644 index 0000000..cd80994 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var log = Math.log, LOG2E = Math.LOG2E; + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x < 0) return NaN; + if (x === 0) return -Infinity; + if (x === 1) return 0; + if (x === Infinity) return Infinity; + + return log(x) * LOG2E; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/implement.js new file mode 100644 index 0000000..b0db2f4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'sign', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/index.js new file mode 100644 index 0000000..b232633 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.sign + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/is-implemented.js new file mode 100644 index 0000000..6d0de47 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var sign = Math.sign; + if (typeof sign !== 'function') return false; + return ((sign(10) === 1) && (sign(-20) === -1)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/shim.js new file mode 100644 index 0000000..4df9c95 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/shim.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function (value) { + value = Number(value); + if (isNaN(value) || (value === 0)) return value; + return (value > 0) ? 1 : -1; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/implement.js new file mode 100644 index 0000000..f259a63 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'sinh', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/index.js new file mode 100644 index 0000000..e5bea57 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.sinh + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/is-implemented.js new file mode 100644 index 0000000..888ec67 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var sinh = Math.sinh; + if (typeof sinh !== 'function') return false; + return ((sinh(1) === 1.1752011936438014) && (sinh(Number.MIN_VALUE) === 5e-324)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/shim.js new file mode 100644 index 0000000..5b725be --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/shim.js @@ -0,0 +1,17 @@ +// Parts of implementation taken from es6-shim project +// See: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js + +'use strict'; + +var expm1 = require('../expm1') + + , abs = Math.abs, exp = Math.exp, e = Math.E; + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x === 0) return x; + if (!isFinite(x)) return x; + if (abs(x) < 1) return (expm1(x) - expm1(-x)) / 2; + return (exp(x - 1) - exp(-x - 1)) * e / 2; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/implement.js new file mode 100644 index 0000000..5199a02 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'tanh', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/index.js new file mode 100644 index 0000000..6099c40 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.tanh + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/is-implemented.js new file mode 100644 index 0000000..a7d2223 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var tanh = Math.tanh; + if (typeof tanh !== 'function') return false; + return ((tanh(1) === 0.7615941559557649) && (tanh(Number.MAX_VALUE) === 1)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/shim.js new file mode 100644 index 0000000..f6e948f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/shim.js @@ -0,0 +1,17 @@ +'use strict'; + +var exp = Math.exp; + +module.exports = function (x) { + var a, b; + if (isNaN(x)) return NaN; + x = Number(x); + if (x === 0) return x; + if (x === Infinity) return 1; + if (x === -Infinity) return -1; + a = exp(x); + if (a === Infinity) return 1; + b = exp(-x); + if (b === Infinity) return -1; + return (a - b) / (a + b); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/implement.js new file mode 100644 index 0000000..3ee80ab --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Math, 'trunc', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/index.js new file mode 100644 index 0000000..0b0f9b2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Math.trunc + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/is-implemented.js new file mode 100644 index 0000000..3e8cde1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var trunc = Math.trunc; + if (typeof trunc !== 'function') return false; + return (trunc(13.67) === 13) && (trunc(-13.67) === -13); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/shim.js new file mode 100644 index 0000000..02e2c2a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/shim.js @@ -0,0 +1,13 @@ +'use strict'; + +var floor = Math.floor; + +module.exports = function (x) { + if (isNaN(x)) return NaN; + x = Number(x); + if (x === 0) return x; + if (x === Infinity) return Infinity; + if (x === -Infinity) return -Infinity; + if (x > 0) return floor(x); + return -floor(-x); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/#/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/#/index.js new file mode 100644 index 0000000..3248117 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/#/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + pad: require('./pad') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/#/pad.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/#/pad.js new file mode 100644 index 0000000..4478f6a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/#/pad.js @@ -0,0 +1,15 @@ +'use strict'; + +var pad = require('../../string/#/pad') + , toPosInt = require('../to-pos-integer') + + , toFixed = Number.prototype.toFixed; + +module.exports = function (length/*, precision*/) { + var precision; + length = toPosInt(length); + precision = toPosInt(arguments[1]); + + return pad.call(precision ? toFixed.call(this, precision) : this, + '0', length + (precision ? (1 + precision) : 0)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/implement.js new file mode 100644 index 0000000..f0a670a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Number, 'EPSILON', { value: require('./'), + configurable: false, enumerable: false, writable: false }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/index.js new file mode 100644 index 0000000..4e4b621 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = 2.220446049250313e-16; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/is-implemented.js new file mode 100644 index 0000000..141f5d2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/is-implemented.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function () { + return (typeof Number.EPSILON === 'number'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/index.js new file mode 100644 index 0000000..35daf78 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/index.js @@ -0,0 +1,16 @@ +'use strict'; + +module.exports = { + '#': require('./#'), + EPSILON: require('./epsilon'), + isFinite: require('./is-finite'), + isInteger: require('./is-integer'), + isNaN: require('./is-nan'), + isNumber: require('./is-number'), + isSafeInteger: require('./is-safe-integer'), + MAX_SAFE_INTEGER: require('./max-safe-integer'), + MIN_SAFE_INTEGER: require('./min-safe-integer'), + toInteger: require('./to-integer'), + toPosInteger: require('./to-pos-integer'), + toUint32: require('./to-uint32') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/implement.js new file mode 100644 index 0000000..51d7cac --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Number, 'isFinite', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/index.js new file mode 100644 index 0000000..15d5f40 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Number.isFinite + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/is-implemented.js new file mode 100644 index 0000000..556e396 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var isFinite = Number.isFinite; + if (typeof isFinite !== 'function') return false; + return !isFinite('23') && isFinite(34) && !isFinite(Infinity); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/shim.js new file mode 100644 index 0000000..e3aee55 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/shim.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (value) { + return (typeof value === 'number') && isFinite(value); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/implement.js new file mode 100644 index 0000000..fe53f28 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Number, 'isInteger', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/index.js new file mode 100644 index 0000000..55e039a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Number.isInteger + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/is-implemented.js new file mode 100644 index 0000000..a0e573b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var isInteger = Number.isInteger; + if (typeof isInteger !== 'function') return false; + return !isInteger('23') && isInteger(34) && !isInteger(32.34); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/shim.js new file mode 100644 index 0000000..5402939 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/shim.js @@ -0,0 +1,8 @@ +// Credit: http://www.2ality.com/2014/05/is-integer.html + +'use strict'; + +module.exports = function (value) { + if (typeof value !== 'number') return false; + return (value % 1 === 0); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/implement.js new file mode 100644 index 0000000..e1c5dee --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Number, 'isNaN', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/index.js new file mode 100644 index 0000000..3b2c4ca --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Number.isNaN + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/is-implemented.js new file mode 100644 index 0000000..4cf2766 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var isNaN = Number.isNaN; + if (typeof isNaN !== 'function') return false; + return !isNaN({}) && isNaN(NaN) && !isNaN(34); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/shim.js new file mode 100644 index 0000000..070d96c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/shim.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (value) { return (value !== value); } //jslint: ignore diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-number.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-number.js new file mode 100644 index 0000000..19a99e4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-number.js @@ -0,0 +1,11 @@ +'use strict'; + +var toString = Object.prototype.toString + + , id = toString.call(1); + +module.exports = function (x) { + return ((typeof x === 'number') || + ((x instanceof Number) || + ((typeof x === 'object') && (toString.call(x) === id)))); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/implement.js new file mode 100644 index 0000000..51cef96 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Number, 'isSafeInteger', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/index.js new file mode 100644 index 0000000..49adeaa --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Number.isSafeInteger + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/is-implemented.js new file mode 100644 index 0000000..510b60e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function () { + var isSafeInteger = Number.isSafeInteger; + if (typeof isSafeInteger !== 'function') return false; + return !isSafeInteger('23') && isSafeInteger(34232322323) && + !isSafeInteger(9007199254740992); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/shim.js new file mode 100644 index 0000000..692acdd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/shim.js @@ -0,0 +1,11 @@ +'use strict'; + +var isInteger = require('../is-integer/shim') + , maxValue = require('../max-safe-integer') + + , abs = Math.abs; + +module.exports = function (value) { + if (!isInteger(value)) return false; + return abs(value) <= maxValue; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/implement.js new file mode 100644 index 0000000..4e0bb57 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Number, 'MAX_SAFE_INTEGER', { value: require('./'), + configurable: false, enumerable: false, writable: false }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/index.js new file mode 100644 index 0000000..ed5d6a5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = Math.pow(2, 53) - 1; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/is-implemented.js new file mode 100644 index 0000000..7bd08a9 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function () { + return (typeof Number.MAX_SAFE_INTEGER === 'number'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/implement.js new file mode 100644 index 0000000..e3f110e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Number, 'MIN_SAFE_INTEGER', { value: require('./'), + configurable: false, enumerable: false, writable: false }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/index.js new file mode 100644 index 0000000..1c6cc27 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = -(Math.pow(2, 53) - 1); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/is-implemented.js new file mode 100644 index 0000000..efc9875 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/is-implemented.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function () { + return (typeof Number.MIN_SAFE_INTEGER === 'number'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-integer.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-integer.js new file mode 100644 index 0000000..60e798c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-integer.js @@ -0,0 +1,12 @@ +'use strict'; + +var sign = require('../math/sign') + + , abs = Math.abs, floor = Math.floor; + +module.exports = function (value) { + if (isNaN(value)) return 0; + value = Number(value); + if ((value === 0) || !isFinite(value)) return value; + return sign(value) * floor(abs(value)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-pos-integer.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-pos-integer.js new file mode 100644 index 0000000..605a302 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-pos-integer.js @@ -0,0 +1,7 @@ +'use strict'; + +var toInteger = require('./to-integer') + + , max = Math.max; + +module.exports = function (value) { return max(0, toInteger(value)); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-uint32.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-uint32.js new file mode 100644 index 0000000..6263e85 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-uint32.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (value) { return value >>> 0; }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/_iterate.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/_iterate.js new file mode 100644 index 0000000..bf2c55d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/_iterate.js @@ -0,0 +1,29 @@ +// Internal method, used by iteration functions. +// Calls a function for each key-value pair found in object +// Optionally takes compareFn to iterate object in specific order + +'use strict'; + +var isCallable = require('./is-callable') + , callable = require('./valid-callable') + , value = require('./valid-value') + + , call = Function.prototype.call, keys = Object.keys + , propertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (method, defVal) { + return function (obj, cb/*, thisArg, compareFn*/) { + var list, thisArg = arguments[2], compareFn = arguments[3]; + obj = Object(value(obj)); + callable(cb); + + list = keys(obj); + if (compareFn) { + list.sort(isCallable(compareFn) ? compareFn.bind(obj) : undefined); + } + return list[method](function (key, index) { + if (!propertyIsEnumerable.call(obj, key)) return defVal; + return call.call(cb, thisArg, obj[key], key, obj, index); + }); + }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/implement.js new file mode 100644 index 0000000..3bcc68e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Object, 'assign', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/index.js new file mode 100644 index 0000000..ab0f9f2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Object.assign + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/is-implemented.js new file mode 100644 index 0000000..579ad2d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/is-implemented.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function () { + var assign = Object.assign, obj; + if (typeof assign !== 'function') return false; + obj = { foo: 'raz' }; + assign(obj, { bar: 'dwa' }, { trzy: 'trzy' }); + return (obj.foo + obj.bar + obj.trzy) === 'razdwatrzy'; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/shim.js new file mode 100644 index 0000000..74da11a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/shim.js @@ -0,0 +1,22 @@ +'use strict'; + +var keys = require('../keys') + , value = require('../valid-value') + + , max = Math.max; + +module.exports = function (dest, src/*, …srcn*/) { + var error, i, l = max(arguments.length, 2), assign; + dest = Object(value(dest)); + assign = function (key) { + try { dest[key] = src[key]; } catch (e) { + if (!error) error = e; + } + }; + for (i = 1; i < l; ++i) { + src = arguments[i]; + keys(src).forEach(assign); + } + if (error !== undefined) throw error; + return dest; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/clear.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/clear.js new file mode 100644 index 0000000..85e4637 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/clear.js @@ -0,0 +1,16 @@ +'use strict'; + +var keys = require('./keys'); + +module.exports = function (obj) { + var error; + keys(obj).forEach(function (key) { + try { + delete this[key]; + } catch (e) { + if (!error) error = e; + } + }, obj); + if (error !== undefined) throw error; + return obj; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/compact.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/compact.js new file mode 100644 index 0000000..d021da4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/compact.js @@ -0,0 +1,7 @@ +'use strict'; + +var filter = require('./filter'); + +module.exports = function (obj) { + return filter(obj, function (val) { return val != null; }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/compare.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/compare.js new file mode 100644 index 0000000..2ab11f1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/compare.js @@ -0,0 +1,42 @@ +'use strict'; + +var strCompare = require('../string/#/case-insensitive-compare') + , isObject = require('./is-object') + + , resolve, typeMap; + +typeMap = { + undefined: 0, + object: 1, + boolean: 2, + string: 3, + number: 4 +}; + +resolve = function (a) { + if (isObject(a)) { + if (typeof a.valueOf !== 'function') return NaN; + a = a.valueOf(); + if (isObject(a)) { + if (typeof a.toString !== 'function') return NaN; + a = a.toString(); + if (typeof a !== 'string') return NaN; + } + } + return a; +}; + +module.exports = function (a, b) { + if (a === b) return 0; // Same + + a = resolve(a); + b = resolve(b); + if (a == b) return typeMap[typeof a] - typeMap[typeof b]; //jslint: ignore + if (a == null) return -1; + if (b == null) return 1; + if ((typeof a === 'string') || (typeof b === 'string')) { + return strCompare.call(a, b); + } + if ((a !== a) && (b !== b)) return 0; //jslint: ignore + return Number(a) - Number(b); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/copy-deep.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/copy-deep.js new file mode 100644 index 0000000..548e3ee --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/copy-deep.js @@ -0,0 +1,30 @@ +'use strict'; + +var isPlainObject = require('./is-plain-object') + , value = require('./valid-value') + + , keys = Object.keys + , copy; + +copy = function (source) { + var target = {}; + this[0].push(source); + this[1].push(target); + keys(source).forEach(function (key) { + var index; + if (!isPlainObject(source[key])) { + target[key] = source[key]; + return; + } + index = this[0].indexOf(source[key]); + if (index === -1) target[key] = copy.call(this, source[key]); + else target[key] = this[1][index]; + }, this); + return target; +}; + +module.exports = function (source) { + var obj = Object(value(source)); + if (obj !== source) return obj; + return copy.call([[], []], obj); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/copy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/copy.js new file mode 100644 index 0000000..4d71772 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/copy.js @@ -0,0 +1,10 @@ +'use strict'; + +var assign = require('./assign') + , value = require('./valid-value'); + +module.exports = function (obj) { + var copy = Object(value(obj)); + if (copy !== obj) return copy; + return assign({}, obj); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/count.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/count.js new file mode 100644 index 0000000..29cfbb5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/count.js @@ -0,0 +1,5 @@ +'use strict'; + +var keys = require('./keys'); + +module.exports = function (obj) { return keys(obj).length; }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/create.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/create.js new file mode 100644 index 0000000..f813b46 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/create.js @@ -0,0 +1,36 @@ +// Workaround for http://code.google.com/p/v8/issues/detail?id=2804 + +'use strict'; + +var create = Object.create, shim; + +if (!require('./set-prototype-of/is-implemented')()) { + shim = require('./set-prototype-of/shim'); +} + +module.exports = (function () { + var nullObject, props, desc; + if (!shim) return create; + if (shim.level !== 1) return create; + + nullObject = {}; + props = {}; + desc = { configurable: false, enumerable: false, writable: true, + value: undefined }; + Object.getOwnPropertyNames(Object.prototype).forEach(function (name) { + if (name === '__proto__') { + props[name] = { configurable: true, enumerable: false, writable: true, + value: undefined }; + return; + } + props[name] = desc; + }); + Object.defineProperties(nullObject, props); + + Object.defineProperty(shim, 'nullPolyfill', { configurable: false, + enumerable: false, writable: false, value: nullObject }); + + return function (prototype, props) { + return create((prototype === null) ? nullObject : prototype, props); + }; +}()); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/eq.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/eq.js new file mode 100644 index 0000000..037937e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/eq.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (x, y) { + return ((x === y) || ((x !== x) && (y !== y))); //jslint: ignore +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/every.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/every.js new file mode 100644 index 0000000..1303db2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/every.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./_iterate')('every', true); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/filter.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/filter.js new file mode 100644 index 0000000..e5edb49 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/filter.js @@ -0,0 +1,15 @@ +'use strict'; + +var callable = require('./valid-callable') + , forEach = require('./for-each') + + , call = Function.prototype.call; + +module.exports = function (obj, cb/*, thisArg*/) { + var o = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, obj, index) { + if (call.call(cb, thisArg, value, key, obj, index)) o[key] = obj[key]; + }); + return o; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/first-key.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/first-key.js new file mode 100644 index 0000000..7df10b2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/first-key.js @@ -0,0 +1,14 @@ +'use strict'; + +var value = require('./valid-value') + + , propertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (obj) { + var i; + value(obj); + for (i in obj) { + if (propertyIsEnumerable.call(obj, i)) return i; + } + return null; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/flatten.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/flatten.js new file mode 100644 index 0000000..e8b4044 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/flatten.js @@ -0,0 +1,17 @@ +'use strict'; + +var isPlainObject = require('./is-plain-object') + , forEach = require('./for-each') + + , process; + +process = function self(value, key) { + if (isPlainObject(value)) forEach(value, self, this); + else this[key] = value; +}; + +module.exports = function (obj) { + var flattened = {}; + forEach(obj, process, flattened); + return flattened; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/for-each.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/for-each.js new file mode 100644 index 0000000..6674f8a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/for-each.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./_iterate')('forEach'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/get-property-names.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/get-property-names.js new file mode 100644 index 0000000..54a01e5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/get-property-names.js @@ -0,0 +1,18 @@ +'use strict'; + +var uniq = require('../array/#/uniq') + , value = require('./valid-value') + + , push = Array.prototype.push + , getOwnPropertyNames = Object.getOwnPropertyNames + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (obj) { + var keys; + obj = Object(value(obj)); + keys = getOwnPropertyNames(obj); + while ((obj = getPrototypeOf(obj))) { + push.apply(keys, getOwnPropertyNames(obj)); + } + return uniq.call(keys); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/index.js new file mode 100644 index 0000000..4bdf403 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/index.js @@ -0,0 +1,48 @@ +'use strict'; + +module.exports = { + assign: require('./assign'), + clear: require('./clear'), + compact: require('./compact'), + compare: require('./compare'), + copy: require('./copy'), + copyDeep: require('./copy-deep'), + count: require('./count'), + create: require('./create'), + eq: require('./eq'), + every: require('./every'), + filter: require('./filter'), + firstKey: require('./first-key'), + flatten: require('./flatten'), + forEach: require('./for-each'), + getPropertyNames: require('./get-property-names'), + is: require('./is'), + isArrayLike: require('./is-array-like'), + isCallable: require('./is-callable'), + isCopy: require('./is-copy'), + isCopyDeep: require('./is-copy-deep'), + isEmpty: require('./is-empty'), + isObject: require('./is-object'), + isPlainObject: require('./is-plain-object'), + keyOf: require('./key-of'), + keys: require('./keys'), + map: require('./map'), + mapKeys: require('./map-keys'), + normalizeOptions: require('./normalize-options'), + mixin: require('./mixin'), + mixinPrototypes: require('./mixin-prototypes'), + primitiveSet: require('./primitive-set'), + safeTraverse: require('./safe-traverse'), + serialize: require('./serialize'), + setPrototypeOf: require('./set-prototype-of'), + some: require('./some'), + toArray: require('./to-array'), + unserialize: require('./unserialize'), + validateArrayLike: require('./validate-array-like'), + validateArrayLikeObject: require('./validate-array-like-object'), + validCallable: require('./valid-callable'), + validObject: require('./valid-object'), + validateStringifiable: require('./validate-stringifiable'), + validateStringifiableValue: require('./validate-stringifiable-value'), + validValue: require('./valid-value') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-array-like.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-array-like.js new file mode 100644 index 0000000..b8beed2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-array-like.js @@ -0,0 +1,14 @@ +'use strict'; + +var isFunction = require('../function/is-function') + , isObject = require('./is-object'); + +module.exports = function (x) { + return ((x != null) && (typeof x.length === 'number') && + + // Just checking ((typeof x === 'object') && (typeof x !== 'function')) + // won't work right for some cases, e.g.: + // type of instance of NodeList in Safari is a 'function' + + ((isObject(x) && !isFunction(x)) || (typeof x === "string"))) || false; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-callable.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-callable.js new file mode 100644 index 0000000..5d5d4b3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-callable.js @@ -0,0 +1,5 @@ +// Deprecated + +'use strict'; + +module.exports = function (obj) { return typeof obj === 'function'; }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy-deep.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy-deep.js new file mode 100644 index 0000000..c4b2b42 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy-deep.js @@ -0,0 +1,58 @@ +'use strict'; + +var eq = require('./eq') + , isPlainObject = require('./is-plain-object') + , value = require('./valid-value') + + , isArray = Array.isArray, keys = Object.keys + , propertyIsEnumerable = Object.prototype.propertyIsEnumerable + + , eqArr, eqVal, eqObj; + +eqArr = function (a, b, recMap) { + var i, l = a.length; + if (l !== b.length) return false; + for (i = 0; i < l; ++i) { + if (a.hasOwnProperty(i) !== b.hasOwnProperty(i)) return false; + if (!eqVal(a[i], b[i], recMap)) return false; + } + return true; +}; + +eqObj = function (a, b, recMap) { + var k1 = keys(a), k2 = keys(b); + if (k1.length !== k2.length) return false; + return k1.every(function (key) { + if (!propertyIsEnumerable.call(b, key)) return false; + return eqVal(a[key], b[key], recMap); + }); +}; + +eqVal = function (a, b, recMap) { + var i, eqX, c1, c2; + if (eq(a, b)) return true; + if (isPlainObject(a)) { + if (!isPlainObject(b)) return false; + eqX = eqObj; + } else if (isArray(a) && isArray(b)) { + eqX = eqArr; + } else { + return false; + } + c1 = recMap[0]; + c2 = recMap[1]; + i = c1.indexOf(a); + if (i !== -1) { + if (c2[i].indexOf(b) !== -1) return true; + } else { + i = c1.push(a) - 1; + c2[i] = []; + } + c2[i].push(b); + return eqX(a, b, recMap); +}; + +module.exports = function (a, b) { + if (eq(value(a), value(b))) return true; + return eqVal(Object(a), Object(b), [[], []]); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy.js new file mode 100644 index 0000000..4fe639d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy.js @@ -0,0 +1,24 @@ +'use strict'; + +var eq = require('./eq') + , value = require('./valid-value') + + , keys = Object.keys + , propertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (a, b) { + var k1, k2; + + if (eq(value(a), value(b))) return true; + + a = Object(a); + b = Object(b); + + k1 = keys(a); + k2 = keys(b); + if (k1.length !== k2.length) return false; + return k1.every(function (key) { + if (!propertyIsEnumerable.call(b, key)) return false; + return eq(a[key], b[key]); + }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-empty.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-empty.js new file mode 100644 index 0000000..7b51a87 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-empty.js @@ -0,0 +1,14 @@ +'use strict'; + +var value = require('./valid-value') + + , propertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (obj) { + var i; + value(obj); + for (i in obj) { //jslint: ignore + if (propertyIsEnumerable.call(obj, i)) return false; + } + return true; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-object.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-object.js new file mode 100644 index 0000000..a86facf --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-object.js @@ -0,0 +1,7 @@ +'use strict'; + +var map = { function: true, object: true }; + +module.exports = function (x) { + return ((x != null) && map[typeof x]) || false; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-plain-object.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-plain-object.js new file mode 100644 index 0000000..9a28231 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-plain-object.js @@ -0,0 +1,20 @@ +'use strict'; + +var getPrototypeOf = Object.getPrototypeOf, prototype = Object.prototype + , toString = prototype.toString + + , id = Object().toString(); + +module.exports = function (value) { + var proto, constructor; + if (!value || (typeof value !== 'object') || (toString.call(value) !== id)) { + return false; + } + proto = getPrototypeOf(value); + if (proto === null) { + constructor = value.constructor; + if (typeof constructor !== 'function') return true; + return (constructor.prototype !== value); + } + return (proto === prototype) || (getPrototypeOf(proto) === null); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is.js new file mode 100644 index 0000000..5778b50 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is.js @@ -0,0 +1,10 @@ +// Implementation credits go to: +// http://wiki.ecmascript.org/doku.php?id=harmony:egal + +'use strict'; + +module.exports = function (x, y) { + return (x === y) ? + ((x !== 0) || ((1 / x) === (1 / y))) : + ((x !== x) && (y !== y)); //jslint: ignore +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/key-of.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/key-of.js new file mode 100644 index 0000000..8c44c8d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/key-of.js @@ -0,0 +1,15 @@ +'use strict'; + +var eq = require('./eq') + , some = require('./some'); + +module.exports = function (obj, searchValue) { + var r; + return some(obj, function (value, name) { + if (eq(value, searchValue)) { + r = name; + return true; + } + return false; + }) ? r : null; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/implement.js new file mode 100644 index 0000000..c6872bd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(Object, 'keys', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/index.js new file mode 100644 index 0000000..5ef0522 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Object.keys + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/is-implemented.js new file mode 100644 index 0000000..40c32c3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function () { + try { + Object.keys('primitive'); + return true; + } catch (e) { return false; } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/shim.js new file mode 100644 index 0000000..034b6b2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/shim.js @@ -0,0 +1,7 @@ +'use strict'; + +var keys = Object.keys; + +module.exports = function (object) { + return keys(object == null ? object : Object(object)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/map-keys.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/map-keys.js new file mode 100644 index 0000000..26f0eca --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/map-keys.js @@ -0,0 +1,15 @@ +'use strict'; + +var callable = require('./valid-callable') + , forEach = require('./for-each') + + , call = Function.prototype.call; + +module.exports = function (obj, cb/*, thisArg*/) { + var o = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, obj, index) { + o[call.call(cb, thisArg, key, value, this, index)] = value; + }, obj); + return o; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/map.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/map.js new file mode 100644 index 0000000..6b39d3c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/map.js @@ -0,0 +1,15 @@ +'use strict'; + +var callable = require('./valid-callable') + , forEach = require('./for-each') + + , call = Function.prototype.call; + +module.exports = function (obj, cb/*, thisArg*/) { + var o = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, obj, index) { + o[key] = call.call(cb, thisArg, value, key, obj, index); + }); + return o; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin-prototypes.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin-prototypes.js new file mode 100644 index 0000000..1ef5756 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin-prototypes.js @@ -0,0 +1,34 @@ +'use strict'; + +var value = require('./valid-value') + , mixin = require('./mixin') + + , defineProperty = Object.defineProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor + , getOwnPropertyNames = Object.getOwnPropertyNames + , getPrototypeOf = Object.getPrototypeOf + , hasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (target, source) { + var error, end, define; + target = Object(value(target)); + source = Object(value(source)); + end = getPrototypeOf(target); + if (source === end) return target; + try { + mixin(target, source); + } catch (e) { error = e; } + source = getPrototypeOf(source); + define = function (name) { + if (hasOwnProperty.call(target, name)) return; + try { + defineProperty(target, name, getOwnPropertyDescriptor(source, name)); + } catch (e) { error = e; } + }; + while (source && (source !== end)) { + getOwnPropertyNames(source).forEach(define); + source = getPrototypeOf(source); + } + if (error) throw error; + return target; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin.js new file mode 100644 index 0000000..80b5df5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin.js @@ -0,0 +1,19 @@ +'use strict'; + +var value = require('./valid-value') + + , defineProperty = Object.defineProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor + , getOwnPropertyNames = Object.getOwnPropertyNames; + +module.exports = function (target, source) { + var error; + target = Object(value(target)); + getOwnPropertyNames(Object(value(source))).forEach(function (name) { + try { + defineProperty(target, name, getOwnPropertyDescriptor(source, name)); + } catch (e) { error = e; } + }); + if (error !== undefined) throw error; + return target; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/normalize-options.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/normalize-options.js new file mode 100644 index 0000000..cf8ed8d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/normalize-options.js @@ -0,0 +1,17 @@ +'use strict'; + +var forEach = Array.prototype.forEach, create = Object.create; + +var process = function (src, obj) { + var key; + for (key in src) obj[key] = src[key]; +}; + +module.exports = function (options/*, …options*/) { + var result = create(null); + forEach.call(arguments, function (options) { + if (options == null) return; + process(Object(options), result); + }); + return result; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/primitive-set.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/primitive-set.js new file mode 100644 index 0000000..ada1095 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/primitive-set.js @@ -0,0 +1,9 @@ +'use strict'; + +var forEach = Array.prototype.forEach, create = Object.create; + +module.exports = function (arg/*, …args*/) { + var set = create(null); + forEach.call(arguments, function (name) { set[name] = true; }); + return set; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/safe-traverse.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/safe-traverse.js new file mode 100644 index 0000000..7e1b5f4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/safe-traverse.js @@ -0,0 +1,15 @@ +'use strict'; + +var value = require('./valid-value'); + +module.exports = function (obj/*, …names*/) { + var length, current = 1; + value(obj); + length = arguments.length - 1; + if (!length) return obj; + while (current < length) { + obj = obj[arguments[current++]]; + if (obj == null) return undefined; + } + return obj[arguments[current]]; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/serialize.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/serialize.js new file mode 100644 index 0000000..8113b68 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/serialize.js @@ -0,0 +1,36 @@ +'use strict'; + +var toArray = require('./to-array') + , isDate = require('../date/is-date') + , isRegExp = require('../reg-exp/is-reg-exp') + + , isArray = Array.isArray, stringify = JSON.stringify + , keyValueToString = function (value, key) { return stringify(key) + ':' + exports(value); }; + +var sparseMap = function (arr) { + var i, l = arr.length, result = new Array(l); + for (i = 0; i < l; ++i) { + if (!arr.hasOwnProperty(i)) continue; + result[i] = exports(arr[i]); + } + return result; +}; + +module.exports = exports = function (obj) { + if (obj == null) return String(obj); + switch (typeof obj) { + case 'string': + return stringify(obj); + case 'number': + case 'boolean': + case 'function': + return String(obj); + case 'object': + if (isArray(obj)) return '[' + sparseMap(obj) + ']'; + if (isRegExp(obj)) return String(obj); + if (isDate(obj)) return 'new Date(' + obj.valueOf() + ')'; + return '{' + toArray(obj, keyValueToString) + '}'; + default: + throw new TypeError("Serialization of " + String(obj) + "is unsupported"); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/implement.js new file mode 100644 index 0000000..000e6bd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/implement.js @@ -0,0 +1,8 @@ +'use strict'; + +var shim; + +if (!require('./is-implemented')() && (shim = require('./shim'))) { + Object.defineProperty(Object, 'setPrototypeOf', + { value: shim, configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/index.js new file mode 100644 index 0000000..ccc4099 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? Object.setPrototypeOf + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js new file mode 100644 index 0000000..98d0c84 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js @@ -0,0 +1,11 @@ +'use strict'; + +var create = Object.create, getPrototypeOf = Object.getPrototypeOf + , x = {}; + +module.exports = function (/*customCreate*/) { + var setPrototypeOf = Object.setPrototypeOf + , customCreate = arguments[0] || create; + if (typeof setPrototypeOf !== 'function') return false; + return getPrototypeOf(setPrototypeOf(customCreate(null), x)) === x; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/shim.js new file mode 100644 index 0000000..4ec9446 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/shim.js @@ -0,0 +1,73 @@ +// Big thanks to @WebReflection for sorting this out +// https://gist.github.com/WebReflection/5593554 + +'use strict'; + +var isObject = require('../is-object') + , value = require('../valid-value') + + , isPrototypeOf = Object.prototype.isPrototypeOf + , defineProperty = Object.defineProperty + , nullDesc = { configurable: true, enumerable: false, writable: true, + value: undefined } + , validate; + +validate = function (obj, prototype) { + value(obj); + if ((prototype === null) || isObject(prototype)) return obj; + throw new TypeError('Prototype must be null or an object'); +}; + +module.exports = (function (status) { + var fn, set; + if (!status) return null; + if (status.level === 2) { + if (status.set) { + set = status.set; + fn = function (obj, prototype) { + set.call(validate(obj, prototype), prototype); + return obj; + }; + } else { + fn = function (obj, prototype) { + validate(obj, prototype).__proto__ = prototype; + return obj; + }; + } + } else { + fn = function self(obj, prototype) { + var isNullBase; + validate(obj, prototype); + isNullBase = isPrototypeOf.call(self.nullPolyfill, obj); + if (isNullBase) delete self.nullPolyfill.__proto__; + if (prototype === null) prototype = self.nullPolyfill; + obj.__proto__ = prototype; + if (isNullBase) defineProperty(self.nullPolyfill, '__proto__', nullDesc); + return obj; + }; + } + return Object.defineProperty(fn, 'level', { configurable: false, + enumerable: false, writable: false, value: status.level }); +}((function () { + var x = Object.create(null), y = {}, set + , desc = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__'); + + if (desc) { + try { + set = desc.set; // Opera crashes at this point + set.call(x, y); + } catch (ignore) { } + if (Object.getPrototypeOf(x) === y) return { set: set, level: 2 }; + } + + x.__proto__ = y; + if (Object.getPrototypeOf(x) === y) return { level: 2 }; + + x = {}; + x.__proto__ = y; + if (Object.getPrototypeOf(x) === y) return { level: 1 }; + + return false; +}()))); + +require('../create'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/some.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/some.js new file mode 100644 index 0000000..cde5dde --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/some.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./_iterate')('some', false); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/to-array.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/to-array.js new file mode 100644 index 0000000..a954abb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/to-array.js @@ -0,0 +1,18 @@ +'use strict'; + +var callable = require('./valid-callable') + , forEach = require('./for-each') + + , call = Function.prototype.call + + , defaultCb = function (value, key) { return [key, value]; }; + +module.exports = function (obj/*, cb, thisArg, compareFn*/) { + var a = [], cb = arguments[1], thisArg = arguments[2]; + cb = (cb == null) ? defaultCb : callable(cb); + + forEach(obj, function (value, key, obj, index) { + a.push(call.call(cb, thisArg, value, key, this, index)); + }, obj, arguments[3]); + return a; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/unserialize.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/unserialize.js new file mode 100644 index 0000000..ce68e40 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/unserialize.js @@ -0,0 +1,7 @@ +'use strict'; + +var value = require('./valid-value'); + +module.exports = exports = function (code) { + return (new Function('return ' + value(code)))(); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-callable.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-callable.js new file mode 100644 index 0000000..c977527 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-callable.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (fn) { + if (typeof fn !== 'function') throw new TypeError(fn + " is not a function"); + return fn; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-object.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-object.js new file mode 100644 index 0000000..f82bd51 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-object.js @@ -0,0 +1,8 @@ +'use strict'; + +var isObject = require('./is-object'); + +module.exports = function (value) { + if (!isObject(value)) throw new TypeError(value + " is not an Object"); + return value; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-value.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-value.js new file mode 100644 index 0000000..36c8ec3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-value.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (value) { + if (value == null) throw new TypeError("Cannot use null or undefined"); + return value; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like-object.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like-object.js new file mode 100644 index 0000000..89e12c5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like-object.js @@ -0,0 +1,9 @@ +'use strict'; + +var isArrayLike = require('./is-array-like') + , isObject = require('./is-object'); + +module.exports = function (obj) { + if (isObject(obj) && isArrayLike(obj)) return obj; + throw new TypeError(obj + " is not array-like object"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like.js new file mode 100644 index 0000000..6a35b54 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like.js @@ -0,0 +1,8 @@ +'use strict'; + +var isArrayLike = require('./is-array-like'); + +module.exports = function (obj) { + if (isArrayLike(obj)) return obj; + throw new TypeError(obj + " is not array-like value"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable-value.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable-value.js new file mode 100644 index 0000000..9df3b66 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable-value.js @@ -0,0 +1,6 @@ +'use strict'; + +var value = require('./valid-value') + , stringifiable = require('./validate-stringifiable'); + +module.exports = function (x) { return stringifiable(value(x)); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable.js new file mode 100644 index 0000000..eba7ce7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (stringifiable) { + try { + return String(stringifiable); + } catch (e) { + throw new TypeError("Passed argument cannot be stringifed"); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/package.json b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/package.json new file mode 100644 index 0000000..01d6532 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/package.json @@ -0,0 +1,74 @@ +{ + "name": "es5-ext", + "version": "0.10.7", + "description": "ECMAScript 5 extensions and ES6 shims", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "keywords": [ + "ecmascript", + "ecmascript5", + "ecmascript6", + "es5", + "es6", + "extensions", + "ext", + "addons", + "extras", + "harmony", + "javascript", + "polyfill", + "shim", + "util", + "utils", + "utilities" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es5-ext.git" + }, + "dependencies": { + "es6-iterator": "~0.1.3", + "es6-symbol": "~2.0.1" + }, + "devDependencies": { + "tad": "~0.2.2", + "xlint": "~0.2.2", + "xlint-jslint-medikoo": "~0.1.2" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "MIT", + "gitHead": "5b63ee02f50dfbc70dc1f62bc66b8718af443f83", + "bugs": { + "url": "https://github.com/medikoo/es5-ext/issues" + }, + "homepage": "https://github.com/medikoo/es5-ext", + "_id": "es5-ext@0.10.7", + "_shasum": "dfaea50721301042e2d89c1719d43493fa821656", + "_from": "es5-ext@>=0.10.6 <0.11.0", + "_npmVersion": "2.7.4", + "_nodeVersion": "0.12.2", + "_npmUser": { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + }, + "maintainers": [ + { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + } + ], + "dist": { + "shasum": "dfaea50721301042e2d89c1719d43493fa821656", + "tarball": "http://registry.npmjs.org/es5-ext/-/es5-ext-0.10.7.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.7.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/index.js new file mode 100644 index 0000000..f7e7a58 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + isSticky: require('./is-sticky'), + isUnicode: require('./is-unicode'), + match: require('./match'), + replace: require('./replace'), + search: require('./search'), + split: require('./split') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-sticky.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-sticky.js new file mode 100644 index 0000000..830a481 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-sticky.js @@ -0,0 +1,9 @@ +'use strict'; + +var validRegExp = require('../valid-reg-exp') + + , re = /\/[a-xz]*y[a-xz]*$/; + +module.exports = function () { + return Boolean(String(validRegExp(this)).match(re)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-unicode.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-unicode.js new file mode 100644 index 0000000..b005f6d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-unicode.js @@ -0,0 +1,9 @@ +'use strict'; + +var validRegExp = require('../valid-reg-exp') + + , re = /\/[a-xz]*u[a-xz]*$/; + +module.exports = function () { + return Boolean(String(validRegExp(this)).match(re)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/implement.js new file mode 100644 index 0000000..921c936 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(RegExp.prototype, 'match', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/index.js new file mode 100644 index 0000000..0534ac3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? RegExp.prototype.match + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/is-implemented.js new file mode 100644 index 0000000..b7e9964 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +var re = /foo/; + +module.exports = function () { + if (typeof re.match !== 'function') return false; + return re.match('barfoobar') && !re.match('elo'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/shim.js new file mode 100644 index 0000000..4f99cf4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/shim.js @@ -0,0 +1,8 @@ +'use strict'; + +var validRegExp = require('../../valid-reg-exp'); + +module.exports = function (string) { + validRegExp(this); + return String(string).match(this); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/implement.js new file mode 100644 index 0000000..ad580de --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(RegExp.prototype, 'replace', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/index.js new file mode 100644 index 0000000..5658177 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? RegExp.prototype.replace + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js new file mode 100644 index 0000000..1b42d25 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +var re = /foo/; + +module.exports = function () { + if (typeof re.replace !== 'function') return false; + return re.replace('foobar', 'mar') === 'marbar'; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/shim.js new file mode 100644 index 0000000..c3e6aeb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/shim.js @@ -0,0 +1,8 @@ +'use strict'; + +var validRegExp = require('../../valid-reg-exp'); + +module.exports = function (string, replaceValue) { + validRegExp(this); + return String(string).replace(this, replaceValue); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/implement.js new file mode 100644 index 0000000..3804f4e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(RegExp.prototype, 'search', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/index.js new file mode 100644 index 0000000..67995d4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? RegExp.prototype.search + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/is-implemented.js new file mode 100644 index 0000000..efba889 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +var re = /foo/; + +module.exports = function () { + if (typeof re.search !== 'function') return false; + return re.search('barfoo') === 3; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/shim.js new file mode 100644 index 0000000..6d9dcae --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/shim.js @@ -0,0 +1,8 @@ +'use strict'; + +var validRegExp = require('../../valid-reg-exp'); + +module.exports = function (string) { + validRegExp(this); + return String(string).search(this); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/implement.js new file mode 100644 index 0000000..50facb6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(RegExp.prototype, 'split', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/index.js new file mode 100644 index 0000000..f101f5a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? RegExp.prototype.split + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/is-implemented.js new file mode 100644 index 0000000..7244c99 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +var re = /\|/; + +module.exports = function () { + if (typeof re.split !== 'function') return false; + return re.split('bar|foo')[1] === 'foo'; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/shim.js new file mode 100644 index 0000000..76154e7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/shim.js @@ -0,0 +1,8 @@ +'use strict'; + +var validRegExp = require('../../valid-reg-exp'); + +module.exports = function (string) { + validRegExp(this); + return String(string).split(this); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/implement.js new file mode 100644 index 0000000..7e8af1d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/implement.js @@ -0,0 +1,8 @@ +'use strict'; + +var isSticky = require('../is-sticky'); + +if (!require('./is-implemented')()) { + Object.defineProperty(RegExp.prototype, 'sticky', { configurable: true, + enumerable: false, get: isSticky }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js new file mode 100644 index 0000000..379c4a5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function () { + return RegExp.prototype.sticky === false; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/implement.js new file mode 100644 index 0000000..5a82a4d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/implement.js @@ -0,0 +1,8 @@ +'use strict'; + +var isUnicode = require('../is-unicode'); + +if (!require('./is-implemented')()) { + Object.defineProperty(RegExp.prototype, 'unicode', { configurable: true, + enumerable: false, get: isUnicode }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js new file mode 100644 index 0000000..a8b15b3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function () { + return RegExp.prototype.unicode === false; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/escape.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/escape.js new file mode 100644 index 0000000..a2363fc --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/escape.js @@ -0,0 +1,9 @@ +// Thanks to Andrew Clover: +// http://stackoverflow.com/questions/3561493 +// /is-there-a-regexp-escape-function-in-javascript + +'use strict'; + +var re = /[\-\/\\\^$*+?.()|\[\]{}]/g; + +module.exports = function (str) { return String(str).replace(re, '\\$&'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/index.js new file mode 100644 index 0000000..75ea313 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/index.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = { + '#': require('./#'), + escape: require('./escape'), + isRegExp: require('./is-reg-exp'), + validRegExp: require('./valid-reg-exp') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/is-reg-exp.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/is-reg-exp.js new file mode 100644 index 0000000..6eb1297 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/is-reg-exp.js @@ -0,0 +1,9 @@ +'use strict'; + +var toString = Object.prototype.toString + + , id = toString.call(/a/); + +module.exports = function (x) { + return (x && (x instanceof RegExp || (toString.call(x) === id))) || false; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/valid-reg-exp.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/valid-reg-exp.js new file mode 100644 index 0000000..d3a7764 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/valid-reg-exp.js @@ -0,0 +1,8 @@ +'use strict'; + +var isRegExp = require('./is-reg-exp'); + +module.exports = function (x) { + if (!isRegExp(x)) throw new TypeError(x + " is not a RegExp object"); + return x; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/implement.js new file mode 100644 index 0000000..4494d7b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(String.prototype, require('es6-symbol').iterator, + { value: require('./shim'), configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/index.js new file mode 100644 index 0000000..22f15e6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/index.js @@ -0,0 +1,4 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? String.prototype[require('es6-symbol').iterator] : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..f5c462d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/is-implemented.js @@ -0,0 +1,16 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator; + +module.exports = function () { + var str = '🙈f', iterator, result; + if (typeof str[iteratorSymbol] !== 'function') return false; + iterator = str[iteratorSymbol](); + if (!iterator) return false; + if (typeof iterator.next !== 'function') return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== '🙈') return false; + if (result.done !== false) return false; + return true; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/shim.js new file mode 100644 index 0000000..0be3029 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/shim.js @@ -0,0 +1,6 @@ +'use strict'; + +var StringIterator = require('es6-iterator/string') + , value = require('../../../object/valid-value'); + +module.exports = function () { return new StringIterator(value(this)); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/at.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/at.js new file mode 100644 index 0000000..77bd251 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/at.js @@ -0,0 +1,33 @@ +// Based on: https://github.com/mathiasbynens/String.prototype.at +// Thanks @mathiasbynens ! + +'use strict'; + +var toInteger = require('../../number/to-integer') + , validValue = require('../../object/valid-value'); + +module.exports = function (pos) { + var str = String(validValue(this)), size = str.length + , cuFirst, cuSecond, nextPos, len; + pos = toInteger(pos); + + // Account for out-of-bounds indices + // The odd lower bound is because the ToInteger operation is + // going to round `n` to `0` for `-1 < n <= 0`. + if (pos <= -1 || pos >= size) return ''; + + // Second half of `ToInteger` + pos = pos | 0; + // Get the first code unit and code unit value + cuFirst = str.charCodeAt(pos); + nextPos = pos + 1; + len = 1; + if ( // check if it’s the start of a surrogate pair + (cuFirst >= 0xD800) && (cuFirst <= 0xDBFF) && // high surrogate + (size > nextPos) // there is a next code unit + ) { + cuSecond = str.charCodeAt(nextPos); + if (cuSecond >= 0xDC00 && cuSecond <= 0xDFFF) len = 2; // low surrogate + } + return str.slice(pos, pos + len); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/camel-to-hyphen.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/camel-to-hyphen.js new file mode 100644 index 0000000..1cb8d12 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/camel-to-hyphen.js @@ -0,0 +1,10 @@ +'use strict'; + +var replace = String.prototype.replace + , re = /([A-Z])/g; + +module.exports = function () { + var str = replace.call(this, re, "-$1").toLowerCase(); + if (str[0] === '-') str = str.slice(1); + return str; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/capitalize.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/capitalize.js new file mode 100644 index 0000000..ed76827 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/capitalize.js @@ -0,0 +1,8 @@ +'use strict'; + +var value = require('../../object/valid-value'); + +module.exports = function () { + var str = String(value(this)); + return str.charAt(0).toUpperCase() + str.slice(1); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/case-insensitive-compare.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/case-insensitive-compare.js new file mode 100644 index 0000000..599cb83 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/case-insensitive-compare.js @@ -0,0 +1,7 @@ +'use strict'; + +var toLowerCase = String.prototype.toLowerCase; + +module.exports = function (other) { + return toLowerCase.call(this).localeCompare(toLowerCase.call(String(other))); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/implement.js new file mode 100644 index 0000000..1e7a37b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(String.prototype, 'codePointAt', + { value: require('./shim'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/index.js new file mode 100644 index 0000000..7e91d83 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? String.prototype.codePointAt + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/is-implemented.js new file mode 100644 index 0000000..b271589 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +var str = 'abc\uD834\uDF06def'; + +module.exports = function () { + if (typeof str.codePointAt !== 'function') return false; + return str.codePointAt(3) === 0x1D306; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/shim.js new file mode 100644 index 0000000..1c9038b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/shim.js @@ -0,0 +1,26 @@ +// Based on: https://github.com/mathiasbynens/String.prototype.codePointAt +// Thanks @mathiasbynens ! + +'use strict'; + +var toInteger = require('../../../number/to-integer') + , validValue = require('../../../object/valid-value'); + +module.exports = function (pos) { + var str = String(validValue(this)), l = str.length, first, second; + pos = toInteger(pos); + + // Account for out-of-bounds indices: + if (pos < 0 || pos >= l) return undefined; + + // Get the first code unit + first = str.charCodeAt(pos); + if ((first >= 0xD800) && (first <= 0xDBFF) && (l > pos + 1)) { + second = str.charCodeAt(pos + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/implement.js new file mode 100644 index 0000000..6b7a3c0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(String.prototype, 'contains', + { value: require('./shim'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/index.js new file mode 100644 index 0000000..abb3e37 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? String.prototype.contains + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/is-implemented.js new file mode 100644 index 0000000..6f7d4b7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +var str = 'razdwatrzy'; + +module.exports = function () { + if (typeof str.contains !== 'function') return false; + return ((str.contains('dwa') === true) && (str.contains('foo') === false)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/shim.js new file mode 100644 index 0000000..89e39e7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/shim.js @@ -0,0 +1,7 @@ +'use strict'; + +var indexOf = String.prototype.indexOf; + +module.exports = function (searchString/*, position*/) { + return indexOf.call(this, searchString, arguments[1]) > -1; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/implement.js new file mode 100644 index 0000000..0b09025 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(String.prototype, 'endsWith', + { value: require('./shim'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/index.js new file mode 100644 index 0000000..d2d9484 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? String.prototype.endsWith + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/is-implemented.js new file mode 100644 index 0000000..f3bb008 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +var str = 'razdwatrzy'; + +module.exports = function () { + if (typeof str.endsWith !== 'function') return false; + return ((str.endsWith('trzy') === true) && (str.endsWith('raz') === false)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/shim.js new file mode 100644 index 0000000..26cbdb1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/shim.js @@ -0,0 +1,16 @@ +'use strict'; + +var toInteger = require('../../../number/to-integer') + , value = require('../../../object/valid-value') + + , min = Math.min, max = Math.max; + +module.exports = function (searchString/*, endPosition*/) { + var self, start, endPos; + self = String(value(this)); + searchString = String(searchString); + endPos = arguments[1]; + start = ((endPos == null) ? self.length : + min(max(toInteger(endPos), 0), self.length)) - searchString.length; + return (start < 0) ? false : (self.indexOf(searchString, start) === start); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/hyphen-to-camel.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/hyphen-to-camel.js new file mode 100644 index 0000000..8928b02 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/hyphen-to-camel.js @@ -0,0 +1,8 @@ +'use strict'; + +var replace = String.prototype.replace + + , re = /-([a-z0-9])/g + , toUpperCase = function (m, a) { return a.toUpperCase(); }; + +module.exports = function () { return replace.call(this, re, toUpperCase); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/indent.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/indent.js new file mode 100644 index 0000000..223bd82 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/indent.js @@ -0,0 +1,12 @@ +'use strict'; + +var repeat = require('./repeat') + + , replace = String.prototype.replace + , re = /(\r\n|[\n\r\u2028\u2029])([\u0000-\u0009\u000b-\uffff]+)/g; + +module.exports = function (indent/*, count*/) { + var count = arguments[1]; + indent = repeat.call(String(indent), (count == null) ? 1 : count); + return indent + replace.call(this, re, '$1' + indent + '$2'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/index.js new file mode 100644 index 0000000..d45d747 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/index.js @@ -0,0 +1,21 @@ +'use strict'; + +module.exports = { + '@@iterator': require('./@@iterator'), + at: require('./at'), + camelToHyphen: require('./camel-to-hyphen'), + capitalize: require('./capitalize'), + caseInsensitiveCompare: require('./case-insensitive-compare'), + codePointAt: require('./code-point-at'), + contains: require('./contains'), + hyphenToCamel: require('./hyphen-to-camel'), + endsWith: require('./ends-with'), + indent: require('./indent'), + last: require('./last'), + normalize: require('./normalize'), + pad: require('./pad'), + plainReplace: require('./plain-replace'), + plainReplaceAll: require('./plain-replace-all'), + repeat: require('./repeat'), + startsWith: require('./starts-with') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/last.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/last.js new file mode 100644 index 0000000..d5cf46e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/last.js @@ -0,0 +1,8 @@ +'use strict'; + +var value = require('../../object/valid-value'); + +module.exports = function () { + var self = String(value(this)), l = self.length; + return l ? self[l - 1] : null; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/_data.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/_data.js new file mode 100644 index 0000000..e4e00a3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/_data.js @@ -0,0 +1,69 @@ +'use strict'; + +module.exports = { 0:{60:[,,{824:8814}],61:[,,{824:8800}],62:[,,{824:8815}],65:[,,{768:192,769:193,770:194,771:195,772:256,774:258,775:550,776:196,777:7842,778:197,780:461,783:512,785:514,803:7840,805:7680,808:260}],66:[,,{775:7682,803:7684,817:7686}],67:[,,{769:262,770:264,775:266,780:268,807:199}],68:[,,{775:7690,780:270,803:7692,807:7696,813:7698,817:7694}],69:[,,{768:200,769:201,770:202,771:7868,772:274,774:276,775:278,776:203,777:7866,780:282,783:516,785:518,803:7864,807:552,808:280,813:7704,816:7706}],70:[,,{775:7710}],71:[,,{769:500,770:284,772:7712,774:286,775:288,780:486,807:290}],72:[,,{770:292,775:7714,776:7718,780:542,803:7716,807:7720,814:7722}],73:[,,{768:204,769:205,770:206,771:296,772:298,774:300,775:304,776:207,777:7880,780:463,783:520,785:522,803:7882,808:302,816:7724}],74:[,,{770:308}],75:[,,{769:7728,780:488,803:7730,807:310,817:7732}],76:[,,{769:313,780:317,803:7734,807:315,813:7740,817:7738}],77:[,,{769:7742,775:7744,803:7746}],78:[,,{768:504,769:323,771:209,775:7748,780:327,803:7750,807:325,813:7754,817:7752}],79:[,,{768:210,769:211,770:212,771:213,772:332,774:334,775:558,776:214,777:7886,779:336,780:465,783:524,785:526,795:416,803:7884,808:490}],80:[,,{769:7764,775:7766}],82:[,,{769:340,775:7768,780:344,783:528,785:530,803:7770,807:342,817:7774}],83:[,,{769:346,770:348,775:7776,780:352,803:7778,806:536,807:350}],84:[,,{775:7786,780:356,803:7788,806:538,807:354,813:7792,817:7790}],85:[,,{768:217,769:218,770:219,771:360,772:362,774:364,776:220,777:7910,778:366,779:368,780:467,783:532,785:534,795:431,803:7908,804:7794,808:370,813:7798,816:7796}],86:[,,{771:7804,803:7806}],87:[,,{768:7808,769:7810,770:372,775:7814,776:7812,803:7816}],88:[,,{775:7818,776:7820}],89:[,,{768:7922,769:221,770:374,771:7928,772:562,775:7822,776:376,777:7926,803:7924}],90:[,,{769:377,770:7824,775:379,780:381,803:7826,817:7828}],97:[,,{768:224,769:225,770:226,771:227,772:257,774:259,775:551,776:228,777:7843,778:229,780:462,783:513,785:515,803:7841,805:7681,808:261}],98:[,,{775:7683,803:7685,817:7687}],99:[,,{769:263,770:265,775:267,780:269,807:231}],100:[,,{775:7691,780:271,803:7693,807:7697,813:7699,817:7695}],101:[,,{768:232,769:233,770:234,771:7869,772:275,774:277,775:279,776:235,777:7867,780:283,783:517,785:519,803:7865,807:553,808:281,813:7705,816:7707}],102:[,,{775:7711}],103:[,,{769:501,770:285,772:7713,774:287,775:289,780:487,807:291}],104:[,,{770:293,775:7715,776:7719,780:543,803:7717,807:7721,814:7723,817:7830}],105:[,,{768:236,769:237,770:238,771:297,772:299,774:301,776:239,777:7881,780:464,783:521,785:523,803:7883,808:303,816:7725}],106:[,,{770:309,780:496}],107:[,,{769:7729,780:489,803:7731,807:311,817:7733}],108:[,,{769:314,780:318,803:7735,807:316,813:7741,817:7739}],109:[,,{769:7743,775:7745,803:7747}],110:[,,{768:505,769:324,771:241,775:7749,780:328,803:7751,807:326,813:7755,817:7753}],111:[,,{768:242,769:243,770:244,771:245,772:333,774:335,775:559,776:246,777:7887,779:337,780:466,783:525,785:527,795:417,803:7885,808:491}],112:[,,{769:7765,775:7767}],114:[,,{769:341,775:7769,780:345,783:529,785:531,803:7771,807:343,817:7775}],115:[,,{769:347,770:349,775:7777,780:353,803:7779,806:537,807:351}],116:[,,{775:7787,776:7831,780:357,803:7789,806:539,807:355,813:7793,817:7791}],117:[,,{768:249,769:250,770:251,771:361,772:363,774:365,776:252,777:7911,778:367,779:369,780:468,783:533,785:535,795:432,803:7909,804:7795,808:371,813:7799,816:7797}],118:[,,{771:7805,803:7807}],119:[,,{768:7809,769:7811,770:373,775:7815,776:7813,778:7832,803:7817}],120:[,,{775:7819,776:7821}],121:[,,{768:7923,769:253,770:375,771:7929,772:563,775:7823,776:255,777:7927,778:7833,803:7925}],122:[,,{769:378,770:7825,775:380,780:382,803:7827,817:7829}],160:[[32],256],168:[[32,776],256,{768:8173,769:901,834:8129}],170:[[97],256],175:[[32,772],256],178:[[50],256],179:[[51],256],180:[[32,769],256],181:[[956],256],184:[[32,807],256],185:[[49],256],186:[[111],256],188:[[49,8260,52],256],189:[[49,8260,50],256],190:[[51,8260,52],256],192:[[65,768]],193:[[65,769]],194:[[65,770],,{768:7846,769:7844,771:7850,777:7848}],195:[[65,771]],196:[[65,776],,{772:478}],197:[[65,778],,{769:506}],198:[,,{769:508,772:482}],199:[[67,807],,{769:7688}],200:[[69,768]],201:[[69,769]],202:[[69,770],,{768:7872,769:7870,771:7876,777:7874}],203:[[69,776]],204:[[73,768]],205:[[73,769]],206:[[73,770]],207:[[73,776],,{769:7726}],209:[[78,771]],210:[[79,768]],211:[[79,769]],212:[[79,770],,{768:7890,769:7888,771:7894,777:7892}],213:[[79,771],,{769:7756,772:556,776:7758}],214:[[79,776],,{772:554}],216:[,,{769:510}],217:[[85,768]],218:[[85,769]],219:[[85,770]],220:[[85,776],,{768:475,769:471,772:469,780:473}],221:[[89,769]],224:[[97,768]],225:[[97,769]],226:[[97,770],,{768:7847,769:7845,771:7851,777:7849}],227:[[97,771]],228:[[97,776],,{772:479}],229:[[97,778],,{769:507}],230:[,,{769:509,772:483}],231:[[99,807],,{769:7689}],232:[[101,768]],233:[[101,769]],234:[[101,770],,{768:7873,769:7871,771:7877,777:7875}],235:[[101,776]],236:[[105,768]],237:[[105,769]],238:[[105,770]],239:[[105,776],,{769:7727}],241:[[110,771]],242:[[111,768]],243:[[111,769]],244:[[111,770],,{768:7891,769:7889,771:7895,777:7893}],245:[[111,771],,{769:7757,772:557,776:7759}],246:[[111,776],,{772:555}],248:[,,{769:511}],249:[[117,768]],250:[[117,769]],251:[[117,770]],252:[[117,776],,{768:476,769:472,772:470,780:474}],253:[[121,769]],255:[[121,776]]}, + 256:{256:[[65,772]],257:[[97,772]],258:[[65,774],,{768:7856,769:7854,771:7860,777:7858}],259:[[97,774],,{768:7857,769:7855,771:7861,777:7859}],260:[[65,808]],261:[[97,808]],262:[[67,769]],263:[[99,769]],264:[[67,770]],265:[[99,770]],266:[[67,775]],267:[[99,775]],268:[[67,780]],269:[[99,780]],270:[[68,780]],271:[[100,780]],274:[[69,772],,{768:7700,769:7702}],275:[[101,772],,{768:7701,769:7703}],276:[[69,774]],277:[[101,774]],278:[[69,775]],279:[[101,775]],280:[[69,808]],281:[[101,808]],282:[[69,780]],283:[[101,780]],284:[[71,770]],285:[[103,770]],286:[[71,774]],287:[[103,774]],288:[[71,775]],289:[[103,775]],290:[[71,807]],291:[[103,807]],292:[[72,770]],293:[[104,770]],296:[[73,771]],297:[[105,771]],298:[[73,772]],299:[[105,772]],300:[[73,774]],301:[[105,774]],302:[[73,808]],303:[[105,808]],304:[[73,775]],306:[[73,74],256],307:[[105,106],256],308:[[74,770]],309:[[106,770]],310:[[75,807]],311:[[107,807]],313:[[76,769]],314:[[108,769]],315:[[76,807]],316:[[108,807]],317:[[76,780]],318:[[108,780]],319:[[76,183],256],320:[[108,183],256],323:[[78,769]],324:[[110,769]],325:[[78,807]],326:[[110,807]],327:[[78,780]],328:[[110,780]],329:[[700,110],256],332:[[79,772],,{768:7760,769:7762}],333:[[111,772],,{768:7761,769:7763}],334:[[79,774]],335:[[111,774]],336:[[79,779]],337:[[111,779]],340:[[82,769]],341:[[114,769]],342:[[82,807]],343:[[114,807]],344:[[82,780]],345:[[114,780]],346:[[83,769],,{775:7780}],347:[[115,769],,{775:7781}],348:[[83,770]],349:[[115,770]],350:[[83,807]],351:[[115,807]],352:[[83,780],,{775:7782}],353:[[115,780],,{775:7783}],354:[[84,807]],355:[[116,807]],356:[[84,780]],357:[[116,780]],360:[[85,771],,{769:7800}],361:[[117,771],,{769:7801}],362:[[85,772],,{776:7802}],363:[[117,772],,{776:7803}],364:[[85,774]],365:[[117,774]],366:[[85,778]],367:[[117,778]],368:[[85,779]],369:[[117,779]],370:[[85,808]],371:[[117,808]],372:[[87,770]],373:[[119,770]],374:[[89,770]],375:[[121,770]],376:[[89,776]],377:[[90,769]],378:[[122,769]],379:[[90,775]],380:[[122,775]],381:[[90,780]],382:[[122,780]],383:[[115],256,{775:7835}],416:[[79,795],,{768:7900,769:7898,771:7904,777:7902,803:7906}],417:[[111,795],,{768:7901,769:7899,771:7905,777:7903,803:7907}],431:[[85,795],,{768:7914,769:7912,771:7918,777:7916,803:7920}],432:[[117,795],,{768:7915,769:7913,771:7919,777:7917,803:7921}],439:[,,{780:494}],452:[[68,381],256],453:[[68,382],256],454:[[100,382],256],455:[[76,74],256],456:[[76,106],256],457:[[108,106],256],458:[[78,74],256],459:[[78,106],256],460:[[110,106],256],461:[[65,780]],462:[[97,780]],463:[[73,780]],464:[[105,780]],465:[[79,780]],466:[[111,780]],467:[[85,780]],468:[[117,780]],469:[[220,772]],470:[[252,772]],471:[[220,769]],472:[[252,769]],473:[[220,780]],474:[[252,780]],475:[[220,768]],476:[[252,768]],478:[[196,772]],479:[[228,772]],480:[[550,772]],481:[[551,772]],482:[[198,772]],483:[[230,772]],486:[[71,780]],487:[[103,780]],488:[[75,780]],489:[[107,780]],490:[[79,808],,{772:492}],491:[[111,808],,{772:493}],492:[[490,772]],493:[[491,772]],494:[[439,780]],495:[[658,780]],496:[[106,780]],497:[[68,90],256],498:[[68,122],256],499:[[100,122],256],500:[[71,769]],501:[[103,769]],504:[[78,768]],505:[[110,768]],506:[[197,769]],507:[[229,769]],508:[[198,769]],509:[[230,769]],510:[[216,769]],511:[[248,769]],66045:[,220]}, + 512:{512:[[65,783]],513:[[97,783]],514:[[65,785]],515:[[97,785]],516:[[69,783]],517:[[101,783]],518:[[69,785]],519:[[101,785]],520:[[73,783]],521:[[105,783]],522:[[73,785]],523:[[105,785]],524:[[79,783]],525:[[111,783]],526:[[79,785]],527:[[111,785]],528:[[82,783]],529:[[114,783]],530:[[82,785]],531:[[114,785]],532:[[85,783]],533:[[117,783]],534:[[85,785]],535:[[117,785]],536:[[83,806]],537:[[115,806]],538:[[84,806]],539:[[116,806]],542:[[72,780]],543:[[104,780]],550:[[65,775],,{772:480}],551:[[97,775],,{772:481}],552:[[69,807],,{774:7708}],553:[[101,807],,{774:7709}],554:[[214,772]],555:[[246,772]],556:[[213,772]],557:[[245,772]],558:[[79,775],,{772:560}],559:[[111,775],,{772:561}],560:[[558,772]],561:[[559,772]],562:[[89,772]],563:[[121,772]],658:[,,{780:495}],688:[[104],256],689:[[614],256],690:[[106],256],691:[[114],256],692:[[633],256],693:[[635],256],694:[[641],256],695:[[119],256],696:[[121],256],728:[[32,774],256],729:[[32,775],256],730:[[32,778],256],731:[[32,808],256],732:[[32,771],256],733:[[32,779],256],736:[[611],256],737:[[108],256],738:[[115],256],739:[[120],256],740:[[661],256]}, + 768:{768:[,230],769:[,230],770:[,230],771:[,230],772:[,230],773:[,230],774:[,230],775:[,230],776:[,230,{769:836}],777:[,230],778:[,230],779:[,230],780:[,230],781:[,230],782:[,230],783:[,230],784:[,230],785:[,230],786:[,230],787:[,230],788:[,230],789:[,232],790:[,220],791:[,220],792:[,220],793:[,220],794:[,232],795:[,216],796:[,220],797:[,220],798:[,220],799:[,220],800:[,220],801:[,202],802:[,202],803:[,220],804:[,220],805:[,220],806:[,220],807:[,202],808:[,202],809:[,220],810:[,220],811:[,220],812:[,220],813:[,220],814:[,220],815:[,220],816:[,220],817:[,220],818:[,220],819:[,220],820:[,1],821:[,1],822:[,1],823:[,1],824:[,1],825:[,220],826:[,220],827:[,220],828:[,220],829:[,230],830:[,230],831:[,230],832:[[768],230],833:[[769],230],834:[,230],835:[[787],230],836:[[776,769],230],837:[,240],838:[,230],839:[,220],840:[,220],841:[,220],842:[,230],843:[,230],844:[,230],845:[,220],846:[,220],848:[,230],849:[,230],850:[,230],851:[,220],852:[,220],853:[,220],854:[,220],855:[,230],856:[,232],857:[,220],858:[,220],859:[,230],860:[,233],861:[,234],862:[,234],863:[,233],864:[,234],865:[,234],866:[,233],867:[,230],868:[,230],869:[,230],870:[,230],871:[,230],872:[,230],873:[,230],874:[,230],875:[,230],876:[,230],877:[,230],878:[,230],879:[,230],884:[[697]],890:[[32,837],256],894:[[59]],900:[[32,769],256],901:[[168,769]],902:[[913,769]],903:[[183]],904:[[917,769]],905:[[919,769]],906:[[921,769]],908:[[927,769]],910:[[933,769]],911:[[937,769]],912:[[970,769]],913:[,,{768:8122,769:902,772:8121,774:8120,787:7944,788:7945,837:8124}],917:[,,{768:8136,769:904,787:7960,788:7961}],919:[,,{768:8138,769:905,787:7976,788:7977,837:8140}],921:[,,{768:8154,769:906,772:8153,774:8152,776:938,787:7992,788:7993}],927:[,,{768:8184,769:908,787:8008,788:8009}],929:[,,{788:8172}],933:[,,{768:8170,769:910,772:8169,774:8168,776:939,788:8025}],937:[,,{768:8186,769:911,787:8040,788:8041,837:8188}],938:[[921,776]],939:[[933,776]],940:[[945,769],,{837:8116}],941:[[949,769]],942:[[951,769],,{837:8132}],943:[[953,769]],944:[[971,769]],945:[,,{768:8048,769:940,772:8113,774:8112,787:7936,788:7937,834:8118,837:8115}],949:[,,{768:8050,769:941,787:7952,788:7953}],951:[,,{768:8052,769:942,787:7968,788:7969,834:8134,837:8131}],953:[,,{768:8054,769:943,772:8145,774:8144,776:970,787:7984,788:7985,834:8150}],959:[,,{768:8056,769:972,787:8000,788:8001}],961:[,,{787:8164,788:8165}],965:[,,{768:8058,769:973,772:8161,774:8160,776:971,787:8016,788:8017,834:8166}],969:[,,{768:8060,769:974,787:8032,788:8033,834:8182,837:8179}],970:[[953,776],,{768:8146,769:912,834:8151}],971:[[965,776],,{768:8162,769:944,834:8167}],972:[[959,769]],973:[[965,769]],974:[[969,769],,{837:8180}],976:[[946],256],977:[[952],256],978:[[933],256,{769:979,776:980}],979:[[978,769]],980:[[978,776]],981:[[966],256],982:[[960],256],1008:[[954],256],1009:[[961],256],1010:[[962],256],1012:[[920],256],1013:[[949],256],1017:[[931],256]}, + 1024:{1024:[[1045,768]],1025:[[1045,776]],1027:[[1043,769]],1030:[,,{776:1031}],1031:[[1030,776]],1036:[[1050,769]],1037:[[1048,768]],1038:[[1059,774]],1040:[,,{774:1232,776:1234}],1043:[,,{769:1027}],1045:[,,{768:1024,774:1238,776:1025}],1046:[,,{774:1217,776:1244}],1047:[,,{776:1246}],1048:[,,{768:1037,772:1250,774:1049,776:1252}],1049:[[1048,774]],1050:[,,{769:1036}],1054:[,,{776:1254}],1059:[,,{772:1262,774:1038,776:1264,779:1266}],1063:[,,{776:1268}],1067:[,,{776:1272}],1069:[,,{776:1260}],1072:[,,{774:1233,776:1235}],1075:[,,{769:1107}],1077:[,,{768:1104,774:1239,776:1105}],1078:[,,{774:1218,776:1245}],1079:[,,{776:1247}],1080:[,,{768:1117,772:1251,774:1081,776:1253}],1081:[[1080,774]],1082:[,,{769:1116}],1086:[,,{776:1255}],1091:[,,{772:1263,774:1118,776:1265,779:1267}],1095:[,,{776:1269}],1099:[,,{776:1273}],1101:[,,{776:1261}],1104:[[1077,768]],1105:[[1077,776]],1107:[[1075,769]],1110:[,,{776:1111}],1111:[[1110,776]],1116:[[1082,769]],1117:[[1080,768]],1118:[[1091,774]],1140:[,,{783:1142}],1141:[,,{783:1143}],1142:[[1140,783]],1143:[[1141,783]],1155:[,230],1156:[,230],1157:[,230],1158:[,230],1159:[,230],1217:[[1046,774]],1218:[[1078,774]],1232:[[1040,774]],1233:[[1072,774]],1234:[[1040,776]],1235:[[1072,776]],1238:[[1045,774]],1239:[[1077,774]],1240:[,,{776:1242}],1241:[,,{776:1243}],1242:[[1240,776]],1243:[[1241,776]],1244:[[1046,776]],1245:[[1078,776]],1246:[[1047,776]],1247:[[1079,776]],1250:[[1048,772]],1251:[[1080,772]],1252:[[1048,776]],1253:[[1080,776]],1254:[[1054,776]],1255:[[1086,776]],1256:[,,{776:1258}],1257:[,,{776:1259}],1258:[[1256,776]],1259:[[1257,776]],1260:[[1069,776]],1261:[[1101,776]],1262:[[1059,772]],1263:[[1091,772]],1264:[[1059,776]],1265:[[1091,776]],1266:[[1059,779]],1267:[[1091,779]],1268:[[1063,776]],1269:[[1095,776]],1272:[[1067,776]],1273:[[1099,776]]}, + 1280:{1415:[[1381,1410],256],1425:[,220],1426:[,230],1427:[,230],1428:[,230],1429:[,230],1430:[,220],1431:[,230],1432:[,230],1433:[,230],1434:[,222],1435:[,220],1436:[,230],1437:[,230],1438:[,230],1439:[,230],1440:[,230],1441:[,230],1442:[,220],1443:[,220],1444:[,220],1445:[,220],1446:[,220],1447:[,220],1448:[,230],1449:[,230],1450:[,220],1451:[,230],1452:[,230],1453:[,222],1454:[,228],1455:[,230],1456:[,10],1457:[,11],1458:[,12],1459:[,13],1460:[,14],1461:[,15],1462:[,16],1463:[,17],1464:[,18],1465:[,19],1466:[,19],1467:[,20],1468:[,21],1469:[,22],1471:[,23],1473:[,24],1474:[,25],1476:[,230],1477:[,220],1479:[,18]}, + 1536:{1552:[,230],1553:[,230],1554:[,230],1555:[,230],1556:[,230],1557:[,230],1558:[,230],1559:[,230],1560:[,30],1561:[,31],1562:[,32],1570:[[1575,1619]],1571:[[1575,1620]],1572:[[1608,1620]],1573:[[1575,1621]],1574:[[1610,1620]],1575:[,,{1619:1570,1620:1571,1621:1573}],1608:[,,{1620:1572}],1610:[,,{1620:1574}],1611:[,27],1612:[,28],1613:[,29],1614:[,30],1615:[,31],1616:[,32],1617:[,33],1618:[,34],1619:[,230],1620:[,230],1621:[,220],1622:[,220],1623:[,230],1624:[,230],1625:[,230],1626:[,230],1627:[,230],1628:[,220],1629:[,230],1630:[,230],1631:[,220],1648:[,35],1653:[[1575,1652],256],1654:[[1608,1652],256],1655:[[1735,1652],256],1656:[[1610,1652],256],1728:[[1749,1620]],1729:[,,{1620:1730}],1730:[[1729,1620]],1746:[,,{1620:1747}],1747:[[1746,1620]],1749:[,,{1620:1728}],1750:[,230],1751:[,230],1752:[,230],1753:[,230],1754:[,230],1755:[,230],1756:[,230],1759:[,230],1760:[,230],1761:[,230],1762:[,230],1763:[,220],1764:[,230],1767:[,230],1768:[,230],1770:[,220],1771:[,230],1772:[,230],1773:[,220]}, + 1792:{1809:[,36],1840:[,230],1841:[,220],1842:[,230],1843:[,230],1844:[,220],1845:[,230],1846:[,230],1847:[,220],1848:[,220],1849:[,220],1850:[,230],1851:[,220],1852:[,220],1853:[,230],1854:[,220],1855:[,230],1856:[,230],1857:[,230],1858:[,220],1859:[,230],1860:[,220],1861:[,230],1862:[,220],1863:[,230],1864:[,220],1865:[,230],1866:[,230],2027:[,230],2028:[,230],2029:[,230],2030:[,230],2031:[,230],2032:[,230],2033:[,230],2034:[,220],2035:[,230]}, + 2048:{2070:[,230],2071:[,230],2072:[,230],2073:[,230],2075:[,230],2076:[,230],2077:[,230],2078:[,230],2079:[,230],2080:[,230],2081:[,230],2082:[,230],2083:[,230],2085:[,230],2086:[,230],2087:[,230],2089:[,230],2090:[,230],2091:[,230],2092:[,230],2093:[,230],2137:[,220],2138:[,220],2139:[,220],2276:[,230],2277:[,230],2278:[,220],2279:[,230],2280:[,230],2281:[,220],2282:[,230],2283:[,230],2284:[,230],2285:[,220],2286:[,220],2287:[,220],2288:[,27],2289:[,28],2290:[,29],2291:[,230],2292:[,230],2293:[,230],2294:[,220],2295:[,230],2296:[,230],2297:[,220],2298:[,220],2299:[,230],2300:[,230],2301:[,230],2302:[,230]}, + 2304:{2344:[,,{2364:2345}],2345:[[2344,2364]],2352:[,,{2364:2353}],2353:[[2352,2364]],2355:[,,{2364:2356}],2356:[[2355,2364]],2364:[,7],2381:[,9],2385:[,230],2386:[,220],2387:[,230],2388:[,230],2392:[[2325,2364],512],2393:[[2326,2364],512],2394:[[2327,2364],512],2395:[[2332,2364],512],2396:[[2337,2364],512],2397:[[2338,2364],512],2398:[[2347,2364],512],2399:[[2351,2364],512],2492:[,7],2503:[,,{2494:2507,2519:2508}],2507:[[2503,2494]],2508:[[2503,2519]],2509:[,9],2524:[[2465,2492],512],2525:[[2466,2492],512],2527:[[2479,2492],512]}, + 2560:{2611:[[2610,2620],512],2614:[[2616,2620],512],2620:[,7],2637:[,9],2649:[[2582,2620],512],2650:[[2583,2620],512],2651:[[2588,2620],512],2654:[[2603,2620],512],2748:[,7],2765:[,9],68109:[,220],68111:[,230],68152:[,230],68153:[,1],68154:[,220],68159:[,9]}, + 2816:{2876:[,7],2887:[,,{2878:2891,2902:2888,2903:2892}],2888:[[2887,2902]],2891:[[2887,2878]],2892:[[2887,2903]],2893:[,9],2908:[[2849,2876],512],2909:[[2850,2876],512],2962:[,,{3031:2964}],2964:[[2962,3031]],3014:[,,{3006:3018,3031:3020}],3015:[,,{3006:3019}],3018:[[3014,3006]],3019:[[3015,3006]],3020:[[3014,3031]],3021:[,9]}, + 3072:{3142:[,,{3158:3144}],3144:[[3142,3158]],3149:[,9],3157:[,84],3158:[,91],3260:[,7],3263:[,,{3285:3264}],3264:[[3263,3285]],3270:[,,{3266:3274,3285:3271,3286:3272}],3271:[[3270,3285]],3272:[[3270,3286]],3274:[[3270,3266],,{3285:3275}],3275:[[3274,3285]],3277:[,9]}, + 3328:{3398:[,,{3390:3402,3415:3404}],3399:[,,{3390:3403}],3402:[[3398,3390]],3403:[[3399,3390]],3404:[[3398,3415]],3405:[,9],3530:[,9],3545:[,,{3530:3546,3535:3548,3551:3550}],3546:[[3545,3530]],3548:[[3545,3535],,{3530:3549}],3549:[[3548,3530]],3550:[[3545,3551]]}, + 3584:{3635:[[3661,3634],256],3640:[,103],3641:[,103],3642:[,9],3656:[,107],3657:[,107],3658:[,107],3659:[,107],3763:[[3789,3762],256],3768:[,118],3769:[,118],3784:[,122],3785:[,122],3786:[,122],3787:[,122],3804:[[3755,3737],256],3805:[[3755,3745],256]}, + 3840:{3852:[[3851],256],3864:[,220],3865:[,220],3893:[,220],3895:[,220],3897:[,216],3907:[[3906,4023],512],3917:[[3916,4023],512],3922:[[3921,4023],512],3927:[[3926,4023],512],3932:[[3931,4023],512],3945:[[3904,4021],512],3953:[,129],3954:[,130],3955:[[3953,3954],512],3956:[,132],3957:[[3953,3956],512],3958:[[4018,3968],512],3959:[[4018,3969],256],3960:[[4019,3968],512],3961:[[4019,3969],256],3962:[,130],3963:[,130],3964:[,130],3965:[,130],3968:[,130],3969:[[3953,3968],512],3970:[,230],3971:[,230],3972:[,9],3974:[,230],3975:[,230],3987:[[3986,4023],512],3997:[[3996,4023],512],4002:[[4001,4023],512],4007:[[4006,4023],512],4012:[[4011,4023],512],4025:[[3984,4021],512],4038:[,220]}, + 4096:{4133:[,,{4142:4134}],4134:[[4133,4142]],4151:[,7],4153:[,9],4154:[,9],4237:[,220],4348:[[4316],256],69702:[,9],69785:[,,{69818:69786}],69786:[[69785,69818]],69787:[,,{69818:69788}],69788:[[69787,69818]],69797:[,,{69818:69803}],69803:[[69797,69818]],69817:[,9],69818:[,7]}, + 4352:{69888:[,230],69889:[,230],69890:[,230],69934:[[69937,69927]],69935:[[69938,69927]],69937:[,,{69927:69934}],69938:[,,{69927:69935}],69939:[,9],69940:[,9],70080:[,9]}, + 4864:{4957:[,230],4958:[,230],4959:[,230]}, + 5632:{71350:[,9],71351:[,7]}, + 5888:{5908:[,9],5940:[,9],6098:[,9],6109:[,230]}, + 6144:{6313:[,228]}, + 6400:{6457:[,222],6458:[,230],6459:[,220]}, + 6656:{6679:[,230],6680:[,220],6752:[,9],6773:[,230],6774:[,230],6775:[,230],6776:[,230],6777:[,230],6778:[,230],6779:[,230],6780:[,230],6783:[,220]}, + 6912:{6917:[,,{6965:6918}],6918:[[6917,6965]],6919:[,,{6965:6920}],6920:[[6919,6965]],6921:[,,{6965:6922}],6922:[[6921,6965]],6923:[,,{6965:6924}],6924:[[6923,6965]],6925:[,,{6965:6926}],6926:[[6925,6965]],6929:[,,{6965:6930}],6930:[[6929,6965]],6964:[,7],6970:[,,{6965:6971}],6971:[[6970,6965]],6972:[,,{6965:6973}],6973:[[6972,6965]],6974:[,,{6965:6976}],6975:[,,{6965:6977}],6976:[[6974,6965]],6977:[[6975,6965]],6978:[,,{6965:6979}],6979:[[6978,6965]],6980:[,9],7019:[,230],7020:[,220],7021:[,230],7022:[,230],7023:[,230],7024:[,230],7025:[,230],7026:[,230],7027:[,230],7082:[,9],7083:[,9],7142:[,7],7154:[,9],7155:[,9]}, + 7168:{7223:[,7],7376:[,230],7377:[,230],7378:[,230],7380:[,1],7381:[,220],7382:[,220],7383:[,220],7384:[,220],7385:[,220],7386:[,230],7387:[,230],7388:[,220],7389:[,220],7390:[,220],7391:[,220],7392:[,230],7394:[,1],7395:[,1],7396:[,1],7397:[,1],7398:[,1],7399:[,1],7400:[,1],7405:[,220],7412:[,230]}, + 7424:{7468:[[65],256],7469:[[198],256],7470:[[66],256],7472:[[68],256],7473:[[69],256],7474:[[398],256],7475:[[71],256],7476:[[72],256],7477:[[73],256],7478:[[74],256],7479:[[75],256],7480:[[76],256],7481:[[77],256],7482:[[78],256],7484:[[79],256],7485:[[546],256],7486:[[80],256],7487:[[82],256],7488:[[84],256],7489:[[85],256],7490:[[87],256],7491:[[97],256],7492:[[592],256],7493:[[593],256],7494:[[7426],256],7495:[[98],256],7496:[[100],256],7497:[[101],256],7498:[[601],256],7499:[[603],256],7500:[[604],256],7501:[[103],256],7503:[[107],256],7504:[[109],256],7505:[[331],256],7506:[[111],256],7507:[[596],256],7508:[[7446],256],7509:[[7447],256],7510:[[112],256],7511:[[116],256],7512:[[117],256],7513:[[7453],256],7514:[[623],256],7515:[[118],256],7516:[[7461],256],7517:[[946],256],7518:[[947],256],7519:[[948],256],7520:[[966],256],7521:[[967],256],7522:[[105],256],7523:[[114],256],7524:[[117],256],7525:[[118],256],7526:[[946],256],7527:[[947],256],7528:[[961],256],7529:[[966],256],7530:[[967],256],7544:[[1085],256],7579:[[594],256],7580:[[99],256],7581:[[597],256],7582:[[240],256],7583:[[604],256],7584:[[102],256],7585:[[607],256],7586:[[609],256],7587:[[613],256],7588:[[616],256],7589:[[617],256],7590:[[618],256],7591:[[7547],256],7592:[[669],256],7593:[[621],256],7594:[[7557],256],7595:[[671],256],7596:[[625],256],7597:[[624],256],7598:[[626],256],7599:[[627],256],7600:[[628],256],7601:[[629],256],7602:[[632],256],7603:[[642],256],7604:[[643],256],7605:[[427],256],7606:[[649],256],7607:[[650],256],7608:[[7452],256],7609:[[651],256],7610:[[652],256],7611:[[122],256],7612:[[656],256],7613:[[657],256],7614:[[658],256],7615:[[952],256],7616:[,230],7617:[,230],7618:[,220],7619:[,230],7620:[,230],7621:[,230],7622:[,230],7623:[,230],7624:[,230],7625:[,230],7626:[,220],7627:[,230],7628:[,230],7629:[,234],7630:[,214],7631:[,220],7632:[,202],7633:[,230],7634:[,230],7635:[,230],7636:[,230],7637:[,230],7638:[,230],7639:[,230],7640:[,230],7641:[,230],7642:[,230],7643:[,230],7644:[,230],7645:[,230],7646:[,230],7647:[,230],7648:[,230],7649:[,230],7650:[,230],7651:[,230],7652:[,230],7653:[,230],7654:[,230],7676:[,233],7677:[,220],7678:[,230],7679:[,220]}, + 7680:{7680:[[65,805]],7681:[[97,805]],7682:[[66,775]],7683:[[98,775]],7684:[[66,803]],7685:[[98,803]],7686:[[66,817]],7687:[[98,817]],7688:[[199,769]],7689:[[231,769]],7690:[[68,775]],7691:[[100,775]],7692:[[68,803]],7693:[[100,803]],7694:[[68,817]],7695:[[100,817]],7696:[[68,807]],7697:[[100,807]],7698:[[68,813]],7699:[[100,813]],7700:[[274,768]],7701:[[275,768]],7702:[[274,769]],7703:[[275,769]],7704:[[69,813]],7705:[[101,813]],7706:[[69,816]],7707:[[101,816]],7708:[[552,774]],7709:[[553,774]],7710:[[70,775]],7711:[[102,775]],7712:[[71,772]],7713:[[103,772]],7714:[[72,775]],7715:[[104,775]],7716:[[72,803]],7717:[[104,803]],7718:[[72,776]],7719:[[104,776]],7720:[[72,807]],7721:[[104,807]],7722:[[72,814]],7723:[[104,814]],7724:[[73,816]],7725:[[105,816]],7726:[[207,769]],7727:[[239,769]],7728:[[75,769]],7729:[[107,769]],7730:[[75,803]],7731:[[107,803]],7732:[[75,817]],7733:[[107,817]],7734:[[76,803],,{772:7736}],7735:[[108,803],,{772:7737}],7736:[[7734,772]],7737:[[7735,772]],7738:[[76,817]],7739:[[108,817]],7740:[[76,813]],7741:[[108,813]],7742:[[77,769]],7743:[[109,769]],7744:[[77,775]],7745:[[109,775]],7746:[[77,803]],7747:[[109,803]],7748:[[78,775]],7749:[[110,775]],7750:[[78,803]],7751:[[110,803]],7752:[[78,817]],7753:[[110,817]],7754:[[78,813]],7755:[[110,813]],7756:[[213,769]],7757:[[245,769]],7758:[[213,776]],7759:[[245,776]],7760:[[332,768]],7761:[[333,768]],7762:[[332,769]],7763:[[333,769]],7764:[[80,769]],7765:[[112,769]],7766:[[80,775]],7767:[[112,775]],7768:[[82,775]],7769:[[114,775]],7770:[[82,803],,{772:7772}],7771:[[114,803],,{772:7773}],7772:[[7770,772]],7773:[[7771,772]],7774:[[82,817]],7775:[[114,817]],7776:[[83,775]],7777:[[115,775]],7778:[[83,803],,{775:7784}],7779:[[115,803],,{775:7785}],7780:[[346,775]],7781:[[347,775]],7782:[[352,775]],7783:[[353,775]],7784:[[7778,775]],7785:[[7779,775]],7786:[[84,775]],7787:[[116,775]],7788:[[84,803]],7789:[[116,803]],7790:[[84,817]],7791:[[116,817]],7792:[[84,813]],7793:[[116,813]],7794:[[85,804]],7795:[[117,804]],7796:[[85,816]],7797:[[117,816]],7798:[[85,813]],7799:[[117,813]],7800:[[360,769]],7801:[[361,769]],7802:[[362,776]],7803:[[363,776]],7804:[[86,771]],7805:[[118,771]],7806:[[86,803]],7807:[[118,803]],7808:[[87,768]],7809:[[119,768]],7810:[[87,769]],7811:[[119,769]],7812:[[87,776]],7813:[[119,776]],7814:[[87,775]],7815:[[119,775]],7816:[[87,803]],7817:[[119,803]],7818:[[88,775]],7819:[[120,775]],7820:[[88,776]],7821:[[120,776]],7822:[[89,775]],7823:[[121,775]],7824:[[90,770]],7825:[[122,770]],7826:[[90,803]],7827:[[122,803]],7828:[[90,817]],7829:[[122,817]],7830:[[104,817]],7831:[[116,776]],7832:[[119,778]],7833:[[121,778]],7834:[[97,702],256],7835:[[383,775]],7840:[[65,803],,{770:7852,774:7862}],7841:[[97,803],,{770:7853,774:7863}],7842:[[65,777]],7843:[[97,777]],7844:[[194,769]],7845:[[226,769]],7846:[[194,768]],7847:[[226,768]],7848:[[194,777]],7849:[[226,777]],7850:[[194,771]],7851:[[226,771]],7852:[[7840,770]],7853:[[7841,770]],7854:[[258,769]],7855:[[259,769]],7856:[[258,768]],7857:[[259,768]],7858:[[258,777]],7859:[[259,777]],7860:[[258,771]],7861:[[259,771]],7862:[[7840,774]],7863:[[7841,774]],7864:[[69,803],,{770:7878}],7865:[[101,803],,{770:7879}],7866:[[69,777]],7867:[[101,777]],7868:[[69,771]],7869:[[101,771]],7870:[[202,769]],7871:[[234,769]],7872:[[202,768]],7873:[[234,768]],7874:[[202,777]],7875:[[234,777]],7876:[[202,771]],7877:[[234,771]],7878:[[7864,770]],7879:[[7865,770]],7880:[[73,777]],7881:[[105,777]],7882:[[73,803]],7883:[[105,803]],7884:[[79,803],,{770:7896}],7885:[[111,803],,{770:7897}],7886:[[79,777]],7887:[[111,777]],7888:[[212,769]],7889:[[244,769]],7890:[[212,768]],7891:[[244,768]],7892:[[212,777]],7893:[[244,777]],7894:[[212,771]],7895:[[244,771]],7896:[[7884,770]],7897:[[7885,770]],7898:[[416,769]],7899:[[417,769]],7900:[[416,768]],7901:[[417,768]],7902:[[416,777]],7903:[[417,777]],7904:[[416,771]],7905:[[417,771]],7906:[[416,803]],7907:[[417,803]],7908:[[85,803]],7909:[[117,803]],7910:[[85,777]],7911:[[117,777]],7912:[[431,769]],7913:[[432,769]],7914:[[431,768]],7915:[[432,768]],7916:[[431,777]],7917:[[432,777]],7918:[[431,771]],7919:[[432,771]],7920:[[431,803]],7921:[[432,803]],7922:[[89,768]],7923:[[121,768]],7924:[[89,803]],7925:[[121,803]],7926:[[89,777]],7927:[[121,777]],7928:[[89,771]],7929:[[121,771]]}, + 7936:{7936:[[945,787],,{768:7938,769:7940,834:7942,837:8064}],7937:[[945,788],,{768:7939,769:7941,834:7943,837:8065}],7938:[[7936,768],,{837:8066}],7939:[[7937,768],,{837:8067}],7940:[[7936,769],,{837:8068}],7941:[[7937,769],,{837:8069}],7942:[[7936,834],,{837:8070}],7943:[[7937,834],,{837:8071}],7944:[[913,787],,{768:7946,769:7948,834:7950,837:8072}],7945:[[913,788],,{768:7947,769:7949,834:7951,837:8073}],7946:[[7944,768],,{837:8074}],7947:[[7945,768],,{837:8075}],7948:[[7944,769],,{837:8076}],7949:[[7945,769],,{837:8077}],7950:[[7944,834],,{837:8078}],7951:[[7945,834],,{837:8079}],7952:[[949,787],,{768:7954,769:7956}],7953:[[949,788],,{768:7955,769:7957}],7954:[[7952,768]],7955:[[7953,768]],7956:[[7952,769]],7957:[[7953,769]],7960:[[917,787],,{768:7962,769:7964}],7961:[[917,788],,{768:7963,769:7965}],7962:[[7960,768]],7963:[[7961,768]],7964:[[7960,769]],7965:[[7961,769]],7968:[[951,787],,{768:7970,769:7972,834:7974,837:8080}],7969:[[951,788],,{768:7971,769:7973,834:7975,837:8081}],7970:[[7968,768],,{837:8082}],7971:[[7969,768],,{837:8083}],7972:[[7968,769],,{837:8084}],7973:[[7969,769],,{837:8085}],7974:[[7968,834],,{837:8086}],7975:[[7969,834],,{837:8087}],7976:[[919,787],,{768:7978,769:7980,834:7982,837:8088}],7977:[[919,788],,{768:7979,769:7981,834:7983,837:8089}],7978:[[7976,768],,{837:8090}],7979:[[7977,768],,{837:8091}],7980:[[7976,769],,{837:8092}],7981:[[7977,769],,{837:8093}],7982:[[7976,834],,{837:8094}],7983:[[7977,834],,{837:8095}],7984:[[953,787],,{768:7986,769:7988,834:7990}],7985:[[953,788],,{768:7987,769:7989,834:7991}],7986:[[7984,768]],7987:[[7985,768]],7988:[[7984,769]],7989:[[7985,769]],7990:[[7984,834]],7991:[[7985,834]],7992:[[921,787],,{768:7994,769:7996,834:7998}],7993:[[921,788],,{768:7995,769:7997,834:7999}],7994:[[7992,768]],7995:[[7993,768]],7996:[[7992,769]],7997:[[7993,769]],7998:[[7992,834]],7999:[[7993,834]],8000:[[959,787],,{768:8002,769:8004}],8001:[[959,788],,{768:8003,769:8005}],8002:[[8000,768]],8003:[[8001,768]],8004:[[8000,769]],8005:[[8001,769]],8008:[[927,787],,{768:8010,769:8012}],8009:[[927,788],,{768:8011,769:8013}],8010:[[8008,768]],8011:[[8009,768]],8012:[[8008,769]],8013:[[8009,769]],8016:[[965,787],,{768:8018,769:8020,834:8022}],8017:[[965,788],,{768:8019,769:8021,834:8023}],8018:[[8016,768]],8019:[[8017,768]],8020:[[8016,769]],8021:[[8017,769]],8022:[[8016,834]],8023:[[8017,834]],8025:[[933,788],,{768:8027,769:8029,834:8031}],8027:[[8025,768]],8029:[[8025,769]],8031:[[8025,834]],8032:[[969,787],,{768:8034,769:8036,834:8038,837:8096}],8033:[[969,788],,{768:8035,769:8037,834:8039,837:8097}],8034:[[8032,768],,{837:8098}],8035:[[8033,768],,{837:8099}],8036:[[8032,769],,{837:8100}],8037:[[8033,769],,{837:8101}],8038:[[8032,834],,{837:8102}],8039:[[8033,834],,{837:8103}],8040:[[937,787],,{768:8042,769:8044,834:8046,837:8104}],8041:[[937,788],,{768:8043,769:8045,834:8047,837:8105}],8042:[[8040,768],,{837:8106}],8043:[[8041,768],,{837:8107}],8044:[[8040,769],,{837:8108}],8045:[[8041,769],,{837:8109}],8046:[[8040,834],,{837:8110}],8047:[[8041,834],,{837:8111}],8048:[[945,768],,{837:8114}],8049:[[940]],8050:[[949,768]],8051:[[941]],8052:[[951,768],,{837:8130}],8053:[[942]],8054:[[953,768]],8055:[[943]],8056:[[959,768]],8057:[[972]],8058:[[965,768]],8059:[[973]],8060:[[969,768],,{837:8178}],8061:[[974]],8064:[[7936,837]],8065:[[7937,837]],8066:[[7938,837]],8067:[[7939,837]],8068:[[7940,837]],8069:[[7941,837]],8070:[[7942,837]],8071:[[7943,837]],8072:[[7944,837]],8073:[[7945,837]],8074:[[7946,837]],8075:[[7947,837]],8076:[[7948,837]],8077:[[7949,837]],8078:[[7950,837]],8079:[[7951,837]],8080:[[7968,837]],8081:[[7969,837]],8082:[[7970,837]],8083:[[7971,837]],8084:[[7972,837]],8085:[[7973,837]],8086:[[7974,837]],8087:[[7975,837]],8088:[[7976,837]],8089:[[7977,837]],8090:[[7978,837]],8091:[[7979,837]],8092:[[7980,837]],8093:[[7981,837]],8094:[[7982,837]],8095:[[7983,837]],8096:[[8032,837]],8097:[[8033,837]],8098:[[8034,837]],8099:[[8035,837]],8100:[[8036,837]],8101:[[8037,837]],8102:[[8038,837]],8103:[[8039,837]],8104:[[8040,837]],8105:[[8041,837]],8106:[[8042,837]],8107:[[8043,837]],8108:[[8044,837]],8109:[[8045,837]],8110:[[8046,837]],8111:[[8047,837]],8112:[[945,774]],8113:[[945,772]],8114:[[8048,837]],8115:[[945,837]],8116:[[940,837]],8118:[[945,834],,{837:8119}],8119:[[8118,837]],8120:[[913,774]],8121:[[913,772]],8122:[[913,768]],8123:[[902]],8124:[[913,837]],8125:[[32,787],256],8126:[[953]],8127:[[32,787],256,{768:8141,769:8142,834:8143}],8128:[[32,834],256],8129:[[168,834]],8130:[[8052,837]],8131:[[951,837]],8132:[[942,837]],8134:[[951,834],,{837:8135}],8135:[[8134,837]],8136:[[917,768]],8137:[[904]],8138:[[919,768]],8139:[[905]],8140:[[919,837]],8141:[[8127,768]],8142:[[8127,769]],8143:[[8127,834]],8144:[[953,774]],8145:[[953,772]],8146:[[970,768]],8147:[[912]],8150:[[953,834]],8151:[[970,834]],8152:[[921,774]],8153:[[921,772]],8154:[[921,768]],8155:[[906]],8157:[[8190,768]],8158:[[8190,769]],8159:[[8190,834]],8160:[[965,774]],8161:[[965,772]],8162:[[971,768]],8163:[[944]],8164:[[961,787]],8165:[[961,788]],8166:[[965,834]],8167:[[971,834]],8168:[[933,774]],8169:[[933,772]],8170:[[933,768]],8171:[[910]],8172:[[929,788]],8173:[[168,768]],8174:[[901]],8175:[[96]],8178:[[8060,837]],8179:[[969,837]],8180:[[974,837]],8182:[[969,834],,{837:8183}],8183:[[8182,837]],8184:[[927,768]],8185:[[908]],8186:[[937,768]],8187:[[911]],8188:[[937,837]],8189:[[180]],8190:[[32,788],256,{768:8157,769:8158,834:8159}]}, + 8192:{8192:[[8194]],8193:[[8195]],8194:[[32],256],8195:[[32],256],8196:[[32],256],8197:[[32],256],8198:[[32],256],8199:[[32],256],8200:[[32],256],8201:[[32],256],8202:[[32],256],8209:[[8208],256],8215:[[32,819],256],8228:[[46],256],8229:[[46,46],256],8230:[[46,46,46],256],8239:[[32],256],8243:[[8242,8242],256],8244:[[8242,8242,8242],256],8246:[[8245,8245],256],8247:[[8245,8245,8245],256],8252:[[33,33],256],8254:[[32,773],256],8263:[[63,63],256],8264:[[63,33],256],8265:[[33,63],256],8279:[[8242,8242,8242,8242],256],8287:[[32],256],8304:[[48],256],8305:[[105],256],8308:[[52],256],8309:[[53],256],8310:[[54],256],8311:[[55],256],8312:[[56],256],8313:[[57],256],8314:[[43],256],8315:[[8722],256],8316:[[61],256],8317:[[40],256],8318:[[41],256],8319:[[110],256],8320:[[48],256],8321:[[49],256],8322:[[50],256],8323:[[51],256],8324:[[52],256],8325:[[53],256],8326:[[54],256],8327:[[55],256],8328:[[56],256],8329:[[57],256],8330:[[43],256],8331:[[8722],256],8332:[[61],256],8333:[[40],256],8334:[[41],256],8336:[[97],256],8337:[[101],256],8338:[[111],256],8339:[[120],256],8340:[[601],256],8341:[[104],256],8342:[[107],256],8343:[[108],256],8344:[[109],256],8345:[[110],256],8346:[[112],256],8347:[[115],256],8348:[[116],256],8360:[[82,115],256],8400:[,230],8401:[,230],8402:[,1],8403:[,1],8404:[,230],8405:[,230],8406:[,230],8407:[,230],8408:[,1],8409:[,1],8410:[,1],8411:[,230],8412:[,230],8417:[,230],8421:[,1],8422:[,1],8423:[,230],8424:[,220],8425:[,230],8426:[,1],8427:[,1],8428:[,220],8429:[,220],8430:[,220],8431:[,220],8432:[,230]}, + 8448:{8448:[[97,47,99],256],8449:[[97,47,115],256],8450:[[67],256],8451:[[176,67],256],8453:[[99,47,111],256],8454:[[99,47,117],256],8455:[[400],256],8457:[[176,70],256],8458:[[103],256],8459:[[72],256],8460:[[72],256],8461:[[72],256],8462:[[104],256],8463:[[295],256],8464:[[73],256],8465:[[73],256],8466:[[76],256],8467:[[108],256],8469:[[78],256],8470:[[78,111],256],8473:[[80],256],8474:[[81],256],8475:[[82],256],8476:[[82],256],8477:[[82],256],8480:[[83,77],256],8481:[[84,69,76],256],8482:[[84,77],256],8484:[[90],256],8486:[[937]],8488:[[90],256],8490:[[75]],8491:[[197]],8492:[[66],256],8493:[[67],256],8495:[[101],256],8496:[[69],256],8497:[[70],256],8499:[[77],256],8500:[[111],256],8501:[[1488],256],8502:[[1489],256],8503:[[1490],256],8504:[[1491],256],8505:[[105],256],8507:[[70,65,88],256],8508:[[960],256],8509:[[947],256],8510:[[915],256],8511:[[928],256],8512:[[8721],256],8517:[[68],256],8518:[[100],256],8519:[[101],256],8520:[[105],256],8521:[[106],256],8528:[[49,8260,55],256],8529:[[49,8260,57],256],8530:[[49,8260,49,48],256],8531:[[49,8260,51],256],8532:[[50,8260,51],256],8533:[[49,8260,53],256],8534:[[50,8260,53],256],8535:[[51,8260,53],256],8536:[[52,8260,53],256],8537:[[49,8260,54],256],8538:[[53,8260,54],256],8539:[[49,8260,56],256],8540:[[51,8260,56],256],8541:[[53,8260,56],256],8542:[[55,8260,56],256],8543:[[49,8260],256],8544:[[73],256],8545:[[73,73],256],8546:[[73,73,73],256],8547:[[73,86],256],8548:[[86],256],8549:[[86,73],256],8550:[[86,73,73],256],8551:[[86,73,73,73],256],8552:[[73,88],256],8553:[[88],256],8554:[[88,73],256],8555:[[88,73,73],256],8556:[[76],256],8557:[[67],256],8558:[[68],256],8559:[[77],256],8560:[[105],256],8561:[[105,105],256],8562:[[105,105,105],256],8563:[[105,118],256],8564:[[118],256],8565:[[118,105],256],8566:[[118,105,105],256],8567:[[118,105,105,105],256],8568:[[105,120],256],8569:[[120],256],8570:[[120,105],256],8571:[[120,105,105],256],8572:[[108],256],8573:[[99],256],8574:[[100],256],8575:[[109],256],8585:[[48,8260,51],256],8592:[,,{824:8602}],8594:[,,{824:8603}],8596:[,,{824:8622}],8602:[[8592,824]],8603:[[8594,824]],8622:[[8596,824]],8653:[[8656,824]],8654:[[8660,824]],8655:[[8658,824]],8656:[,,{824:8653}],8658:[,,{824:8655}],8660:[,,{824:8654}]}, + 8704:{8707:[,,{824:8708}],8708:[[8707,824]],8712:[,,{824:8713}],8713:[[8712,824]],8715:[,,{824:8716}],8716:[[8715,824]],8739:[,,{824:8740}],8740:[[8739,824]],8741:[,,{824:8742}],8742:[[8741,824]],8748:[[8747,8747],256],8749:[[8747,8747,8747],256],8751:[[8750,8750],256],8752:[[8750,8750,8750],256],8764:[,,{824:8769}],8769:[[8764,824]],8771:[,,{824:8772}],8772:[[8771,824]],8773:[,,{824:8775}],8775:[[8773,824]],8776:[,,{824:8777}],8777:[[8776,824]],8781:[,,{824:8813}],8800:[[61,824]],8801:[,,{824:8802}],8802:[[8801,824]],8804:[,,{824:8816}],8805:[,,{824:8817}],8813:[[8781,824]],8814:[[60,824]],8815:[[62,824]],8816:[[8804,824]],8817:[[8805,824]],8818:[,,{824:8820}],8819:[,,{824:8821}],8820:[[8818,824]],8821:[[8819,824]],8822:[,,{824:8824}],8823:[,,{824:8825}],8824:[[8822,824]],8825:[[8823,824]],8826:[,,{824:8832}],8827:[,,{824:8833}],8828:[,,{824:8928}],8829:[,,{824:8929}],8832:[[8826,824]],8833:[[8827,824]],8834:[,,{824:8836}],8835:[,,{824:8837}],8836:[[8834,824]],8837:[[8835,824]],8838:[,,{824:8840}],8839:[,,{824:8841}],8840:[[8838,824]],8841:[[8839,824]],8849:[,,{824:8930}],8850:[,,{824:8931}],8866:[,,{824:8876}],8872:[,,{824:8877}],8873:[,,{824:8878}],8875:[,,{824:8879}],8876:[[8866,824]],8877:[[8872,824]],8878:[[8873,824]],8879:[[8875,824]],8882:[,,{824:8938}],8883:[,,{824:8939}],8884:[,,{824:8940}],8885:[,,{824:8941}],8928:[[8828,824]],8929:[[8829,824]],8930:[[8849,824]],8931:[[8850,824]],8938:[[8882,824]],8939:[[8883,824]],8940:[[8884,824]],8941:[[8885,824]]}, + 8960:{9001:[[12296]],9002:[[12297]]}, + 9216:{9312:[[49],256],9313:[[50],256],9314:[[51],256],9315:[[52],256],9316:[[53],256],9317:[[54],256],9318:[[55],256],9319:[[56],256],9320:[[57],256],9321:[[49,48],256],9322:[[49,49],256],9323:[[49,50],256],9324:[[49,51],256],9325:[[49,52],256],9326:[[49,53],256],9327:[[49,54],256],9328:[[49,55],256],9329:[[49,56],256],9330:[[49,57],256],9331:[[50,48],256],9332:[[40,49,41],256],9333:[[40,50,41],256],9334:[[40,51,41],256],9335:[[40,52,41],256],9336:[[40,53,41],256],9337:[[40,54,41],256],9338:[[40,55,41],256],9339:[[40,56,41],256],9340:[[40,57,41],256],9341:[[40,49,48,41],256],9342:[[40,49,49,41],256],9343:[[40,49,50,41],256],9344:[[40,49,51,41],256],9345:[[40,49,52,41],256],9346:[[40,49,53,41],256],9347:[[40,49,54,41],256],9348:[[40,49,55,41],256],9349:[[40,49,56,41],256],9350:[[40,49,57,41],256],9351:[[40,50,48,41],256],9352:[[49,46],256],9353:[[50,46],256],9354:[[51,46],256],9355:[[52,46],256],9356:[[53,46],256],9357:[[54,46],256],9358:[[55,46],256],9359:[[56,46],256],9360:[[57,46],256],9361:[[49,48,46],256],9362:[[49,49,46],256],9363:[[49,50,46],256],9364:[[49,51,46],256],9365:[[49,52,46],256],9366:[[49,53,46],256],9367:[[49,54,46],256],9368:[[49,55,46],256],9369:[[49,56,46],256],9370:[[49,57,46],256],9371:[[50,48,46],256],9372:[[40,97,41],256],9373:[[40,98,41],256],9374:[[40,99,41],256],9375:[[40,100,41],256],9376:[[40,101,41],256],9377:[[40,102,41],256],9378:[[40,103,41],256],9379:[[40,104,41],256],9380:[[40,105,41],256],9381:[[40,106,41],256],9382:[[40,107,41],256],9383:[[40,108,41],256],9384:[[40,109,41],256],9385:[[40,110,41],256],9386:[[40,111,41],256],9387:[[40,112,41],256],9388:[[40,113,41],256],9389:[[40,114,41],256],9390:[[40,115,41],256],9391:[[40,116,41],256],9392:[[40,117,41],256],9393:[[40,118,41],256],9394:[[40,119,41],256],9395:[[40,120,41],256],9396:[[40,121,41],256],9397:[[40,122,41],256],9398:[[65],256],9399:[[66],256],9400:[[67],256],9401:[[68],256],9402:[[69],256],9403:[[70],256],9404:[[71],256],9405:[[72],256],9406:[[73],256],9407:[[74],256],9408:[[75],256],9409:[[76],256],9410:[[77],256],9411:[[78],256],9412:[[79],256],9413:[[80],256],9414:[[81],256],9415:[[82],256],9416:[[83],256],9417:[[84],256],9418:[[85],256],9419:[[86],256],9420:[[87],256],9421:[[88],256],9422:[[89],256],9423:[[90],256],9424:[[97],256],9425:[[98],256],9426:[[99],256],9427:[[100],256],9428:[[101],256],9429:[[102],256],9430:[[103],256],9431:[[104],256],9432:[[105],256],9433:[[106],256],9434:[[107],256],9435:[[108],256],9436:[[109],256],9437:[[110],256],9438:[[111],256],9439:[[112],256],9440:[[113],256],9441:[[114],256],9442:[[115],256],9443:[[116],256],9444:[[117],256],9445:[[118],256],9446:[[119],256],9447:[[120],256],9448:[[121],256],9449:[[122],256],9450:[[48],256]}, + 10752:{10764:[[8747,8747,8747,8747],256],10868:[[58,58,61],256],10869:[[61,61],256],10870:[[61,61,61],256],10972:[[10973,824],512]}, + 11264:{11388:[[106],256],11389:[[86],256],11503:[,230],11504:[,230],11505:[,230]}, + 11520:{11631:[[11617],256],11647:[,9],11744:[,230],11745:[,230],11746:[,230],11747:[,230],11748:[,230],11749:[,230],11750:[,230],11751:[,230],11752:[,230],11753:[,230],11754:[,230],11755:[,230],11756:[,230],11757:[,230],11758:[,230],11759:[,230],11760:[,230],11761:[,230],11762:[,230],11763:[,230],11764:[,230],11765:[,230],11766:[,230],11767:[,230],11768:[,230],11769:[,230],11770:[,230],11771:[,230],11772:[,230],11773:[,230],11774:[,230],11775:[,230]}, + 11776:{11935:[[27597],256],12019:[[40863],256]}, + 12032:{12032:[[19968],256],12033:[[20008],256],12034:[[20022],256],12035:[[20031],256],12036:[[20057],256],12037:[[20101],256],12038:[[20108],256],12039:[[20128],256],12040:[[20154],256],12041:[[20799],256],12042:[[20837],256],12043:[[20843],256],12044:[[20866],256],12045:[[20886],256],12046:[[20907],256],12047:[[20960],256],12048:[[20981],256],12049:[[20992],256],12050:[[21147],256],12051:[[21241],256],12052:[[21269],256],12053:[[21274],256],12054:[[21304],256],12055:[[21313],256],12056:[[21340],256],12057:[[21353],256],12058:[[21378],256],12059:[[21430],256],12060:[[21448],256],12061:[[21475],256],12062:[[22231],256],12063:[[22303],256],12064:[[22763],256],12065:[[22786],256],12066:[[22794],256],12067:[[22805],256],12068:[[22823],256],12069:[[22899],256],12070:[[23376],256],12071:[[23424],256],12072:[[23544],256],12073:[[23567],256],12074:[[23586],256],12075:[[23608],256],12076:[[23662],256],12077:[[23665],256],12078:[[24027],256],12079:[[24037],256],12080:[[24049],256],12081:[[24062],256],12082:[[24178],256],12083:[[24186],256],12084:[[24191],256],12085:[[24308],256],12086:[[24318],256],12087:[[24331],256],12088:[[24339],256],12089:[[24400],256],12090:[[24417],256],12091:[[24435],256],12092:[[24515],256],12093:[[25096],256],12094:[[25142],256],12095:[[25163],256],12096:[[25903],256],12097:[[25908],256],12098:[[25991],256],12099:[[26007],256],12100:[[26020],256],12101:[[26041],256],12102:[[26080],256],12103:[[26085],256],12104:[[26352],256],12105:[[26376],256],12106:[[26408],256],12107:[[27424],256],12108:[[27490],256],12109:[[27513],256],12110:[[27571],256],12111:[[27595],256],12112:[[27604],256],12113:[[27611],256],12114:[[27663],256],12115:[[27668],256],12116:[[27700],256],12117:[[28779],256],12118:[[29226],256],12119:[[29238],256],12120:[[29243],256],12121:[[29247],256],12122:[[29255],256],12123:[[29273],256],12124:[[29275],256],12125:[[29356],256],12126:[[29572],256],12127:[[29577],256],12128:[[29916],256],12129:[[29926],256],12130:[[29976],256],12131:[[29983],256],12132:[[29992],256],12133:[[30000],256],12134:[[30091],256],12135:[[30098],256],12136:[[30326],256],12137:[[30333],256],12138:[[30382],256],12139:[[30399],256],12140:[[30446],256],12141:[[30683],256],12142:[[30690],256],12143:[[30707],256],12144:[[31034],256],12145:[[31160],256],12146:[[31166],256],12147:[[31348],256],12148:[[31435],256],12149:[[31481],256],12150:[[31859],256],12151:[[31992],256],12152:[[32566],256],12153:[[32593],256],12154:[[32650],256],12155:[[32701],256],12156:[[32769],256],12157:[[32780],256],12158:[[32786],256],12159:[[32819],256],12160:[[32895],256],12161:[[32905],256],12162:[[33251],256],12163:[[33258],256],12164:[[33267],256],12165:[[33276],256],12166:[[33292],256],12167:[[33307],256],12168:[[33311],256],12169:[[33390],256],12170:[[33394],256],12171:[[33400],256],12172:[[34381],256],12173:[[34411],256],12174:[[34880],256],12175:[[34892],256],12176:[[34915],256],12177:[[35198],256],12178:[[35211],256],12179:[[35282],256],12180:[[35328],256],12181:[[35895],256],12182:[[35910],256],12183:[[35925],256],12184:[[35960],256],12185:[[35997],256],12186:[[36196],256],12187:[[36208],256],12188:[[36275],256],12189:[[36523],256],12190:[[36554],256],12191:[[36763],256],12192:[[36784],256],12193:[[36789],256],12194:[[37009],256],12195:[[37193],256],12196:[[37318],256],12197:[[37324],256],12198:[[37329],256],12199:[[38263],256],12200:[[38272],256],12201:[[38428],256],12202:[[38582],256],12203:[[38585],256],12204:[[38632],256],12205:[[38737],256],12206:[[38750],256],12207:[[38754],256],12208:[[38761],256],12209:[[38859],256],12210:[[38893],256],12211:[[38899],256],12212:[[38913],256],12213:[[39080],256],12214:[[39131],256],12215:[[39135],256],12216:[[39318],256],12217:[[39321],256],12218:[[39340],256],12219:[[39592],256],12220:[[39640],256],12221:[[39647],256],12222:[[39717],256],12223:[[39727],256],12224:[[39730],256],12225:[[39740],256],12226:[[39770],256],12227:[[40165],256],12228:[[40565],256],12229:[[40575],256],12230:[[40613],256],12231:[[40635],256],12232:[[40643],256],12233:[[40653],256],12234:[[40657],256],12235:[[40697],256],12236:[[40701],256],12237:[[40718],256],12238:[[40723],256],12239:[[40736],256],12240:[[40763],256],12241:[[40778],256],12242:[[40786],256],12243:[[40845],256],12244:[[40860],256],12245:[[40864],256]}, + 12288:{12288:[[32],256],12330:[,218],12331:[,228],12332:[,232],12333:[,222],12334:[,224],12335:[,224],12342:[[12306],256],12344:[[21313],256],12345:[[21316],256],12346:[[21317],256],12358:[,,{12441:12436}],12363:[,,{12441:12364}],12364:[[12363,12441]],12365:[,,{12441:12366}],12366:[[12365,12441]],12367:[,,{12441:12368}],12368:[[12367,12441]],12369:[,,{12441:12370}],12370:[[12369,12441]],12371:[,,{12441:12372}],12372:[[12371,12441]],12373:[,,{12441:12374}],12374:[[12373,12441]],12375:[,,{12441:12376}],12376:[[12375,12441]],12377:[,,{12441:12378}],12378:[[12377,12441]],12379:[,,{12441:12380}],12380:[[12379,12441]],12381:[,,{12441:12382}],12382:[[12381,12441]],12383:[,,{12441:12384}],12384:[[12383,12441]],12385:[,,{12441:12386}],12386:[[12385,12441]],12388:[,,{12441:12389}],12389:[[12388,12441]],12390:[,,{12441:12391}],12391:[[12390,12441]],12392:[,,{12441:12393}],12393:[[12392,12441]],12399:[,,{12441:12400,12442:12401}],12400:[[12399,12441]],12401:[[12399,12442]],12402:[,,{12441:12403,12442:12404}],12403:[[12402,12441]],12404:[[12402,12442]],12405:[,,{12441:12406,12442:12407}],12406:[[12405,12441]],12407:[[12405,12442]],12408:[,,{12441:12409,12442:12410}],12409:[[12408,12441]],12410:[[12408,12442]],12411:[,,{12441:12412,12442:12413}],12412:[[12411,12441]],12413:[[12411,12442]],12436:[[12358,12441]],12441:[,8],12442:[,8],12443:[[32,12441],256],12444:[[32,12442],256],12445:[,,{12441:12446}],12446:[[12445,12441]],12447:[[12424,12426],256],12454:[,,{12441:12532}],12459:[,,{12441:12460}],12460:[[12459,12441]],12461:[,,{12441:12462}],12462:[[12461,12441]],12463:[,,{12441:12464}],12464:[[12463,12441]],12465:[,,{12441:12466}],12466:[[12465,12441]],12467:[,,{12441:12468}],12468:[[12467,12441]],12469:[,,{12441:12470}],12470:[[12469,12441]],12471:[,,{12441:12472}],12472:[[12471,12441]],12473:[,,{12441:12474}],12474:[[12473,12441]],12475:[,,{12441:12476}],12476:[[12475,12441]],12477:[,,{12441:12478}],12478:[[12477,12441]],12479:[,,{12441:12480}],12480:[[12479,12441]],12481:[,,{12441:12482}],12482:[[12481,12441]],12484:[,,{12441:12485}],12485:[[12484,12441]],12486:[,,{12441:12487}],12487:[[12486,12441]],12488:[,,{12441:12489}],12489:[[12488,12441]],12495:[,,{12441:12496,12442:12497}],12496:[[12495,12441]],12497:[[12495,12442]],12498:[,,{12441:12499,12442:12500}],12499:[[12498,12441]],12500:[[12498,12442]],12501:[,,{12441:12502,12442:12503}],12502:[[12501,12441]],12503:[[12501,12442]],12504:[,,{12441:12505,12442:12506}],12505:[[12504,12441]],12506:[[12504,12442]],12507:[,,{12441:12508,12442:12509}],12508:[[12507,12441]],12509:[[12507,12442]],12527:[,,{12441:12535}],12528:[,,{12441:12536}],12529:[,,{12441:12537}],12530:[,,{12441:12538}],12532:[[12454,12441]],12535:[[12527,12441]],12536:[[12528,12441]],12537:[[12529,12441]],12538:[[12530,12441]],12541:[,,{12441:12542}],12542:[[12541,12441]],12543:[[12467,12488],256]}, + 12544:{12593:[[4352],256],12594:[[4353],256],12595:[[4522],256],12596:[[4354],256],12597:[[4524],256],12598:[[4525],256],12599:[[4355],256],12600:[[4356],256],12601:[[4357],256],12602:[[4528],256],12603:[[4529],256],12604:[[4530],256],12605:[[4531],256],12606:[[4532],256],12607:[[4533],256],12608:[[4378],256],12609:[[4358],256],12610:[[4359],256],12611:[[4360],256],12612:[[4385],256],12613:[[4361],256],12614:[[4362],256],12615:[[4363],256],12616:[[4364],256],12617:[[4365],256],12618:[[4366],256],12619:[[4367],256],12620:[[4368],256],12621:[[4369],256],12622:[[4370],256],12623:[[4449],256],12624:[[4450],256],12625:[[4451],256],12626:[[4452],256],12627:[[4453],256],12628:[[4454],256],12629:[[4455],256],12630:[[4456],256],12631:[[4457],256],12632:[[4458],256],12633:[[4459],256],12634:[[4460],256],12635:[[4461],256],12636:[[4462],256],12637:[[4463],256],12638:[[4464],256],12639:[[4465],256],12640:[[4466],256],12641:[[4467],256],12642:[[4468],256],12643:[[4469],256],12644:[[4448],256],12645:[[4372],256],12646:[[4373],256],12647:[[4551],256],12648:[[4552],256],12649:[[4556],256],12650:[[4558],256],12651:[[4563],256],12652:[[4567],256],12653:[[4569],256],12654:[[4380],256],12655:[[4573],256],12656:[[4575],256],12657:[[4381],256],12658:[[4382],256],12659:[[4384],256],12660:[[4386],256],12661:[[4387],256],12662:[[4391],256],12663:[[4393],256],12664:[[4395],256],12665:[[4396],256],12666:[[4397],256],12667:[[4398],256],12668:[[4399],256],12669:[[4402],256],12670:[[4406],256],12671:[[4416],256],12672:[[4423],256],12673:[[4428],256],12674:[[4593],256],12675:[[4594],256],12676:[[4439],256],12677:[[4440],256],12678:[[4441],256],12679:[[4484],256],12680:[[4485],256],12681:[[4488],256],12682:[[4497],256],12683:[[4498],256],12684:[[4500],256],12685:[[4510],256],12686:[[4513],256],12690:[[19968],256],12691:[[20108],256],12692:[[19977],256],12693:[[22235],256],12694:[[19978],256],12695:[[20013],256],12696:[[19979],256],12697:[[30002],256],12698:[[20057],256],12699:[[19993],256],12700:[[19969],256],12701:[[22825],256],12702:[[22320],256],12703:[[20154],256]}, + 12800:{12800:[[40,4352,41],256],12801:[[40,4354,41],256],12802:[[40,4355,41],256],12803:[[40,4357,41],256],12804:[[40,4358,41],256],12805:[[40,4359,41],256],12806:[[40,4361,41],256],12807:[[40,4363,41],256],12808:[[40,4364,41],256],12809:[[40,4366,41],256],12810:[[40,4367,41],256],12811:[[40,4368,41],256],12812:[[40,4369,41],256],12813:[[40,4370,41],256],12814:[[40,4352,4449,41],256],12815:[[40,4354,4449,41],256],12816:[[40,4355,4449,41],256],12817:[[40,4357,4449,41],256],12818:[[40,4358,4449,41],256],12819:[[40,4359,4449,41],256],12820:[[40,4361,4449,41],256],12821:[[40,4363,4449,41],256],12822:[[40,4364,4449,41],256],12823:[[40,4366,4449,41],256],12824:[[40,4367,4449,41],256],12825:[[40,4368,4449,41],256],12826:[[40,4369,4449,41],256],12827:[[40,4370,4449,41],256],12828:[[40,4364,4462,41],256],12829:[[40,4363,4457,4364,4453,4523,41],256],12830:[[40,4363,4457,4370,4462,41],256],12832:[[40,19968,41],256],12833:[[40,20108,41],256],12834:[[40,19977,41],256],12835:[[40,22235,41],256],12836:[[40,20116,41],256],12837:[[40,20845,41],256],12838:[[40,19971,41],256],12839:[[40,20843,41],256],12840:[[40,20061,41],256],12841:[[40,21313,41],256],12842:[[40,26376,41],256],12843:[[40,28779,41],256],12844:[[40,27700,41],256],12845:[[40,26408,41],256],12846:[[40,37329,41],256],12847:[[40,22303,41],256],12848:[[40,26085,41],256],12849:[[40,26666,41],256],12850:[[40,26377,41],256],12851:[[40,31038,41],256],12852:[[40,21517,41],256],12853:[[40,29305,41],256],12854:[[40,36001,41],256],12855:[[40,31069,41],256],12856:[[40,21172,41],256],12857:[[40,20195,41],256],12858:[[40,21628,41],256],12859:[[40,23398,41],256],12860:[[40,30435,41],256],12861:[[40,20225,41],256],12862:[[40,36039,41],256],12863:[[40,21332,41],256],12864:[[40,31085,41],256],12865:[[40,20241,41],256],12866:[[40,33258,41],256],12867:[[40,33267,41],256],12868:[[21839],256],12869:[[24188],256],12870:[[25991],256],12871:[[31631],256],12880:[[80,84,69],256],12881:[[50,49],256],12882:[[50,50],256],12883:[[50,51],256],12884:[[50,52],256],12885:[[50,53],256],12886:[[50,54],256],12887:[[50,55],256],12888:[[50,56],256],12889:[[50,57],256],12890:[[51,48],256],12891:[[51,49],256],12892:[[51,50],256],12893:[[51,51],256],12894:[[51,52],256],12895:[[51,53],256],12896:[[4352],256],12897:[[4354],256],12898:[[4355],256],12899:[[4357],256],12900:[[4358],256],12901:[[4359],256],12902:[[4361],256],12903:[[4363],256],12904:[[4364],256],12905:[[4366],256],12906:[[4367],256],12907:[[4368],256],12908:[[4369],256],12909:[[4370],256],12910:[[4352,4449],256],12911:[[4354,4449],256],12912:[[4355,4449],256],12913:[[4357,4449],256],12914:[[4358,4449],256],12915:[[4359,4449],256],12916:[[4361,4449],256],12917:[[4363,4449],256],12918:[[4364,4449],256],12919:[[4366,4449],256],12920:[[4367,4449],256],12921:[[4368,4449],256],12922:[[4369,4449],256],12923:[[4370,4449],256],12924:[[4366,4449,4535,4352,4457],256],12925:[[4364,4462,4363,4468],256],12926:[[4363,4462],256],12928:[[19968],256],12929:[[20108],256],12930:[[19977],256],12931:[[22235],256],12932:[[20116],256],12933:[[20845],256],12934:[[19971],256],12935:[[20843],256],12936:[[20061],256],12937:[[21313],256],12938:[[26376],256],12939:[[28779],256],12940:[[27700],256],12941:[[26408],256],12942:[[37329],256],12943:[[22303],256],12944:[[26085],256],12945:[[26666],256],12946:[[26377],256],12947:[[31038],256],12948:[[21517],256],12949:[[29305],256],12950:[[36001],256],12951:[[31069],256],12952:[[21172],256],12953:[[31192],256],12954:[[30007],256],12955:[[22899],256],12956:[[36969],256],12957:[[20778],256],12958:[[21360],256],12959:[[27880],256],12960:[[38917],256],12961:[[20241],256],12962:[[20889],256],12963:[[27491],256],12964:[[19978],256],12965:[[20013],256],12966:[[19979],256],12967:[[24038],256],12968:[[21491],256],12969:[[21307],256],12970:[[23447],256],12971:[[23398],256],12972:[[30435],256],12973:[[20225],256],12974:[[36039],256],12975:[[21332],256],12976:[[22812],256],12977:[[51,54],256],12978:[[51,55],256],12979:[[51,56],256],12980:[[51,57],256],12981:[[52,48],256],12982:[[52,49],256],12983:[[52,50],256],12984:[[52,51],256],12985:[[52,52],256],12986:[[52,53],256],12987:[[52,54],256],12988:[[52,55],256],12989:[[52,56],256],12990:[[52,57],256],12991:[[53,48],256],12992:[[49,26376],256],12993:[[50,26376],256],12994:[[51,26376],256],12995:[[52,26376],256],12996:[[53,26376],256],12997:[[54,26376],256],12998:[[55,26376],256],12999:[[56,26376],256],13000:[[57,26376],256],13001:[[49,48,26376],256],13002:[[49,49,26376],256],13003:[[49,50,26376],256],13004:[[72,103],256],13005:[[101,114,103],256],13006:[[101,86],256],13007:[[76,84,68],256],13008:[[12450],256],13009:[[12452],256],13010:[[12454],256],13011:[[12456],256],13012:[[12458],256],13013:[[12459],256],13014:[[12461],256],13015:[[12463],256],13016:[[12465],256],13017:[[12467],256],13018:[[12469],256],13019:[[12471],256],13020:[[12473],256],13021:[[12475],256],13022:[[12477],256],13023:[[12479],256],13024:[[12481],256],13025:[[12484],256],13026:[[12486],256],13027:[[12488],256],13028:[[12490],256],13029:[[12491],256],13030:[[12492],256],13031:[[12493],256],13032:[[12494],256],13033:[[12495],256],13034:[[12498],256],13035:[[12501],256],13036:[[12504],256],13037:[[12507],256],13038:[[12510],256],13039:[[12511],256],13040:[[12512],256],13041:[[12513],256],13042:[[12514],256],13043:[[12516],256],13044:[[12518],256],13045:[[12520],256],13046:[[12521],256],13047:[[12522],256],13048:[[12523],256],13049:[[12524],256],13050:[[12525],256],13051:[[12527],256],13052:[[12528],256],13053:[[12529],256],13054:[[12530],256]}, + 13056:{13056:[[12450,12497,12540,12488],256],13057:[[12450,12523,12501,12449],256],13058:[[12450,12531,12506,12450],256],13059:[[12450,12540,12523],256],13060:[[12452,12491,12531,12464],256],13061:[[12452,12531,12481],256],13062:[[12454,12457,12531],256],13063:[[12456,12473,12463,12540,12489],256],13064:[[12456,12540,12459,12540],256],13065:[[12458,12531,12473],256],13066:[[12458,12540,12512],256],13067:[[12459,12452,12522],256],13068:[[12459,12521,12483,12488],256],13069:[[12459,12525,12522,12540],256],13070:[[12460,12525,12531],256],13071:[[12460,12531,12510],256],13072:[[12462,12460],256],13073:[[12462,12491,12540],256],13074:[[12461,12517,12522,12540],256],13075:[[12462,12523,12480,12540],256],13076:[[12461,12525],256],13077:[[12461,12525,12464,12521,12512],256],13078:[[12461,12525,12513,12540,12488,12523],256],13079:[[12461,12525,12527,12483,12488],256],13080:[[12464,12521,12512],256],13081:[[12464,12521,12512,12488,12531],256],13082:[[12463,12523,12476,12452,12525],256],13083:[[12463,12525,12540,12493],256],13084:[[12465,12540,12473],256],13085:[[12467,12523,12490],256],13086:[[12467,12540,12509],256],13087:[[12469,12452,12463,12523],256],13088:[[12469,12531,12481,12540,12512],256],13089:[[12471,12522,12531,12464],256],13090:[[12475,12531,12481],256],13091:[[12475,12531,12488],256],13092:[[12480,12540,12473],256],13093:[[12487,12471],256],13094:[[12489,12523],256],13095:[[12488,12531],256],13096:[[12490,12494],256],13097:[[12494,12483,12488],256],13098:[[12495,12452,12484],256],13099:[[12497,12540,12475,12531,12488],256],13100:[[12497,12540,12484],256],13101:[[12496,12540,12524,12523],256],13102:[[12500,12450,12473,12488,12523],256],13103:[[12500,12463,12523],256],13104:[[12500,12467],256],13105:[[12499,12523],256],13106:[[12501,12449,12521,12483,12489],256],13107:[[12501,12451,12540,12488],256],13108:[[12502,12483,12471,12455,12523],256],13109:[[12501,12521,12531],256],13110:[[12504,12463,12479,12540,12523],256],13111:[[12506,12477],256],13112:[[12506,12491,12498],256],13113:[[12504,12523,12484],256],13114:[[12506,12531,12473],256],13115:[[12506,12540,12472],256],13116:[[12505,12540,12479],256],13117:[[12509,12452,12531,12488],256],13118:[[12508,12523,12488],256],13119:[[12507,12531],256],13120:[[12509,12531,12489],256],13121:[[12507,12540,12523],256],13122:[[12507,12540,12531],256],13123:[[12510,12452,12463,12525],256],13124:[[12510,12452,12523],256],13125:[[12510,12483,12495],256],13126:[[12510,12523,12463],256],13127:[[12510,12531,12471,12519,12531],256],13128:[[12511,12463,12525,12531],256],13129:[[12511,12522],256],13130:[[12511,12522,12496,12540,12523],256],13131:[[12513,12460],256],13132:[[12513,12460,12488,12531],256],13133:[[12513,12540,12488,12523],256],13134:[[12516,12540,12489],256],13135:[[12516,12540,12523],256],13136:[[12518,12450,12531],256],13137:[[12522,12483,12488,12523],256],13138:[[12522,12521],256],13139:[[12523,12500,12540],256],13140:[[12523,12540,12502,12523],256],13141:[[12524,12512],256],13142:[[12524,12531,12488,12466,12531],256],13143:[[12527,12483,12488],256],13144:[[48,28857],256],13145:[[49,28857],256],13146:[[50,28857],256],13147:[[51,28857],256],13148:[[52,28857],256],13149:[[53,28857],256],13150:[[54,28857],256],13151:[[55,28857],256],13152:[[56,28857],256],13153:[[57,28857],256],13154:[[49,48,28857],256],13155:[[49,49,28857],256],13156:[[49,50,28857],256],13157:[[49,51,28857],256],13158:[[49,52,28857],256],13159:[[49,53,28857],256],13160:[[49,54,28857],256],13161:[[49,55,28857],256],13162:[[49,56,28857],256],13163:[[49,57,28857],256],13164:[[50,48,28857],256],13165:[[50,49,28857],256],13166:[[50,50,28857],256],13167:[[50,51,28857],256],13168:[[50,52,28857],256],13169:[[104,80,97],256],13170:[[100,97],256],13171:[[65,85],256],13172:[[98,97,114],256],13173:[[111,86],256],13174:[[112,99],256],13175:[[100,109],256],13176:[[100,109,178],256],13177:[[100,109,179],256],13178:[[73,85],256],13179:[[24179,25104],256],13180:[[26157,21644],256],13181:[[22823,27491],256],13182:[[26126,27835],256],13183:[[26666,24335,20250,31038],256],13184:[[112,65],256],13185:[[110,65],256],13186:[[956,65],256],13187:[[109,65],256],13188:[[107,65],256],13189:[[75,66],256],13190:[[77,66],256],13191:[[71,66],256],13192:[[99,97,108],256],13193:[[107,99,97,108],256],13194:[[112,70],256],13195:[[110,70],256],13196:[[956,70],256],13197:[[956,103],256],13198:[[109,103],256],13199:[[107,103],256],13200:[[72,122],256],13201:[[107,72,122],256],13202:[[77,72,122],256],13203:[[71,72,122],256],13204:[[84,72,122],256],13205:[[956,8467],256],13206:[[109,8467],256],13207:[[100,8467],256],13208:[[107,8467],256],13209:[[102,109],256],13210:[[110,109],256],13211:[[956,109],256],13212:[[109,109],256],13213:[[99,109],256],13214:[[107,109],256],13215:[[109,109,178],256],13216:[[99,109,178],256],13217:[[109,178],256],13218:[[107,109,178],256],13219:[[109,109,179],256],13220:[[99,109,179],256],13221:[[109,179],256],13222:[[107,109,179],256],13223:[[109,8725,115],256],13224:[[109,8725,115,178],256],13225:[[80,97],256],13226:[[107,80,97],256],13227:[[77,80,97],256],13228:[[71,80,97],256],13229:[[114,97,100],256],13230:[[114,97,100,8725,115],256],13231:[[114,97,100,8725,115,178],256],13232:[[112,115],256],13233:[[110,115],256],13234:[[956,115],256],13235:[[109,115],256],13236:[[112,86],256],13237:[[110,86],256],13238:[[956,86],256],13239:[[109,86],256],13240:[[107,86],256],13241:[[77,86],256],13242:[[112,87],256],13243:[[110,87],256],13244:[[956,87],256],13245:[[109,87],256],13246:[[107,87],256],13247:[[77,87],256],13248:[[107,937],256],13249:[[77,937],256],13250:[[97,46,109,46],256],13251:[[66,113],256],13252:[[99,99],256],13253:[[99,100],256],13254:[[67,8725,107,103],256],13255:[[67,111,46],256],13256:[[100,66],256],13257:[[71,121],256],13258:[[104,97],256],13259:[[72,80],256],13260:[[105,110],256],13261:[[75,75],256],13262:[[75,77],256],13263:[[107,116],256],13264:[[108,109],256],13265:[[108,110],256],13266:[[108,111,103],256],13267:[[108,120],256],13268:[[109,98],256],13269:[[109,105,108],256],13270:[[109,111,108],256],13271:[[80,72],256],13272:[[112,46,109,46],256],13273:[[80,80,77],256],13274:[[80,82],256],13275:[[115,114],256],13276:[[83,118],256],13277:[[87,98],256],13278:[[86,8725,109],256],13279:[[65,8725,109],256],13280:[[49,26085],256],13281:[[50,26085],256],13282:[[51,26085],256],13283:[[52,26085],256],13284:[[53,26085],256],13285:[[54,26085],256],13286:[[55,26085],256],13287:[[56,26085],256],13288:[[57,26085],256],13289:[[49,48,26085],256],13290:[[49,49,26085],256],13291:[[49,50,26085],256],13292:[[49,51,26085],256],13293:[[49,52,26085],256],13294:[[49,53,26085],256],13295:[[49,54,26085],256],13296:[[49,55,26085],256],13297:[[49,56,26085],256],13298:[[49,57,26085],256],13299:[[50,48,26085],256],13300:[[50,49,26085],256],13301:[[50,50,26085],256],13302:[[50,51,26085],256],13303:[[50,52,26085],256],13304:[[50,53,26085],256],13305:[[50,54,26085],256],13306:[[50,55,26085],256],13307:[[50,56,26085],256],13308:[[50,57,26085],256],13309:[[51,48,26085],256],13310:[[51,49,26085],256],13311:[[103,97,108],256]}, + 42496:{42607:[,230],42612:[,230],42613:[,230],42614:[,230],42615:[,230],42616:[,230],42617:[,230],42618:[,230],42619:[,230],42620:[,230],42621:[,230],42655:[,230],42736:[,230],42737:[,230]}, + 42752:{42864:[[42863],256],43000:[[294],256],43001:[[339],256]}, + 43008:{43014:[,9],43204:[,9],43232:[,230],43233:[,230],43234:[,230],43235:[,230],43236:[,230],43237:[,230],43238:[,230],43239:[,230],43240:[,230],43241:[,230],43242:[,230],43243:[,230],43244:[,230],43245:[,230],43246:[,230],43247:[,230],43248:[,230],43249:[,230]}, + 43264:{43307:[,220],43308:[,220],43309:[,220],43347:[,9],43443:[,7],43456:[,9]}, + 43520:{43696:[,230],43698:[,230],43699:[,230],43700:[,220],43703:[,230],43704:[,230],43710:[,230],43711:[,230],43713:[,230],43766:[,9]}, + 43776:{44013:[,9]}, + 53504:{119134:[[119127,119141],512],119135:[[119128,119141],512],119136:[[119135,119150],512],119137:[[119135,119151],512],119138:[[119135,119152],512],119139:[[119135,119153],512],119140:[[119135,119154],512],119141:[,216],119142:[,216],119143:[,1],119144:[,1],119145:[,1],119149:[,226],119150:[,216],119151:[,216],119152:[,216],119153:[,216],119154:[,216],119163:[,220],119164:[,220],119165:[,220],119166:[,220],119167:[,220],119168:[,220],119169:[,220],119170:[,220],119173:[,230],119174:[,230],119175:[,230],119176:[,230],119177:[,230],119178:[,220],119179:[,220],119210:[,230],119211:[,230],119212:[,230],119213:[,230],119227:[[119225,119141],512],119228:[[119226,119141],512],119229:[[119227,119150],512],119230:[[119228,119150],512],119231:[[119227,119151],512],119232:[[119228,119151],512]}, + 53760:{119362:[,230],119363:[,230],119364:[,230]}, + 54272:{119808:[[65],256],119809:[[66],256],119810:[[67],256],119811:[[68],256],119812:[[69],256],119813:[[70],256],119814:[[71],256],119815:[[72],256],119816:[[73],256],119817:[[74],256],119818:[[75],256],119819:[[76],256],119820:[[77],256],119821:[[78],256],119822:[[79],256],119823:[[80],256],119824:[[81],256],119825:[[82],256],119826:[[83],256],119827:[[84],256],119828:[[85],256],119829:[[86],256],119830:[[87],256],119831:[[88],256],119832:[[89],256],119833:[[90],256],119834:[[97],256],119835:[[98],256],119836:[[99],256],119837:[[100],256],119838:[[101],256],119839:[[102],256],119840:[[103],256],119841:[[104],256],119842:[[105],256],119843:[[106],256],119844:[[107],256],119845:[[108],256],119846:[[109],256],119847:[[110],256],119848:[[111],256],119849:[[112],256],119850:[[113],256],119851:[[114],256],119852:[[115],256],119853:[[116],256],119854:[[117],256],119855:[[118],256],119856:[[119],256],119857:[[120],256],119858:[[121],256],119859:[[122],256],119860:[[65],256],119861:[[66],256],119862:[[67],256],119863:[[68],256],119864:[[69],256],119865:[[70],256],119866:[[71],256],119867:[[72],256],119868:[[73],256],119869:[[74],256],119870:[[75],256],119871:[[76],256],119872:[[77],256],119873:[[78],256],119874:[[79],256],119875:[[80],256],119876:[[81],256],119877:[[82],256],119878:[[83],256],119879:[[84],256],119880:[[85],256],119881:[[86],256],119882:[[87],256],119883:[[88],256],119884:[[89],256],119885:[[90],256],119886:[[97],256],119887:[[98],256],119888:[[99],256],119889:[[100],256],119890:[[101],256],119891:[[102],256],119892:[[103],256],119894:[[105],256],119895:[[106],256],119896:[[107],256],119897:[[108],256],119898:[[109],256],119899:[[110],256],119900:[[111],256],119901:[[112],256],119902:[[113],256],119903:[[114],256],119904:[[115],256],119905:[[116],256],119906:[[117],256],119907:[[118],256],119908:[[119],256],119909:[[120],256],119910:[[121],256],119911:[[122],256],119912:[[65],256],119913:[[66],256],119914:[[67],256],119915:[[68],256],119916:[[69],256],119917:[[70],256],119918:[[71],256],119919:[[72],256],119920:[[73],256],119921:[[74],256],119922:[[75],256],119923:[[76],256],119924:[[77],256],119925:[[78],256],119926:[[79],256],119927:[[80],256],119928:[[81],256],119929:[[82],256],119930:[[83],256],119931:[[84],256],119932:[[85],256],119933:[[86],256],119934:[[87],256],119935:[[88],256],119936:[[89],256],119937:[[90],256],119938:[[97],256],119939:[[98],256],119940:[[99],256],119941:[[100],256],119942:[[101],256],119943:[[102],256],119944:[[103],256],119945:[[104],256],119946:[[105],256],119947:[[106],256],119948:[[107],256],119949:[[108],256],119950:[[109],256],119951:[[110],256],119952:[[111],256],119953:[[112],256],119954:[[113],256],119955:[[114],256],119956:[[115],256],119957:[[116],256],119958:[[117],256],119959:[[118],256],119960:[[119],256],119961:[[120],256],119962:[[121],256],119963:[[122],256],119964:[[65],256],119966:[[67],256],119967:[[68],256],119970:[[71],256],119973:[[74],256],119974:[[75],256],119977:[[78],256],119978:[[79],256],119979:[[80],256],119980:[[81],256],119982:[[83],256],119983:[[84],256],119984:[[85],256],119985:[[86],256],119986:[[87],256],119987:[[88],256],119988:[[89],256],119989:[[90],256],119990:[[97],256],119991:[[98],256],119992:[[99],256],119993:[[100],256],119995:[[102],256],119997:[[104],256],119998:[[105],256],119999:[[106],256],120000:[[107],256],120001:[[108],256],120002:[[109],256],120003:[[110],256],120005:[[112],256],120006:[[113],256],120007:[[114],256],120008:[[115],256],120009:[[116],256],120010:[[117],256],120011:[[118],256],120012:[[119],256],120013:[[120],256],120014:[[121],256],120015:[[122],256],120016:[[65],256],120017:[[66],256],120018:[[67],256],120019:[[68],256],120020:[[69],256],120021:[[70],256],120022:[[71],256],120023:[[72],256],120024:[[73],256],120025:[[74],256],120026:[[75],256],120027:[[76],256],120028:[[77],256],120029:[[78],256],120030:[[79],256],120031:[[80],256],120032:[[81],256],120033:[[82],256],120034:[[83],256],120035:[[84],256],120036:[[85],256],120037:[[86],256],120038:[[87],256],120039:[[88],256],120040:[[89],256],120041:[[90],256],120042:[[97],256],120043:[[98],256],120044:[[99],256],120045:[[100],256],120046:[[101],256],120047:[[102],256],120048:[[103],256],120049:[[104],256],120050:[[105],256],120051:[[106],256],120052:[[107],256],120053:[[108],256],120054:[[109],256],120055:[[110],256],120056:[[111],256],120057:[[112],256],120058:[[113],256],120059:[[114],256],120060:[[115],256],120061:[[116],256],120062:[[117],256],120063:[[118],256]}, + 54528:{120064:[[119],256],120065:[[120],256],120066:[[121],256],120067:[[122],256],120068:[[65],256],120069:[[66],256],120071:[[68],256],120072:[[69],256],120073:[[70],256],120074:[[71],256],120077:[[74],256],120078:[[75],256],120079:[[76],256],120080:[[77],256],120081:[[78],256],120082:[[79],256],120083:[[80],256],120084:[[81],256],120086:[[83],256],120087:[[84],256],120088:[[85],256],120089:[[86],256],120090:[[87],256],120091:[[88],256],120092:[[89],256],120094:[[97],256],120095:[[98],256],120096:[[99],256],120097:[[100],256],120098:[[101],256],120099:[[102],256],120100:[[103],256],120101:[[104],256],120102:[[105],256],120103:[[106],256],120104:[[107],256],120105:[[108],256],120106:[[109],256],120107:[[110],256],120108:[[111],256],120109:[[112],256],120110:[[113],256],120111:[[114],256],120112:[[115],256],120113:[[116],256],120114:[[117],256],120115:[[118],256],120116:[[119],256],120117:[[120],256],120118:[[121],256],120119:[[122],256],120120:[[65],256],120121:[[66],256],120123:[[68],256],120124:[[69],256],120125:[[70],256],120126:[[71],256],120128:[[73],256],120129:[[74],256],120130:[[75],256],120131:[[76],256],120132:[[77],256],120134:[[79],256],120138:[[83],256],120139:[[84],256],120140:[[85],256],120141:[[86],256],120142:[[87],256],120143:[[88],256],120144:[[89],256],120146:[[97],256],120147:[[98],256],120148:[[99],256],120149:[[100],256],120150:[[101],256],120151:[[102],256],120152:[[103],256],120153:[[104],256],120154:[[105],256],120155:[[106],256],120156:[[107],256],120157:[[108],256],120158:[[109],256],120159:[[110],256],120160:[[111],256],120161:[[112],256],120162:[[113],256],120163:[[114],256],120164:[[115],256],120165:[[116],256],120166:[[117],256],120167:[[118],256],120168:[[119],256],120169:[[120],256],120170:[[121],256],120171:[[122],256],120172:[[65],256],120173:[[66],256],120174:[[67],256],120175:[[68],256],120176:[[69],256],120177:[[70],256],120178:[[71],256],120179:[[72],256],120180:[[73],256],120181:[[74],256],120182:[[75],256],120183:[[76],256],120184:[[77],256],120185:[[78],256],120186:[[79],256],120187:[[80],256],120188:[[81],256],120189:[[82],256],120190:[[83],256],120191:[[84],256],120192:[[85],256],120193:[[86],256],120194:[[87],256],120195:[[88],256],120196:[[89],256],120197:[[90],256],120198:[[97],256],120199:[[98],256],120200:[[99],256],120201:[[100],256],120202:[[101],256],120203:[[102],256],120204:[[103],256],120205:[[104],256],120206:[[105],256],120207:[[106],256],120208:[[107],256],120209:[[108],256],120210:[[109],256],120211:[[110],256],120212:[[111],256],120213:[[112],256],120214:[[113],256],120215:[[114],256],120216:[[115],256],120217:[[116],256],120218:[[117],256],120219:[[118],256],120220:[[119],256],120221:[[120],256],120222:[[121],256],120223:[[122],256],120224:[[65],256],120225:[[66],256],120226:[[67],256],120227:[[68],256],120228:[[69],256],120229:[[70],256],120230:[[71],256],120231:[[72],256],120232:[[73],256],120233:[[74],256],120234:[[75],256],120235:[[76],256],120236:[[77],256],120237:[[78],256],120238:[[79],256],120239:[[80],256],120240:[[81],256],120241:[[82],256],120242:[[83],256],120243:[[84],256],120244:[[85],256],120245:[[86],256],120246:[[87],256],120247:[[88],256],120248:[[89],256],120249:[[90],256],120250:[[97],256],120251:[[98],256],120252:[[99],256],120253:[[100],256],120254:[[101],256],120255:[[102],256],120256:[[103],256],120257:[[104],256],120258:[[105],256],120259:[[106],256],120260:[[107],256],120261:[[108],256],120262:[[109],256],120263:[[110],256],120264:[[111],256],120265:[[112],256],120266:[[113],256],120267:[[114],256],120268:[[115],256],120269:[[116],256],120270:[[117],256],120271:[[118],256],120272:[[119],256],120273:[[120],256],120274:[[121],256],120275:[[122],256],120276:[[65],256],120277:[[66],256],120278:[[67],256],120279:[[68],256],120280:[[69],256],120281:[[70],256],120282:[[71],256],120283:[[72],256],120284:[[73],256],120285:[[74],256],120286:[[75],256],120287:[[76],256],120288:[[77],256],120289:[[78],256],120290:[[79],256],120291:[[80],256],120292:[[81],256],120293:[[82],256],120294:[[83],256],120295:[[84],256],120296:[[85],256],120297:[[86],256],120298:[[87],256],120299:[[88],256],120300:[[89],256],120301:[[90],256],120302:[[97],256],120303:[[98],256],120304:[[99],256],120305:[[100],256],120306:[[101],256],120307:[[102],256],120308:[[103],256],120309:[[104],256],120310:[[105],256],120311:[[106],256],120312:[[107],256],120313:[[108],256],120314:[[109],256],120315:[[110],256],120316:[[111],256],120317:[[112],256],120318:[[113],256],120319:[[114],256]}, + 54784:{120320:[[115],256],120321:[[116],256],120322:[[117],256],120323:[[118],256],120324:[[119],256],120325:[[120],256],120326:[[121],256],120327:[[122],256],120328:[[65],256],120329:[[66],256],120330:[[67],256],120331:[[68],256],120332:[[69],256],120333:[[70],256],120334:[[71],256],120335:[[72],256],120336:[[73],256],120337:[[74],256],120338:[[75],256],120339:[[76],256],120340:[[77],256],120341:[[78],256],120342:[[79],256],120343:[[80],256],120344:[[81],256],120345:[[82],256],120346:[[83],256],120347:[[84],256],120348:[[85],256],120349:[[86],256],120350:[[87],256],120351:[[88],256],120352:[[89],256],120353:[[90],256],120354:[[97],256],120355:[[98],256],120356:[[99],256],120357:[[100],256],120358:[[101],256],120359:[[102],256],120360:[[103],256],120361:[[104],256],120362:[[105],256],120363:[[106],256],120364:[[107],256],120365:[[108],256],120366:[[109],256],120367:[[110],256],120368:[[111],256],120369:[[112],256],120370:[[113],256],120371:[[114],256],120372:[[115],256],120373:[[116],256],120374:[[117],256],120375:[[118],256],120376:[[119],256],120377:[[120],256],120378:[[121],256],120379:[[122],256],120380:[[65],256],120381:[[66],256],120382:[[67],256],120383:[[68],256],120384:[[69],256],120385:[[70],256],120386:[[71],256],120387:[[72],256],120388:[[73],256],120389:[[74],256],120390:[[75],256],120391:[[76],256],120392:[[77],256],120393:[[78],256],120394:[[79],256],120395:[[80],256],120396:[[81],256],120397:[[82],256],120398:[[83],256],120399:[[84],256],120400:[[85],256],120401:[[86],256],120402:[[87],256],120403:[[88],256],120404:[[89],256],120405:[[90],256],120406:[[97],256],120407:[[98],256],120408:[[99],256],120409:[[100],256],120410:[[101],256],120411:[[102],256],120412:[[103],256],120413:[[104],256],120414:[[105],256],120415:[[106],256],120416:[[107],256],120417:[[108],256],120418:[[109],256],120419:[[110],256],120420:[[111],256],120421:[[112],256],120422:[[113],256],120423:[[114],256],120424:[[115],256],120425:[[116],256],120426:[[117],256],120427:[[118],256],120428:[[119],256],120429:[[120],256],120430:[[121],256],120431:[[122],256],120432:[[65],256],120433:[[66],256],120434:[[67],256],120435:[[68],256],120436:[[69],256],120437:[[70],256],120438:[[71],256],120439:[[72],256],120440:[[73],256],120441:[[74],256],120442:[[75],256],120443:[[76],256],120444:[[77],256],120445:[[78],256],120446:[[79],256],120447:[[80],256],120448:[[81],256],120449:[[82],256],120450:[[83],256],120451:[[84],256],120452:[[85],256],120453:[[86],256],120454:[[87],256],120455:[[88],256],120456:[[89],256],120457:[[90],256],120458:[[97],256],120459:[[98],256],120460:[[99],256],120461:[[100],256],120462:[[101],256],120463:[[102],256],120464:[[103],256],120465:[[104],256],120466:[[105],256],120467:[[106],256],120468:[[107],256],120469:[[108],256],120470:[[109],256],120471:[[110],256],120472:[[111],256],120473:[[112],256],120474:[[113],256],120475:[[114],256],120476:[[115],256],120477:[[116],256],120478:[[117],256],120479:[[118],256],120480:[[119],256],120481:[[120],256],120482:[[121],256],120483:[[122],256],120484:[[305],256],120485:[[567],256],120488:[[913],256],120489:[[914],256],120490:[[915],256],120491:[[916],256],120492:[[917],256],120493:[[918],256],120494:[[919],256],120495:[[920],256],120496:[[921],256],120497:[[922],256],120498:[[923],256],120499:[[924],256],120500:[[925],256],120501:[[926],256],120502:[[927],256],120503:[[928],256],120504:[[929],256],120505:[[1012],256],120506:[[931],256],120507:[[932],256],120508:[[933],256],120509:[[934],256],120510:[[935],256],120511:[[936],256],120512:[[937],256],120513:[[8711],256],120514:[[945],256],120515:[[946],256],120516:[[947],256],120517:[[948],256],120518:[[949],256],120519:[[950],256],120520:[[951],256],120521:[[952],256],120522:[[953],256],120523:[[954],256],120524:[[955],256],120525:[[956],256],120526:[[957],256],120527:[[958],256],120528:[[959],256],120529:[[960],256],120530:[[961],256],120531:[[962],256],120532:[[963],256],120533:[[964],256],120534:[[965],256],120535:[[966],256],120536:[[967],256],120537:[[968],256],120538:[[969],256],120539:[[8706],256],120540:[[1013],256],120541:[[977],256],120542:[[1008],256],120543:[[981],256],120544:[[1009],256],120545:[[982],256],120546:[[913],256],120547:[[914],256],120548:[[915],256],120549:[[916],256],120550:[[917],256],120551:[[918],256],120552:[[919],256],120553:[[920],256],120554:[[921],256],120555:[[922],256],120556:[[923],256],120557:[[924],256],120558:[[925],256],120559:[[926],256],120560:[[927],256],120561:[[928],256],120562:[[929],256],120563:[[1012],256],120564:[[931],256],120565:[[932],256],120566:[[933],256],120567:[[934],256],120568:[[935],256],120569:[[936],256],120570:[[937],256],120571:[[8711],256],120572:[[945],256],120573:[[946],256],120574:[[947],256],120575:[[948],256]}, + 55040:{120576:[[949],256],120577:[[950],256],120578:[[951],256],120579:[[952],256],120580:[[953],256],120581:[[954],256],120582:[[955],256],120583:[[956],256],120584:[[957],256],120585:[[958],256],120586:[[959],256],120587:[[960],256],120588:[[961],256],120589:[[962],256],120590:[[963],256],120591:[[964],256],120592:[[965],256],120593:[[966],256],120594:[[967],256],120595:[[968],256],120596:[[969],256],120597:[[8706],256],120598:[[1013],256],120599:[[977],256],120600:[[1008],256],120601:[[981],256],120602:[[1009],256],120603:[[982],256],120604:[[913],256],120605:[[914],256],120606:[[915],256],120607:[[916],256],120608:[[917],256],120609:[[918],256],120610:[[919],256],120611:[[920],256],120612:[[921],256],120613:[[922],256],120614:[[923],256],120615:[[924],256],120616:[[925],256],120617:[[926],256],120618:[[927],256],120619:[[928],256],120620:[[929],256],120621:[[1012],256],120622:[[931],256],120623:[[932],256],120624:[[933],256],120625:[[934],256],120626:[[935],256],120627:[[936],256],120628:[[937],256],120629:[[8711],256],120630:[[945],256],120631:[[946],256],120632:[[947],256],120633:[[948],256],120634:[[949],256],120635:[[950],256],120636:[[951],256],120637:[[952],256],120638:[[953],256],120639:[[954],256],120640:[[955],256],120641:[[956],256],120642:[[957],256],120643:[[958],256],120644:[[959],256],120645:[[960],256],120646:[[961],256],120647:[[962],256],120648:[[963],256],120649:[[964],256],120650:[[965],256],120651:[[966],256],120652:[[967],256],120653:[[968],256],120654:[[969],256],120655:[[8706],256],120656:[[1013],256],120657:[[977],256],120658:[[1008],256],120659:[[981],256],120660:[[1009],256],120661:[[982],256],120662:[[913],256],120663:[[914],256],120664:[[915],256],120665:[[916],256],120666:[[917],256],120667:[[918],256],120668:[[919],256],120669:[[920],256],120670:[[921],256],120671:[[922],256],120672:[[923],256],120673:[[924],256],120674:[[925],256],120675:[[926],256],120676:[[927],256],120677:[[928],256],120678:[[929],256],120679:[[1012],256],120680:[[931],256],120681:[[932],256],120682:[[933],256],120683:[[934],256],120684:[[935],256],120685:[[936],256],120686:[[937],256],120687:[[8711],256],120688:[[945],256],120689:[[946],256],120690:[[947],256],120691:[[948],256],120692:[[949],256],120693:[[950],256],120694:[[951],256],120695:[[952],256],120696:[[953],256],120697:[[954],256],120698:[[955],256],120699:[[956],256],120700:[[957],256],120701:[[958],256],120702:[[959],256],120703:[[960],256],120704:[[961],256],120705:[[962],256],120706:[[963],256],120707:[[964],256],120708:[[965],256],120709:[[966],256],120710:[[967],256],120711:[[968],256],120712:[[969],256],120713:[[8706],256],120714:[[1013],256],120715:[[977],256],120716:[[1008],256],120717:[[981],256],120718:[[1009],256],120719:[[982],256],120720:[[913],256],120721:[[914],256],120722:[[915],256],120723:[[916],256],120724:[[917],256],120725:[[918],256],120726:[[919],256],120727:[[920],256],120728:[[921],256],120729:[[922],256],120730:[[923],256],120731:[[924],256],120732:[[925],256],120733:[[926],256],120734:[[927],256],120735:[[928],256],120736:[[929],256],120737:[[1012],256],120738:[[931],256],120739:[[932],256],120740:[[933],256],120741:[[934],256],120742:[[935],256],120743:[[936],256],120744:[[937],256],120745:[[8711],256],120746:[[945],256],120747:[[946],256],120748:[[947],256],120749:[[948],256],120750:[[949],256],120751:[[950],256],120752:[[951],256],120753:[[952],256],120754:[[953],256],120755:[[954],256],120756:[[955],256],120757:[[956],256],120758:[[957],256],120759:[[958],256],120760:[[959],256],120761:[[960],256],120762:[[961],256],120763:[[962],256],120764:[[963],256],120765:[[964],256],120766:[[965],256],120767:[[966],256],120768:[[967],256],120769:[[968],256],120770:[[969],256],120771:[[8706],256],120772:[[1013],256],120773:[[977],256],120774:[[1008],256],120775:[[981],256],120776:[[1009],256],120777:[[982],256],120778:[[988],256],120779:[[989],256],120782:[[48],256],120783:[[49],256],120784:[[50],256],120785:[[51],256],120786:[[52],256],120787:[[53],256],120788:[[54],256],120789:[[55],256],120790:[[56],256],120791:[[57],256],120792:[[48],256],120793:[[49],256],120794:[[50],256],120795:[[51],256],120796:[[52],256],120797:[[53],256],120798:[[54],256],120799:[[55],256],120800:[[56],256],120801:[[57],256],120802:[[48],256],120803:[[49],256],120804:[[50],256],120805:[[51],256],120806:[[52],256],120807:[[53],256],120808:[[54],256],120809:[[55],256],120810:[[56],256],120811:[[57],256],120812:[[48],256],120813:[[49],256],120814:[[50],256],120815:[[51],256],120816:[[52],256],120817:[[53],256],120818:[[54],256],120819:[[55],256],120820:[[56],256],120821:[[57],256],120822:[[48],256],120823:[[49],256],120824:[[50],256],120825:[[51],256],120826:[[52],256],120827:[[53],256],120828:[[54],256],120829:[[55],256],120830:[[56],256],120831:[[57],256]}, + 60928:{126464:[[1575],256],126465:[[1576],256],126466:[[1580],256],126467:[[1583],256],126469:[[1608],256],126470:[[1586],256],126471:[[1581],256],126472:[[1591],256],126473:[[1610],256],126474:[[1603],256],126475:[[1604],256],126476:[[1605],256],126477:[[1606],256],126478:[[1587],256],126479:[[1593],256],126480:[[1601],256],126481:[[1589],256],126482:[[1602],256],126483:[[1585],256],126484:[[1588],256],126485:[[1578],256],126486:[[1579],256],126487:[[1582],256],126488:[[1584],256],126489:[[1590],256],126490:[[1592],256],126491:[[1594],256],126492:[[1646],256],126493:[[1722],256],126494:[[1697],256],126495:[[1647],256],126497:[[1576],256],126498:[[1580],256],126500:[[1607],256],126503:[[1581],256],126505:[[1610],256],126506:[[1603],256],126507:[[1604],256],126508:[[1605],256],126509:[[1606],256],126510:[[1587],256],126511:[[1593],256],126512:[[1601],256],126513:[[1589],256],126514:[[1602],256],126516:[[1588],256],126517:[[1578],256],126518:[[1579],256],126519:[[1582],256],126521:[[1590],256],126523:[[1594],256],126530:[[1580],256],126535:[[1581],256],126537:[[1610],256],126539:[[1604],256],126541:[[1606],256],126542:[[1587],256],126543:[[1593],256],126545:[[1589],256],126546:[[1602],256],126548:[[1588],256],126551:[[1582],256],126553:[[1590],256],126555:[[1594],256],126557:[[1722],256],126559:[[1647],256],126561:[[1576],256],126562:[[1580],256],126564:[[1607],256],126567:[[1581],256],126568:[[1591],256],126569:[[1610],256],126570:[[1603],256],126572:[[1605],256],126573:[[1606],256],126574:[[1587],256],126575:[[1593],256],126576:[[1601],256],126577:[[1589],256],126578:[[1602],256],126580:[[1588],256],126581:[[1578],256],126582:[[1579],256],126583:[[1582],256],126585:[[1590],256],126586:[[1592],256],126587:[[1594],256],126588:[[1646],256],126590:[[1697],256],126592:[[1575],256],126593:[[1576],256],126594:[[1580],256],126595:[[1583],256],126596:[[1607],256],126597:[[1608],256],126598:[[1586],256],126599:[[1581],256],126600:[[1591],256],126601:[[1610],256],126603:[[1604],256],126604:[[1605],256],126605:[[1606],256],126606:[[1587],256],126607:[[1593],256],126608:[[1601],256],126609:[[1589],256],126610:[[1602],256],126611:[[1585],256],126612:[[1588],256],126613:[[1578],256],126614:[[1579],256],126615:[[1582],256],126616:[[1584],256],126617:[[1590],256],126618:[[1592],256],126619:[[1594],256],126625:[[1576],256],126626:[[1580],256],126627:[[1583],256],126629:[[1608],256],126630:[[1586],256],126631:[[1581],256],126632:[[1591],256],126633:[[1610],256],126635:[[1604],256],126636:[[1605],256],126637:[[1606],256],126638:[[1587],256],126639:[[1593],256],126640:[[1601],256],126641:[[1589],256],126642:[[1602],256],126643:[[1585],256],126644:[[1588],256],126645:[[1578],256],126646:[[1579],256],126647:[[1582],256],126648:[[1584],256],126649:[[1590],256],126650:[[1592],256],126651:[[1594],256]}, + 61696:{127232:[[48,46],256],127233:[[48,44],256],127234:[[49,44],256],127235:[[50,44],256],127236:[[51,44],256],127237:[[52,44],256],127238:[[53,44],256],127239:[[54,44],256],127240:[[55,44],256],127241:[[56,44],256],127242:[[57,44],256],127248:[[40,65,41],256],127249:[[40,66,41],256],127250:[[40,67,41],256],127251:[[40,68,41],256],127252:[[40,69,41],256],127253:[[40,70,41],256],127254:[[40,71,41],256],127255:[[40,72,41],256],127256:[[40,73,41],256],127257:[[40,74,41],256],127258:[[40,75,41],256],127259:[[40,76,41],256],127260:[[40,77,41],256],127261:[[40,78,41],256],127262:[[40,79,41],256],127263:[[40,80,41],256],127264:[[40,81,41],256],127265:[[40,82,41],256],127266:[[40,83,41],256],127267:[[40,84,41],256],127268:[[40,85,41],256],127269:[[40,86,41],256],127270:[[40,87,41],256],127271:[[40,88,41],256],127272:[[40,89,41],256],127273:[[40,90,41],256],127274:[[12308,83,12309],256],127275:[[67],256],127276:[[82],256],127277:[[67,68],256],127278:[[87,90],256],127280:[[65],256],127281:[[66],256],127282:[[67],256],127283:[[68],256],127284:[[69],256],127285:[[70],256],127286:[[71],256],127287:[[72],256],127288:[[73],256],127289:[[74],256],127290:[[75],256],127291:[[76],256],127292:[[77],256],127293:[[78],256],127294:[[79],256],127295:[[80],256],127296:[[81],256],127297:[[82],256],127298:[[83],256],127299:[[84],256],127300:[[85],256],127301:[[86],256],127302:[[87],256],127303:[[88],256],127304:[[89],256],127305:[[90],256],127306:[[72,86],256],127307:[[77,86],256],127308:[[83,68],256],127309:[[83,83],256],127310:[[80,80,86],256],127311:[[87,67],256],127338:[[77,67],256],127339:[[77,68],256],127376:[[68,74],256]}, + 61952:{127488:[[12411,12363],256],127489:[[12467,12467],256],127490:[[12469],256],127504:[[25163],256],127505:[[23383],256],127506:[[21452],256],127507:[[12487],256],127508:[[20108],256],127509:[[22810],256],127510:[[35299],256],127511:[[22825],256],127512:[[20132],256],127513:[[26144],256],127514:[[28961],256],127515:[[26009],256],127516:[[21069],256],127517:[[24460],256],127518:[[20877],256],127519:[[26032],256],127520:[[21021],256],127521:[[32066],256],127522:[[29983],256],127523:[[36009],256],127524:[[22768],256],127525:[[21561],256],127526:[[28436],256],127527:[[25237],256],127528:[[25429],256],127529:[[19968],256],127530:[[19977],256],127531:[[36938],256],127532:[[24038],256],127533:[[20013],256],127534:[[21491],256],127535:[[25351],256],127536:[[36208],256],127537:[[25171],256],127538:[[31105],256],127539:[[31354],256],127540:[[21512],256],127541:[[28288],256],127542:[[26377],256],127543:[[26376],256],127544:[[30003],256],127545:[[21106],256],127546:[[21942],256],127552:[[12308,26412,12309],256],127553:[[12308,19977,12309],256],127554:[[12308,20108,12309],256],127555:[[12308,23433,12309],256],127556:[[12308,28857,12309],256],127557:[[12308,25171,12309],256],127558:[[12308,30423,12309],256],127559:[[12308,21213,12309],256],127560:[[12308,25943,12309],256],127568:[[24471],256],127569:[[21487],256]}, + 63488:{194560:[[20029]],194561:[[20024]],194562:[[20033]],194563:[[131362]],194564:[[20320]],194565:[[20398]],194566:[[20411]],194567:[[20482]],194568:[[20602]],194569:[[20633]],194570:[[20711]],194571:[[20687]],194572:[[13470]],194573:[[132666]],194574:[[20813]],194575:[[20820]],194576:[[20836]],194577:[[20855]],194578:[[132380]],194579:[[13497]],194580:[[20839]],194581:[[20877]],194582:[[132427]],194583:[[20887]],194584:[[20900]],194585:[[20172]],194586:[[20908]],194587:[[20917]],194588:[[168415]],194589:[[20981]],194590:[[20995]],194591:[[13535]],194592:[[21051]],194593:[[21062]],194594:[[21106]],194595:[[21111]],194596:[[13589]],194597:[[21191]],194598:[[21193]],194599:[[21220]],194600:[[21242]],194601:[[21253]],194602:[[21254]],194603:[[21271]],194604:[[21321]],194605:[[21329]],194606:[[21338]],194607:[[21363]],194608:[[21373]],194609:[[21375]],194610:[[21375]],194611:[[21375]],194612:[[133676]],194613:[[28784]],194614:[[21450]],194615:[[21471]],194616:[[133987]],194617:[[21483]],194618:[[21489]],194619:[[21510]],194620:[[21662]],194621:[[21560]],194622:[[21576]],194623:[[21608]],194624:[[21666]],194625:[[21750]],194626:[[21776]],194627:[[21843]],194628:[[21859]],194629:[[21892]],194630:[[21892]],194631:[[21913]],194632:[[21931]],194633:[[21939]],194634:[[21954]],194635:[[22294]],194636:[[22022]],194637:[[22295]],194638:[[22097]],194639:[[22132]],194640:[[20999]],194641:[[22766]],194642:[[22478]],194643:[[22516]],194644:[[22541]],194645:[[22411]],194646:[[22578]],194647:[[22577]],194648:[[22700]],194649:[[136420]],194650:[[22770]],194651:[[22775]],194652:[[22790]],194653:[[22810]],194654:[[22818]],194655:[[22882]],194656:[[136872]],194657:[[136938]],194658:[[23020]],194659:[[23067]],194660:[[23079]],194661:[[23000]],194662:[[23142]],194663:[[14062]],194664:[[14076]],194665:[[23304]],194666:[[23358]],194667:[[23358]],194668:[[137672]],194669:[[23491]],194670:[[23512]],194671:[[23527]],194672:[[23539]],194673:[[138008]],194674:[[23551]],194675:[[23558]],194676:[[24403]],194677:[[23586]],194678:[[14209]],194679:[[23648]],194680:[[23662]],194681:[[23744]],194682:[[23693]],194683:[[138724]],194684:[[23875]],194685:[[138726]],194686:[[23918]],194687:[[23915]],194688:[[23932]],194689:[[24033]],194690:[[24034]],194691:[[14383]],194692:[[24061]],194693:[[24104]],194694:[[24125]],194695:[[24169]],194696:[[14434]],194697:[[139651]],194698:[[14460]],194699:[[24240]],194700:[[24243]],194701:[[24246]],194702:[[24266]],194703:[[172946]],194704:[[24318]],194705:[[140081]],194706:[[140081]],194707:[[33281]],194708:[[24354]],194709:[[24354]],194710:[[14535]],194711:[[144056]],194712:[[156122]],194713:[[24418]],194714:[[24427]],194715:[[14563]],194716:[[24474]],194717:[[24525]],194718:[[24535]],194719:[[24569]],194720:[[24705]],194721:[[14650]],194722:[[14620]],194723:[[24724]],194724:[[141012]],194725:[[24775]],194726:[[24904]],194727:[[24908]],194728:[[24910]],194729:[[24908]],194730:[[24954]],194731:[[24974]],194732:[[25010]],194733:[[24996]],194734:[[25007]],194735:[[25054]],194736:[[25074]],194737:[[25078]],194738:[[25104]],194739:[[25115]],194740:[[25181]],194741:[[25265]],194742:[[25300]],194743:[[25424]],194744:[[142092]],194745:[[25405]],194746:[[25340]],194747:[[25448]],194748:[[25475]],194749:[[25572]],194750:[[142321]],194751:[[25634]],194752:[[25541]],194753:[[25513]],194754:[[14894]],194755:[[25705]],194756:[[25726]],194757:[[25757]],194758:[[25719]],194759:[[14956]],194760:[[25935]],194761:[[25964]],194762:[[143370]],194763:[[26083]],194764:[[26360]],194765:[[26185]],194766:[[15129]],194767:[[26257]],194768:[[15112]],194769:[[15076]],194770:[[20882]],194771:[[20885]],194772:[[26368]],194773:[[26268]],194774:[[32941]],194775:[[17369]],194776:[[26391]],194777:[[26395]],194778:[[26401]],194779:[[26462]],194780:[[26451]],194781:[[144323]],194782:[[15177]],194783:[[26618]],194784:[[26501]],194785:[[26706]],194786:[[26757]],194787:[[144493]],194788:[[26766]],194789:[[26655]],194790:[[26900]],194791:[[15261]],194792:[[26946]],194793:[[27043]],194794:[[27114]],194795:[[27304]],194796:[[145059]],194797:[[27355]],194798:[[15384]],194799:[[27425]],194800:[[145575]],194801:[[27476]],194802:[[15438]],194803:[[27506]],194804:[[27551]],194805:[[27578]],194806:[[27579]],194807:[[146061]],194808:[[138507]],194809:[[146170]],194810:[[27726]],194811:[[146620]],194812:[[27839]],194813:[[27853]],194814:[[27751]],194815:[[27926]]}, + 63744:{63744:[[35912]],63745:[[26356]],63746:[[36554]],63747:[[36040]],63748:[[28369]],63749:[[20018]],63750:[[21477]],63751:[[40860]],63752:[[40860]],63753:[[22865]],63754:[[37329]],63755:[[21895]],63756:[[22856]],63757:[[25078]],63758:[[30313]],63759:[[32645]],63760:[[34367]],63761:[[34746]],63762:[[35064]],63763:[[37007]],63764:[[27138]],63765:[[27931]],63766:[[28889]],63767:[[29662]],63768:[[33853]],63769:[[37226]],63770:[[39409]],63771:[[20098]],63772:[[21365]],63773:[[27396]],63774:[[29211]],63775:[[34349]],63776:[[40478]],63777:[[23888]],63778:[[28651]],63779:[[34253]],63780:[[35172]],63781:[[25289]],63782:[[33240]],63783:[[34847]],63784:[[24266]],63785:[[26391]],63786:[[28010]],63787:[[29436]],63788:[[37070]],63789:[[20358]],63790:[[20919]],63791:[[21214]],63792:[[25796]],63793:[[27347]],63794:[[29200]],63795:[[30439]],63796:[[32769]],63797:[[34310]],63798:[[34396]],63799:[[36335]],63800:[[38706]],63801:[[39791]],63802:[[40442]],63803:[[30860]],63804:[[31103]],63805:[[32160]],63806:[[33737]],63807:[[37636]],63808:[[40575]],63809:[[35542]],63810:[[22751]],63811:[[24324]],63812:[[31840]],63813:[[32894]],63814:[[29282]],63815:[[30922]],63816:[[36034]],63817:[[38647]],63818:[[22744]],63819:[[23650]],63820:[[27155]],63821:[[28122]],63822:[[28431]],63823:[[32047]],63824:[[32311]],63825:[[38475]],63826:[[21202]],63827:[[32907]],63828:[[20956]],63829:[[20940]],63830:[[31260]],63831:[[32190]],63832:[[33777]],63833:[[38517]],63834:[[35712]],63835:[[25295]],63836:[[27138]],63837:[[35582]],63838:[[20025]],63839:[[23527]],63840:[[24594]],63841:[[29575]],63842:[[30064]],63843:[[21271]],63844:[[30971]],63845:[[20415]],63846:[[24489]],63847:[[19981]],63848:[[27852]],63849:[[25976]],63850:[[32034]],63851:[[21443]],63852:[[22622]],63853:[[30465]],63854:[[33865]],63855:[[35498]],63856:[[27578]],63857:[[36784]],63858:[[27784]],63859:[[25342]],63860:[[33509]],63861:[[25504]],63862:[[30053]],63863:[[20142]],63864:[[20841]],63865:[[20937]],63866:[[26753]],63867:[[31975]],63868:[[33391]],63869:[[35538]],63870:[[37327]],63871:[[21237]],63872:[[21570]],63873:[[22899]],63874:[[24300]],63875:[[26053]],63876:[[28670]],63877:[[31018]],63878:[[38317]],63879:[[39530]],63880:[[40599]],63881:[[40654]],63882:[[21147]],63883:[[26310]],63884:[[27511]],63885:[[36706]],63886:[[24180]],63887:[[24976]],63888:[[25088]],63889:[[25754]],63890:[[28451]],63891:[[29001]],63892:[[29833]],63893:[[31178]],63894:[[32244]],63895:[[32879]],63896:[[36646]],63897:[[34030]],63898:[[36899]],63899:[[37706]],63900:[[21015]],63901:[[21155]],63902:[[21693]],63903:[[28872]],63904:[[35010]],63905:[[35498]],63906:[[24265]],63907:[[24565]],63908:[[25467]],63909:[[27566]],63910:[[31806]],63911:[[29557]],63912:[[20196]],63913:[[22265]],63914:[[23527]],63915:[[23994]],63916:[[24604]],63917:[[29618]],63918:[[29801]],63919:[[32666]],63920:[[32838]],63921:[[37428]],63922:[[38646]],63923:[[38728]],63924:[[38936]],63925:[[20363]],63926:[[31150]],63927:[[37300]],63928:[[38584]],63929:[[24801]],63930:[[20102]],63931:[[20698]],63932:[[23534]],63933:[[23615]],63934:[[26009]],63935:[[27138]],63936:[[29134]],63937:[[30274]],63938:[[34044]],63939:[[36988]],63940:[[40845]],63941:[[26248]],63942:[[38446]],63943:[[21129]],63944:[[26491]],63945:[[26611]],63946:[[27969]],63947:[[28316]],63948:[[29705]],63949:[[30041]],63950:[[30827]],63951:[[32016]],63952:[[39006]],63953:[[20845]],63954:[[25134]],63955:[[38520]],63956:[[20523]],63957:[[23833]],63958:[[28138]],63959:[[36650]],63960:[[24459]],63961:[[24900]],63962:[[26647]],63963:[[29575]],63964:[[38534]],63965:[[21033]],63966:[[21519]],63967:[[23653]],63968:[[26131]],63969:[[26446]],63970:[[26792]],63971:[[27877]],63972:[[29702]],63973:[[30178]],63974:[[32633]],63975:[[35023]],63976:[[35041]],63977:[[37324]],63978:[[38626]],63979:[[21311]],63980:[[28346]],63981:[[21533]],63982:[[29136]],63983:[[29848]],63984:[[34298]],63985:[[38563]],63986:[[40023]],63987:[[40607]],63988:[[26519]],63989:[[28107]],63990:[[33256]],63991:[[31435]],63992:[[31520]],63993:[[31890]],63994:[[29376]],63995:[[28825]],63996:[[35672]],63997:[[20160]],63998:[[33590]],63999:[[21050]],194816:[[27966]],194817:[[28023]],194818:[[27969]],194819:[[28009]],194820:[[28024]],194821:[[28037]],194822:[[146718]],194823:[[27956]],194824:[[28207]],194825:[[28270]],194826:[[15667]],194827:[[28363]],194828:[[28359]],194829:[[147153]],194830:[[28153]],194831:[[28526]],194832:[[147294]],194833:[[147342]],194834:[[28614]],194835:[[28729]],194836:[[28702]],194837:[[28699]],194838:[[15766]],194839:[[28746]],194840:[[28797]],194841:[[28791]],194842:[[28845]],194843:[[132389]],194844:[[28997]],194845:[[148067]],194846:[[29084]],194847:[[148395]],194848:[[29224]],194849:[[29237]],194850:[[29264]],194851:[[149000]],194852:[[29312]],194853:[[29333]],194854:[[149301]],194855:[[149524]],194856:[[29562]],194857:[[29579]],194858:[[16044]],194859:[[29605]],194860:[[16056]],194861:[[16056]],194862:[[29767]],194863:[[29788]],194864:[[29809]],194865:[[29829]],194866:[[29898]],194867:[[16155]],194868:[[29988]],194869:[[150582]],194870:[[30014]],194871:[[150674]],194872:[[30064]],194873:[[139679]],194874:[[30224]],194875:[[151457]],194876:[[151480]],194877:[[151620]],194878:[[16380]],194879:[[16392]],194880:[[30452]],194881:[[151795]],194882:[[151794]],194883:[[151833]],194884:[[151859]],194885:[[30494]],194886:[[30495]],194887:[[30495]],194888:[[30538]],194889:[[16441]],194890:[[30603]],194891:[[16454]],194892:[[16534]],194893:[[152605]],194894:[[30798]],194895:[[30860]],194896:[[30924]],194897:[[16611]],194898:[[153126]],194899:[[31062]],194900:[[153242]],194901:[[153285]],194902:[[31119]],194903:[[31211]],194904:[[16687]],194905:[[31296]],194906:[[31306]],194907:[[31311]],194908:[[153980]],194909:[[154279]],194910:[[154279]],194911:[[31470]],194912:[[16898]],194913:[[154539]],194914:[[31686]],194915:[[31689]],194916:[[16935]],194917:[[154752]],194918:[[31954]],194919:[[17056]],194920:[[31976]],194921:[[31971]],194922:[[32000]],194923:[[155526]],194924:[[32099]],194925:[[17153]],194926:[[32199]],194927:[[32258]],194928:[[32325]],194929:[[17204]],194930:[[156200]],194931:[[156231]],194932:[[17241]],194933:[[156377]],194934:[[32634]],194935:[[156478]],194936:[[32661]],194937:[[32762]],194938:[[32773]],194939:[[156890]],194940:[[156963]],194941:[[32864]],194942:[[157096]],194943:[[32880]],194944:[[144223]],194945:[[17365]],194946:[[32946]],194947:[[33027]],194948:[[17419]],194949:[[33086]],194950:[[23221]],194951:[[157607]],194952:[[157621]],194953:[[144275]],194954:[[144284]],194955:[[33281]],194956:[[33284]],194957:[[36766]],194958:[[17515]],194959:[[33425]],194960:[[33419]],194961:[[33437]],194962:[[21171]],194963:[[33457]],194964:[[33459]],194965:[[33469]],194966:[[33510]],194967:[[158524]],194968:[[33509]],194969:[[33565]],194970:[[33635]],194971:[[33709]],194972:[[33571]],194973:[[33725]],194974:[[33767]],194975:[[33879]],194976:[[33619]],194977:[[33738]],194978:[[33740]],194979:[[33756]],194980:[[158774]],194981:[[159083]],194982:[[158933]],194983:[[17707]],194984:[[34033]],194985:[[34035]],194986:[[34070]],194987:[[160714]],194988:[[34148]],194989:[[159532]],194990:[[17757]],194991:[[17761]],194992:[[159665]],194993:[[159954]],194994:[[17771]],194995:[[34384]],194996:[[34396]],194997:[[34407]],194998:[[34409]],194999:[[34473]],195000:[[34440]],195001:[[34574]],195002:[[34530]],195003:[[34681]],195004:[[34600]],195005:[[34667]],195006:[[34694]],195007:[[17879]],195008:[[34785]],195009:[[34817]],195010:[[17913]],195011:[[34912]],195012:[[34915]],195013:[[161383]],195014:[[35031]],195015:[[35038]],195016:[[17973]],195017:[[35066]],195018:[[13499]],195019:[[161966]],195020:[[162150]],195021:[[18110]],195022:[[18119]],195023:[[35488]],195024:[[35565]],195025:[[35722]],195026:[[35925]],195027:[[162984]],195028:[[36011]],195029:[[36033]],195030:[[36123]],195031:[[36215]],195032:[[163631]],195033:[[133124]],195034:[[36299]],195035:[[36284]],195036:[[36336]],195037:[[133342]],195038:[[36564]],195039:[[36664]],195040:[[165330]],195041:[[165357]],195042:[[37012]],195043:[[37105]],195044:[[37137]],195045:[[165678]],195046:[[37147]],195047:[[37432]],195048:[[37591]],195049:[[37592]],195050:[[37500]],195051:[[37881]],195052:[[37909]],195053:[[166906]],195054:[[38283]],195055:[[18837]],195056:[[38327]],195057:[[167287]],195058:[[18918]],195059:[[38595]],195060:[[23986]],195061:[[38691]],195062:[[168261]],195063:[[168474]],195064:[[19054]],195065:[[19062]],195066:[[38880]],195067:[[168970]],195068:[[19122]],195069:[[169110]],195070:[[38923]],195071:[[38923]]}, + 64000:{64000:[[20999]],64001:[[24230]],64002:[[25299]],64003:[[31958]],64004:[[23429]],64005:[[27934]],64006:[[26292]],64007:[[36667]],64008:[[34892]],64009:[[38477]],64010:[[35211]],64011:[[24275]],64012:[[20800]],64013:[[21952]],64016:[[22618]],64018:[[26228]],64021:[[20958]],64022:[[29482]],64023:[[30410]],64024:[[31036]],64025:[[31070]],64026:[[31077]],64027:[[31119]],64028:[[38742]],64029:[[31934]],64030:[[32701]],64032:[[34322]],64034:[[35576]],64037:[[36920]],64038:[[37117]],64042:[[39151]],64043:[[39164]],64044:[[39208]],64045:[[40372]],64046:[[37086]],64047:[[38583]],64048:[[20398]],64049:[[20711]],64050:[[20813]],64051:[[21193]],64052:[[21220]],64053:[[21329]],64054:[[21917]],64055:[[22022]],64056:[[22120]],64057:[[22592]],64058:[[22696]],64059:[[23652]],64060:[[23662]],64061:[[24724]],64062:[[24936]],64063:[[24974]],64064:[[25074]],64065:[[25935]],64066:[[26082]],64067:[[26257]],64068:[[26757]],64069:[[28023]],64070:[[28186]],64071:[[28450]],64072:[[29038]],64073:[[29227]],64074:[[29730]],64075:[[30865]],64076:[[31038]],64077:[[31049]],64078:[[31048]],64079:[[31056]],64080:[[31062]],64081:[[31069]],64082:[[31117]],64083:[[31118]],64084:[[31296]],64085:[[31361]],64086:[[31680]],64087:[[32244]],64088:[[32265]],64089:[[32321]],64090:[[32626]],64091:[[32773]],64092:[[33261]],64093:[[33401]],64094:[[33401]],64095:[[33879]],64096:[[35088]],64097:[[35222]],64098:[[35585]],64099:[[35641]],64100:[[36051]],64101:[[36104]],64102:[[36790]],64103:[[36920]],64104:[[38627]],64105:[[38911]],64106:[[38971]],64107:[[24693]],64108:[[148206]],64109:[[33304]],64112:[[20006]],64113:[[20917]],64114:[[20840]],64115:[[20352]],64116:[[20805]],64117:[[20864]],64118:[[21191]],64119:[[21242]],64120:[[21917]],64121:[[21845]],64122:[[21913]],64123:[[21986]],64124:[[22618]],64125:[[22707]],64126:[[22852]],64127:[[22868]],64128:[[23138]],64129:[[23336]],64130:[[24274]],64131:[[24281]],64132:[[24425]],64133:[[24493]],64134:[[24792]],64135:[[24910]],64136:[[24840]],64137:[[24974]],64138:[[24928]],64139:[[25074]],64140:[[25140]],64141:[[25540]],64142:[[25628]],64143:[[25682]],64144:[[25942]],64145:[[26228]],64146:[[26391]],64147:[[26395]],64148:[[26454]],64149:[[27513]],64150:[[27578]],64151:[[27969]],64152:[[28379]],64153:[[28363]],64154:[[28450]],64155:[[28702]],64156:[[29038]],64157:[[30631]],64158:[[29237]],64159:[[29359]],64160:[[29482]],64161:[[29809]],64162:[[29958]],64163:[[30011]],64164:[[30237]],64165:[[30239]],64166:[[30410]],64167:[[30427]],64168:[[30452]],64169:[[30538]],64170:[[30528]],64171:[[30924]],64172:[[31409]],64173:[[31680]],64174:[[31867]],64175:[[32091]],64176:[[32244]],64177:[[32574]],64178:[[32773]],64179:[[33618]],64180:[[33775]],64181:[[34681]],64182:[[35137]],64183:[[35206]],64184:[[35222]],64185:[[35519]],64186:[[35576]],64187:[[35531]],64188:[[35585]],64189:[[35582]],64190:[[35565]],64191:[[35641]],64192:[[35722]],64193:[[36104]],64194:[[36664]],64195:[[36978]],64196:[[37273]],64197:[[37494]],64198:[[38524]],64199:[[38627]],64200:[[38742]],64201:[[38875]],64202:[[38911]],64203:[[38923]],64204:[[38971]],64205:[[39698]],64206:[[40860]],64207:[[141386]],64208:[[141380]],64209:[[144341]],64210:[[15261]],64211:[[16408]],64212:[[16441]],64213:[[152137]],64214:[[154832]],64215:[[163539]],64216:[[40771]],64217:[[40846]],195072:[[38953]],195073:[[169398]],195074:[[39138]],195075:[[19251]],195076:[[39209]],195077:[[39335]],195078:[[39362]],195079:[[39422]],195080:[[19406]],195081:[[170800]],195082:[[39698]],195083:[[40000]],195084:[[40189]],195085:[[19662]],195086:[[19693]],195087:[[40295]],195088:[[172238]],195089:[[19704]],195090:[[172293]],195091:[[172558]],195092:[[172689]],195093:[[40635]],195094:[[19798]],195095:[[40697]],195096:[[40702]],195097:[[40709]],195098:[[40719]],195099:[[40726]],195100:[[40763]],195101:[[173568]]}, + 64256:{64256:[[102,102],256],64257:[[102,105],256],64258:[[102,108],256],64259:[[102,102,105],256],64260:[[102,102,108],256],64261:[[383,116],256],64262:[[115,116],256],64275:[[1396,1398],256],64276:[[1396,1381],256],64277:[[1396,1387],256],64278:[[1406,1398],256],64279:[[1396,1389],256],64285:[[1497,1460],512],64286:[,26],64287:[[1522,1463],512],64288:[[1506],256],64289:[[1488],256],64290:[[1491],256],64291:[[1492],256],64292:[[1499],256],64293:[[1500],256],64294:[[1501],256],64295:[[1512],256],64296:[[1514],256],64297:[[43],256],64298:[[1513,1473],512],64299:[[1513,1474],512],64300:[[64329,1473],512],64301:[[64329,1474],512],64302:[[1488,1463],512],64303:[[1488,1464],512],64304:[[1488,1468],512],64305:[[1489,1468],512],64306:[[1490,1468],512],64307:[[1491,1468],512],64308:[[1492,1468],512],64309:[[1493,1468],512],64310:[[1494,1468],512],64312:[[1496,1468],512],64313:[[1497,1468],512],64314:[[1498,1468],512],64315:[[1499,1468],512],64316:[[1500,1468],512],64318:[[1502,1468],512],64320:[[1504,1468],512],64321:[[1505,1468],512],64323:[[1507,1468],512],64324:[[1508,1468],512],64326:[[1510,1468],512],64327:[[1511,1468],512],64328:[[1512,1468],512],64329:[[1513,1468],512],64330:[[1514,1468],512],64331:[[1493,1465],512],64332:[[1489,1471],512],64333:[[1499,1471],512],64334:[[1508,1471],512],64335:[[1488,1500],256],64336:[[1649],256],64337:[[1649],256],64338:[[1659],256],64339:[[1659],256],64340:[[1659],256],64341:[[1659],256],64342:[[1662],256],64343:[[1662],256],64344:[[1662],256],64345:[[1662],256],64346:[[1664],256],64347:[[1664],256],64348:[[1664],256],64349:[[1664],256],64350:[[1658],256],64351:[[1658],256],64352:[[1658],256],64353:[[1658],256],64354:[[1663],256],64355:[[1663],256],64356:[[1663],256],64357:[[1663],256],64358:[[1657],256],64359:[[1657],256],64360:[[1657],256],64361:[[1657],256],64362:[[1700],256],64363:[[1700],256],64364:[[1700],256],64365:[[1700],256],64366:[[1702],256],64367:[[1702],256],64368:[[1702],256],64369:[[1702],256],64370:[[1668],256],64371:[[1668],256],64372:[[1668],256],64373:[[1668],256],64374:[[1667],256],64375:[[1667],256],64376:[[1667],256],64377:[[1667],256],64378:[[1670],256],64379:[[1670],256],64380:[[1670],256],64381:[[1670],256],64382:[[1671],256],64383:[[1671],256],64384:[[1671],256],64385:[[1671],256],64386:[[1677],256],64387:[[1677],256],64388:[[1676],256],64389:[[1676],256],64390:[[1678],256],64391:[[1678],256],64392:[[1672],256],64393:[[1672],256],64394:[[1688],256],64395:[[1688],256],64396:[[1681],256],64397:[[1681],256],64398:[[1705],256],64399:[[1705],256],64400:[[1705],256],64401:[[1705],256],64402:[[1711],256],64403:[[1711],256],64404:[[1711],256],64405:[[1711],256],64406:[[1715],256],64407:[[1715],256],64408:[[1715],256],64409:[[1715],256],64410:[[1713],256],64411:[[1713],256],64412:[[1713],256],64413:[[1713],256],64414:[[1722],256],64415:[[1722],256],64416:[[1723],256],64417:[[1723],256],64418:[[1723],256],64419:[[1723],256],64420:[[1728],256],64421:[[1728],256],64422:[[1729],256],64423:[[1729],256],64424:[[1729],256],64425:[[1729],256],64426:[[1726],256],64427:[[1726],256],64428:[[1726],256],64429:[[1726],256],64430:[[1746],256],64431:[[1746],256],64432:[[1747],256],64433:[[1747],256],64467:[[1709],256],64468:[[1709],256],64469:[[1709],256],64470:[[1709],256],64471:[[1735],256],64472:[[1735],256],64473:[[1734],256],64474:[[1734],256],64475:[[1736],256],64476:[[1736],256],64477:[[1655],256],64478:[[1739],256],64479:[[1739],256],64480:[[1733],256],64481:[[1733],256],64482:[[1737],256],64483:[[1737],256],64484:[[1744],256],64485:[[1744],256],64486:[[1744],256],64487:[[1744],256],64488:[[1609],256],64489:[[1609],256],64490:[[1574,1575],256],64491:[[1574,1575],256],64492:[[1574,1749],256],64493:[[1574,1749],256],64494:[[1574,1608],256],64495:[[1574,1608],256],64496:[[1574,1735],256],64497:[[1574,1735],256],64498:[[1574,1734],256],64499:[[1574,1734],256],64500:[[1574,1736],256],64501:[[1574,1736],256],64502:[[1574,1744],256],64503:[[1574,1744],256],64504:[[1574,1744],256],64505:[[1574,1609],256],64506:[[1574,1609],256],64507:[[1574,1609],256],64508:[[1740],256],64509:[[1740],256],64510:[[1740],256],64511:[[1740],256]}, + 64512:{64512:[[1574,1580],256],64513:[[1574,1581],256],64514:[[1574,1605],256],64515:[[1574,1609],256],64516:[[1574,1610],256],64517:[[1576,1580],256],64518:[[1576,1581],256],64519:[[1576,1582],256],64520:[[1576,1605],256],64521:[[1576,1609],256],64522:[[1576,1610],256],64523:[[1578,1580],256],64524:[[1578,1581],256],64525:[[1578,1582],256],64526:[[1578,1605],256],64527:[[1578,1609],256],64528:[[1578,1610],256],64529:[[1579,1580],256],64530:[[1579,1605],256],64531:[[1579,1609],256],64532:[[1579,1610],256],64533:[[1580,1581],256],64534:[[1580,1605],256],64535:[[1581,1580],256],64536:[[1581,1605],256],64537:[[1582,1580],256],64538:[[1582,1581],256],64539:[[1582,1605],256],64540:[[1587,1580],256],64541:[[1587,1581],256],64542:[[1587,1582],256],64543:[[1587,1605],256],64544:[[1589,1581],256],64545:[[1589,1605],256],64546:[[1590,1580],256],64547:[[1590,1581],256],64548:[[1590,1582],256],64549:[[1590,1605],256],64550:[[1591,1581],256],64551:[[1591,1605],256],64552:[[1592,1605],256],64553:[[1593,1580],256],64554:[[1593,1605],256],64555:[[1594,1580],256],64556:[[1594,1605],256],64557:[[1601,1580],256],64558:[[1601,1581],256],64559:[[1601,1582],256],64560:[[1601,1605],256],64561:[[1601,1609],256],64562:[[1601,1610],256],64563:[[1602,1581],256],64564:[[1602,1605],256],64565:[[1602,1609],256],64566:[[1602,1610],256],64567:[[1603,1575],256],64568:[[1603,1580],256],64569:[[1603,1581],256],64570:[[1603,1582],256],64571:[[1603,1604],256],64572:[[1603,1605],256],64573:[[1603,1609],256],64574:[[1603,1610],256],64575:[[1604,1580],256],64576:[[1604,1581],256],64577:[[1604,1582],256],64578:[[1604,1605],256],64579:[[1604,1609],256],64580:[[1604,1610],256],64581:[[1605,1580],256],64582:[[1605,1581],256],64583:[[1605,1582],256],64584:[[1605,1605],256],64585:[[1605,1609],256],64586:[[1605,1610],256],64587:[[1606,1580],256],64588:[[1606,1581],256],64589:[[1606,1582],256],64590:[[1606,1605],256],64591:[[1606,1609],256],64592:[[1606,1610],256],64593:[[1607,1580],256],64594:[[1607,1605],256],64595:[[1607,1609],256],64596:[[1607,1610],256],64597:[[1610,1580],256],64598:[[1610,1581],256],64599:[[1610,1582],256],64600:[[1610,1605],256],64601:[[1610,1609],256],64602:[[1610,1610],256],64603:[[1584,1648],256],64604:[[1585,1648],256],64605:[[1609,1648],256],64606:[[32,1612,1617],256],64607:[[32,1613,1617],256],64608:[[32,1614,1617],256],64609:[[32,1615,1617],256],64610:[[32,1616,1617],256],64611:[[32,1617,1648],256],64612:[[1574,1585],256],64613:[[1574,1586],256],64614:[[1574,1605],256],64615:[[1574,1606],256],64616:[[1574,1609],256],64617:[[1574,1610],256],64618:[[1576,1585],256],64619:[[1576,1586],256],64620:[[1576,1605],256],64621:[[1576,1606],256],64622:[[1576,1609],256],64623:[[1576,1610],256],64624:[[1578,1585],256],64625:[[1578,1586],256],64626:[[1578,1605],256],64627:[[1578,1606],256],64628:[[1578,1609],256],64629:[[1578,1610],256],64630:[[1579,1585],256],64631:[[1579,1586],256],64632:[[1579,1605],256],64633:[[1579,1606],256],64634:[[1579,1609],256],64635:[[1579,1610],256],64636:[[1601,1609],256],64637:[[1601,1610],256],64638:[[1602,1609],256],64639:[[1602,1610],256],64640:[[1603,1575],256],64641:[[1603,1604],256],64642:[[1603,1605],256],64643:[[1603,1609],256],64644:[[1603,1610],256],64645:[[1604,1605],256],64646:[[1604,1609],256],64647:[[1604,1610],256],64648:[[1605,1575],256],64649:[[1605,1605],256],64650:[[1606,1585],256],64651:[[1606,1586],256],64652:[[1606,1605],256],64653:[[1606,1606],256],64654:[[1606,1609],256],64655:[[1606,1610],256],64656:[[1609,1648],256],64657:[[1610,1585],256],64658:[[1610,1586],256],64659:[[1610,1605],256],64660:[[1610,1606],256],64661:[[1610,1609],256],64662:[[1610,1610],256],64663:[[1574,1580],256],64664:[[1574,1581],256],64665:[[1574,1582],256],64666:[[1574,1605],256],64667:[[1574,1607],256],64668:[[1576,1580],256],64669:[[1576,1581],256],64670:[[1576,1582],256],64671:[[1576,1605],256],64672:[[1576,1607],256],64673:[[1578,1580],256],64674:[[1578,1581],256],64675:[[1578,1582],256],64676:[[1578,1605],256],64677:[[1578,1607],256],64678:[[1579,1605],256],64679:[[1580,1581],256],64680:[[1580,1605],256],64681:[[1581,1580],256],64682:[[1581,1605],256],64683:[[1582,1580],256],64684:[[1582,1605],256],64685:[[1587,1580],256],64686:[[1587,1581],256],64687:[[1587,1582],256],64688:[[1587,1605],256],64689:[[1589,1581],256],64690:[[1589,1582],256],64691:[[1589,1605],256],64692:[[1590,1580],256],64693:[[1590,1581],256],64694:[[1590,1582],256],64695:[[1590,1605],256],64696:[[1591,1581],256],64697:[[1592,1605],256],64698:[[1593,1580],256],64699:[[1593,1605],256],64700:[[1594,1580],256],64701:[[1594,1605],256],64702:[[1601,1580],256],64703:[[1601,1581],256],64704:[[1601,1582],256],64705:[[1601,1605],256],64706:[[1602,1581],256],64707:[[1602,1605],256],64708:[[1603,1580],256],64709:[[1603,1581],256],64710:[[1603,1582],256],64711:[[1603,1604],256],64712:[[1603,1605],256],64713:[[1604,1580],256],64714:[[1604,1581],256],64715:[[1604,1582],256],64716:[[1604,1605],256],64717:[[1604,1607],256],64718:[[1605,1580],256],64719:[[1605,1581],256],64720:[[1605,1582],256],64721:[[1605,1605],256],64722:[[1606,1580],256],64723:[[1606,1581],256],64724:[[1606,1582],256],64725:[[1606,1605],256],64726:[[1606,1607],256],64727:[[1607,1580],256],64728:[[1607,1605],256],64729:[[1607,1648],256],64730:[[1610,1580],256],64731:[[1610,1581],256],64732:[[1610,1582],256],64733:[[1610,1605],256],64734:[[1610,1607],256],64735:[[1574,1605],256],64736:[[1574,1607],256],64737:[[1576,1605],256],64738:[[1576,1607],256],64739:[[1578,1605],256],64740:[[1578,1607],256],64741:[[1579,1605],256],64742:[[1579,1607],256],64743:[[1587,1605],256],64744:[[1587,1607],256],64745:[[1588,1605],256],64746:[[1588,1607],256],64747:[[1603,1604],256],64748:[[1603,1605],256],64749:[[1604,1605],256],64750:[[1606,1605],256],64751:[[1606,1607],256],64752:[[1610,1605],256],64753:[[1610,1607],256],64754:[[1600,1614,1617],256],64755:[[1600,1615,1617],256],64756:[[1600,1616,1617],256],64757:[[1591,1609],256],64758:[[1591,1610],256],64759:[[1593,1609],256],64760:[[1593,1610],256],64761:[[1594,1609],256],64762:[[1594,1610],256],64763:[[1587,1609],256],64764:[[1587,1610],256],64765:[[1588,1609],256],64766:[[1588,1610],256],64767:[[1581,1609],256]}, + 64768:{64768:[[1581,1610],256],64769:[[1580,1609],256],64770:[[1580,1610],256],64771:[[1582,1609],256],64772:[[1582,1610],256],64773:[[1589,1609],256],64774:[[1589,1610],256],64775:[[1590,1609],256],64776:[[1590,1610],256],64777:[[1588,1580],256],64778:[[1588,1581],256],64779:[[1588,1582],256],64780:[[1588,1605],256],64781:[[1588,1585],256],64782:[[1587,1585],256],64783:[[1589,1585],256],64784:[[1590,1585],256],64785:[[1591,1609],256],64786:[[1591,1610],256],64787:[[1593,1609],256],64788:[[1593,1610],256],64789:[[1594,1609],256],64790:[[1594,1610],256],64791:[[1587,1609],256],64792:[[1587,1610],256],64793:[[1588,1609],256],64794:[[1588,1610],256],64795:[[1581,1609],256],64796:[[1581,1610],256],64797:[[1580,1609],256],64798:[[1580,1610],256],64799:[[1582,1609],256],64800:[[1582,1610],256],64801:[[1589,1609],256],64802:[[1589,1610],256],64803:[[1590,1609],256],64804:[[1590,1610],256],64805:[[1588,1580],256],64806:[[1588,1581],256],64807:[[1588,1582],256],64808:[[1588,1605],256],64809:[[1588,1585],256],64810:[[1587,1585],256],64811:[[1589,1585],256],64812:[[1590,1585],256],64813:[[1588,1580],256],64814:[[1588,1581],256],64815:[[1588,1582],256],64816:[[1588,1605],256],64817:[[1587,1607],256],64818:[[1588,1607],256],64819:[[1591,1605],256],64820:[[1587,1580],256],64821:[[1587,1581],256],64822:[[1587,1582],256],64823:[[1588,1580],256],64824:[[1588,1581],256],64825:[[1588,1582],256],64826:[[1591,1605],256],64827:[[1592,1605],256],64828:[[1575,1611],256],64829:[[1575,1611],256],64848:[[1578,1580,1605],256],64849:[[1578,1581,1580],256],64850:[[1578,1581,1580],256],64851:[[1578,1581,1605],256],64852:[[1578,1582,1605],256],64853:[[1578,1605,1580],256],64854:[[1578,1605,1581],256],64855:[[1578,1605,1582],256],64856:[[1580,1605,1581],256],64857:[[1580,1605,1581],256],64858:[[1581,1605,1610],256],64859:[[1581,1605,1609],256],64860:[[1587,1581,1580],256],64861:[[1587,1580,1581],256],64862:[[1587,1580,1609],256],64863:[[1587,1605,1581],256],64864:[[1587,1605,1581],256],64865:[[1587,1605,1580],256],64866:[[1587,1605,1605],256],64867:[[1587,1605,1605],256],64868:[[1589,1581,1581],256],64869:[[1589,1581,1581],256],64870:[[1589,1605,1605],256],64871:[[1588,1581,1605],256],64872:[[1588,1581,1605],256],64873:[[1588,1580,1610],256],64874:[[1588,1605,1582],256],64875:[[1588,1605,1582],256],64876:[[1588,1605,1605],256],64877:[[1588,1605,1605],256],64878:[[1590,1581,1609],256],64879:[[1590,1582,1605],256],64880:[[1590,1582,1605],256],64881:[[1591,1605,1581],256],64882:[[1591,1605,1581],256],64883:[[1591,1605,1605],256],64884:[[1591,1605,1610],256],64885:[[1593,1580,1605],256],64886:[[1593,1605,1605],256],64887:[[1593,1605,1605],256],64888:[[1593,1605,1609],256],64889:[[1594,1605,1605],256],64890:[[1594,1605,1610],256],64891:[[1594,1605,1609],256],64892:[[1601,1582,1605],256],64893:[[1601,1582,1605],256],64894:[[1602,1605,1581],256],64895:[[1602,1605,1605],256],64896:[[1604,1581,1605],256],64897:[[1604,1581,1610],256],64898:[[1604,1581,1609],256],64899:[[1604,1580,1580],256],64900:[[1604,1580,1580],256],64901:[[1604,1582,1605],256],64902:[[1604,1582,1605],256],64903:[[1604,1605,1581],256],64904:[[1604,1605,1581],256],64905:[[1605,1581,1580],256],64906:[[1605,1581,1605],256],64907:[[1605,1581,1610],256],64908:[[1605,1580,1581],256],64909:[[1605,1580,1605],256],64910:[[1605,1582,1580],256],64911:[[1605,1582,1605],256],64914:[[1605,1580,1582],256],64915:[[1607,1605,1580],256],64916:[[1607,1605,1605],256],64917:[[1606,1581,1605],256],64918:[[1606,1581,1609],256],64919:[[1606,1580,1605],256],64920:[[1606,1580,1605],256],64921:[[1606,1580,1609],256],64922:[[1606,1605,1610],256],64923:[[1606,1605,1609],256],64924:[[1610,1605,1605],256],64925:[[1610,1605,1605],256],64926:[[1576,1582,1610],256],64927:[[1578,1580,1610],256],64928:[[1578,1580,1609],256],64929:[[1578,1582,1610],256],64930:[[1578,1582,1609],256],64931:[[1578,1605,1610],256],64932:[[1578,1605,1609],256],64933:[[1580,1605,1610],256],64934:[[1580,1581,1609],256],64935:[[1580,1605,1609],256],64936:[[1587,1582,1609],256],64937:[[1589,1581,1610],256],64938:[[1588,1581,1610],256],64939:[[1590,1581,1610],256],64940:[[1604,1580,1610],256],64941:[[1604,1605,1610],256],64942:[[1610,1581,1610],256],64943:[[1610,1580,1610],256],64944:[[1610,1605,1610],256],64945:[[1605,1605,1610],256],64946:[[1602,1605,1610],256],64947:[[1606,1581,1610],256],64948:[[1602,1605,1581],256],64949:[[1604,1581,1605],256],64950:[[1593,1605,1610],256],64951:[[1603,1605,1610],256],64952:[[1606,1580,1581],256],64953:[[1605,1582,1610],256],64954:[[1604,1580,1605],256],64955:[[1603,1605,1605],256],64956:[[1604,1580,1605],256],64957:[[1606,1580,1581],256],64958:[[1580,1581,1610],256],64959:[[1581,1580,1610],256],64960:[[1605,1580,1610],256],64961:[[1601,1605,1610],256],64962:[[1576,1581,1610],256],64963:[[1603,1605,1605],256],64964:[[1593,1580,1605],256],64965:[[1589,1605,1605],256],64966:[[1587,1582,1610],256],64967:[[1606,1580,1610],256],65008:[[1589,1604,1746],256],65009:[[1602,1604,1746],256],65010:[[1575,1604,1604,1607],256],65011:[[1575,1603,1576,1585],256],65012:[[1605,1581,1605,1583],256],65013:[[1589,1604,1593,1605],256],65014:[[1585,1587,1608,1604],256],65015:[[1593,1604,1610,1607],256],65016:[[1608,1587,1604,1605],256],65017:[[1589,1604,1609],256],65018:[[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],256],65019:[[1580,1604,32,1580,1604,1575,1604,1607],256],65020:[[1585,1740,1575,1604],256]}, + 65024:{65040:[[44],256],65041:[[12289],256],65042:[[12290],256],65043:[[58],256],65044:[[59],256],65045:[[33],256],65046:[[63],256],65047:[[12310],256],65048:[[12311],256],65049:[[8230],256],65056:[,230],65057:[,230],65058:[,230],65059:[,230],65060:[,230],65061:[,230],65062:[,230],65072:[[8229],256],65073:[[8212],256],65074:[[8211],256],65075:[[95],256],65076:[[95],256],65077:[[40],256],65078:[[41],256],65079:[[123],256],65080:[[125],256],65081:[[12308],256],65082:[[12309],256],65083:[[12304],256],65084:[[12305],256],65085:[[12298],256],65086:[[12299],256],65087:[[12296],256],65088:[[12297],256],65089:[[12300],256],65090:[[12301],256],65091:[[12302],256],65092:[[12303],256],65095:[[91],256],65096:[[93],256],65097:[[8254],256],65098:[[8254],256],65099:[[8254],256],65100:[[8254],256],65101:[[95],256],65102:[[95],256],65103:[[95],256],65104:[[44],256],65105:[[12289],256],65106:[[46],256],65108:[[59],256],65109:[[58],256],65110:[[63],256],65111:[[33],256],65112:[[8212],256],65113:[[40],256],65114:[[41],256],65115:[[123],256],65116:[[125],256],65117:[[12308],256],65118:[[12309],256],65119:[[35],256],65120:[[38],256],65121:[[42],256],65122:[[43],256],65123:[[45],256],65124:[[60],256],65125:[[62],256],65126:[[61],256],65128:[[92],256],65129:[[36],256],65130:[[37],256],65131:[[64],256],65136:[[32,1611],256],65137:[[1600,1611],256],65138:[[32,1612],256],65140:[[32,1613],256],65142:[[32,1614],256],65143:[[1600,1614],256],65144:[[32,1615],256],65145:[[1600,1615],256],65146:[[32,1616],256],65147:[[1600,1616],256],65148:[[32,1617],256],65149:[[1600,1617],256],65150:[[32,1618],256],65151:[[1600,1618],256],65152:[[1569],256],65153:[[1570],256],65154:[[1570],256],65155:[[1571],256],65156:[[1571],256],65157:[[1572],256],65158:[[1572],256],65159:[[1573],256],65160:[[1573],256],65161:[[1574],256],65162:[[1574],256],65163:[[1574],256],65164:[[1574],256],65165:[[1575],256],65166:[[1575],256],65167:[[1576],256],65168:[[1576],256],65169:[[1576],256],65170:[[1576],256],65171:[[1577],256],65172:[[1577],256],65173:[[1578],256],65174:[[1578],256],65175:[[1578],256],65176:[[1578],256],65177:[[1579],256],65178:[[1579],256],65179:[[1579],256],65180:[[1579],256],65181:[[1580],256],65182:[[1580],256],65183:[[1580],256],65184:[[1580],256],65185:[[1581],256],65186:[[1581],256],65187:[[1581],256],65188:[[1581],256],65189:[[1582],256],65190:[[1582],256],65191:[[1582],256],65192:[[1582],256],65193:[[1583],256],65194:[[1583],256],65195:[[1584],256],65196:[[1584],256],65197:[[1585],256],65198:[[1585],256],65199:[[1586],256],65200:[[1586],256],65201:[[1587],256],65202:[[1587],256],65203:[[1587],256],65204:[[1587],256],65205:[[1588],256],65206:[[1588],256],65207:[[1588],256],65208:[[1588],256],65209:[[1589],256],65210:[[1589],256],65211:[[1589],256],65212:[[1589],256],65213:[[1590],256],65214:[[1590],256],65215:[[1590],256],65216:[[1590],256],65217:[[1591],256],65218:[[1591],256],65219:[[1591],256],65220:[[1591],256],65221:[[1592],256],65222:[[1592],256],65223:[[1592],256],65224:[[1592],256],65225:[[1593],256],65226:[[1593],256],65227:[[1593],256],65228:[[1593],256],65229:[[1594],256],65230:[[1594],256],65231:[[1594],256],65232:[[1594],256],65233:[[1601],256],65234:[[1601],256],65235:[[1601],256],65236:[[1601],256],65237:[[1602],256],65238:[[1602],256],65239:[[1602],256],65240:[[1602],256],65241:[[1603],256],65242:[[1603],256],65243:[[1603],256],65244:[[1603],256],65245:[[1604],256],65246:[[1604],256],65247:[[1604],256],65248:[[1604],256],65249:[[1605],256],65250:[[1605],256],65251:[[1605],256],65252:[[1605],256],65253:[[1606],256],65254:[[1606],256],65255:[[1606],256],65256:[[1606],256],65257:[[1607],256],65258:[[1607],256],65259:[[1607],256],65260:[[1607],256],65261:[[1608],256],65262:[[1608],256],65263:[[1609],256],65264:[[1609],256],65265:[[1610],256],65266:[[1610],256],65267:[[1610],256],65268:[[1610],256],65269:[[1604,1570],256],65270:[[1604,1570],256],65271:[[1604,1571],256],65272:[[1604,1571],256],65273:[[1604,1573],256],65274:[[1604,1573],256],65275:[[1604,1575],256],65276:[[1604,1575],256]}, + 65280:{65281:[[33],256],65282:[[34],256],65283:[[35],256],65284:[[36],256],65285:[[37],256],65286:[[38],256],65287:[[39],256],65288:[[40],256],65289:[[41],256],65290:[[42],256],65291:[[43],256],65292:[[44],256],65293:[[45],256],65294:[[46],256],65295:[[47],256],65296:[[48],256],65297:[[49],256],65298:[[50],256],65299:[[51],256],65300:[[52],256],65301:[[53],256],65302:[[54],256],65303:[[55],256],65304:[[56],256],65305:[[57],256],65306:[[58],256],65307:[[59],256],65308:[[60],256],65309:[[61],256],65310:[[62],256],65311:[[63],256],65312:[[64],256],65313:[[65],256],65314:[[66],256],65315:[[67],256],65316:[[68],256],65317:[[69],256],65318:[[70],256],65319:[[71],256],65320:[[72],256],65321:[[73],256],65322:[[74],256],65323:[[75],256],65324:[[76],256],65325:[[77],256],65326:[[78],256],65327:[[79],256],65328:[[80],256],65329:[[81],256],65330:[[82],256],65331:[[83],256],65332:[[84],256],65333:[[85],256],65334:[[86],256],65335:[[87],256],65336:[[88],256],65337:[[89],256],65338:[[90],256],65339:[[91],256],65340:[[92],256],65341:[[93],256],65342:[[94],256],65343:[[95],256],65344:[[96],256],65345:[[97],256],65346:[[98],256],65347:[[99],256],65348:[[100],256],65349:[[101],256],65350:[[102],256],65351:[[103],256],65352:[[104],256],65353:[[105],256],65354:[[106],256],65355:[[107],256],65356:[[108],256],65357:[[109],256],65358:[[110],256],65359:[[111],256],65360:[[112],256],65361:[[113],256],65362:[[114],256],65363:[[115],256],65364:[[116],256],65365:[[117],256],65366:[[118],256],65367:[[119],256],65368:[[120],256],65369:[[121],256],65370:[[122],256],65371:[[123],256],65372:[[124],256],65373:[[125],256],65374:[[126],256],65375:[[10629],256],65376:[[10630],256],65377:[[12290],256],65378:[[12300],256],65379:[[12301],256],65380:[[12289],256],65381:[[12539],256],65382:[[12530],256],65383:[[12449],256],65384:[[12451],256],65385:[[12453],256],65386:[[12455],256],65387:[[12457],256],65388:[[12515],256],65389:[[12517],256],65390:[[12519],256],65391:[[12483],256],65392:[[12540],256],65393:[[12450],256],65394:[[12452],256],65395:[[12454],256],65396:[[12456],256],65397:[[12458],256],65398:[[12459],256],65399:[[12461],256],65400:[[12463],256],65401:[[12465],256],65402:[[12467],256],65403:[[12469],256],65404:[[12471],256],65405:[[12473],256],65406:[[12475],256],65407:[[12477],256],65408:[[12479],256],65409:[[12481],256],65410:[[12484],256],65411:[[12486],256],65412:[[12488],256],65413:[[12490],256],65414:[[12491],256],65415:[[12492],256],65416:[[12493],256],65417:[[12494],256],65418:[[12495],256],65419:[[12498],256],65420:[[12501],256],65421:[[12504],256],65422:[[12507],256],65423:[[12510],256],65424:[[12511],256],65425:[[12512],256],65426:[[12513],256],65427:[[12514],256],65428:[[12516],256],65429:[[12518],256],65430:[[12520],256],65431:[[12521],256],65432:[[12522],256],65433:[[12523],256],65434:[[12524],256],65435:[[12525],256],65436:[[12527],256],65437:[[12531],256],65438:[[12441],256],65439:[[12442],256],65440:[[12644],256],65441:[[12593],256],65442:[[12594],256],65443:[[12595],256],65444:[[12596],256],65445:[[12597],256],65446:[[12598],256],65447:[[12599],256],65448:[[12600],256],65449:[[12601],256],65450:[[12602],256],65451:[[12603],256],65452:[[12604],256],65453:[[12605],256],65454:[[12606],256],65455:[[12607],256],65456:[[12608],256],65457:[[12609],256],65458:[[12610],256],65459:[[12611],256],65460:[[12612],256],65461:[[12613],256],65462:[[12614],256],65463:[[12615],256],65464:[[12616],256],65465:[[12617],256],65466:[[12618],256],65467:[[12619],256],65468:[[12620],256],65469:[[12621],256],65470:[[12622],256],65474:[[12623],256],65475:[[12624],256],65476:[[12625],256],65477:[[12626],256],65478:[[12627],256],65479:[[12628],256],65482:[[12629],256],65483:[[12630],256],65484:[[12631],256],65485:[[12632],256],65486:[[12633],256],65487:[[12634],256],65490:[[12635],256],65491:[[12636],256],65492:[[12637],256],65493:[[12638],256],65494:[[12639],256],65495:[[12640],256],65498:[[12641],256],65499:[[12642],256],65500:[[12643],256],65504:[[162],256],65505:[[163],256],65506:[[172],256],65507:[[175],256],65508:[[166],256],65509:[[165],256],65510:[[8361],256],65512:[[9474],256],65513:[[8592],256],65514:[[8593],256],65515:[[8594],256],65516:[[8595],256],65517:[[9632],256],65518:[[9675],256]} +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/implement.js new file mode 100644 index 0000000..cfc710e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(String.prototype, 'normalize', + { value: require('./shim'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/index.js new file mode 100644 index 0000000..619b096 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? String.prototype.normalize + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/is-implemented.js new file mode 100644 index 0000000..67c8d8d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +var str = 'æøåäüö'; + +module.exports = function () { + if (typeof str.normalize !== 'function') return false; + return str.normalize('NFKD') === 'æøåäüö'; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/shim.js new file mode 100644 index 0000000..a379989 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/shim.js @@ -0,0 +1,289 @@ +// Taken from: https://github.com/walling/unorm/blob/master/lib/unorm.js + +/* + * UnicodeNormalizer 1.0.0 + * Copyright (c) 2008 Matsuza + * Dual licensed under the MIT (MIT-LICENSE.txt) and + * GPL (GPL-LICENSE.txt) licenses. + * $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $ + * $Rev: 13309 $ +*/ + +'use strict'; + +var primitiveSet = require('../../../object/primitive-set') + , validValue = require('../../../object/valid-value') + , data = require('./_data') + + , floor = Math.floor + , forms = primitiveSet('NFC', 'NFD', 'NFKC', 'NFKD') + + , DEFAULT_FEATURE = [null, 0, {}], CACHE_THRESHOLD = 10, SBase = 0xAC00 + , LBase = 0x1100, VBase = 0x1161, TBase = 0x11A7, LCount = 19, VCount = 21 + , TCount = 28, NCount = VCount * TCount, SCount = LCount * NCount + , UChar, cache = {}, cacheCounter = [], i, fromCache, fromData, fromCpOnly + , fromRuleBasedJamo, fromCpFilter, strategies, UCharIterator + , RecursDecompIterator, DecompIterator, CompIterator, createIterator + , normalize; + +UChar = function (cp, feature) { + this.codepoint = cp; + this.feature = feature; +}; + +// Strategies +for (i = 0; i <= 0xFF; ++i) cacheCounter[i] = 0; + +fromCache = function (next, cp, needFeature) { + var ret = cache[cp]; + if (!ret) { + ret = next(cp, needFeature); + if (!!ret.feature && ++cacheCounter[(cp >> 8) & 0xFF] > CACHE_THRESHOLD) { + cache[cp] = ret; + } + } + return ret; +}; + +fromData = function (next, cp, needFeature) { + var hash = cp & 0xFF00, dunit = UChar.udata[hash] || {}, f = dunit[cp]; + return f ? new UChar(cp, f) : new UChar(cp, DEFAULT_FEATURE); +}; +fromCpOnly = function (next, cp, needFeature) { + return !!needFeature ? next(cp, needFeature) : new UChar(cp, null); +}; + +fromRuleBasedJamo = function (next, cp, needFeature) { + var c, base, i, arr, SIndex, TIndex, feature, j; + if (cp < LBase || (LBase + LCount <= cp && cp < SBase) || + (SBase + SCount < cp)) { + return next(cp, needFeature); + } + if (LBase <= cp && cp < LBase + LCount) { + c = {}; + base = (cp - LBase) * VCount; + for (i = 0; i < VCount; ++i) { + c[VBase + i] = SBase + TCount * (i + base); + } + arr = new Array(3); + arr[2] = c; + return new UChar(cp, arr); + } + + SIndex = cp - SBase; + TIndex = SIndex % TCount; + feature = []; + if (TIndex !== 0) { + feature[0] = [SBase + SIndex - TIndex, TBase + TIndex]; + } else { + feature[0] = [LBase + floor(SIndex / NCount), VBase + + floor((SIndex % NCount) / TCount)]; + feature[2] = {}; + for (j = 1; j < TCount; ++j) { + feature[2][TBase + j] = cp + j; + } + } + return new UChar(cp, feature); +}; + +fromCpFilter = function (next, cp, needFeature) { + return (cp < 60) || ((13311 < cp) && (cp < 42607)) + ? new UChar(cp, DEFAULT_FEATURE) : next(cp, needFeature); +}; + +strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData]; + +UChar.fromCharCode = strategies.reduceRight(function (next, strategy) { + return function (cp, needFeature) { return strategy(next, cp, needFeature); }; +}, null); + +UChar.isHighSurrogate = function (cp) { return cp >= 0xD800 && cp <= 0xDBFF; }; +UChar.isLowSurrogate = function (cp) { return cp >= 0xDC00 && cp <= 0xDFFF; }; + +UChar.prototype.prepFeature = function () { + if (!this.feature) { + this.feature = UChar.fromCharCode(this.codepoint, true).feature; + } +}; + +UChar.prototype.toString = function () { + var x; + if (this.codepoint < 0x10000) return String.fromCharCode(this.codepoint); + x = this.codepoint - 0x10000; + return String.fromCharCode(floor(x / 0x400) + 0xD800, x % 0x400 + 0xDC00); +}; + +UChar.prototype.getDecomp = function () { + this.prepFeature(); + return this.feature[0] || null; +}; + +UChar.prototype.isCompatibility = function () { + this.prepFeature(); + return !!this.feature[1] && (this.feature[1] & (1 << 8)); +}; +UChar.prototype.isExclude = function () { + this.prepFeature(); + return !!this.feature[1] && (this.feature[1] & (1 << 9)); +}; +UChar.prototype.getCanonicalClass = function () { + this.prepFeature(); + return !!this.feature[1] ? (this.feature[1] & 0xff) : 0; +}; +UChar.prototype.getComposite = function (following) { + var cp; + this.prepFeature(); + if (!this.feature[2]) return null; + cp = this.feature[2][following.codepoint]; + return cp ? UChar.fromCharCode(cp) : null; +}; + +UCharIterator = function (str) { + this.str = str; + this.cursor = 0; +}; +UCharIterator.prototype.next = function () { + if (!!this.str && this.cursor < this.str.length) { + var cp = this.str.charCodeAt(this.cursor++), d; + if (UChar.isHighSurrogate(cp) && this.cursor < this.str.length && + UChar.isLowSurrogate((d = this.str.charCodeAt(this.cursor)))) { + cp = (cp - 0xD800) * 0x400 + (d - 0xDC00) + 0x10000; + ++this.cursor; + } + return UChar.fromCharCode(cp); + } + this.str = null; + return null; +}; + +RecursDecompIterator = function (it, cano) { + this.it = it; + this.canonical = cano; + this.resBuf = []; +}; + +RecursDecompIterator.prototype.next = function () { + var recursiveDecomp, uchar; + recursiveDecomp = function (cano, uchar) { + var decomp = uchar.getDecomp(), ret, i, a, j; + if (!!decomp && !(cano && uchar.isCompatibility())) { + ret = []; + for (i = 0; i < decomp.length; ++i) { + a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i])); + //ret.concat(a); //<-why does not this work? + //following block is a workaround. + for (j = 0; j < a.length; ++j) ret.push(a[j]); + } + return ret; + } + return [uchar]; + }; + if (this.resBuf.length === 0) { + uchar = this.it.next(); + if (!uchar) return null; + this.resBuf = recursiveDecomp(this.canonical, uchar); + } + return this.resBuf.shift(); +}; + +DecompIterator = function (it) { + this.it = it; + this.resBuf = []; +}; + +DecompIterator.prototype.next = function () { + var cc, uchar, inspt, uchar2, cc2; + if (this.resBuf.length === 0) { + do { + uchar = this.it.next(); + if (!uchar) break; + cc = uchar.getCanonicalClass(); + inspt = this.resBuf.length; + if (cc !== 0) { + for (inspt; inspt > 0; --inspt) { + uchar2 = this.resBuf[inspt - 1]; + cc2 = uchar2.getCanonicalClass(); + if (cc2 <= cc) break; + } + } + this.resBuf.splice(inspt, 0, uchar); + } while (cc !== 0); + } + return this.resBuf.shift(); +}; + +CompIterator = function (it) { + this.it = it; + this.procBuf = []; + this.resBuf = []; + this.lastClass = null; +}; + +CompIterator.prototype.next = function () { + var uchar, starter, composite, cc; + while (this.resBuf.length === 0) { + uchar = this.it.next(); + if (!uchar) { + this.resBuf = this.procBuf; + this.procBuf = []; + break; + } + if (this.procBuf.length === 0) { + this.lastClass = uchar.getCanonicalClass(); + this.procBuf.push(uchar); + } else { + starter = this.procBuf[0]; + composite = starter.getComposite(uchar); + cc = uchar.getCanonicalClass(); + if (!!composite && (this.lastClass < cc || this.lastClass === 0)) { + this.procBuf[0] = composite; + } else { + if (cc === 0) { + this.resBuf = this.procBuf; + this.procBuf = []; + } + this.lastClass = cc; + this.procBuf.push(uchar); + } + } + } + return this.resBuf.shift(); +}; + +createIterator = function (mode, str) { + switch (mode) { + case "NFD": + return new DecompIterator( + new RecursDecompIterator(new UCharIterator(str), true) + ); + case "NFKD": + return new DecompIterator( + new RecursDecompIterator(new UCharIterator(str), false) + ); + case "NFC": + return new CompIterator(new DecompIterator( + new RecursDecompIterator(new UCharIterator(str), true) + )); + case "NFKC": + return new CompIterator(new DecompIterator( + new RecursDecompIterator(new UCharIterator(str), false) + )); + } + throw mode + " is invalid"; +}; +normalize = function (mode, str) { + var it = createIterator(mode, str), ret = "", uchar; + while (!!(uchar = it.next())) ret += uchar.toString(); + return ret; +}; + +/* Unicode data */ +UChar.udata = data; + +module.exports = function (/*form*/) { + var str = String(validValue(this)), form = arguments[0]; + if (form === undefined) form = 'NFC'; + else form = String(form); + if (!forms[form]) throw new RangeError('Invalid normalization form: ' + form); + return normalize(form, str); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/pad.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/pad.js new file mode 100644 index 0000000..f227f23 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/pad.js @@ -0,0 +1,18 @@ +'use strict'; + +var toInteger = require('../../number/to-integer') + , value = require('../../object/valid-value') + , repeat = require('./repeat') + + , abs = Math.abs, max = Math.max; + +module.exports = function (fill/*, length*/) { + var self = String(value(this)) + , sLength = self.length + , length = arguments[1]; + + length = isNaN(length) ? 1 : toInteger(length); + fill = repeat.call(String(fill), abs(length)); + if (length >= 0) return fill.slice(0, max(0, length - sLength)) + self; + return self + (((sLength + length) >= 0) ? '' : fill.slice(length + sLength)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace-all.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace-all.js new file mode 100644 index 0000000..678b1cb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace-all.js @@ -0,0 +1,16 @@ +'use strict'; + +var value = require('../../object/valid-value'); + +module.exports = function (search, replace) { + var index, pos = 0, str = String(value(this)), sl, rl; + search = String(search); + replace = String(replace); + sl = search.length; + rl = replace.length; + while ((index = str.indexOf(search, pos)) !== -1) { + str = str.slice(0, index) + replace + str.slice(index + sl); + pos = index + rl; + } + return str; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace.js new file mode 100644 index 0000000..24ce16d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace.js @@ -0,0 +1,10 @@ +'use strict'; + +var indexOf = String.prototype.indexOf, slice = String.prototype.slice; + +module.exports = function (search, replace) { + var index = indexOf.call(this, search); + if (index === -1) return String(this); + return slice.call(this, 0, index) + replace + + slice.call(this, index + String(search).length); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/implement.js new file mode 100644 index 0000000..4c39b9f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(String.prototype, 'repeat', + { value: require('./shim'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/index.js new file mode 100644 index 0000000..15a800e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? String.prototype.repeat + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/is-implemented.js new file mode 100644 index 0000000..f7b8750 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/is-implemented.js @@ -0,0 +1,8 @@ +'use strict'; + +var str = 'foo'; + +module.exports = function () { + if (typeof str.repeat !== 'function') return false; + return (str.repeat(2) === 'foofoo'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/shim.js new file mode 100644 index 0000000..0a3928b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/shim.js @@ -0,0 +1,22 @@ +// Thanks: http://www.2ality.com/2014/01/efficient-string-repeat.html + +'use strict'; + +var value = require('../../../object/valid-value') + , toInteger = require('../../../number/to-integer'); + +module.exports = function (count) { + var str = String(value(this)), result; + count = toInteger(count); + if (count < 0) throw new RangeError("Count must be >= 0"); + if (!isFinite(count)) throw new RangeError("Count must be < ∞"); + result = ''; + if (!count) return result; + while (true) { + if (count & 1) result += str; + count >>>= 1; + if (count <= 0) break; + str += str; + } + return result; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/implement.js new file mode 100644 index 0000000..d4f1eaf --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(String.prototype, 'startsWith', + { value: require('./shim'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/index.js new file mode 100644 index 0000000..ec66a7c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? String.prototype.startsWith + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/is-implemented.js new file mode 100644 index 0000000..a0556f1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/is-implemented.js @@ -0,0 +1,9 @@ +'use strict'; + +var str = 'razdwatrzy'; + +module.exports = function () { + if (typeof str.startsWith !== 'function') return false; + return ((str.startsWith('trzy') === false) && + (str.startsWith('raz') === true)); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/shim.js new file mode 100644 index 0000000..aa5aaf4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/shim.js @@ -0,0 +1,12 @@ +'use strict'; + +var value = require('../../../object/valid-value') + , toInteger = require('../../../number/to-integer') + + , max = Math.max, min = Math.min; + +module.exports = function (searchString/*, position*/) { + var start, self = String(value(this)); + start = min(max(toInteger(arguments[1]), 0), self.length); + return (self.indexOf(searchString, start) === start); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/format-method.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/format-method.js new file mode 100644 index 0000000..f1de1e3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/format-method.js @@ -0,0 +1,24 @@ +'use strict'; + +var isCallable = require('../object/is-callable') + , value = require('../object/valid-value') + + , call = Function.prototype.call; + +module.exports = function (fmap) { + fmap = Object(value(fmap)); + return function (pattern) { + var context = value(this); + pattern = String(pattern); + return pattern.replace(/%([a-zA-Z]+)|\\([\u0000-\uffff])/g, + function (match, token, escape) { + var t, r; + if (escape) return escape; + t = token; + while (t && !(r = fmap[t])) t = t.slice(0, -1); + if (!r) return match; + if (isCallable(r)) r = call.call(r, context); + return r + token.slice(t.length); + }); + }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/implement.js new file mode 100644 index 0000000..b062331 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(String, 'fromCodePoint', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/index.js new file mode 100644 index 0000000..3f3110b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? String.fromCodePoint + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/is-implemented.js new file mode 100644 index 0000000..840a20e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/is-implemented.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function () { + var fromCodePoint = String.fromCodePoint; + if (typeof fromCodePoint !== 'function') return false; + return fromCodePoint(0x1D306, 0x61, 0x1D307) === '\ud834\udf06a\ud834\udf07'; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/shim.js new file mode 100644 index 0000000..41fd737 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/shim.js @@ -0,0 +1,30 @@ +// Based on: +// http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/ +// and: +// https://github.com/mathiasbynens/String.fromCodePoint/blob/master +// /fromcodepoint.js + +'use strict'; + +var floor = Math.floor, fromCharCode = String.fromCharCode; + +module.exports = function (codePoint/*, …codePoints*/) { + var chars = [], l = arguments.length, i, c, result = ''; + for (i = 0; i < l; ++i) { + c = Number(arguments[i]); + if (!isFinite(c) || c < 0 || c > 0x10FFFF || floor(c) !== c) { + throw new RangeError("Invalid code point " + c); + } + + if (c < 0x10000) { + chars.push(c); + } else { + c -= 0x10000; + chars.push((c >> 10) + 0xD800, (c % 0x400) + 0xDC00); + } + if (i + 1 !== l && chars.length <= 0x4000) continue; + result += fromCharCode.apply(null, chars); + chars.length = 0; + } + return result; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/index.js new file mode 100644 index 0000000..dbbcdf6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + '#': require('./#'), + formatMethod: require('./format-method'), + fromCodePoint: require('./from-code-point'), + isString: require('./is-string'), + randomUniq: require('./random-uniq'), + raw: require('./raw') +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/is-string.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/is-string.js new file mode 100644 index 0000000..719aeec --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/is-string.js @@ -0,0 +1,10 @@ +'use strict'; + +var toString = Object.prototype.toString + + , id = toString.call(''); + +module.exports = function (x) { + return (typeof x === 'string') || (x && (typeof x === 'object') && + ((x instanceof String) || (toString.call(x) === id))) || false; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/random-uniq.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/random-uniq.js new file mode 100644 index 0000000..54ae6f8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/random-uniq.js @@ -0,0 +1,11 @@ +'use strict'; + +var generated = Object.create(null) + + , random = Math.random; + +module.exports = function () { + var str; + do { str = random().toString(36).slice(2); } while (generated[str]); + return str; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/implement.js new file mode 100644 index 0000000..c417e65 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(String, 'raw', { value: require('./shim'), + configurable: true, enumerable: false, writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/index.js new file mode 100644 index 0000000..504a5de --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('./is-implemented')() + ? String.raw + : require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/is-implemented.js new file mode 100644 index 0000000..d7204c0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/is-implemented.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function () { + var raw = String.raw, test; + if (typeof raw !== 'function') return false; + test = ['foo\nbar', 'marko\n']; + test.raw = ['foo\\nbar', 'marko\\n']; + return raw(test, 'INSE\nRT') === 'foo\\nbarINSE\nRTmarko\\n'; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/shim.js new file mode 100644 index 0000000..7096efb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/shim.js @@ -0,0 +1,15 @@ +'use strict'; + +var toPosInt = require('../../number/to-pos-integer') + , validValue = require('../../object/valid-value') + + , reduce = Array.prototype.reduce; + +module.exports = function (callSite/*, …substitutions*/) { + var args, rawValue = Object(validValue(Object(validValue(callSite)).raw)); + if (!toPosInt(rawValue.length)) return ''; + args = arguments; + return reduce.call(rawValue, function (a, b, i) { + return a + String(args[i]) + b; + }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/__tad.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/__tad.js new file mode 100644 index 0000000..8845778 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/__tad.js @@ -0,0 +1,3 @@ +'use strict'; + +exports.context = null; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/implement.js new file mode 100644 index 0000000..f060539 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/@@iterator/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/shim.js new file mode 100644 index 0000000..e590d8f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator/shim.js @@ -0,0 +1,9 @@ +'use strict'; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: '1', done: false }); + a.deep(iterator.next(), { value: '2', done: false }); + a.deep(iterator.next(), { value: '3', done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/_compare-by-length.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/_compare-by-length.js new file mode 100644 index 0000000..e40c305 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/_compare-by-length.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function (t, a) { + var x = [4, 5, 6], y = { length: 8 }, w = {}, z = { length: 1 }; + + a.deep([x, y, w, z].sort(t), [w, z, x, y]); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/binary-search.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/binary-search.js new file mode 100644 index 0000000..cf33173 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/binary-search.js @@ -0,0 +1,15 @@ +'use strict'; + +var compare = function (value) { return this - value; }; + +module.exports = function (t, a) { + var arr; + arr = [2, 5, 5, 8, 34, 67, 98, 345, 678]; + + // highest, equal match + a(t.call(arr, compare.bind(1)), 0, "All higher"); + a(t.call(arr, compare.bind(679)), arr.length - 1, "All lower"); + a(t.call(arr, compare.bind(4)), 0, "Mid"); + a(t.call(arr, compare.bind(5)), 2, "Match"); + a(t.call(arr, compare.bind(6)), 2, "Above"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/clear.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/clear.js new file mode 100644 index 0000000..a5b1c97 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/clear.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function (t, a) { + var x = [1, 2, {}, 4]; + a(t.call(x), x, "Returns same array"); + a.deep(x, [], "Empties array"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/compact.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/compact.js new file mode 100644 index 0000000..6390eb2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/compact.js @@ -0,0 +1,17 @@ +'use strict'; + +module.exports = { + __generic: function (t, a) { + a(t.call(this).length, 3); + }, + "": function (t, a) { + var o, x, y, z; + o = {}; + x = [0, 1, "", null, o, false, undefined, true]; + y = x.slice(0); + + a.not(z = t.call(x), x, "Returns different object"); + a.deep(x, y, "Origin not changed"); + a.deep(z, [0, 1, "", o, false, true], "Result"); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/implement.js new file mode 100644 index 0000000..3bdbe86 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/concat/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/shim.js new file mode 100644 index 0000000..c30eb7e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat/shim.js @@ -0,0 +1,26 @@ +'use strict'; + +var SubArray = require('../../../../array/_sub-array-dummy-safe'); + +module.exports = function (t, a) { + var arr = [1, 3, 45], x = {}, subArr, subArr2, result; + + a.deep(t.call(arr, '2d', x, ['ere', 'fe', x], false, null), + [1, 3, 45, '2d', x, 'ere', 'fe', x, false, null], "Plain array"); + + subArr = new SubArray('lol', 'miszko'); + subArr2 = new SubArray('elo', 'fol'); + + result = t.call(subArr, 'df', arr, 'fef', subArr2, null); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, ['lol', 'miszko', 'df', 1, 3, 45, 'fef', 'elo', 'fol', null], + "Spreable by default"); + + SubArray.prototype['@@isConcatSpreadable'] = false; + + result = t.call(subArr, 'df', arr, 'fef', subArr2, null); + a.deep(result, ['lol', 'miszko', 'df', 1, 3, 45, 'fef', subArr2, null], + "Non spreadable"); + + delete SubArray.prototype['@@isConcatSpreadable']; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js new file mode 100644 index 0000000..21404a1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/contains.js @@ -0,0 +1,21 @@ +'use strict'; + +module.exports = { + __generic: function (t, a) { + a(t.call(this, this[1]), true, "Contains"); + a(t.call(this, {}), false, "Does Not contain"); + }, + "": function (t, a) { + var o, x = {}, y = {}; + + o = [1, 'raz', x]; + + a(t.call(o, 1), true, "First"); + a(t.call(o, '1'), false, "Type coercion"); + a(t.call(o, 'raz'), true, "Primitive"); + a(t.call(o, 'foo'), false, "Primitive not found"); + a(t.call(o, x), true, "Object found"); + a(t.call(o, y), false, "Object not found"); + a(t.call(o, 1, 1), false, "Position"); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/implement.js new file mode 100644 index 0000000..3607047 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/copy-within/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/shim.js new file mode 100644 index 0000000..93c85ea --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within/shim.js @@ -0,0 +1,29 @@ +'use strict'; + +module.exports = function (t, a) { + var args, x; + + a.h1("2 args"); + x = [1, 2, 3, 4, 5]; + t.call(x, 0, 3); + a.deep(x, [4, 5, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 3), [1, 4, 5, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 2), [1, 3, 4, 5, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 2, 2), [1, 2, 3, 4, 5]); + + a.h1("3 args"); + a.deep(t.call([1, 2, 3, 4, 5], 0, 3, 4), [4, 2, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 3, 4), [1, 4, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 1, 2, 4), [1, 3, 4, 4, 5]); + + a.h1("Negative args"); + a.deep(t.call([1, 2, 3, 4, 5], 0, -2), [4, 5, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], 0, -2, -1), [4, 2, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -2), [1, 3, 3, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], -4, -3, -1), [1, 3, 4, 4, 5]); + a.deep(t.call([1, 2, 3, 4, 5], -4, -3), [1, 3, 4, 5, 5]); + + a.h1("Array-likes"); + args = { 0: 1, 1: 2, 2: 3, length: 3 }; + a.deep(t.call(args, -2, 0), { '0': 1, '1': 1, '2': 2, length: 3 }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/diff.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/diff.js new file mode 100644 index 0000000..bcfa3a0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/diff.js @@ -0,0 +1,17 @@ +'use strict'; + +module.exports = { + __generic: function (t, a) { + a.deep(t.call(this, this), []); + }, + "": function (t, a) { + var x = {}, y = {}; + + a.deep(t.call([1, 'raz', x, 2, 'trzy', y], [x, 2, 'trzy']), [1, 'raz', y], + "Scope longer"); + a.deep(t.call([1, 'raz', x], [x, 2, 'trzy', 1, y]), ['raz'], + "Arg longer"); + a.deep(t.call([1, 'raz', x], []), [1, 'raz', x], "Empty arg"); + a.deep(t.call([], [1, y, 'sdfs']), [], "Empty scope"); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-index-of.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-index-of.js new file mode 100644 index 0000000..4cf6c63 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-index-of.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = function (t, a) { + var x = {}; + a(t.call([3, 'raz', {}, x, {}], x), 3, "Regular"); + a(t.call([3, 'raz', NaN, {}, NaN], NaN), 2, "NaN"); + a(t.call([3, 'raz', 0, {}, -0], -0), 2, "-0"); + a(t.call([3, 'raz', -0, {}, 0], +0), 2, "+0"); + a(t.call([3, 'raz', NaN, {}, NaN], NaN, 3), 4, "fromIndex"); + a(t.call([3, 'raz', NaN, {}, NaN], NaN, -1), 4, "fromIndex negative #1"); + a(t.call([3, 'raz', NaN, {}, NaN], NaN, -2), 4, "fromIndex negative #2"); + a(t.call([3, 'raz', NaN, {}, NaN], NaN, -3), 2, "fromIndex negative #3"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-last-index-of.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-last-index-of.js new file mode 100644 index 0000000..ed4f700 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/e-last-index-of.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function (t, a) { + var x = {}; + a(t.call([3, 'raz', {}, x, {}, x], x), 5, "Regular"); + a(t.call([3, 'raz', NaN, {}, x], NaN), 2, "NaN"); + a(t.call([3, 'raz', 0, {}, -0], -0), 4, "-0"); + a(t.call([3, 'raz', -0, {}, 0], +0), 4, "+0"); + a(t.call([3, 'raz', NaN, {}, NaN], NaN, 3), 2, "fromIndex"); + a(t.call([3, 'raz', NaN, 2, NaN], NaN, -1), 4, "Negative fromIndex #1"); + a(t.call([3, 'raz', NaN, 2, NaN], NaN, -2), 2, "Negative fromIndex #2"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/implement.js new file mode 100644 index 0000000..733209a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/entries/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/shim.js new file mode 100644 index 0000000..bf40d31 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries/shim.js @@ -0,0 +1,9 @@ +'use strict'; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: [0, '1'], done: false }); + a.deep(iterator.next(), { value: [1, '2'], done: false }); + a.deep(iterator.next(), { value: [2, '3'], done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/exclusion.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/exclusion.js new file mode 100644 index 0000000..07b32d8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/exclusion.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = { + __generic: function (t, a) { + var x = {}; + a.deep(t.call(this, this, [this[0], this[2], x]), [x]); + }, + "": function (t, a) { + var x = {}, y = {}; + + a.deep(t.call([x, y]), [x, y], "No arguments"); + a.deep(t.call([x, 1], [], []), [x, 1], "Empty arguments"); + a.deep(t.call([1, 'raz', x], [2, 'raz', y], [2, 'raz', x]), [1, y]); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/implement.js new file mode 100644 index 0000000..2a01d28 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/fill/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/shim.js new file mode 100644 index 0000000..d67300f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill/shim.js @@ -0,0 +1,18 @@ +// Taken from https://github.com/paulmillr/es6-shim/blob/master/test/array.js + +'use strict'; + +module.exports = function (t, a) { + var x; + + x = [1, 2, 3, 4, 5, 6]; + a(t.call(x, -1), x, "Returns self object"); + a.deep(x, [-1, -1, -1, -1, -1, -1], "Value"); + + a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 3), [1, 2, 3, -1, -1, -1], + "Positive start"); + a.deep(t.call([1, 2, 3, 4, 5, 6], -1, -3), [1, 2, 3, -1, -1, -1], + "Negative start"); + a.deep(t.call([1, 2, 3, 4, 5, 6], -1, 9), [1, 2, 3, 4, 5, 6], + "Large start"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/implement.js new file mode 100644 index 0000000..6d6b87c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/filter/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/shim.js new file mode 100644 index 0000000..e8b5c39 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter/shim.js @@ -0,0 +1,17 @@ +'use strict'; + +var SubArray = require('../../../../array/_sub-array-dummy-safe'); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ['foo', undefined, 0, '2d', false, x, null]; + + a.deep(t.call(arr, Boolean), ['foo', '2d', x], "Plain array"); + + subArr = new SubArray('foo', undefined, 0, '2d', false, x, null); + + result = t.call(subArr, Boolean); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, ['foo', '2d', x], "Result of subclass"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/implement.js new file mode 100644 index 0000000..8d85e61 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/find-index/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/shim.js new file mode 100644 index 0000000..b5fee46 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index/shim.js @@ -0,0 +1,17 @@ +'use strict'; + +exports.__generic = function (t, a) { + var count = 0, o = {}, self = Object(this); + a(t.call(self, function (value, i, scope) { + a(value, this[i], "Value"); + a(i, count++, "Index"); + a(scope, this, "Scope"); + }, self), -1, "Falsy result"); + a(count, 3); + + count = -1; + a(t.call(this, function () { + return ++count ? o : null; + }, this), 1, "Truthy result"); + a(count, 1); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/implement.js new file mode 100644 index 0000000..29fac41 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/find/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/shim.js new file mode 100644 index 0000000..ad2e645 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find/shim.js @@ -0,0 +1,17 @@ +'use strict'; + +exports.__generic = function (t, a) { + var count = 0, o = {}, self = Object(this); + a(t.call(self, function (value, i, scope) { + a(value, this[i], "Value"); + a(i, count++, "Index"); + a(scope, this, "Scope"); + }, self), undefined, "Falsy result"); + a(count, 3); + + count = -1; + a(t.call(this, function () { + return ++count ? o : null; + }, this), this[1], "Truthy result"); + a(count, 1); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first-index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first-index.js new file mode 100644 index 0000000..4aebad6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first-index.js @@ -0,0 +1,17 @@ +'use strict'; + +module.exports = function (t, a) { + var x; + a(t.call([]), null, "Empty"); + a(t.call([null]), 0, "One value"); + a(t.call([1, 2, 3]), 0, "Many values"); + a(t.call(new Array(1000)), null, "Sparse empty"); + x = []; + x[883] = undefined; + x[890] = null; + a(t.call(x), 883, "Manual sparse, distant value"); + x = new Array(1000); + x[657] = undefined; + x[700] = null; + a(t.call(x), 657, "Sparse, distant value"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first.js new file mode 100644 index 0000000..87fde03 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/first.js @@ -0,0 +1,13 @@ +'use strict'; + +exports.__generic = function (t, a) { + a(t.call(this), this[0]); +}; +exports[''] = function (t, a) { + var x; + a(t.call([]), undefined, "Empty"); + a(t.call(new Array(234), undefined, "Sparse empty")); + x = new Array(2342); + x[434] = {}; + a(t.call(x), x[434], "Sparse"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/flatten.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/flatten.js new file mode 100644 index 0000000..65f1214 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/flatten.js @@ -0,0 +1,12 @@ +'use strict'; + +var o = [1, 2, [3, 4, [5, 6], 7, 8], 9, 10]; + +module.exports = { + __generic: function (t, a) { + a(t.call(this).length, 3); + }, + "Nested Arrays": function (t, a) { + a(t.call(o).length, 10); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/for-each-right.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/for-each-right.js new file mode 100644 index 0000000..2d24569 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/for-each-right.js @@ -0,0 +1,36 @@ +'use strict'; + +module.exports = { + __generic: function (t, a) { + var count = 0, first, last, x, icount = this.length; + t.call(this, function (item, index, col) { + ++count; + if (!first) { + first = item; + } + last = item; + x = col; + a(index, --icount, "Index"); + }); + a(count, this.length, "Iterated"); + a(first, this[this.length - 1], "First is last"); + a(last, this[0], "Last is first"); + a.deep(x, Object(this), "Collection as third argument"); //jslint: skip + }, + "": function (t, a) { + var x = {}, y, count; + t.call([1], function () { y = this; }, x); + a(y, x, "Scope"); + y = 0; + t.call([3, 4, 4], function (a, i) { y += i; }); + a(y, 3, "Indexes"); + + x = [1, 3]; + x[5] = 'x'; + y = 0; + count = 0; + t.call(x, function (a, i) { ++count; y += i; }); + a(y, 6, "Misssing Indexes"); + a(count, 3, "Misssing Indexes, count"); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/group.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/group.js new file mode 100644 index 0000000..32dc8c2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/group.js @@ -0,0 +1,24 @@ +'use strict'; + +module.exports = { + __generic: function (t, a) { + var count = 0, self; + + self = Object(this); + a.deep(t.call(self, function (v, i, scope) { + a(v, this[i], "Value"); + a(i, count++, "Index"); + a(scope, this, "Scope"); + return i; + }, self), { 0: [this[0]], 1: [this[1]], 2: [this[2]] }); + }, + "": function (t, a) { + var r; + r = t.call([2, 3, 3, 4, 5, 6, 7, 7, 23, 45, 34, 56], + function (v) { + return v % 2 ? 'odd' : 'even'; + }); + a.deep(r.odd, [3, 3, 5, 7, 7, 23, 45]); + a.deep(r.even, [2, 4, 6, 34, 56]); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/indexes-of.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/indexes-of.js new file mode 100644 index 0000000..3364170 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/indexes-of.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = { + __generic: function (t, a) { + a.deep(t.call(this, this[1]), [1]); + }, + "": function (t, a) { + var x = {}; + a.deep(t.call([1, 3, 5, 3, 5], 6), [], "No result"); + a.deep(t.call([1, 3, 5, 1, 3, 5, 1], 1), [0, 3, 6], "Some results"); + a.deep(t.call([], x), [], "Empty array"); + a.deep(t.call([x, 3, {}, x, 3, 5, x], x), [0, 3, 6], "Search for object"); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/intersection.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/intersection.js new file mode 100644 index 0000000..b72b2fb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/intersection.js @@ -0,0 +1,24 @@ +'use strict'; + +var toArray = require('../../../array/to-array'); + +module.exports = { + __generic: function (t, a) { + a.deep(t.call(this, this, this), toArray(this)); + }, + "": function (t, a) { + var x = {}, y = {}, p, r; + a.deep(t.call([], [2, 3, 4]), [], "Empty #1"); + a.deep(t.call([2, 3, 4], []), [], "Empty #2"); + a.deep(t.call([2, 3, x], [y, 5, 7]), [], "Different"); + p = t.call([3, 5, 'raz', {}, 'dwa', x], [1, 3, 'raz', 'dwa', 'trzy', x, {}], + [3, 'raz', x, 65]); + r = [3, 'raz', x]; + p.sort(); + r.sort(); + a.deep(p, r, "Same parts"); + a.deep(t.call(r, r), r, "Same"); + a.deep(t.call([1, 2, x, 4, 5, y, 7], [7, y, 5, 4, x, 2, 1]), + [1, 2, x, 4, 5, y, 7], "Long reverse same"); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-copy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-copy.js new file mode 100644 index 0000000..e7f80e7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-copy.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = function (t, a) { + var x = {}; + a(t.call([], []), true, "Empty"); + a(t.call([], {}), true, "Empty lists"); + a(t.call([1, x, 'raz'], [1, x, 'raz']), true, "Same"); + a(t.call([1, x, 'raz'], { 0: 1, 1: x, 2: 'raz', length: 3 }), true, + "Same lists"); + a(t.call([1, x, 'raz'], [x, 1, 'raz']), false, "Diff order"); + a(t.call([1, x], [1, x, 'raz']), false, "Diff length #1"); + a(t.call([1, x, 'raz'], [1, x]), false, "Diff length #2"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-uniq.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-uniq.js new file mode 100644 index 0000000..7349ba3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/is-uniq.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + var x = {}; + a(t.call([]), true, "Empty"); + a(t.call({}), true, "Empty lists"); + a(t.call([1, x, 'raz']), true, "Uniq"); + a(t.call([1, x, 1, 'raz']), false, "Not Uniq: primitive"); + a(t.call([1, x, '1', 'raz']), true, "Uniq: primitive"); + a(t.call([1, x, 1, {}, 'raz']), false, "Not Uniq: Obj"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/implement.js new file mode 100644 index 0000000..b0c1aa0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/keys/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/shim.js new file mode 100644 index 0000000..a43c04c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys/shim.js @@ -0,0 +1,9 @@ +'use strict'; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: 0, done: false }); + a.deep(iterator.next(), { value: 1, done: false }); + a.deep(iterator.next(), { value: 2, done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last-index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last-index.js new file mode 100644 index 0000000..a1cac10 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last-index.js @@ -0,0 +1,17 @@ +'use strict'; + +module.exports = function (t, a) { + var x; + a(t.call([]), null, "Empty"); + a(t.call([null]), 0, "One value"); + a(t.call([1, 2, 3]), 2, "Many values"); + a(t.call(new Array(1000)), null, "Sparse empty"); + x = []; + x[883] = null; + x[890] = undefined; + a(t.call(x), 890, "Manual sparse, distant value"); + x = new Array(1000); + x[657] = null; + x[700] = undefined; + a(t.call(x), 700, "Sparse, distant value"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last.js new file mode 100644 index 0000000..8d051bc --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/last.js @@ -0,0 +1,15 @@ +'use strict'; + +exports.__generic = function (t, a) { + a(t.call(this), this[this.length - 1]); +}; + +exports[''] = function (t, a) { + var x; + a(t.call([]), undefined, "Empty"); + a(t.call(new Array(234), undefined, "Sparse empty")); + x = new Array(2342); + x[434] = {}; + x[450] = {}; + a(t.call(x), x[450], "Sparse"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/implement.js new file mode 100644 index 0000000..cdcbc8d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/map/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/shim.js new file mode 100644 index 0000000..bbfefe8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map/shim.js @@ -0,0 +1,19 @@ +'use strict'; + +var SubArray = require('../../../../array/_sub-array-dummy-safe'); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ['foo', undefined, 0, '2d', false, x, null]; + + a.deep(t.call(arr, Boolean), [true, false, false, true, false, true, false], + "Plain array"); + + subArr = new SubArray('foo', undefined, 0, '2d', false, x, null); + + result = t.call(subArr, Boolean); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, [true, false, false, true, false, true, false], + "Result of subclass"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/remove.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/remove.js new file mode 100644 index 0000000..3ebdca2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/remove.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = function (t, a) { + var y = {}, z = {}, x = [9, z, 5, y, 'foo']; + t.call(x, y); + a.deep(x, [9, z, 5, 'foo']); + t.call(x, {}); + a.deep(x, [9, z, 5, 'foo'], "Not existing"); + t.call(x, 5); + a.deep(x, [9, z, 'foo'], "Primitive"); + x = [9, z, 5, y, 'foo']; + t.call(x, z, 5, 'foo'); + a.deep(x, [9, y], "More than one argument"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/separate.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/separate.js new file mode 100644 index 0000000..42918b5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/separate.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = function (t, a) { + var x = [], y = {}, z = {}; + a.deep(t.call(x, y), [], "Empty"); + a.not(t.call(x), x, "Returns copy"); + a.deep(t.call([1], y), [1], "One"); + a.deep(t.call([1, 'raz'], y), [1, y, 'raz'], "One"); + a.deep(t.call([1, 'raz', x], y), [1, y, 'raz', y, x], "More"); + x = new Array(1000); + x[23] = 2; + x[3453] = 'raz'; + x[500] = z; + a.deep(t.call(x, y), [2, y, z, y, 'raz'], "Sparse"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/implement.js new file mode 100644 index 0000000..855ae2f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/slice/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/shim.js new file mode 100644 index 0000000..f674f34 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice/shim.js @@ -0,0 +1,17 @@ +'use strict'; + +var SubArray = require('../../../../array/_sub-array-dummy-safe'); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ['foo', undefined, 0, '2d', false, x, null]; + + a.deep(t.call(arr, 2, 4), [0, '2d'], "Plain array: result"); + + subArr = new SubArray('foo', undefined, 0, '2d', false, x, null); + + result = t.call(subArr, 2, 4); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, [0, '2d'], "Subclass: result"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/some-right.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/some-right.js new file mode 100644 index 0000000..900771a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/some-right.js @@ -0,0 +1,43 @@ +'use strict'; + +module.exports = { + __generic: function (t, a) { + var count = 0, first, last, x, icount = this.length; + t.call(this, function (item, index, col) { + ++count; + if (!first) { + first = item; + } + last = item; + x = col; + a(index, --icount, "Index"); + }); + a(count, this.length, "Iterated"); + a(first, this[this.length - 1], "First is last"); + a(last, this[0], "Last is first"); + a.deep(x, Object(this), "Collection as third argument"); //jslint: skip + }, + "": function (t, a) { + var x = {}, y, count; + t.call([1], function () { y = this; }, x); + a(y, x, "Scope"); + y = 0; + t.call([3, 4, 4], function (a, i) { y += i; }); + a(y, 3, "Indexes"); + + x = [1, 3]; + x[5] = 'x'; + y = 0; + count = 0; + a(t.call(x, function (a, i) { ++count; y += i; }), false, "Return"); + a(y, 6, "Misssing Indexes"); + a(count, 3, "Misssing Indexes, count"); + + count = 0; + a(t.call([-2, -3, -4, 2, -5], function (item) { + ++count; + return item > 0; + }), true, "Return"); + a(count, 2, "Break after true is returned"); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/implement.js new file mode 100644 index 0000000..0d9f461 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/splice/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/shim.js new file mode 100644 index 0000000..2c751e6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/shim.js @@ -0,0 +1,19 @@ +'use strict'; + +var SubArray = require('../../../../array/_sub-array-dummy-safe'); + +module.exports = function (t, a) { + var arr, x = {}, subArr, result; + + arr = ['foo', undefined, 0, '2d', false, x, null]; + + a.deep(t.call(arr, 2, 2, 'bar'), [0, '2d'], "Plain array: result"); + a.deep(arr, ["foo", undefined, "bar", false, x, null], "Plain array: change"); + + subArr = new SubArray('foo', undefined, 0, '2d', false, x, null); + + result = t.call(subArr, 2, 2, 'bar'); + a(result instanceof SubArray, true, "Instance of subclass"); + a.deep(result, [0, '2d'], "Subclass: result"); + a.deep(subArr, ["foo", undefined, "bar", false, x, null], "Subclass: change"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/uniq.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/uniq.js new file mode 100644 index 0000000..2f7e6c4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/uniq.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = { + __generic: function (t, a) { + a(t.call(this).length, 3); + }, + "": function (t, a) { + var o, x = {}, y = {}, z = {}, w; + o = [1, 2, x, 3, 1, 'raz', '1', y, x, 'trzy', z, 'raz']; + + a.not(w = t.call(o), o, "Returns different object"); + a.deep(w, [1, 2, x, 3, 'raz', '1', y, 'trzy', z], "Result"); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/implement.js new file mode 100644 index 0000000..9f40138 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../array/#/values/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/shim.js new file mode 100644 index 0000000..e590d8f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values/shim.js @@ -0,0 +1,9 @@ +'use strict'; + +exports.__generic = function (t, a) { + var iterator = t.call(this); + a.deep(iterator.next(), { value: '1', done: false }); + a.deep(iterator.next(), { value: '2', done: false }); + a.deep(iterator.next(), { value: '3', done: false }); + a.deep(iterator.next(), { value: undefined, done: true }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/__scopes.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/__scopes.js new file mode 100644 index 0000000..fc240d3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/__scopes.js @@ -0,0 +1,9 @@ +'use strict'; + +exports.Array = ['1', '2', '3']; + +exports.Arguments = (function () { + return arguments; +}('1', '2', '3')); + +exports.String = "123"; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_is-extensible.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_is-extensible.js new file mode 100644 index 0000000..d387126 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_is-extensible.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a(typeof t, 'boolean'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js new file mode 100644 index 0000000..29d8699 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy-safe.js @@ -0,0 +1,7 @@ +'use strict'; + +var isArray = Array.isArray; + +module.exports = function (t, a) { + t((t === null) || isArray(t.prototype), true); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy.js new file mode 100644 index 0000000..29d8699 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/_sub-array-dummy.js @@ -0,0 +1,7 @@ +'use strict'; + +var isArray = Array.isArray; + +module.exports = function (t, a) { + t((t === null) || isArray(t.prototype), true); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/implement.js new file mode 100644 index 0000000..e0db846 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../array/from/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/shim.js new file mode 100644 index 0000000..310302a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from/shim.js @@ -0,0 +1,60 @@ +// Some tests taken from: https://github.com/mathiasbynens/Array.from/blob/master/tests/tests.js + +'use strict'; + +module.exports = function (t, a) { + var o = [1, 2, 3], MyType; + a.not(t(o), o, "Array"); + a.deep(t(o), o, "Array: same content"); + a.deep(t('12r3v'), ['1', '2', 'r', '3', 'v'], "String"); + a.deep(t((function () { return arguments; }(3, o, 'raz'))), + [3, o, 'raz'], "Arguments"); + a.deep(t((function () { return arguments; }(3))), [3], + "Arguments with one numeric value"); + + a.deep(t({ 0: 'raz', 1: 'dwa', length: 2 }), ['raz', 'dwa'], "Other"); + + a.deep(t(o, function (val) { return (val + 2) * 10; }, 10), [30, 40, 50], + "Mapping"); + + a.throws(function () { t(); }, TypeError, "Undefined"); + a.deep(t(3), [], "Primitive"); + + a(t.length, 1, "Length"); + a.deep(t({ length: 0 }), [], "No values Array-like"); + a.deep(t({ length: -1 }), [], "Invalid length Array-like"); + a.deep(t({ length: -Infinity }), [], "Invalid length Array-like #2"); + a.throws(function () { t(undefined); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Null"); + a.deep(t(false), [], "Boolean"); + a.deep(t(-Infinity), [], "Inifity"); + a.deep(t(-0), [], "-0"); + a.deep(t(+0), [], "+0"); + a.deep(t(1), [], "1"); + a.deep(t(+Infinity), [], "+Infinity"); + a.deep(t({}), [], "Plain object"); + a.deep(t({ length: 1 }), [undefined], "Sparse array-like"); + a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return x + x; }), ['aa', 'bb'], + "Map"); + a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return String(this); }, undefined), + ['undefined', 'undefined'], "Map context"); + a.deep(t({ '0': 'a', '1': 'b', length: 2 }, function (x) { return String(this); }, 'x'), + ['x', 'x'], "Map primitive context"); + a.throws(function () { t({}, 'foo', 'x'); }, TypeError, "Non callable for map"); + + a.deep(t.call(null, { length: 1, '0': 'a' }), ['a'], "Null context"); + + a(t({ __proto__: { '0': 'abc', length: 1 } })[0], 'abc', "Values on prototype"); + + a.throws(function () { t.call(function () { return Object.freeze({}); }, {}); }, + TypeError, "Contructor producing freezed objects"); + + // Ensure no setters are called for the indexes + // Ensure no setters are called for the indexes + MyType = function () {}; + Object.defineProperty(MyType.prototype, '0', { + set: function (x) { throw new Error('Setter called: ' + x); } + }); + a.deep(t.call(MyType, { '0': 'abc', length: 1 }), { '0': 'abc', length: 1 }, + "Defined not set"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/generate.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/generate.js new file mode 100644 index 0000000..d72e056 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/generate.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + var x = {}, y = {}; + a.deep(t(3), [undefined, undefined, undefined], "Just length"); + a.deep(t(0, 'x'), [], "No repeat"); + a.deep(t(1, x, y), [x], "Arguments length larger than repeat number"); + a.deep(t(3, x), [x, x, x], "Single argument"); + a.deep(t(5, x, y), [x, y, x, y, x], "Many arguments"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/is-plain-array.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/is-plain-array.js new file mode 100644 index 0000000..871a08a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/is-plain-array.js @@ -0,0 +1,18 @@ +'use strict'; + +var SubArray = require('../../array/_sub-array-dummy-safe'); + +module.exports = function (t, a) { + var arr = [1, 2, 3]; + a(t(arr), true, "Array"); + a(t(null), false, "Null"); + a(t(), false, "Undefined"); + a(t('234'), false, "String"); + a(t(23), false, "Number"); + a(t({}), false, "Plain object"); + a(t({ length: 1, 0: 'raz' }), false, "Array-like"); + a(t(Object.create(arr)), false, "Array extension"); + if (!SubArray) return; + a(t(new SubArray(23)), false, "Subclass instance"); + a(t(Array.prototype), false, "Array.prototype"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/implement.js new file mode 100644 index 0000000..30d53be --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../array/of/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/shim.js new file mode 100644 index 0000000..e697442 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of/shim.js @@ -0,0 +1,68 @@ +// Most tests taken from https://github.com/mathiasbynens/Array.of/blob/master/tests/tests.js +// Thanks @mathiasbynens + +'use strict'; + +var defineProperty = Object.defineProperty; + +module.exports = function (t, a) { + var x = {}, testObject, MyType; + + a.deep(t(), [], "No arguments"); + a.deep(t(3), [3], "One numeric argument"); + a.deep(t(3, 'raz', null, x, undefined), [3, 'raz', null, x, undefined], + "Many arguments"); + + a(t.length, 0, "Length"); + + a.deep(t('abc'), ['abc'], "String"); + a.deep(t(undefined), [undefined], "Undefined"); + a.deep(t(null), [null], "Null"); + a.deep(t(false), [false], "Boolean"); + a.deep(t(-Infinity), [-Infinity], "Infinity"); + a.deep(t(-0), [-0], "-0"); + a.deep(t(+0), [+0], "+0"); + a.deep(t(1), [1], "1"); + a.deep(t(1, 2, 3), [1, 2, 3], "Numeric args"); + a.deep(t(+Infinity), [+Infinity], "+Infinity"); + a.deep(t({ '0': 'a', '1': 'b', '2': 'c', length: 3 }), + [{ '0': 'a', '1': 'b', '2': 'c', length: 3 }], "Array like"); + a.deep(t(undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity), + [undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity], "Falsy arguments"); + + a.h1("Null context"); + a.deep(t.call(null, 'abc'), ['abc'], "String"); + a.deep(t.call(null, undefined), [undefined], "Undefined"); + a.deep(t.call(null, null), [null], "Null"); + a.deep(t.call(null, false), [false], "Boolean"); + a.deep(t.call(null, -Infinity), [-Infinity], "-Infinity"); + a.deep(t.call(null, -0), [-0], "-0"); + a.deep(t.call(null, +0), [+0], "+0"); + a.deep(t.call(null, 1), [1], "1"); + a.deep(t.call(null, 1, 2, 3), [1, 2, 3], "Numeric"); + a.deep(t.call(null, +Infinity), [+Infinity], "+Infinity"); + a.deep(t.call(null, { '0': 'a', '1': 'b', '2': 'c', length: 3 }), + [{ '0': 'a', '1': 'b', '2': 'c', length: 3 }], "Array-like"); + a.deep(t.call(null, undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity), + [undefined, null, false, -Infinity, -0, +0, 1, 2, +Infinity], "Falsy"); + + a.h1("Other constructor context"); + a.deep(t.call(Object, 1, 2, 3), { '0': 1, '1': 2, '2': 3, length: 3 }, "Many arguments"); + + testObject = Object(3); + testObject[0] = 1; + testObject[1] = 2; + testObject[2] = 3; + testObject.length = 3; + a.deep(t.call(Object, 1, 2, 3), testObject, "Test object"); + a(t.call(Object).length, 0, "No arguments"); + a.throws(function () { t.call(function () { return Object.freeze({}); }); }, TypeError, + "Frozen instance"); + + // Ensure no setters are called for the indexes + MyType = function () {}; + defineProperty(MyType.prototype, '0', { + set: function (x) { throw new Error('Setter called: ' + x); } + }); + a.deep(t.call(MyType, 'abc'), { '0': 'abc', length: 1 }, "Define, not set"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/to-array.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/to-array.js new file mode 100644 index 0000000..4985b5e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/to-array.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = function (t, a) { + var o = [1, 2, 3]; + a(t(o), o, "Array"); + a.deep(t('12r3v'), ['1', '2', 'r', '3', 'v'], "String"); + a.deep(t((function () { return arguments; }(3, o, 'raz'))), + [3, o, 'raz'], "Arguments"); + a.deep(t((function () { return arguments; }(3))), [3], + "Arguments with one numeric value"); + + a.deep(t({ 0: 'raz', 1: 'dwa', length: 2 }), ['raz', 'dwa'], "Other"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/valid-array.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/valid-array.js new file mode 100644 index 0000000..3732192 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/valid-array.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = function (t, a) { + var x; + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Null"); + a.throws(function () { t(0); }, TypeError, "Number"); + a.throws(function () { t(true); }, TypeError, "Boolean"); + a.throws(function () { t('raz'); }, TypeError, "String"); + a.throws(function () { t(function () {}); }, TypeError, "Function"); + a.throws(function () { t({}); }, TypeError, "Object"); + a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like"); + a(t(x = []), x, "Array"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/boolean/is-boolean.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/boolean/is-boolean.js new file mode 100644 index 0000000..4e6b3cb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/boolean/is-boolean.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function (t, a) { + a(t('arar'), false, "String"); + a(t(12), false, "Number"); + a(t(false), true, "Boolean"); + a(t(new Boolean(false)), true, "Boolean object"); + a(t(new Date()), false, "Date"); + a(t(new String('raz')), false, "String object"); + a(t({}), false, "Plain object"); + a(t(/a/), false, "Regular expression"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/copy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/copy.js new file mode 100644 index 0000000..767c5e1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/copy.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + var o = new Date(), o2; + + o2 = t.call(o); + a.not(o, o2, "Different objects"); + a.ok(o2 instanceof Date, "Instance of Date"); + a(o.getTime(), o2.getTime(), "Same time"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/days-in-month.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/days-in-month.js new file mode 100644 index 0000000..9ddba55 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/days-in-month.js @@ -0,0 +1,17 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call(new Date(2001, 0, 1)), 31, "January"); + a(t.call(new Date(2001, 1, 1)), 28, "February"); + a(t.call(new Date(2000, 1, 1)), 29, "February (leap)"); + a(t.call(new Date(2001, 2, 1)), 31, "March"); + a(t.call(new Date(2001, 3, 1)), 30, "April"); + a(t.call(new Date(2001, 4, 1)), 31, "May"); + a(t.call(new Date(2001, 5, 1)), 30, "June"); + a(t.call(new Date(2001, 6, 1)), 31, "July"); + a(t.call(new Date(2001, 7, 1)), 31, "August"); + a(t.call(new Date(2001, 8, 1)), 30, "September"); + a(t.call(new Date(2001, 9, 1)), 31, "October"); + a(t.call(new Date(2001, 10, 1)), 30, "November"); + a(t.call(new Date(2001, 11, 1)), 31, "December"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-day.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-day.js new file mode 100644 index 0000000..d4f4a90 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-day.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call(new Date(2000, 0, 1, 13, 32, 34, 234)).valueOf(), + new Date(2000, 0, 1).valueOf()); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-month.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-month.js new file mode 100644 index 0000000..b4a81be --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-month.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call(new Date(2000, 0, 15, 13, 32, 34, 234)).valueOf(), + new Date(2000, 0, 1).valueOf()); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-year.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-year.js new file mode 100644 index 0000000..aae117e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/floor-year.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call(new Date(2000, 5, 13, 13, 32, 34, 234)).valueOf(), + new Date(2000, 0, 1).valueOf()); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/format.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/format.js new file mode 100644 index 0000000..e68e4bf --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#/format.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (t, a) { + var dt = new Date(2011, 2, 3, 3, 5, 5, 32); + a(t.call(dt, ' %Y.%y.%m.%d.%H.%M.%S.%L '), ' 2011.11.03.03.03.05.05.032 '); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/is-date.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/is-date.js new file mode 100644 index 0000000..109093d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/is-date.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + a(t('arar'), false, "String"); + a(t(12), false, "Number"); + a(t(true), false, "Boolean"); + a(t(new Date()), true, "Date"); + a(t(new String('raz')), false, "String object"); + a(t({}), false, "Plain object"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/valid-date.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/valid-date.js new file mode 100644 index 0000000..98787e4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/valid-date.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function (t, a) { + var d = new Date(); + a(t(d), d, "Date"); + a.throws(function () { + t({}); + }, "Object"); + a.throws(function () { + t({ valueOf: function () { return 20; } }); + }, "Number object"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/#/throw.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/#/throw.js new file mode 100644 index 0000000..1213cfc --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/#/throw.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + var e = new Error(); + try { + t.call(e); + } catch (e2) { + a(e2, e); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/custom.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/custom.js new file mode 100644 index 0000000..d4ff500 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/custom.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function (t, a) { + var T = t, err = new T('My Error', 'MY_ERROR', { errno: 123 }); + a(err instanceof Error, true, "Instance of error"); + a(err.constructor, Error, "Constructor"); + a(err.name, 'Error', "Name"); + a(String(err), 'Error: My Error', "String representation"); + a(err.code, 'MY_ERROR', "Code"); + a(err.errno, 123, "Errno"); + a(typeof err.stack, 'string', "Stack trace"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/is-error.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/is-error.js new file mode 100644 index 0000000..f8b5e20 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/is-error.js @@ -0,0 +1,16 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(), false, "Undefined"); + a(t(1), false, "Primitive"); + a(t({}), false, "Objectt"); + a(t({ toString: function () { return '[object Error]'; } }), false, + "Fake error"); + a(t(new Error()), true, "Error"); + a(t(new EvalError()), true, "EvalError"); + a(t(new RangeError()), true, "RangeError"); + a(t(new ReferenceError()), true, "ReferenceError"); + a(t(new SyntaxError()), true, "SyntaxError"); + a(t(new TypeError()), true, "TypeError"); + a(t(new URIError()), true, "URIError"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/valid-error.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/valid-error.js new file mode 100644 index 0000000..e04cdb3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/valid-error.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (t, a) { + var e = new Error(); + a(t(e), e, "Error"); + a.throws(function () { + t({}); + }, "Other"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/compose.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/compose.js new file mode 100644 index 0000000..83de5e8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/compose.js @@ -0,0 +1,9 @@ +'use strict'; + +var f = function (a, b) { return ['a', arguments.length, a, b]; } + , g = function (a) { return ['b', arguments.length].concat(a); } + , h = function (a) { return ['c', arguments.length].concat(a); }; + +module.exports = function (t, a) { + a.deep(t.call(h, g, f)(1, 2), ['c', 1, 'b', 1, 'a', 2, 1, 2]); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/copy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/copy.js new file mode 100644 index 0000000..7a22e2f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/copy.js @@ -0,0 +1,19 @@ +'use strict'; + +module.exports = function (t, a) { + var foo = 'raz', bar = 'dwa' + , fn = function marko(a, b) { return this + a + b + foo + bar; } + , result, o = {}; + + fn.prototype = o; + + fn.foo = 'raz'; + + result = t.call(fn); + + a(result.length, fn.length, "Length"); + a(result.name, fn.name, "Length"); + a(result.call('marko', 'el', 'fe'), 'markoelferazdwa', "Body"); + a(result.prototype, fn.prototype, "Prototype"); + a(result.foo, fn.foo, "Custom property"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/curry.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/curry.js new file mode 100644 index 0000000..18fb038 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/curry.js @@ -0,0 +1,18 @@ +'use strict'; + +var toArray = require('../../../array/to-array') + + , f = function () { return toArray(arguments); }; + +module.exports = function (t, a) { + var x, y = {}, z; + a.deep(t.call(f, 0, 1, 2)(3), [], "0 arguments"); + x = t.call(f, 5, {}); + a(x.length, 5, "Length #1"); + z = x(1, 2); + a(z.length, 3, "Length #2"); + z = z(3, 4); + a(z.length, 1, "Length #1"); + a.deep(z(5, 6), [1, 2, 3, 4, 5], "Many arguments"); + a.deep(x(8, 3)(y, 45)('raz', 6), [8, 3, y, 45, 'raz'], "Many arguments #2"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/lock.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/lock.js new file mode 100644 index 0000000..44a12d7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/lock.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call(function () { + return arguments.length; + })(1, 2, 3), 0); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/not.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/not.js new file mode 100644 index 0000000..c0f5e9d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/not.js @@ -0,0 +1,11 @@ +'use strict'; + +var identity = require('../../../function/identity') + , noop = require('../../../function/noop'); + +module.exports = function (t, a) { + a(t.call(identity)(''), true, "Falsy"); + a(t.call(noop)(), true, "Undefined"); + a(t.call(identity)({}), false, "Any object"); + a(t.call(identity)(true), false, "True"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/partial.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/partial.js new file mode 100644 index 0000000..bd00ce7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/partial.js @@ -0,0 +1,9 @@ +'use strict'; + +var toArray = require('../../../array/to-array') + + , f = function () { return toArray(arguments); }; + +module.exports = function (t, a) { + a.deep(t.call(f, 1)(2, 3), [1, 2, 3]); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/spread.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/spread.js new file mode 100644 index 0000000..b82dfec --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/spread.js @@ -0,0 +1,8 @@ +'use strict'; + +var f = function (a, b) { return this[a] + this[b]; } + , o = { a: 3, b: 4 }; + +module.exports = function (t, a) { + a(t.call(f).call(o, ['a', 'b']), 7); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/to-string-tokens.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/to-string-tokens.js new file mode 100644 index 0000000..4c54d30 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#/to-string-tokens.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function (t, a) { + a.deep(t.call(function (a, b) { return this[a] + this[b]; }), + { args: 'a, b', body: ' return this[a] + this[b]; ' }); + a.deep(t.call(function () {}), + { args: '', body: '' }); + a.deep(t.call(function (raz) {}), + { args: 'raz', body: '' }); + a.deep(t.call(function () { Object(); }), + { args: '', body: ' Object(); ' }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/_define-length.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/_define-length.js new file mode 100644 index 0000000..8f037e8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/_define-length.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function (t, a) { + var foo = 'raz', bar = 'dwa' + , fn = function (a, b) { return this + a + b + foo + bar; } + , result; + + result = t(fn, 3); + a(result.call('marko', 'el', 'fe'), 'markoelferazdwa', "Content"); + a(result.length, 3, "Length"); + a(result.prototype, fn.prototype, "Prototype"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/constant.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/constant.js new file mode 100644 index 0000000..fda52aa --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/constant.js @@ -0,0 +1,7 @@ +'use strict'; + +var o = {}; + +module.exports = function (t, a) { + a(t(o)(), o); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/identity.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/identity.js new file mode 100644 index 0000000..8013e2e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/identity.js @@ -0,0 +1,7 @@ +'use strict'; + +var o = {}; + +module.exports = function (t, a) { + a(t(o), o); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/invoke.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/invoke.js new file mode 100644 index 0000000..fcce4aa --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/invoke.js @@ -0,0 +1,9 @@ +'use strict'; + +var constant = require('../../function/constant') + + , o = { b: constant('c') }; + +module.exports = function (t, a) { + a(t('b')(o), 'c'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-arguments.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-arguments.js new file mode 100644 index 0000000..f8de881 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-arguments.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + var args, dummy; + args = (function () { return arguments; }()); + dummy = { '0': 1, '1': 2 }; + Object.defineProperty(dummy, 'length', { value: 2 }); + a(t(args), true, "Arguments"); + a(t(dummy), false, "Dummy"); + a(t([]), false, "Array"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-function.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-function.js new file mode 100644 index 0000000..83acc42 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/is-function.js @@ -0,0 +1,8 @@ +'use strict'; + +var o = { call: Function.prototype.call, apply: Function.prototype.apply }; + +module.exports = function (t, a) { + a(t(function () {}), true, "Function is function"); + a(t(o), false, "Plain object is not function"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/noop.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/noop.js new file mode 100644 index 0000000..4305c6f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/noop.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a(typeof t(1, 2, 3), 'undefined'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/pluck.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/pluck.js new file mode 100644 index 0000000..5bf9583 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/pluck.js @@ -0,0 +1,7 @@ +'use strict'; + +var o = { foo: 'bar' }; + +module.exports = function (t, a) { + a(t('foo')(o), o.foo); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/valid-function.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/valid-function.js new file mode 100644 index 0000000..59b1623 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/valid-function.js @@ -0,0 +1,17 @@ +'use strict'; + +module.exports = function (t, a) { + var f = function () {}; + a(t(f), f, "Function"); + f = new Function(); + a(t(f), f, "Function"); + a.throws(function () { + t({}); + }, "Object"); + a.throws(function () { + t(/re/); + }, "RegExp"); + a.throws(function () { + t({ call: function () { return 20; } }); + }, "Plain object"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/global.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/global.js new file mode 100644 index 0000000..1f452ae --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/global.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a.ok(t && typeof t === 'object'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/for-each.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/for-each.js new file mode 100644 index 0000000..0fed8ad --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/for-each.js @@ -0,0 +1,40 @@ +'use strict'; + +var ArrayIterator = require('es6-iterator/array') + + , slice = Array.prototype.slice; + +module.exports = function (t, a) { + var i = 0, x = ['raz', 'dwa', 'trzy'], y = {}; + t(x, function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#"); + a(this, y, "Array: context: " + (i++) + "#"); + }, y); + i = 0; + t((function () { return arguments; }('raz', 'dwa', 'trzy')), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#"); + a(this, y, "Arguments: context: " + (i++) + "#"); + }, y); + i = 0; + t({ 0: 'raz', 1: 'dwa', 2: 'trzy', length: 3 }, function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Array-like" + i + "#"); + a(this, y, "Array-like: context: " + (i++) + "#"); + }, y); + i = 0; + t(x = 'foo', function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Regular String: context: " + (i++) + "#"); + }, y); + i = 0; + x = ['r', '💩', 'z']; + t('r💩z', function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Unicode String: context: " + (i++) + "#"); + }, y); + i = 0; + t(new ArrayIterator(x), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#"); + a(this, y, "Iterator: context: " + (i++) + "#"); + }, y); + +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/is.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/is.js new file mode 100644 index 0000000..c0d2a43 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/is.js @@ -0,0 +1,20 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator; + +module.exports = function (t, a) { + var x; + a(t([]), true, "Array"); + a(t(""), true, "String"); + a(t((function () { return arguments; }())), true, "Arguments"); + a(t({ length: 0 }), true, "List object"); + a(t(function () {}), false, "Function"); + a(t({}), false, "Plain object"); + a(t(/raz/), false, "Regexp"); + a(t(), false, "No argument"); + a(t(null), false, "Null"); + a(t(undefined), false, "Undefined"); + x = {}; + x[iteratorSymbol] = function () {}; + a(t(x), true, "Iterable"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate-object.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate-object.js new file mode 100644 index 0000000..da12529 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate-object.js @@ -0,0 +1,20 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator; + +module.exports = function (t, a) { + var x; + a.throws(function () { t(0); }, TypeError, "0"); + a.throws(function () { t(false); }, TypeError, "false"); + a.throws(function () { t(''); }, TypeError, "String"); + a.throws(function () { t({}); }, TypeError, "Plain Object"); + a.throws(function () { t(function () {}); }, TypeError, "Function"); + a(t(x = new String('raz')), x, "String object"); //jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "null"); + x = {}; + x[iteratorSymbol] = function () {}; + a(t(x), x, "Iterable"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate.js new file mode 100644 index 0000000..bcc2ad3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable/validate.js @@ -0,0 +1,20 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator; + +module.exports = function (t, a) { + var x; + a.throws(function () { t(0); }, TypeError, "0"); + a.throws(function () { t(false); }, TypeError, "false"); + a(t(''), '', "''"); + a.throws(function () { t({}); }, TypeError, "Plain Object"); + a.throws(function () { t(function () {}); }, TypeError, "Function"); + a(t(x = new String('raz')), x, "String object"); //jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "null"); + x = {}; + x[iteratorSymbol] = function () {}; + a(t(x), x, "Iterable"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_pack-ieee754.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_pack-ieee754.js new file mode 100644 index 0000000..9041431 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_pack-ieee754.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a.deep(t(1.337, 8, 23), [63, 171, 34, 209]); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_unpack-ieee754.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_unpack-ieee754.js new file mode 100644 index 0000000..ca30b82 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/_unpack-ieee754.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a.deep(t([63, 171, 34, 209], 8, 23), 1.3370000123977661); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/implement.js new file mode 100644 index 0000000..01fb6d0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/acosh/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/shim.js new file mode 100644 index 0000000..3d710c7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh/shim.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-1), NaN, "Negative"); + a(t(0), NaN, "Zero"); + a(t(0.5), NaN, "Below 1"); + a(t(1), 0, "1"); + a(t(2), 1.3169578969248166, "Other"); + a(t(Infinity), Infinity, "Infinity"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/implement.js new file mode 100644 index 0000000..d1fcece --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/asinh/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/shim.js new file mode 100644 index 0000000..d9fbe49 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh/shim.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(-2), -1.4436354751788103, "Negative"); + a(t(2), 1.4436354751788103, "Positive"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/implement.js new file mode 100644 index 0000000..cba8fad --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/atanh/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/shim.js new file mode 100644 index 0000000..a857b49 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh/shim.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-2), NaN, "Less than -1"); + a(t(2), NaN, "Greater than 1"); + a(t(-1), -Infinity, "-1"); + a(t(1), Infinity, "1"); + a(t(0), 0, "Zero"); + a(t(0.5), 0.5493061443340549, "Ohter"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/implement.js new file mode 100644 index 0000000..374d4b3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/cbrt/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/shim.js new file mode 100644 index 0000000..43ab68b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt/shim.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(-1), -1, "-1"); + a(t(1), 1, "1"); + a(t(2), 1.2599210498948732, "Ohter"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/implement.js new file mode 100644 index 0000000..44f8815 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/clz32/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/shim.js new file mode 100644 index 0000000..a769b39 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32/shim.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(1), 31, "1"); + a(t(1000), 22, "1000"); + a(t(), 32, "No arguments"); + a(t(Infinity), 32, "Infinity"); + a(t(-Infinity), 32, "-Infinity"); + a(t("foo"), 32, "String"); + a(t(true), 31, "Boolean"); + a(t(3.5), 30, "Float"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/implement.js new file mode 100644 index 0000000..f3c712b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/cosh/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/shim.js new file mode 100644 index 0000000..419c123 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh/shim.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 1, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), Infinity, "-Infinity"); + a(t(1), 1.5430806348152437, "1"); + a(t(Number.MAX_VALUE), Infinity); + a(t(-Number.MAX_VALUE), Infinity); + a(t(Number.MIN_VALUE), 1); + a(t(-Number.MIN_VALUE), 1); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/implement.js new file mode 100644 index 0000000..c212967 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/expm1/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/shim.js new file mode 100644 index 0000000..15f0e79 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1/shim.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -1, "-Infinity"); + a(t(1).toFixed(15), '1.718281828459045', "1"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/implement.js new file mode 100644 index 0000000..c909af7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/fround/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/shim.js new file mode 100644 index 0000000..4ef6d4e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround/shim.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(1.337), 1.3370000123977661, "1"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/implement.js new file mode 100644 index 0000000..9946646 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/hypot/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/shim.js new file mode 100644 index 0000000..91d950a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot/shim.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(), 0, "No arguments"); + a(t(0, -0, 0), 0, "Zeros"); + a(t(4, NaN, Infinity), Infinity, "Infinity"); + a(t(4, NaN, -Infinity), Infinity, "Infinity"); + a(t(4, NaN, 34), NaN, "NaN"); + a(t(3, 4), 5, "#1"); + a(t(3, 4, 5), 7.0710678118654755, "#2"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/implement.js new file mode 100644 index 0000000..7b2a2a6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/imul/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/shim.js new file mode 100644 index 0000000..a2ca7fe --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul/shim.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(), 0, "No arguments"); + a(t(0, 0), 0, "Zeros"); + a(t(2, 4), 8, "#1"); + a(t(-1, 8), -8, "#2"); + a(t(0xfffffffe, 5), -10, "#3"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/implement.js new file mode 100644 index 0000000..4b3b4a4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/log10/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/shim.js new file mode 100644 index 0000000..5fa0d5b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10/shim.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-0.5), NaN, "Less than 0"); + a(t(0), -Infinity, "0"); + a(t(1), 0, "1"); + a(t(Infinity), Infinity, "Infinity"); + a(t(2), 0.3010299956639812, "Other"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/implement.js new file mode 100644 index 0000000..5d269bd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/log1p/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/shim.js new file mode 100644 index 0000000..d495ce0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p/shim.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-1.5), NaN, "Less than -1"); + a(t(-1), -Infinity, "-1"); + a(t(0), 0, "0"); + a(t(Infinity), Infinity, "Infinity"); + a(t(1), 0.6931471805599453, "Other"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/implement.js new file mode 100644 index 0000000..92b501a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/log2/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/shim.js new file mode 100644 index 0000000..faa9c32 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2/shim.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(-0.5), NaN, "Less than 0"); + a(t(0), -Infinity, "0"); + a(t(1), 0, "1"); + a(t(Infinity), Infinity, "Infinity"); + a(t(3).toFixed(15), '1.584962500721156', "Other"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/implement.js new file mode 100644 index 0000000..5875c42 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/sign/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/shim.js new file mode 100644 index 0000000..b6b89c1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign/shim.js @@ -0,0 +1,11 @@ +'use strict'; + +var is = require('../../../object/is'); + +module.exports = function (t, a) { + a(is(t(0), +0), true, "+0"); + a(is(t(-0), -0), true, "-0"); + a(t({}), NaN, true, "NaN"); + a(t(-234234234), -1, "Negative"); + a(t(234234234), 1, "Positive"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/implement.js new file mode 100644 index 0000000..e52089e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/sinh/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/shim.js new file mode 100644 index 0000000..4f63b59 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh/shim.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(t(1), 1.1752011936438014, "1"); + a(t(Number.MAX_VALUE), Infinity); + a(t(-Number.MAX_VALUE), -Infinity); + a(t(Number.MIN_VALUE), 5e-324); + a(t(-Number.MIN_VALUE), -5e-324); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/implement.js new file mode 100644 index 0000000..a96bf19 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/tanh/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/shim.js new file mode 100644 index 0000000..2c67aaf --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh/shim.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), 1, "Infinity"); + a(t(-Infinity), -1, "-Infinity"); + a(t(1), 0.7615941559557649, "1"); + a(t(Number.MAX_VALUE), 1); + a(t(-Number.MAX_VALUE), -1); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/implement.js new file mode 100644 index 0000000..1830e61 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../math/trunc/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/shim.js new file mode 100644 index 0000000..9e5eed7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc/shim.js @@ -0,0 +1,16 @@ +'use strict'; + +var is = require('../../../object/is'); + +module.exports = function (t, a) { + a(t({}), NaN, "NaN"); + a(t(0), 0, "Zero"); + a(t(Infinity), Infinity, "Infinity"); + a(t(-Infinity), -Infinity, "-Infinity"); + a(is(t(0.234), 0), true, "0"); + a(is(t(-0.234), -0), true, "-0"); + a(t(13.7), 13, "Positive #1"); + a(t(12.3), 12, "Positive #2"); + a(t(-12.3), -12, "Negative #1"); + a(t(-14.7), -14, "Negative #2"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/#/pad.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/#/pad.js new file mode 100644 index 0000000..e020823 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/#/pad.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call(78, 4), '0078'); + a(t.call(65.12323, 4, 3), '0065.123', "Precision"); + a(t.call(65, 4, 3), '0065.000', "Precision integer"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/implement.js new file mode 100644 index 0000000..574da75 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../number/epsilon/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/index.js new file mode 100644 index 0000000..c892fd4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a(typeof t, 'number'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/implement.js new file mode 100644 index 0000000..b35345f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../number/is-finite/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/shim.js new file mode 100644 index 0000000..5205d1c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite/shim.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(2), true, "Number"); + a(t('23'), false, "Not numeric"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/implement.js new file mode 100644 index 0000000..127149c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../number/is-integer/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/shim.js new file mode 100644 index 0000000..3f3985c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer/shim.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(2), true, "Number"); + a(t(2.34), false, "Float"); + a(t('23'), false, "Not numeric"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/implement.js new file mode 100644 index 0000000..2f01d6d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../number/is-nan/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/shim.js new file mode 100644 index 0000000..425723e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan/shim.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(2), false, "Number"); + a(t({}), false, "Not numeric"); + a(t(NaN), true, "NaN"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-number.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-number.js new file mode 100644 index 0000000..2751334 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-number.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(0), true, "Zero"); + a(t(NaN), true, "NaN"); + a(t(Infinity), true, "Infinity"); + a(t(12), true, "Number"); + a(t(false), false, "Boolean"); + a(t(new Date()), false, "Date"); + a(t(new Number(2)), true, "Number object"); + a(t('asdfaf'), false, "String"); + a(t(''), false, "Empty String"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/implement.js new file mode 100644 index 0000000..33667e2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../number/is-safe-integer/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/shim.js new file mode 100644 index 0000000..77e0667 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer/shim.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(2), true, "Number"); + a(t(2.34), false, "Float"); + a(t(Math.pow(2, 53)), false, "Too large"); + a(t(Math.pow(2, 53) - 1), true, "Maximum"); + a(t('23'), false, "Not numeric"); + a(t(NaN), false, "NaN"); + a(t(Infinity), false, "Infinity"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/implement.js new file mode 100644 index 0000000..bef00ca --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../number/max-safe-integer/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/index.js new file mode 100644 index 0000000..c892fd4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a(typeof t, 'number'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/implement.js new file mode 100644 index 0000000..fa44024 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../number/min-safe-integer/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/index.js new file mode 100644 index 0000000..c892fd4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a(typeof t, 'number'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-integer.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-integer.js new file mode 100644 index 0000000..ff326ba --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-integer.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), 0, "NaN"); + a(t(20), 20, "Positive integer"); + a(t('-20'), -20, "String negative integer"); + a(t(Infinity), Infinity, "Infinity"); + a(t(15.343), 15, "Float"); + a(t(-15.343), -15, "Negative float"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-pos-integer.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-pos-integer.js new file mode 100644 index 0000000..2f3b4e6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-pos-integer.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), 0, "NaN"); + a(t(20), 20, "Positive integer"); + a(t(-20), 0, "Negative integer"); + a(t(Infinity), Infinity, "Infinity"); + a(t(15.343), 15, "Float"); + a(t(-15.343), 0, "Negative float"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-uint32.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-uint32.js new file mode 100644 index 0000000..00d05bd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/to-uint32.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), 0, "Not numeric"); + a(t(-4), 4294967292, "Negative"); + a(t(133432), 133432, "Positive"); + a(t(8589934592), 0, "Greater than maximum"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/_iterate.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/_iterate.js new file mode 100644 index 0000000..179afed --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/_iterate.js @@ -0,0 +1,30 @@ +'use strict'; + +module.exports = function (t, a) { + var o = { raz: 1, dwa: 2, trzy: 3 } + , o2 = {}, o3 = {}, arr, i = -1; + + t = t('forEach'); + t(o, function (value, name, self, index) { + o2[name] = value; + a(index, ++i, "Index"); + a(self, o, "Self"); + a(this, o3, "Scope"); + }, o3); + a.deep(o2, o); + + arr = []; + o2 = {}; + i = -1; + t(o, function (value, name, self, index) { + arr.push(value); + o2[name] = value; + a(index, ++i, "Index"); + a(self, o, "Self"); + a(this, o3, "Scope"); + }, o3, function (a, b) { + return o[b] - o[a]; + }); + a.deep(o2, o, "Sort by Values: Content"); + a.deep(arr, [3, 2, 1], "Sort by Values: Order"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/implement.js new file mode 100644 index 0000000..4006559 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../object/assign/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/shim.js new file mode 100644 index 0000000..9afe5f6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign/shim.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + var o1 = { a: 1, b: 2 } + , o2 = { b: 3, c: 4 }; + + a(t(o1, o2), o1, "Returns self"); + a.deep(o1, { a: 1, b: 3, c: 4 }, "Single: content"); + + a.deep(t({}, o1, o2), { a: 1, b: 3, c: 4 }, "Multi argument"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/clear.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/clear.js new file mode 100644 index 0000000..bfc08cc --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/clear.js @@ -0,0 +1,13 @@ +'use strict'; + +var isEmpty = require('../../object/is-empty'); + +module.exports = function (t, a) { + var x = {}; + a(t(x), x, "Empty: Returns same object"); + a(isEmpty(x), true, "Empty: Not changed"); + x.foo = 'raz'; + x.bar = 'dwa'; + a(t(x), x, "Same object"); + a(isEmpty(x), true, "Emptied"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compact.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compact.js new file mode 100644 index 0000000..9c9064c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compact.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = function (t, a) { + var x = {}, y = {}, z; + z = t(x); + a.not(z, x, "Returns different object"); + a.deep(z, {}, "Empty on empty"); + + x = { foo: 'bar', a: 0, b: false, c: '', d: '0', e: null, bar: y, + elo: undefined }; + z = t(x); + a.deep(z, { foo: 'bar', a: 0, b: false, c: '', d: '0', bar: y }, + "Cleared null values"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compare.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compare.js new file mode 100644 index 0000000..cb94241 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/compare.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = function (t, a) { + var d = new Date(); + + a.ok(t(12, 3) > 0, "Numbers"); + a.ok(t(2, 13) < 0, "Numbers #2"); + a.ok(t("aaa", "aa") > 0, "Strings"); + a.ok(t("aa", "ab") < 0, "Strings #2"); + a(t("aa", "aa"), 0, "Strings same"); + a(t(d, new Date(d.getTime())), 0, "Same date"); + a.ok(t(d, new Date(d.getTime() + 1)) < 0, "Different date"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy-deep.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy-deep.js new file mode 100644 index 0000000..a4023bc --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy-deep.js @@ -0,0 +1,24 @@ +'use strict'; + +var stringify = JSON.stringify; + +module.exports = function (t, a) { + var o = { 1: 'raz', 2: 'dwa', 3: 'trzy' } + , no = t(o); + + a.not(no, o, "Return different object"); + a(stringify(no), stringify(o), "Match properties and values"); + + o = { foo: 'bar', raz: { dwa: 'dwa', + trzy: { cztery: 'pięć', 'sześć': 'siedem' }, osiem: {}, + 'dziewięć': function () { } }, 'dziesięć': 10 }; + o.raz.rec = o; + + no = t(o); + a.not(o.raz, no.raz, "Deep"); + a.not(o.raz.trzy, no.raz.trzy, "Deep #2"); + a(stringify(o.raz.trzy), stringify(no.raz.trzy), "Deep content"); + a(no.raz.rec, no, "Recursive"); + a.not(o.raz.osiem, no.raz.osiem, "Empty object"); + a(o.raz['dziewięć'], no.raz['dziewięć'], "Function"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy.js new file mode 100644 index 0000000..2f222ef --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/copy.js @@ -0,0 +1,19 @@ +'use strict'; + +var stringify = JSON.stringify; + +module.exports = function (t, a) { + var o = { 1: 'raz', 2: 'dwa', 3: 'trzy' } + , no = t(o); + + a.not(no, o, "Return different object"); + a(stringify(no), stringify(o), "Match properties and values"); + + o = { foo: 'bar', raz: { dwa: 'dwa', + trzy: { cztery: 'pięć', 'sześć': 'siedem' }, osiem: {}, + 'dziewięć': function () { } }, 'dziesięć': 10 }; + o.raz.rec = o; + + no = t(o); + a(o.raz, no.raz, "Shallow"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/count.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/count.js new file mode 100644 index 0000000..494f4f1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/count.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), 0, "Empty"); + a(t({ raz: 1, dwa: null, trzy: undefined, cztery: 0 }), 4, + "Some properties"); + a(t(Object.defineProperties({}, { + raz: { value: 'raz' }, + dwa: { value: 'dwa', enumerable: true } + })), 1, "Some properties hidden"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/create.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/create.js new file mode 100644 index 0000000..8b7be21 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/create.js @@ -0,0 +1,22 @@ +'use strict'; + +var setPrototypeOf = require('../../object/set-prototype-of') + + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (t, a) { + var x = {}, obj; + + a(getPrototypeOf(t(x)), x, "Normal object"); + a(getPrototypeOf(t(null)), + (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Null"); + + a.h1("Properties"); + a.h2("Normal object"); + a(getPrototypeOf(obj = t(x, { foo: { value: 'bar' } })), x, "Prototype"); + a(obj.foo, 'bar', "Property"); + a.h2("Null"); + a(getPrototypeOf(obj = t(null, { foo: { value: 'bar2' } })), + (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Prototype"); + a(obj.foo, 'bar2', "Property"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/eq.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/eq.js new file mode 100644 index 0000000..02b3f00 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/eq.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function (t, a) { + var o = {}; + a(t(o, {}), false, "Different objects"); + a(t(o, o), true, "Same objects"); + a(t('1', '1'), true, "Same primitive"); + a(t('1', 1), false, "Different primitive types"); + a(t(NaN, NaN), true, "NaN"); + a(t(0, 0), true, "0,0"); + a(t(0, -0), true, "0,-0"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/every.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/every.js new file mode 100644 index 0000000..07d5bbb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/every.js @@ -0,0 +1,21 @@ +'use strict'; + +var o = { 1: 1, 2: 2, 3: 3 }; + +module.exports = function (t, a) { + var o2 = {}; + t(o, function (value, name) { + o2[name] = value; + return true; + }); + a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); + + a(t(o, function () { + return true; + }), true, "Succeeds"); + + a(t(o, function () { + return false; + }), false, "Fails"); + +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/filter.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/filter.js new file mode 100644 index 0000000..7307da8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/filter.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (t, a) { + a.deep(t({ 1: 1, 2: 2, 3: 3, 4: 4 }, + function (value) { return Boolean(value % 2); }), { 1: 1, 3: 3 }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/first-key.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/first-key.js new file mode 100644 index 0000000..8169cd2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/first-key.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = function (t, a) { + var x = {}, y = Object.create(null); + a(t(x), null, "Normal: Empty"); + a(t(y), null, "Null extension: Empty"); + x.foo = 'raz'; + x.bar = 343; + a(['foo', 'bar'].indexOf(t(x)) !== -1, true, "Normal"); + y.elo = 'foo'; + y.mar = 'wew'; + a(['elo', 'mar'].indexOf(t(y)) !== -1, true, "Null extension"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/flatten.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/flatten.js new file mode 100644 index 0000000..ca342ea --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/flatten.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (t, a) { + a.deep(t({ a: { aa: 1, ab: 2 }, b: { ba: 3, bb: 4 } }), + { aa: 1, ab: 2, ba: 3, bb: 4 }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/for-each.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/for-each.js new file mode 100644 index 0000000..8690d1e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/for-each.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + var o = { raz: 1, dwa: 2, trzy: 3 } + , o2 = {}; + a(t(o, function (value, name) { + o2[name] = value; + }), undefined, "Return"); + a.deep(o2, o); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/get-property-names.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/get-property-names.js new file mode 100644 index 0000000..b91c3dd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/get-property-names.js @@ -0,0 +1,18 @@ +'use strict'; + +module.exports = function (t, a) { + var o = { first: 1, second: 4 }, r1, r2; + o = Object.create(o, { + third: { value: null } + }); + o.first = 2; + o = Object.create(o); + o.fourth = 3; + + r1 = t(o); + r1.sort(); + r2 = ['first', 'second', 'third', 'fourth'] + .concat(Object.getOwnPropertyNames(Object.prototype)); + r2.sort(); + a.deep(r1, r2); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-array-like.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-array-like.js new file mode 100644 index 0000000..6295973 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-array-like.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = function (t, a) { + a(t([]), true, "Array"); + a(t(""), true, "String"); + a(t((function () { return arguments; }())), true, "Arguments"); + a(t({ length: 0 }), true, "List object"); + a(t(function () {}), false, "Function"); + a(t({}), false, "Plain object"); + a(t(/raz/), false, "Regexp"); + a(t(), false, "No argument"); + a(t(null), false, "Null"); + a(t(undefined), false, "Undefined"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-callable.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-callable.js new file mode 100644 index 0000000..625e221 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-callable.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(function () {}), true, "Function"); + a(t({}), false, "Object"); + a(t(), false, "Undefined"); + a(t(null), false, "Null"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy-deep.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy-deep.js new file mode 100644 index 0000000..4f14cbb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy-deep.js @@ -0,0 +1,46 @@ +'use strict'; + +module.exports = function (t, a) { + var x, y; + + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false, + "Different property value"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false, + "Property only in source"); + a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false, + "Property only in target"); + + a(t("raz", "dwa"), false, "String: diff"); + a(t("raz", "raz"), true, "String: same"); + a(t("32", 32), false, "String & Number"); + + a(t([1, 'raz', true], [1, 'raz', true]), true, "Array: same"); + a(t([1, 'raz', undefined], [1, 'raz']), false, "Array: diff"); + a(t(['foo'], ['one']), false, "Array: One value comparision"); + + x = { foo: { bar: { mar: {} } } }; + y = { foo: { bar: { mar: {} } } }; + a(t(x, y), true, "Deep"); + + a(t({ foo: { bar: { mar: 'foo' } } }, { foo: { bar: { mar: {} } } }), + false, "Deep: false"); + + x = { foo: { bar: { mar: {} } } }; + x.rec = { foo: x }; + + y = { foo: { bar: { mar: {} } } }; + y.rec = { foo: x }; + + a(t(x, y), true, "Object: Infinite Recursion: Same #1"); + + x.rec.foo = y; + a(t(x, y), true, "Object: Infinite Recursion: Same #2"); + + x.rec.foo = x; + y.rec.foo = y; + a(t(x, y), true, "Object: Infinite Recursion: Same #3"); + + y.foo.bar.mar = 'raz'; + a(t(x, y), false, "Object: Infinite Recursion: Diff"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy.js new file mode 100644 index 0000000..394e2ed --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-copy.js @@ -0,0 +1,18 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false, + "Different property value"); + a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false, + "Property only in source"); + a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false, + "Property only in target"); + + a(t("raz", "dwa"), false, "String: diff"); + a(t("raz", "raz"), true, "String: same"); + a(t("32", 32), false, "String & Number"); + + a(t([1, 'raz', true], [1, 'raz', true]), true, "Array: same"); + a(t([1, 'raz', undefined], [1, 'raz']), false, "Array: diff"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-empty.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-empty.js new file mode 100644 index 0000000..b560c2c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-empty.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), true, "Empty"); + a(t({ 1: 1 }), false, "Not empty"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-object.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-object.js new file mode 100644 index 0000000..72c8aa6 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-object.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = function (t, a) { + a(t('arar'), false, "String"); + a(t(12), false, "Number"); + a(t(true), false, "Boolean"); + a(t(null), false, "Null"); + a(t(new Date()), true, "Date"); + a(t(new String('raz')), true, "String object"); + a(t({}), true, "Plain object"); + a(t(/a/), true, "Regular expression"); + a(t(function () {}), true, "Function"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-plain-object.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-plain-object.js new file mode 100644 index 0000000..e988829 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is-plain-object.js @@ -0,0 +1,18 @@ +'use strict'; + +module.exports = function (t, a) { + a(t({}), true, "Empty {} is plain object"); + a(t({ a: true }), true, "{} with property is plain object"); + a(t({ prototype: 1, constructor: 2, __proto__: 3 }), true, + "{} with any property keys is plain object"); + a(t(null), false, "Null is not plain object"); + a(t('string'), false, "Primitive is not plain object"); + a(t(function () {}), false, "Function is not plain object"); + a(t(Object.create({})), false, + "Object whose prototype is not Object.prototype is not plain object"); + a(t(Object.create(Object.prototype)), true, + "Object whose prototype is Object.prototype is plain object"); + a(t(Object.create(null)), true, + "Object whose prototype is null is plain object"); + a(t(Object.prototype), false, "Object.prototype"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is.js new file mode 100644 index 0000000..4f8948c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/is.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function (t, a) { + var o = {}; + a(t(o, {}), false, "Different objects"); + a(t(o, o), true, "Same objects"); + a(t('1', '1'), true, "Same primitive"); + a(t('1', 1), false, "Different primitive types"); + a(t(NaN, NaN), true, "NaN"); + a(t(0, 0), true, "0,0"); + a(t(0, -0), false, "0,-0"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/key-of.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/key-of.js new file mode 100644 index 0000000..a9225a0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/key-of.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function (t, a) { + var x = {}, y = {} + , o = { foo: 'bar', raz: x, trzy: 'cztery', five: '6' }; + + a(t(o, 'bar'), 'foo', "First property"); + a(t(o, 6), null, "Primitive that's not there"); + a(t(o, x), 'raz', "Object"); + a(t(o, y), null, "Object that's not there"); + a(t(o, '6'), 'five', "Last property"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/implement.js new file mode 100644 index 0000000..179e1e5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../object/keys/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/shim.js new file mode 100644 index 0000000..ed29eeb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys/shim.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function (t, a) { + a.deep(t({ foo: 'bar' }), ['foo'], "Object"); + a.deep(t('raz'), ['0', '1', '2'], "Primitive"); + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Undefined"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map-keys.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map-keys.js new file mode 100644 index 0000000..be84825 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map-keys.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function (t, a) { + a.deep(t({ 1: 1, 2: 2, 3: 3 }, function (key, value) { + return 'x' + (key + value); + }), { x11: 1, x22: 2, x33: 3 }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map.js new file mode 100644 index 0000000..f9cc09c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/map.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (t, a) { + var obj = { 1: 1, 2: 2, 3: 3 }; + a.deep(t(obj, function (value, key, context) { + a(context, obj, "Context argument"); + return (value + 1) + key; + }), { 1: '21', 2: '32', 3: '43' }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin-prototypes.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin-prototypes.js new file mode 100644 index 0000000..d1c727a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin-prototypes.js @@ -0,0 +1,67 @@ +'use strict'; + +module.exports = function (t, a) { + var o, o1, o2, x, y = {}, z = {}; + o = { inherited: true, visible: 23 }; + o1 = Object.create(o); + o1.visible = z; + o1.nonremovable = 'raz'; + Object.defineProperty(o1, 'hidden', { value: 'hidden' }); + + o2 = Object.defineProperties({}, { nonremovable: { value: y } }); + o2.other = 'other'; + + try { t(o2, o1); } catch (ignore) {} + + a(o2.visible, z, "Enumerable"); + a(o1.hidden, 'hidden', "Not Enumerable"); + a(o2.propertyIsEnumerable('visible'), true, "Enumerable is enumerable"); + a(o2.propertyIsEnumerable('hidden'), false, + "Not enumerable is not enumerable"); + + a(o2.inherited, true, "Extend deep"); + + a(o2.nonremovable, y, "Do not overwrite non configurable"); + a(o2.other, 'other', "Own kept"); + + x = {}; + t(x, o2); + try { t(x, o1); } catch (ignore) {} + + a(x.visible, z, "Enumerable"); + a(x.hidden, 'hidden', "Not Enumerable"); + a(x.propertyIsEnumerable('visible'), true, "Enumerable is enumerable"); + a(x.propertyIsEnumerable('hidden'), false, + "Not enumerable is not enumerable"); + + a(x.inherited, true, "Extend deep"); + + a(x.nonremovable, y, "Ignored non configurable"); + a(x.other, 'other', "Other"); + + x.visible = 3; + a(x.visible, 3, "Writable is writable"); + + x = {}; + t(x, o1); + a.throws(function () { + x.hidden = 3; + }, "Not writable is not writable"); + + x = {}; + t(x, o1); + delete x.visible; + a.ok(!x.hasOwnProperty('visible'), "Configurable is configurable"); + + x = {}; + t(x, o1); + a.throws(function () { + delete x.hidden; + }, "Not configurable is not configurable"); + + x = Object.defineProperty({}, 'foo', + { configurable: false, writable: true, enumerable: false, value: 'bar' }); + + try { t(x, { foo: 'lorem' }); } catch (ignore) {} + a(x.foo, 'bar', "Writable, not enumerable"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin.js new file mode 100644 index 0000000..866005b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/mixin.js @@ -0,0 +1,69 @@ +'use strict'; + +module.exports = function (t, a) { + var o, o1, o2, x, y = {}, z = {}; + o = { inherited: true }; + o1 = Object.create(o); + o1.visible = z; + o1.nonremovable = 'raz'; + Object.defineProperty(o1, 'hidden', { value: 'hidden' }); + + o2 = Object.defineProperties({}, { nonremovable: { value: y } }); + o2.other = 'other'; + + try { t(o2, o1); } catch (ignore) {} + + a(o2.visible, z, "Enumerable"); + a(o1.hidden, 'hidden', "Not Enumerable"); + a(o2.propertyIsEnumerable('visible'), true, "Enumerable is enumerable"); + a(o2.propertyIsEnumerable('hidden'), false, + "Not enumerable is not enumerable"); + + a(o2.hasOwnProperty('inherited'), false, "Extend only own"); + a(o2.inherited, undefined, "Extend ony own: value"); + + a(o2.nonremovable, y, "Do not overwrite non configurable"); + a(o2.other, 'other', "Own kept"); + + x = {}; + t(x, o2); + try { t(x, o1); } catch (ignore) {} + + a(x.visible, z, "Enumerable"); + a(x.hidden, 'hidden', "Not Enumerable"); + a(x.propertyIsEnumerable('visible'), true, "Enumerable is enumerable"); + a(x.propertyIsEnumerable('hidden'), false, + "Not enumerable is not enumerable"); + + a(x.hasOwnProperty('inherited'), false, "Extend only own"); + a(x.inherited, undefined, "Extend ony own: value"); + + a(x.nonremovable, y, "Ignored non configurable"); + a(x.other, 'other', "Other"); + + x.visible = 3; + a(x.visible, 3, "Writable is writable"); + + x = {}; + t(x, o1); + a.throws(function () { + x.hidden = 3; + }, "Not writable is not writable"); + + x = {}; + t(x, o1); + delete x.visible; + a.ok(!x.hasOwnProperty('visible'), "Configurable is configurable"); + + x = {}; + t(x, o1); + a.throws(function () { + delete x.hidden; + }, "Not configurable is not configurable"); + + x = Object.defineProperty({}, 'foo', + { configurable: false, writable: true, enumerable: false, value: 'bar' }); + + try { t(x, { foo: 'lorem' }); } catch (ignore) {} + a(x.foo, 'bar', "Writable, not enumerable"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/normalize-options.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/normalize-options.js new file mode 100644 index 0000000..0d2d4da --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/normalize-options.js @@ -0,0 +1,32 @@ +'use strict'; + +var create = Object.create, defineProperty = Object.defineProperty; + +module.exports = function (t, a) { + var x = { foo: 'raz', bar: 'dwa' }, y; + y = t(x); + a.not(y, x, "Returns copy"); + a.deep(y, x, "Plain"); + + x = { raz: 'one', dwa: 'two' }; + defineProperty(x, 'get', { + configurable: true, + enumerable: true, + get: function () { return this.dwa; } + }); + x = create(x); + x.trzy = 'three'; + x.cztery = 'four'; + x = create(x); + x.dwa = 'two!'; + x.trzy = 'three!'; + x.piec = 'five'; + x.szesc = 'six'; + + a.deep(t(x), { raz: 'one', dwa: 'two!', trzy: 'three!', cztery: 'four', + piec: 'five', szesc: 'six', get: 'two!' }, "Deep object"); + + a.deep(t({ marko: 'raz', raz: 'foo' }, x, { szesc: 'elo', siedem: 'bibg' }), + { marko: 'raz', raz: 'one', dwa: 'two!', trzy: 'three!', cztery: 'four', + piec: 'five', szesc: 'elo', siedem: 'bibg', get: 'two!' }, "Multiple options"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/primitive-set.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/primitive-set.js new file mode 100644 index 0000000..839857e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/primitive-set.js @@ -0,0 +1,15 @@ +'use strict'; + +var getPropertyNames = require('../../object/get-property-names') + , isPlainObject = require('../../object/is-plain-object'); + +module.exports = function (t, a) { + var x = t(); + a(isPlainObject(x), true, "Plain object"); + a.deep(getPropertyNames(x), [], "No properties"); + x.foo = 'bar'; + a.deep(getPropertyNames(x), ['foo'], "Extensible"); + + a.deep(t('raz', 'dwa', 3), { raz: true, dwa: true, 3: true }, + "Arguments handling"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/safe-traverse.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/safe-traverse.js new file mode 100644 index 0000000..d30cdef --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/safe-traverse.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = function (t, a) { + var obj = { foo: { bar: { lorem: 12 } } }; + a(t(obj), obj, "No props"); + a(t(obj, 'foo'), obj.foo, "One"); + a(t(obj, 'raz'), undefined, "One: Fail"); + a(t(obj, 'foo', 'bar'), obj.foo.bar, "Two"); + a(t(obj, 'dsd', 'raz'), undefined, "Two: Fail #1"); + a(t(obj, 'foo', 'raz'), undefined, "Two: Fail #2"); + a(t(obj, 'foo', 'bar', 'lorem'), obj.foo.bar.lorem, "Three"); + a(t(obj, 'dsd', 'raz', 'fef'), undefined, "Three: Fail #1"); + a(t(obj, 'foo', 'raz', 'asdf'), undefined, "Three: Fail #2"); + a(t(obj, 'foo', 'bar', 'asd'), undefined, "Three: Fail #3"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/serialize.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/serialize.js new file mode 100644 index 0000000..43eed6a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/serialize.js @@ -0,0 +1,25 @@ +'use strict'; + +module.exports = function (t, a) { + var fn = function (raz, dwa) { return raz + dwa; }; + a(t(), 'undefined', "Undefined"); + a(t(null), 'null', "Null"); + a(t(null), 'null', "Null"); + a(t('raz'), '"raz"', "String"); + a(t('raz"ddwa\ntrzy'), '"raz\\"ddwa\\ntrzy"', "String with escape"); + a(t(false), 'false', "Booelean"); + a(t(fn), String(fn), "Function"); + + a(t(/raz-dwa/g), '/raz-dwa/g', "RegExp"); + a(t(new Date(1234567)), 'new Date(1234567)', "Date"); + a(t([]), '[]', "Empty array"); + a(t([undefined, false, null, 'raz"ddwa\ntrzy', fn, /raz/g, new Date(1234567), ['foo']]), + '[undefined,false,null,"raz\\"ddwa\\ntrzy",' + String(fn) + + ',/raz/g,new Date(1234567),["foo"]]', "Rich Array"); + a(t({}), '{}', "Empty object"); + a(t({ raz: undefined, dwa: false, trzy: null, cztery: 'raz"ddwa\ntrzy', piec: fn, szesc: /raz/g, + siedem: new Date(1234567), osiem: ['foo', 32], dziewiec: { foo: 'bar', dwa: 343 } }), + '{"raz":undefined,"dwa":false,"trzy":null,"cztery":"raz\\"ddwa\\ntrzy","piec":' + String(fn) + + ',"szesc":/raz/g,"siedem":new Date(1234567),"osiem":["foo",32],' + + '"dziewiec":{"foo":"bar","dwa":343}}', "Rich object"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/implement.js new file mode 100644 index 0000000..30b2ac4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +var create = require('../../../object/create') + , isImplemented = require('../../../object/set-prototype-of/is-implemented'); + +module.exports = function (a) { a(isImplemented(create), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/index.js new file mode 100644 index 0000000..aec2605 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var create = require('../../../object/create') + + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (t, a) { + var x = {}, y = {}; + + if (t === null) return; + a(t(x, y), x, "Return self object"); + a(getPrototypeOf(x), y, "Object"); + a.throws(function () { t(x); }, TypeError, "Undefined"); + a.throws(function () { t('foo'); }, TypeError, "Primitive"); + a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null"); + x = create(null); + a.h1("Change null prototype"); + a(t(x, y), x, "Result"); + a(getPrototypeOf(x), y, "Prototype"); + a.h1("Set null prototype"); + a(t(y, null), y, "Result"); + a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/shim.js new file mode 100644 index 0000000..aec2605 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of/shim.js @@ -0,0 +1,23 @@ +'use strict'; + +var create = require('../../../object/create') + + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (t, a) { + var x = {}, y = {}; + + if (t === null) return; + a(t(x, y), x, "Return self object"); + a(getPrototypeOf(x), y, "Object"); + a.throws(function () { t(x); }, TypeError, "Undefined"); + a.throws(function () { t('foo'); }, TypeError, "Primitive"); + a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null"); + x = create(null); + a.h1("Change null prototype"); + a(t(x, y), x, "Result"); + a(getPrototypeOf(x), y, "Prototype"); + a.h1("Set null prototype"); + a(t(y, null), y, "Result"); + a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/some.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/some.js new file mode 100644 index 0000000..490431e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/some.js @@ -0,0 +1,23 @@ +'use strict'; + +var o = { 1: 1, 2: 2, 3: 3 }; + +module.exports = function (t, a) { + var o2 = {}, i = 0; + t(o, function (value, name) { + o2[name] = value; + return false; + }); + a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); + + a(t(o, function () { + ++i; + return true; + }), true, "Succeeds"); + a(i, 1, "Stops iteration after condition is met"); + + a(t(o, function () { + return false; + }), false, "Fails"); + +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/to-array.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/to-array.js new file mode 100644 index 0000000..1f4beef --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/to-array.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = function (t, a) { + var o = { 1: 1, 2: 2, 3: 3 }, o1 = {} + , o2 = t(o, function (value, name, self) { + a(self, o, "Self"); + a(this, o1, "Scope"); + return value + Number(name); + }, o1); + a.deep(o2, [2, 4, 6]); + + t(o).sort().forEach(function (item) { + a.deep(item, [item[0], o[item[0]]], "Default"); + }); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/unserialize.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/unserialize.js new file mode 100644 index 0000000..405eef1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/unserialize.js @@ -0,0 +1,24 @@ +'use strict'; + +module.exports = function (t, a) { + var fn = function (raz, dwa) { return raz + dwa; }; + a(t('undefined'), undefined, "Undefined"); + a(t('null'), null, "Null"); + a(t('"raz"'), 'raz', "String"); + a(t('"raz\\"ddwa\\ntrzy"'), 'raz"ddwa\ntrzy', "String with escape"); + a(t('false'), false, "Booelean"); + a(String(t(String(fn))), String(fn), "Function"); + + a.deep(t('/raz-dwa/g'), /raz-dwa/g, "RegExp"); + a.deep(t('new Date(1234567)'), new Date(1234567), "Date"); + a.deep(t('[]'), [], "Empty array"); + a.deep(t('[undefined,false,null,"raz\\"ddwa\\ntrzy",/raz/g,new Date(1234567),["foo"]]'), + [undefined, false, null, 'raz"ddwa\ntrzy', /raz/g, new Date(1234567), ['foo']], "Rich Array"); + a.deep(t('{}'), {}, "Empty object"); + a.deep(t('{"raz":undefined,"dwa":false,"trzy":null,"cztery":"raz\\"ddwa\\ntrzy",' + + '"szesc":/raz/g,"siedem":new Date(1234567),"osiem":["foo",32],' + + '"dziewiec":{"foo":"bar","dwa":343}}'), + { raz: undefined, dwa: false, trzy: null, cztery: 'raz"ddwa\ntrzy', szesc: /raz/g, + siedem: new Date(1234567), osiem: ['foo', 32], dziewiec: { foo: 'bar', dwa: 343 } }, + "Rich object"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-callable.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-callable.js new file mode 100644 index 0000000..b40540b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-callable.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (t, a) { + var f = function () {}; + a(t(f), f, "Function"); + a.throws(function () { + t({}); + }, "Not Function"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-object.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-object.js new file mode 100644 index 0000000..eaa8e7b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-object.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = function (t, a) { + var x; + a.throws(function () { t(0); }, TypeError, "0"); + a.throws(function () { t(false); }, TypeError, "false"); + a.throws(function () { t(''); }, TypeError, "''"); + a(t(x = {}), x, "Object"); + a(t(x = function () {}), x, "Function"); + a(t(x = new String('raz')), x, "String object"); //jslint: ignore + a(t(x = new Date()), x, "Date"); + + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "null"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-value.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-value.js new file mode 100644 index 0000000..f1eeafa --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/valid-value.js @@ -0,0 +1,19 @@ +'use strict'; + +var numIsNaN = require('../../number/is-nan'); + +module.exports = function (t, a) { + var x; + a(t(0), 0, "0"); + a(t(false), false, "false"); + a(t(''), '', "''"); + a(numIsNaN(t(NaN)), true, "NaN"); + a(t(x = {}), x, "{}"); + + a.throws(function () { + t(); + }, "Undefined"); + a.throws(function () { + t(null); + }, "null"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like-object.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like-object.js new file mode 100644 index 0000000..2f3e31b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like-object.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = function (t, a) { + var x; + a.throws(function () { t(0); }, TypeError, "0"); + a.throws(function () { t(false); }, TypeError, "false"); + a.throws(function () { t(''); }, TypeError, "String"); + a.throws(function () { t({}); }, TypeError, "Plain Object"); + a.throws(function () { t(function () {}); }, TypeError, "Function"); + a(t(x = new String('raz')), x, "String object"); //jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "null"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like.js new file mode 100644 index 0000000..53bd112 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-array-like.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = function (t, a) { + var x; + a.throws(function () { t(0); }, TypeError, "0"); + a.throws(function () { t(false); }, TypeError, "false"); + a(t(''), '', "''"); + a.throws(function () { t({}); }, TypeError, "Plain Object"); + a.throws(function () { t(function () {}); }, TypeError, "Function"); + a(t(x = new String('raz')), x, "String object"); //jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "null"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable-value.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable-value.js new file mode 100644 index 0000000..ae9bd17 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable-value.js @@ -0,0 +1,16 @@ +'use strict'; + +module.exports = function (t, a) { + var x; + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Null"); + a(t(0), "0"); + a(t(false), "false"); + a(t(''), ""); + a(t({}), String({}), "Object"); + a(t(x = function () {}), String(x), "Function"); + a(t(x = new String('raz')), String(x), "String object"); //jslint: ignore + a(t(x = new Date()), String(x), "Date"); + + a.throws(function () { t(Object.create(null)); }, TypeError, "Null prototype object"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable.js new file mode 100644 index 0000000..4a46bb5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/validate-stringifiable.js @@ -0,0 +1,16 @@ +'use strict'; + +module.exports = function (t, a) { + var x; + a(t(), 'undefined', "Undefined"); + a(t(null), 'null', "Null"); + a(t(0), "0"); + a(t(false), "false"); + a(t(''), ""); + a(t({}), String({}), "Object"); + a(t(x = function () {}), String(x), "Function"); + a(t(x = new String('raz')), String(x), "String object"); //jslint: ignore + a(t(x = new Date()), String(x), "Date"); + + a.throws(function () { t(Object.create(null)); }, TypeError, "Null prototype object"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/index.js new file mode 100644 index 0000000..ca2bd65 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/index.js @@ -0,0 +1,12 @@ +'use strict'; + +var indexTest = require('tad/lib/utils/index-test') + + , path = require('path').resolve(__dirname, '../../../reg-exp/#'); + +module.exports = function (t, a, d) { + indexTest(indexTest.readDir(path).aside(function (data) { + delete data.sticky; + delete data.unicode; + }))(t, a, d); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-sticky.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-sticky.js new file mode 100644 index 0000000..e154ac2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-sticky.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + var re; + a(t.call(/raz/), false, "Normal"); + a(t.call(/raz/g), false, "Global"); + try { re = new RegExp('raz', 'y'); } catch (ignore) {} + if (!re) return; + a(t.call(re), true, "Sticky"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-unicode.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-unicode.js new file mode 100644 index 0000000..2ffb9e8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/is-unicode.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function (t, a) { + var re; + a(t.call(/raz/), false, "Normal"); + a(t.call(/raz/g), false, "Global"); + try { re = new RegExp('raz', 'u'); } catch (ignore) {} + if (!re) return; + a(t.call(re), true, "Unicode"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/implement.js new file mode 100644 index 0000000..89825a4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../reg-exp/#/match/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/shim.js new file mode 100644 index 0000000..5249139 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match/shim.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function (t, a) { + var result = ['foo']; + result.index = 0; + result.input = 'foobar'; + a.deep(t.call(/foo/, 'foobar'), result); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/implement.js new file mode 100644 index 0000000..c32b23a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../reg-exp/#/replace/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/shim.js new file mode 100644 index 0000000..2b378fd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace/shim.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call(/foo/, 'foobar', 'mar'), 'marbar'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/implement.js new file mode 100644 index 0000000..ff1b808 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../reg-exp/#/search/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/shim.js new file mode 100644 index 0000000..596bcdb --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search/shim.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call(/foo/, 'barfoo'), 3); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/implement.js new file mode 100644 index 0000000..1cee441 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../reg-exp/#/split/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/shim.js new file mode 100644 index 0000000..6a95cd0 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split/shim.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a.deep(t.call(/\|/, 'bar|foo'), ['bar', 'foo']); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js new file mode 100644 index 0000000..d94e7b9 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../reg-exp/#/sticky/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js new file mode 100644 index 0000000..9b1aa0f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../reg-exp/#/unicode/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/escape.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/escape.js new file mode 100644 index 0000000..5b00f67 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/escape.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (t, a) { + var str = "(?:^te|er)s{2}t\\[raz]+$"; + a(RegExp('^' + t(str) + '$').test(str), true); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/is-reg-exp.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/is-reg-exp.js new file mode 100644 index 0000000..785ca28 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/is-reg-exp.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function (t, a) { + a(t('arar'), false, "String"); + a(t(12), false, "Number"); + a(t(true), false, "Boolean"); + a(t(new Date()), false, "Date"); + a(t(new String('raz')), false, "String object"); + a(t({}), false, "Plain object"); + a(t(/a/), true, "Regular expression"); + a(t(new RegExp('a')), true, "Regular expression via constructor"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js new file mode 100644 index 0000000..cd12cf1 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/valid-reg-exp.js @@ -0,0 +1,17 @@ +'use strict'; + +module.exports = function (t, a) { + var r = /raz/; + a(t(r), r, "Direct"); + r = new RegExp('foo'); + a(t(r), r, "Constructor"); + a.throws(function () { + t({}); + }, "Object"); + a.throws(function () { + t(function () {}); + }, "Function"); + a.throws(function () { + t({ exec: function () { return 20; } }); + }, "Plain object"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/implement.js new file mode 100644 index 0000000..09bf336 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../string/#/@@iterator/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/shim.js new file mode 100644 index 0000000..3b0e0b7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator/shim.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (t, a) { + var it = t.call('r💩z'); + a.deep(it.next(), { done: false, value: 'r' }, "#1"); + a.deep(it.next(), { done: false, value: '💩' }, "#2"); + a.deep(it.next(), { done: false, value: 'z' }, "#3"); + a.deep(it.next(), { done: true, value: undefined }, "End"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/at.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/at.js new file mode 100644 index 0000000..2447a9f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/at.js @@ -0,0 +1,97 @@ +// See tests at https://github.com/mathiasbynens/String.prototype.at + +'use strict'; + +module.exports = function (t, a) { + a(t.length, 1, "Length"); + + a.h1("BMP"); + a(t.call('abc\uD834\uDF06def', -Infinity), '', "-Infinity"); + a(t.call('abc\uD834\uDF06def', -1), '', "-1"); + a(t.call('abc\uD834\uDF06def', -0), 'a', "-0"); + a(t.call('abc\uD834\uDF06def', +0), 'a', "+0"); + a(t.call('abc\uD834\uDF06def', 1), 'b', "1"); + a(t.call('abc\uD834\uDF06def', 3), '\uD834\uDF06', "3"); + a(t.call('abc\uD834\uDF06def', 4), '\uDF06', "4"); + a(t.call('abc\uD834\uDF06def', 5), 'd', "5"); + a(t.call('abc\uD834\uDF06def', 42), '', "42"); + a(t.call('abc\uD834\uDF06def', +Infinity), '', "+Infinity"); + a(t.call('abc\uD834\uDF06def', null), 'a', "null"); + a(t.call('abc\uD834\uDF06def', undefined), 'a', "undefined"); + a(t.call('abc\uD834\uDF06def'), 'a', "No argument"); + a(t.call('abc\uD834\uDF06def', false), 'a', "false"); + a(t.call('abc\uD834\uDF06def', NaN), 'a', "NaN"); + a(t.call('abc\uD834\uDF06def', ''), 'a', "Empty string"); + a(t.call('abc\uD834\uDF06def', '_'), 'a', "_"); + a(t.call('abc\uD834\uDF06def', '1'), 'b', "'1'"); + a(t.call('abc\uD834\uDF06def', []), 'a', "[]"); + a(t.call('abc\uD834\uDF06def', {}), 'a', "{}"); + a(t.call('abc\uD834\uDF06def', -0.9), 'a', "-0.9"); + a(t.call('abc\uD834\uDF06def', 1.9), 'b', "1.9"); + a(t.call('abc\uD834\uDF06def', 7.9), 'f', "7.9"); + a(t.call('abc\uD834\uDF06def', Math.pow(2, 32)), '', "Big number"); + + a.h1("Astral symbol"); + a(t.call('\uD834\uDF06def', -Infinity), '', "-Infinity"); + a(t.call('\uD834\uDF06def', -1), '', "-1"); + a(t.call('\uD834\uDF06def', -0), '\uD834\uDF06', "-0"); + a(t.call('\uD834\uDF06def', +0), '\uD834\uDF06', "+0"); + a(t.call('\uD834\uDF06def', 1), '\uDF06', "1"); + a(t.call('\uD834\uDF06def', 2), 'd', "2"); + a(t.call('\uD834\uDF06def', 3), 'e', "3"); + a(t.call('\uD834\uDF06def', 4), 'f', "4"); + a(t.call('\uD834\uDF06def', 42), '', "42"); + a(t.call('\uD834\uDF06def', +Infinity), '', "+Infinity"); + a(t.call('\uD834\uDF06def', null), '\uD834\uDF06', "null"); + a(t.call('\uD834\uDF06def', undefined), '\uD834\uDF06', "undefined"); + a(t.call('\uD834\uDF06def'), '\uD834\uDF06', "No arguments"); + a(t.call('\uD834\uDF06def', false), '\uD834\uDF06', "false"); + a(t.call('\uD834\uDF06def', NaN), '\uD834\uDF06', "NaN"); + a(t.call('\uD834\uDF06def', ''), '\uD834\uDF06', "Empty string"); + a(t.call('\uD834\uDF06def', '_'), '\uD834\uDF06', "_"); + a(t.call('\uD834\uDF06def', '1'), '\uDF06', "'1'"); + + a.h1("Lone high surrogates"); + a(t.call('\uD834abc', -Infinity), '', "-Infinity"); + a(t.call('\uD834abc', -1), '', "-1"); + a(t.call('\uD834abc', -0), '\uD834', "-0"); + a(t.call('\uD834abc', +0), '\uD834', "+0"); + a(t.call('\uD834abc', 1), 'a', "1"); + a(t.call('\uD834abc', 42), '', "42"); + a(t.call('\uD834abc', +Infinity), '', "Infinity"); + a(t.call('\uD834abc', null), '\uD834', "null"); + a(t.call('\uD834abc', undefined), '\uD834', "undefined"); + a(t.call('\uD834abc'), '\uD834', "No arguments"); + a(t.call('\uD834abc', false), '\uD834', "false"); + a(t.call('\uD834abc', NaN), '\uD834', "NaN"); + a(t.call('\uD834abc', ''), '\uD834', "Empty string"); + a(t.call('\uD834abc', '_'), '\uD834', "_"); + a(t.call('\uD834abc', '1'), 'a', "'a'"); + + a.h1("Lone low surrogates"); + a(t.call('\uDF06abc', -Infinity), '', "-Infinity"); + a(t.call('\uDF06abc', -1), '', "-1"); + a(t.call('\uDF06abc', -0), '\uDF06', "-0"); + a(t.call('\uDF06abc', +0), '\uDF06', "+0"); + a(t.call('\uDF06abc', 1), 'a', "1"); + a(t.call('\uDF06abc', 42), '', "42"); + a(t.call('\uDF06abc', +Infinity), '', "+Infinity"); + a(t.call('\uDF06abc', null), '\uDF06', "null"); + a(t.call('\uDF06abc', undefined), '\uDF06', "undefined"); + a(t.call('\uDF06abc'), '\uDF06', "No arguments"); + a(t.call('\uDF06abc', false), '\uDF06', "false"); + a(t.call('\uDF06abc', NaN), '\uDF06', "NaN"); + a(t.call('\uDF06abc', ''), '\uDF06', "Empty string"); + a(t.call('\uDF06abc', '_'), '\uDF06', "_"); + a(t.call('\uDF06abc', '1'), 'a', "'1'"); + + a.h1("Context"); + a.throws(function () { t.call(undefined); }, TypeError, "Undefined"); + a.throws(function () { t.call(undefined, 4); }, TypeError, + "Undefined + argument"); + a.throws(function () { t.call(null); }, TypeError, "Null"); + a.throws(function () { t.call(null, 4); }, TypeError, "Null + argument"); + a(t.call(42, 0), '4', "Number #1"); + a(t.call(42, 1), '2', "Number #2"); + a(t.call({ toString: function () { return 'abc'; } }, 2), 'c', "Object"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/camel-to-hyphen.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/camel-to-hyphen.js new file mode 100644 index 0000000..8b47a81 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/camel-to-hyphen.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call('razDwaTRzy4yFoo45My'), 'raz-dwa-t-rzy4y-foo45-my'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/capitalize.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/capitalize.js new file mode 100644 index 0000000..fa11ff8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/capitalize.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call('raz'), 'Raz', "Word"); + a(t.call('BLA'), 'BLA', "Uppercase"); + a(t.call(''), '', "Empty"); + a(t.call('a'), 'A', "One letter"); + a(t.call('this is a test'), 'This is a test', "Sentence"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/case-insensitive-compare.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/case-insensitive-compare.js new file mode 100644 index 0000000..01a90c3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/case-insensitive-compare.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call("AA", "aa"), 0, "Same"); + a.ok(t.call("Amber", "zebra") < 0, "Less"); + a.ok(t.call("Zebra", "amber") > 0, "Greater"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/implement.js new file mode 100644 index 0000000..5e33cd7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/implement.js @@ -0,0 +1,6 @@ +'use strict'; + +var isImplemented = + require('../../../../string/#/code-point-at/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/shim.js new file mode 100644 index 0000000..0df4751 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at/shim.js @@ -0,0 +1,81 @@ +// Taken from: https://github.com/mathiasbynens/String.prototype.codePointAt +// /blob/master/tests/tests.js + +'use strict'; + +module.exports = function (t, a) { + a(t.length, 1, "Length"); + + // String that starts with a BMP symbol + a(t.call('abc\uD834\uDF06def', ''), 0x61); + a(t.call('abc\uD834\uDF06def', '_'), 0x61); + a(t.call('abc\uD834\uDF06def'), 0x61); + a(t.call('abc\uD834\uDF06def', -Infinity), undefined); + a(t.call('abc\uD834\uDF06def', -1), undefined); + a(t.call('abc\uD834\uDF06def', -0), 0x61); + a(t.call('abc\uD834\uDF06def', 0), 0x61); + a(t.call('abc\uD834\uDF06def', 3), 0x1D306); + a(t.call('abc\uD834\uDF06def', 4), 0xDF06); + a(t.call('abc\uD834\uDF06def', 5), 0x64); + a(t.call('abc\uD834\uDF06def', 42), undefined); + a(t.call('abc\uD834\uDF06def', Infinity), undefined); + a(t.call('abc\uD834\uDF06def', Infinity), undefined); + a(t.call('abc\uD834\uDF06def', NaN), 0x61); + a(t.call('abc\uD834\uDF06def', false), 0x61); + a(t.call('abc\uD834\uDF06def', null), 0x61); + a(t.call('abc\uD834\uDF06def', undefined), 0x61); + + // String that starts with an astral symbol + a(t.call('\uD834\uDF06def', ''), 0x1D306); + a(t.call('\uD834\uDF06def', '1'), 0xDF06); + a(t.call('\uD834\uDF06def', '_'), 0x1D306); + a(t.call('\uD834\uDF06def'), 0x1D306); + a(t.call('\uD834\uDF06def', -1), undefined); + a(t.call('\uD834\uDF06def', -0), 0x1D306); + a(t.call('\uD834\uDF06def', 0), 0x1D306); + a(t.call('\uD834\uDF06def', 1), 0xDF06); + a(t.call('\uD834\uDF06def', 42), undefined); + a(t.call('\uD834\uDF06def', false), 0x1D306); + a(t.call('\uD834\uDF06def', null), 0x1D306); + a(t.call('\uD834\uDF06def', undefined), 0x1D306); + + // Lone high surrogates + a(t.call('\uD834abc', ''), 0xD834); + a(t.call('\uD834abc', '_'), 0xD834); + a(t.call('\uD834abc'), 0xD834); + a(t.call('\uD834abc', -1), undefined); + a(t.call('\uD834abc', -0), 0xD834); + a(t.call('\uD834abc', 0), 0xD834); + a(t.call('\uD834abc', false), 0xD834); + a(t.call('\uD834abc', NaN), 0xD834); + a(t.call('\uD834abc', null), 0xD834); + a(t.call('\uD834abc', undefined), 0xD834); + + // Lone low surrogates + a(t.call('\uDF06abc', ''), 0xDF06); + a(t.call('\uDF06abc', '_'), 0xDF06); + a(t.call('\uDF06abc'), 0xDF06); + a(t.call('\uDF06abc', -1), undefined); + a(t.call('\uDF06abc', -0), 0xDF06); + a(t.call('\uDF06abc', 0), 0xDF06); + a(t.call('\uDF06abc', false), 0xDF06); + a(t.call('\uDF06abc', NaN), 0xDF06); + a(t.call('\uDF06abc', null), 0xDF06); + a(t.call('\uDF06abc', undefined), 0xDF06); + + a.throws(function () { t.call(undefined); }, TypeError); + a.throws(function () { t.call(undefined, 4); }, TypeError); + a.throws(function () { t.call(null); }, TypeError); + a.throws(function () { t.call(null, 4); }, TypeError); + a(t.call(42, 0), 0x34); + a(t.call(42, 1), 0x32); + a(t.call({ toString: function () { return 'abc'; } }, 2), 0x63); + + a.throws(function () { t.apply(undefined); }, TypeError); + a.throws(function () { t.apply(undefined, [4]); }, TypeError); + a.throws(function () { t.apply(null); }, TypeError); + a.throws(function () { t.apply(null, [4]); }, TypeError); + a(t.apply(42, [0]), 0x34); + a(t.apply(42, [1]), 0x32); + a(t.apply({ toString: function () { return 'abc'; } }, [2]), 0x63); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/implement.js new file mode 100644 index 0000000..220f50d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../string/#/contains/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/shim.js new file mode 100644 index 0000000..a0ea4db --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call('raz', ''), true, "Empty"); + a(t.call('', ''), true, "Both Empty"); + a(t.call('raz', 'raz'), true, "Same"); + a(t.call('razdwa', 'raz'), true, "Starts with"); + a(t.call('razdwa', 'dwa'), true, "Ends with"); + a(t.call('razdwa', 'zdw'), true, "In middle"); + a(t.call('', 'raz'), false, "Something in empty"); + a(t.call('az', 'raz'), false, "Longer"); + a(t.call('azasdfasdf', 'azff'), false, "Not found"); + a(t.call('razdwa', 'raz', 1), false, "Position"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/implement.js new file mode 100644 index 0000000..93bd2dd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../string/#/ends-with/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/shim.js new file mode 100644 index 0000000..e4b93c4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with/shim.js @@ -0,0 +1,16 @@ +// In some parts copied from: +// http://closure-library.googlecode.com/svn/trunk/closure/goog/ +// string/string_test.html + +'use strict'; + +module.exports = function (t, a) { + a(t.call('abc', ''), true, "Empty needle"); + a(t.call('abcd', 'cd'), true, "Ends with needle"); + a(t.call('abcd', 'abcd'), true, "Needle equals haystack"); + a(t.call('abcd', 'ab'), false, "Doesn't end with needle"); + a(t.call('abc', 'defg'), false, "Length trick"); + a(t.call('razdwa', 'zd', 3), false, "Position: false"); + a(t.call('razdwa', 'zd', 4), true, "Position: true"); + a(t.call('razdwa', 'zd', 5), false, "Position: false #2"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/hyphen-to-camel.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/hyphen-to-camel.js new file mode 100644 index 0000000..bd7ded4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/hyphen-to-camel.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call('raz-dwa-t-rzy-4y-rtr4-tiu-45-pa'), 'razDwaTRzy4yRtr4Tiu45Pa'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/indent.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/indent.js new file mode 100644 index 0000000..eb92b36 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/indent.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call('ra\nzz', ''), 'ra\nzz', "Empty"); + a(t.call('ra\nzz', '\t', 3), '\t\t\tra\n\t\t\tzz', "String repeat"); + a(t.call('ra\nzz\nsss\nfff\n', '\t'), '\tra\n\tzz\n\tsss\n\tfff\n', + "Multi-line"); + a(t.call('ra\n\nzz\n', '\t'), '\tra\n\n\tzz\n', "Don't touch empty lines"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/last.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/last.js new file mode 100644 index 0000000..ad36a21 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/last.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call(''), null, "Null"); + a(t.call('abcdef'), 'f', "String"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/_data.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/_data.js new file mode 100644 index 0000000..c741add --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/_data.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t[0], 'object'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/implement.js new file mode 100644 index 0000000..4886c9b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../string/#/normalize/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/shim.js new file mode 100644 index 0000000..28e27f5 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize/shim.js @@ -0,0 +1,13 @@ +// Taken from: https://github.com/walling/unorm/blob/master/test/es6-shim.js + +'use strict'; + +var str = 'äiti'; + +module.exports = function (t, a) { + a(t.call(str), "\u00e4iti"); + a(t.call(str, "NFC"), "\u00e4iti"); + a(t.call(str, "NFD"), "a\u0308iti"); + a(t.call(str, "NFKC"), "\u00e4iti"); + a(t.call(str, "NFKD"), "a\u0308iti"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/pad.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/pad.js new file mode 100644 index 0000000..28c3fca --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/pad.js @@ -0,0 +1,24 @@ +'use strict'; + +var partial = require('../../../function/#/partial'); + +module.exports = { + Left: function (t, a) { + t = partial.call(t, 'x', 5); + + a(t.call('yy'), 'xxxyy'); + a(t.call(''), 'xxxxx', "Empty string"); + + a(t.call('yyyyy'), 'yyyyy', 'Equal length'); + a(t.call('yyyyyyy'), 'yyyyyyy', 'Longer'); + }, + Right: function (t, a) { + t = partial.call(t, 'x', -5); + + a(t.call('yy'), 'yyxxx'); + a(t.call(''), 'xxxxx', "Empty string"); + + a(t.call('yyyyy'), 'yyyyy', 'Equal length'); + a(t.call('yyyyyyy'), 'yyyyyyy', 'Longer'); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace-all.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace-all.js new file mode 100644 index 0000000..a425c87 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace-all.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call('razdwatrzy', 'dwa', 'olera'), 'razoleratrzy', "Basic"); + a(t.call('razdwatrzy', 'dwa', 'ole$&a'), 'razole$&atrzy', "Inserts"); + a(t.call('razdwa', 'ola', 'sdfs'), 'razdwa', "No replace"); + + a(t.call('$raz$$dwa$trzy$', '$', '&&'), '&&raz&&&&dwa&&trzy&&', "Multi"); + a(t.call('$raz$$dwa$$$$trzy$', '$$', '&'), '$raz&dwa&&trzy$', + "Multi many chars"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace.js new file mode 100644 index 0000000..54522ed --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/plain-replace.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call('razdwatrzy', 'dwa', 'olera'), 'razoleratrzy', "Basic"); + a(t.call('razdwatrzy', 'dwa', 'ole$&a'), 'razole$&atrzy', "Inserts"); + a(t.call('razdwa', 'ola', 'sdfs'), 'razdwa', "No replace"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/implement.js new file mode 100644 index 0000000..7ff65a8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../string/#/repeat/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/shim.js new file mode 100644 index 0000000..7e0d077 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat/shim.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function (t, a) { + a(t.call('a', 0), '', "Empty"); + a(t.call('a', 1), 'a', "1"); + a(t.call('\t', 5), '\t\t\t\t\t', "Whitespace"); + a(t.call('raz', 3), 'razrazraz', "Many chars"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/implement.js new file mode 100644 index 0000000..fc8490f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../../string/#/starts-with/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/shim.js new file mode 100644 index 0000000..e0e123b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with/shim.js @@ -0,0 +1,14 @@ +// Inspired and in some parts copied from: +// http://closure-library.googlecode.com/svn/trunk/closure/goog +// /string/string_test.html + +'use strict'; + +module.exports = function (t, a) { + a(t.call('abc', ''), true, "Empty needle"); + a(t.call('abcd', 'ab'), true, "Starts with needle"); + a(t.call('abcd', 'abcd'), true, "Needle equals haystack"); + a(t.call('abcd', 'bcde', 1), false, "Needle larger than haystack"); + a(!t.call('abcd', 'cd'), true, "Doesn't start with needle"); + a(t.call('abcd', 'bc', 1), true, "Position"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/format-method.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/format-method.js new file mode 100644 index 0000000..bb5561e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/format-method.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function (t, a) { + t = t({ a: 'A', aa: 'B', ab: 'C', b: 'D', + c: function () { return ++this.a; } }); + a(t.call({ a: 0 }, ' %a%aab%abb%b\\%aa%ab%c%c '), ' ABbCbD%aaC12 '); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/implement.js new file mode 100644 index 0000000..0aceb97 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../string/from-code-point/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/shim.js new file mode 100644 index 0000000..88cda3d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point/shim.js @@ -0,0 +1,47 @@ +// Taken from: https://github.com/mathiasbynens/String.fromCodePoint/blob/master +// /tests/tests.js + +'use strict'; + +var pow = Math.pow; + +module.exports = function (t, a) { + var counter, result; + + a(t.length, 1, "Length"); + a(String.propertyIsEnumerable('fromCodePoint'), false, "Not enumerable"); + + a(t(''), '\0', "Empty string"); + a(t(), '', "No arguments"); + a(t(-0), '\0', "-0"); + a(t(0), '\0', "0"); + a(t(0x1D306), '\uD834\uDF06', "Unicode"); + a(t(0x1D306, 0x61, 0x1D307), '\uD834\uDF06a\uD834\uDF07', "Complex unicode"); + a(t(0x61, 0x62, 0x1D307), 'ab\uD834\uDF07', "Complex"); + a(t(false), '\0', "false"); + a(t(null), '\0', "null"); + + a.throws(function () { t('_'); }, RangeError, "_"); + a.throws(function () { t(Infinity); }, RangeError, "Infinity"); + a.throws(function () { t(-Infinity); }, RangeError, "-Infinity"); + a.throws(function () { t(-1); }, RangeError, "-1"); + a.throws(function () { t(0x10FFFF + 1); }, RangeError, "Range error #1"); + a.throws(function () { t(3.14); }, RangeError, "Range error #2"); + a.throws(function () { t(3e-2); }, RangeError, "Range error #3"); + a.throws(function () { t(-Infinity); }, RangeError, "Range error #4"); + a.throws(function () { t(+Infinity); }, RangeError, "Range error #5"); + a.throws(function () { t(NaN); }, RangeError, "Range error #6"); + a.throws(function () { t(undefined); }, RangeError, "Range error #7"); + a.throws(function () { t({}); }, RangeError, "Range error #8"); + a.throws(function () { t(/re/); }, RangeError, "Range error #9"); + + counter = pow(2, 15) * 3 / 2; + result = []; + while (--counter >= 0) result.push(0); // one code unit per symbol + t.apply(null, result); // must not throw + + counter = pow(2, 15) * 3 / 2; + result = []; + while (--counter >= 0) result.push(0xFFFF + 1); // two code units per symbol + t.apply(null, result); // must not throw +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/is-string.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/is-string.js new file mode 100644 index 0000000..32f5958 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/is-string.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function (t, a) { + a(t(null), false, "Null"); + a(t(''), true, "Empty string"); + a(t(12), false, "Number"); + a(t(false), false, "Boolean"); + a(t(new Date()), false, "Date"); + a(t(new String('raz')), true, "String object"); + a(t('asdfaf'), true, "String"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/random-uniq.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/random-uniq.js new file mode 100644 index 0000000..6791ac2 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/random-uniq.js @@ -0,0 +1,14 @@ +'use strict'; + +var isValidFormat = RegExp.prototype.test.bind(/^[a-z0-9]+$/); + +module.exports = function (t, a) { + a(typeof t(), 'string'); + a.ok(t().length > 7); + a.not(t(), t()); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); + a.ok(isValidFormat(t())); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/implement.js new file mode 100644 index 0000000..59416de --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/implement.js @@ -0,0 +1,5 @@ +'use strict'; + +var isImplemented = require('../../../string/raw/is-implemented'); + +module.exports = function (a) { a(isImplemented(), true); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/index.js new file mode 100644 index 0000000..2e0bfa3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./shim'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/shim.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/shim.js new file mode 100644 index 0000000..025ed78 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw/shim.js @@ -0,0 +1,15 @@ +// Partially taken from: +// https://github.com/paulmillr/es6-shim/blob/master/test/string.js + +'use strict'; + +module.exports = function (t, a) { + var callSite = []; + + callSite.raw = ["The total is ", " ($", " with tax)"]; + a(t(callSite, '{total}', '{total * 1.01}'), + 'The total is {total} (${total * 1.01} with tax)'); + + callSite.raw = []; + a(t(callSite, '{total}', '{total * 1.01}'), ''); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/#/chain.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/#/chain.js new file mode 100644 index 0000000..6dc1543 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/#/chain.js @@ -0,0 +1,40 @@ +'use strict'; + +var setPrototypeOf = require('es5-ext/object/set-prototype-of') + , d = require('d') + , Iterator = require('../') + , validIterable = require('../valid-iterable') + + , push = Array.prototype.push + , defineProperties = Object.defineProperties + , IteratorChain; + +IteratorChain = function (iterators) { + defineProperties(this, { + __iterators__: d('', iterators), + __current__: d('w', iterators.shift()) + }); +}; +if (setPrototypeOf) setPrototypeOf(IteratorChain, Iterator); + +IteratorChain.prototype = Object.create(Iterator.prototype, { + constructor: d(IteratorChain), + next: d(function () { + var result; + if (!this.__current__) return { done: true, value: undefined }; + result = this.__current__.next(); + while (result.done) { + this.__current__ = this.__iterators__.shift(); + if (!this.__current__) return { done: true, value: undefined }; + result = this.__current__.next(); + } + return result; + }) +}); + +module.exports = function () { + var iterators = [this]; + push.apply(iterators, arguments); + iterators.forEach(validIterable); + return new IteratorChain(iterators); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/.lint b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/.lint new file mode 100644 index 0000000..cf54d81 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/.lint @@ -0,0 +1,11 @@ +@root + +module + +tabs +indent 2 +maxlen 100 + +ass +nomen +plusplus diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/.npmignore b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/.npmignore new file mode 100644 index 0000000..155e41f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/npm-debug.log +/.lintcache diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/.travis.yml b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/.travis.yml new file mode 100644 index 0000000..02c277c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +node_js: + - 0.8 + - 0.10 + - 0.11 + +notifications: + email: + - medikoo+es6-iterator@medikoo.com + +script: "npm test && npm run lint" diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/CHANGES b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/CHANGES new file mode 100644 index 0000000..a2d1ec7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/CHANGES @@ -0,0 +1,28 @@ +v0.1.3 -- 2015.02.02 +* Update dependencies +* Fix spelling of LICENSE + +v0.1.2 -- 2014.11.19 +* Optimise internal `_next` to not verify internal's list length at all times + (#2 thanks @RReverser) +* Fix documentation examples +* Configure lint scripts + +v0.1.1 -- 2014.04.29 +* Fix es6-symbol dependency version + +v0.1.0 -- 2014.04.29 +* Assure strictly npm hosted dependencies +* Remove sparse arrays dedicated handling (as per spec) +* Add: isIterable, validIterable and chain (method) +* Remove toArray, it's addressed by Array.from (polyfil can be found in es5-ext/array/from) +* Add break possiblity to 'forOf' via 'doBreak' function argument +* Provide dedicated iterator for array-likes (ArrayIterator) and for strings (StringIterator) +* Provide @@toStringTag symbol +* When available rely on @@iterator symbol +* Remove 32bit integer maximum list length restriction +* Improve Iterator internals +* Update to use latest version of dependencies + +v0.0.0 -- 2013.10.12 +Initial (dev version)
\ No newline at end of file diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/LICENSE b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/LICENSE new file mode 100644 index 0000000..04724a3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2013-2015 Mariusz Nowak (www.medikoo.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/README.md b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/README.md new file mode 100644 index 0000000..288373d --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/README.md @@ -0,0 +1,148 @@ +# es6-iterator +## ECMAScript 6 Iterator interface + +### Installation + + $ npm install es6-iterator + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## API + +### Constructors + +#### Iterator(list) _(es6-iterator)_ + +Abstract Iterator interface. Meant for extensions and not to be used on its own. + +Accepts any _list_ object (technically object with numeric _length_ property). + +_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_ + +```javascript +var Iterator = require('es6-iterator') +var iterator = new Iterator([1, 2, 3]); + +iterator.next(); // { value: 1, done: false } +iterator.next(); // { value: 2, done: false } +iterator.next(); // { value: 3, done: false } +iterator.next(); // { value: undefined, done: true } +``` + + +#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_ + +Dedicated for arrays and array-likes. Supports three iteration kinds: +* __value__ _(default)_ - Iterates values +* __key__ - Iterates indexes +* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form. + + +```javascript +var ArrayIterator = require('es6-iterator/array') +var iterator = new ArrayIterator([1, 2, 3], 'key+value'); + +iterator.next(); // { value: [0, 1], done: false } +iterator.next(); // { value: [1, 2], done: false } +iterator.next(); // { value: [2, 3], done: false } +iterator.next(); // { value: undefined, done: true } +``` + +May also be used for _arguments_ objects: + +```javascript +(function () { + var iterator = new ArrayIterator(arguments); + + iterator.next(); // { value: 1, done: false } + iterator.next(); // { value: 2, done: false } + iterator.next(); // { value: 3, done: false } + iterator.next(); // { value: undefined, done: true } +}(1, 2, 3)); +``` + +#### StringIterator(str) _(es6-iterator/string)_ + +Assures proper iteration over unicode symbols. +See: http://mathiasbynens.be/notes/javascript-unicode + +```javascript +var StringIterator = require('es6-iterator/string'); +var iterator = new StringIterator('f🙈o🙉o🙊'); + +iterator.next(); // { value: 'f', done: false } +iterator.next(); // { value: '🙈', done: false } +iterator.next(); // { value: 'o', done: false } +iterator.next(); // { value: '🙉', done: false } +iterator.next(); // { value: 'o', done: false } +iterator.next(); // { value: '🙊', done: false } +iterator.next(); // { value: undefined, done: true } +``` + +### Function utilities + +#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_ + +Polyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement. + +``` +var forOf = require('es6-iterator/for-of'); +var result = []; + +forOf('🙈🙉🙊', function (monkey) { result.push(monkey); }); +console.log(result); // ['🙈', '🙉', '🙊']; +``` + +Optionally you can break iteration at any point: + +```javascript +var result = []; + +forOf([1,2,3,4]', function (val, doBreak) { + result.push(monkey); + if (val >= 3) doBreak(); +}); +console.log(result); // [1, 2, 3]; +``` + +#### get(obj) _(es6-iterator/get)_ + +Return iterator for any iterable object. + +```javascript +var getIterator = require('es6-iterator/get'); +var iterator = get([1,2,3]); + +iterator.next(); // { value: 1, done: false } +iterator.next(); // { value: 2, done: false } +iterator.next(); // { value: 3, done: false } +iterator.next(); // { value: undefined, done: true } +``` + +#### isIterable(obj) _(es6-iterator/is-iterable)_ + +Whether _obj_ is iterable + +```javascript +var isIterable = require('es6-iterator/is-iterable'); + +isIterable(null); // false +isIterable(true); // false +isIterable('str'); // true +isIterable(['a', 'r', 'r']); // true +isIterable(new ArrayIterator([])); // true +``` + +#### validIterable(obj) _(es6-iterator/valid-iterable)_ + +If _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown. + +### Method extensions + +#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_ + +Chain multiple iterators into one. + +### Tests [](https://travis-ci.org/medikoo/es6-iterator) + + $ npm test diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/array.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/array.js new file mode 100644 index 0000000..885ad0a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/array.js @@ -0,0 +1,30 @@ +'use strict'; + +var setPrototypeOf = require('es5-ext/object/set-prototype-of') + , contains = require('es5-ext/string/#/contains') + , d = require('d') + , Iterator = require('./') + + , defineProperty = Object.defineProperty + , ArrayIterator; + +ArrayIterator = module.exports = function (arr, kind) { + if (!(this instanceof ArrayIterator)) return new ArrayIterator(arr, kind); + Iterator.call(this, arr); + if (!kind) kind = 'value'; + else if (contains.call(kind, 'key+value')) kind = 'key+value'; + else if (contains.call(kind, 'key')) kind = 'key'; + else kind = 'value'; + defineProperty(this, '__kind__', d('', kind)); +}; +if (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator); + +ArrayIterator.prototype = Object.create(Iterator.prototype, { + constructor: d(ArrayIterator), + _resolve: d(function (i) { + if (this.__kind__ === 'value') return this.__list__[i]; + if (this.__kind__ === 'key+value') return [i, this.__list__[i]]; + return i; + }), + toString: d(function () { return '[object Array Iterator]'; }) +}); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/for-of.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/for-of.js new file mode 100644 index 0000000..111f552 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/for-of.js @@ -0,0 +1,44 @@ +'use strict'; + +var callable = require('es5-ext/object/valid-callable') + , isString = require('es5-ext/string/is-string') + , get = require('./get') + + , isArray = Array.isArray, call = Function.prototype.call; + +module.exports = function (iterable, cb/*, thisArg*/) { + var mode, thisArg = arguments[2], result, doBreak, broken, i, l, char, code; + if (isArray(iterable)) mode = 'array'; + else if (isString(iterable)) mode = 'string'; + else iterable = get(iterable); + + callable(cb); + doBreak = function () { broken = true; }; + if (mode === 'array') { + iterable.some(function (value) { + call.call(cb, thisArg, value, doBreak); + if (broken) return true; + }); + return; + } + if (mode === 'string') { + l = iterable.length; + for (i = 0; i < l; ++i) { + char = iterable[i]; + if ((i + 1) < l) { + code = char.charCodeAt(0); + if ((code >= 0xD800) && (code <= 0xDBFF)) char += iterable[++i]; + } + call.call(cb, thisArg, char, doBreak); + if (broken) break; + } + return; + } + result = iterable.next(); + + while (!result.done) { + call.call(cb, thisArg, result.value, doBreak); + if (broken) return; + result = iterable.next(); + } +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/get.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/get.js new file mode 100644 index 0000000..38230fd --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/get.js @@ -0,0 +1,13 @@ +'use strict'; + +var isString = require('es5-ext/string/is-string') + , ArrayIterator = require('./array') + , StringIterator = require('./string') + , iterable = require('./valid-iterable') + , iteratorSymbol = require('es6-symbol').iterator; + +module.exports = function (obj) { + if (typeof iterable(obj)[iteratorSymbol] === 'function') return obj[iteratorSymbol](); + if (isString(obj)) return new StringIterator(obj); + return new ArrayIterator(obj); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/index.js new file mode 100644 index 0000000..10fd089 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/index.js @@ -0,0 +1,90 @@ +'use strict'; + +var clear = require('es5-ext/array/#/clear') + , assign = require('es5-ext/object/assign') + , callable = require('es5-ext/object/valid-callable') + , value = require('es5-ext/object/valid-value') + , d = require('d') + , autoBind = require('d/auto-bind') + , Symbol = require('es6-symbol') + + , defineProperty = Object.defineProperty + , defineProperties = Object.defineProperties + , Iterator; + +module.exports = Iterator = function (list, context) { + if (!(this instanceof Iterator)) return new Iterator(list, context); + defineProperties(this, { + __list__: d('w', value(list)), + __context__: d('w', context), + __nextIndex__: d('w', 0) + }); + if (!context) return; + callable(context.on); + context.on('_add', this._onAdd); + context.on('_delete', this._onDelete); + context.on('_clear', this._onClear); +}; + +defineProperties(Iterator.prototype, assign({ + constructor: d(Iterator), + _next: d(function () { + var i; + if (!this.__list__) return; + if (this.__redo__) { + i = this.__redo__.shift(); + if (i !== undefined) return i; + } + if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++; + this._unBind(); + }), + next: d(function () { return this._createResult(this._next()); }), + _createResult: d(function (i) { + if (i === undefined) return { done: true, value: undefined }; + return { done: false, value: this._resolve(i) }; + }), + _resolve: d(function (i) { return this.__list__[i]; }), + _unBind: d(function () { + this.__list__ = null; + delete this.__redo__; + if (!this.__context__) return; + this.__context__.off('_add', this._onAdd); + this.__context__.off('_delete', this._onDelete); + this.__context__.off('_clear', this._onClear); + this.__context__ = null; + }), + toString: d(function () { return '[object Iterator]'; }) +}, autoBind({ + _onAdd: d(function (index) { + if (index >= this.__nextIndex__) return; + ++this.__nextIndex__; + if (!this.__redo__) { + defineProperty(this, '__redo__', d('c', [index])); + return; + } + this.__redo__.forEach(function (redo, i) { + if (redo >= index) this.__redo__[i] = ++redo; + }, this); + this.__redo__.push(index); + }), + _onDelete: d(function (index) { + var i; + if (index >= this.__nextIndex__) return; + --this.__nextIndex__; + if (!this.__redo__) return; + i = this.__redo__.indexOf(index); + if (i !== -1) this.__redo__.splice(i, 1); + this.__redo__.forEach(function (redo, i) { + if (redo > index) this.__redo__[i] = --redo; + }, this); + }), + _onClear: d(function () { + if (this.__redo__) clear.call(this.__redo__); + this.__nextIndex__ = 0; + }) +}))); + +defineProperty(Iterator.prototype, Symbol.iterator, d(function () { + return this; +})); +defineProperty(Iterator.prototype, Symbol.toStringTag, d('', 'Iterator')); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/is-iterable.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/is-iterable.js new file mode 100644 index 0000000..bbcf104 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/is-iterable.js @@ -0,0 +1,13 @@ +'use strict'; + +var isString = require('es5-ext/string/is-string') + , iteratorSymbol = require('es6-symbol').iterator + + , isArray = Array.isArray; + +module.exports = function (value) { + if (value == null) return false; + if (isArray(value)) return true; + if (isString(value)) return true; + return (typeof value[iteratorSymbol] === 'function'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/package.json b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/package.json new file mode 100644 index 0000000..b861638 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/package.json @@ -0,0 +1,66 @@ +{ + "name": "es6-iterator", + "version": "0.1.3", + "description": "Iterator abstraction based on ES6 specification", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "keywords": [ + "iterator", + "array", + "list", + "set", + "map", + "generator" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-iterator.git" + }, + "dependencies": { + "d": "~0.1.1", + "es5-ext": "~0.10.5", + "es6-symbol": "~2.0.1" + }, + "devDependencies": { + "event-emitter": "~0.3.3", + "tad": "~0.2.1", + "xlint": "~0.2.2", + "xlint-jslint-medikoo": "~0.1.2" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "MIT", + "gitHead": "2addc362c6f139e4941cf4726eeb59e5960c5cef", + "bugs": { + "url": "https://github.com/medikoo/es6-iterator/issues" + }, + "homepage": "https://github.com/medikoo/es6-iterator", + "_id": "es6-iterator@0.1.3", + "_shasum": "d6f58b8c4fc413c249b4baa19768f8e4d7c8944e", + "_from": "es6-iterator@>=0.1.3 <0.2.0", + "_npmVersion": "2.3.0", + "_nodeVersion": "0.11.16", + "_npmUser": { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + }, + "maintainers": [ + { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + } + ], + "dist": { + "shasum": "d6f58b8c4fc413c249b4baa19768f8e4d7c8944e", + "tarball": "http://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/string.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/string.js new file mode 100644 index 0000000..cdb39ea --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/string.js @@ -0,0 +1,37 @@ +// Thanks @mathiasbynens +// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols + +'use strict'; + +var setPrototypeOf = require('es5-ext/object/set-prototype-of') + , d = require('d') + , Iterator = require('./') + + , defineProperty = Object.defineProperty + , StringIterator; + +StringIterator = module.exports = function (str) { + if (!(this instanceof StringIterator)) return new StringIterator(str); + str = String(str); + Iterator.call(this, str); + defineProperty(this, '__length__', d('', str.length)); + +}; +if (setPrototypeOf) setPrototypeOf(StringIterator, Iterator); + +StringIterator.prototype = Object.create(Iterator.prototype, { + constructor: d(StringIterator), + _next: d(function () { + if (!this.__list__) return; + if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++; + this._unBind(); + }), + _resolve: d(function (i) { + var char = this.__list__[i], code; + if (this.__nextIndex__ === this.__length__) return char; + code = char.charCodeAt(0); + if ((code >= 0xD800) && (code <= 0xDBFF)) return char + this.__list__[this.__nextIndex__++]; + return char; + }), + toString: d(function () { return '[object String Iterator]'; }) +}); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/#/chain.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/#/chain.js new file mode 100644 index 0000000..a414c66 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/#/chain.js @@ -0,0 +1,23 @@ +'use strict'; + +var Iterator = require('../../'); + +module.exports = function (t, a) { + var i1 = new Iterator(['raz', 'dwa', 'trzy']) + , i2 = new Iterator(['cztery', 'pięć', 'sześć']) + , i3 = new Iterator(['siedem', 'osiem', 'dziewięć']) + + , iterator = t.call(i1, i2, i3); + + a.deep(iterator.next(), { done: false, value: 'raz' }, "#1"); + a.deep(iterator.next(), { done: false, value: 'dwa' }, "#2"); + a.deep(iterator.next(), { done: false, value: 'trzy' }, "#3"); + a.deep(iterator.next(), { done: false, value: 'cztery' }, "#4"); + a.deep(iterator.next(), { done: false, value: 'pięć' }, "#5"); + a.deep(iterator.next(), { done: false, value: 'sześć' }, "#6"); + a.deep(iterator.next(), { done: false, value: 'siedem' }, "#7"); + a.deep(iterator.next(), { done: false, value: 'osiem' }, "#8"); + a.deep(iterator.next(), { done: false, value: 'dziewięć' }, "#9"); + a.deep(iterator.next(), { done: true, value: undefined }, "Done #1"); + a.deep(iterator.next(), { done: true, value: undefined }, "Done #2"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/array.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/array.js new file mode 100644 index 0000000..ae7c219 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/array.js @@ -0,0 +1,67 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator; + +module.exports = function (T) { + return { + Values: function (a) { + var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it; + + it = new T(x); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: 'raz' }, "#1"); + a.deep(it.next(), { done: false, value: 'dwa' }, "#2"); + x.splice(1, 0, 'elo'); + a.deep(it.next(), { done: false, value: 'dwa' }, "Insert"); + a.deep(it.next(), { done: false, value: 'trzy' }, "#3"); + a.deep(it.next(), { done: false, value: 'cztery' }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: 'pięć' }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Keys & Values": function (a) { + var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it; + + it = new T(x, 'key+value'); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: [0, 'raz'] }, "#1"); + a.deep(it.next(), { done: false, value: [1, 'dwa'] }, "#2"); + x.splice(1, 0, 'elo'); + a.deep(it.next(), { done: false, value: [2, 'dwa'] }, "Insert"); + a.deep(it.next(), { done: false, value: [3, 'trzy'] }, "#3"); + a.deep(it.next(), { done: false, value: [4, 'cztery'] }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: [5, 'pięć'] }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + Keys: function (a) { + var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], it; + + it = new T(x, 'key'); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: 0 }, "#1"); + a.deep(it.next(), { done: false, value: 1 }, "#2"); + x.splice(1, 0, 'elo'); + a.deep(it.next(), { done: false, value: 2 }, "Insert"); + a.deep(it.next(), { done: false, value: 3 }, "#3"); + a.deep(it.next(), { done: false, value: 4 }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: 5 }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + Sparse: function (a) { + var x = new Array(6), it; + + x[2] = 'raz'; + x[4] = 'dwa'; + it = new T(x); + a.deep(it.next(), { done: false, value: undefined }, "#1"); + a.deep(it.next(), { done: false, value: undefined }, "#2"); + a.deep(it.next(), { done: false, value: 'raz' }, "#3"); + a.deep(it.next(), { done: false, value: undefined }, "#4"); + a.deep(it.next(), { done: false, value: 'dwa' }, "#5"); + a.deep(it.next(), { done: false, value: undefined }, "#6"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + } + }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/for-of.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/for-of.js new file mode 100644 index 0000000..502e7b7 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/for-of.js @@ -0,0 +1,35 @@ +'use strict'; + +var ArrayIterator = require('../array') + + , slice = Array.prototype.slice; + +module.exports = function (t, a) { + var i = 0, x = ['raz', 'dwa', 'trzy'], y = {}, called = 0; + t(x, function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#"); + a(this, y, "Array: context: " + (i++) + "#"); + }, y); + i = 0; + t(x = 'foo', function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Regular String: context: " + (i++) + "#"); + }, y); + i = 0; + x = ['r', '💩', 'z']; + t('r💩z', function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Unicode String: context: " + (i++) + "#"); + }, y); + i = 0; + t(new ArrayIterator(x), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#"); + a(this, y, "Iterator: context: " + (i++) + "#"); + }, y); + + t(x = ['raz', 'dwa', 'trzy'], function (value, doBreak) { + ++called; + return doBreak(); + }); + a(called, 1, "Break"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/get.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/get.js new file mode 100644 index 0000000..7309590 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/get.js @@ -0,0 +1,16 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator + , Iterator = require('../'); + +module.exports = function (t, a) { + var iterator; + a.throws(function () { t(); }, TypeError, "Null"); + a.throws(function () { t({}); }, TypeError, "Plain object"); + a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like"); + iterator = {}; + iterator[iteratorSymbol] = function () { return new Iterator([]); }; + a(t(iterator) instanceof Iterator, true, "Iterator"); + a(String(t([])), '[object Array Iterator]', " Array"); + a(String(t('foo')), '[object String Iterator]', "String"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/index.js new file mode 100644 index 0000000..ea3621a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/index.js @@ -0,0 +1,99 @@ +'use strict'; + +var ee = require('event-emitter') + , iteratorSymbol = require('es6-symbol').iterator; + +module.exports = function (T) { + return { + "": function (a) { + var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć'], it, y, z; + + it = new T(x); + a(it[iteratorSymbol](), it, "@@iterator"); + y = it.next(); + a.deep(y, { done: false, value: 'raz' }, "#1"); + z = it.next(); + a.not(y, z, "Recreate result"); + a.deep(z, { done: false, value: 'dwa' }, "#2"); + a.deep(it.next(), { done: false, value: 'trzy' }, "#3"); + a.deep(it.next(), { done: false, value: 'cztery' }, "#4"); + a.deep(it.next(), { done: false, value: 'pięć' }, "#5"); + a.deep(y = it.next(), { done: true, value: undefined }, "End"); + a.not(y, it.next(), "Recreate result on dead"); + }, + Emited: function (a) { + var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć'], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: 'raz' }, "#1"); + a.deep(it.next(), { done: false, value: 'dwa' }, "#2"); + y.emit('_add', x.push('sześć') - 1); + a.deep(it.next(), { done: false, value: 'trzy' }, "#3"); + x.splice(1, 0, 'półtora'); + y.emit('_add', 1); + a.deep(it.next(), { done: false, value: 'półtora' }, "Insert"); + x.splice(5, 1); + y.emit('_delete', 5); + a.deep(it.next(), { done: false, value: 'cztery' }, "#4"); + a.deep(it.next(), { done: false, value: 'sześć' }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited #2": function (a) { + var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: 'raz' }, "#1"); + a.deep(it.next(), { done: false, value: 'dwa' }, "#2"); + x.splice(1, 0, 'półtora'); + y.emit('_add', 1); + x.splice(1, 0, '1.25'); + y.emit('_add', 1); + x.splice(0, 1); + y.emit('_delete', 0); + a.deep(it.next(), { done: false, value: 'półtora' }, "Insert"); + a.deep(it.next(), { done: false, value: '1.25' }, "Insert #2"); + a.deep(it.next(), { done: false, value: 'trzy' }, "#3"); + a.deep(it.next(), { done: false, value: 'cztery' }, "#4"); + x.splice(5, 1); + y.emit('_delete', 5); + a.deep(it.next(), { done: false, value: 'sześć' }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited: Clear #1": function (a) { + var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: 'raz' }, "#1"); + a.deep(it.next(), { done: false, value: 'dwa' }, "#2"); + x.length = 0; + y.emit('_clear'); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited: Clear #2": function (a) { + var x = ['raz', 'dwa', 'trzy', 'cztery', 'pięć', 'sześć'], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: 'raz' }, "#1"); + a.deep(it.next(), { done: false, value: 'dwa' }, "#2"); + x.length = 0; + y.emit('_clear'); + x.push('foo'); + x.push('bar'); + a.deep(it.next(), { done: false, value: 'foo' }, "#3"); + a.deep(it.next(), { done: false, value: 'bar' }, "#4"); + x.splice(1, 0, 'półtora'); + y.emit('_add', 1); + x.splice(1, 0, '1.25'); + y.emit('_add', 1); + x.splice(0, 1); + y.emit('_delete', 0); + a.deep(it.next(), { done: false, value: 'półtora' }, "Insert"); + a.deep(it.next(), { done: false, value: '1.25' }, "Insert #2"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + } + }; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/is-iterable.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/is-iterable.js new file mode 100644 index 0000000..7c5c59b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/is-iterable.js @@ -0,0 +1,18 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator + , Iterator = require('../'); + +module.exports = function (t, a) { + var iterator; + a(t(), false, "Undefined"); + a(t(123), false, "Number"); + a(t({}), false, "Plain object"); + a(t({ length: 0 }), false, "Array-like"); + iterator = {}; + iterator[iteratorSymbol] = function () { return new Iterator([]); }; + a(t(iterator), true, "Iterator"); + a(t([]), true, "Array"); + a(t('foo'), true, "String"); + a(t(''), true, "Empty string"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/string.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/string.js new file mode 100644 index 0000000..d11855f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/string.js @@ -0,0 +1,23 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator; + +module.exports = function (T, a) { + var it = new T('foobar'); + + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: 'f' }, "#1"); + a.deep(it.next(), { done: false, value: 'o' }, "#2"); + a.deep(it.next(), { done: false, value: 'o' }, "#3"); + a.deep(it.next(), { done: false, value: 'b' }, "#4"); + a.deep(it.next(), { done: false, value: 'a' }, "#5"); + a.deep(it.next(), { done: false, value: 'r' }, "#6"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + + a.h1("Outside of BMP"); + it = new T('r💩z'); + a.deep(it.next(), { done: false, value: 'r' }, "#1"); + a.deep(it.next(), { done: false, value: '💩' }, "#2"); + a.deep(it.next(), { done: false, value: 'z' }, "#3"); + a.deep(it.next(), { done: true, value: undefined }, "End"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/valid-iterable.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/valid-iterable.js new file mode 100644 index 0000000..7760b01 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/valid-iterable.js @@ -0,0 +1,16 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator + , Iterator = require('../'); + +module.exports = function (t, a) { + var obj; + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t({}); }, TypeError, "Plain object"); + a.throws(function () { t({ length: 0 }); }, TypeError, "Array-like"); + obj = {}; + obj[iteratorSymbol] = function () { return new Iterator([]); }; + a(t(obj), obj, "Iterator"); + obj = []; + a(t(obj), obj, 'Array'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/valid-iterable.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/valid-iterable.js new file mode 100644 index 0000000..d330997 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/valid-iterable.js @@ -0,0 +1,8 @@ +'use strict'; + +var isIterable = require('./is-iterable'); + +module.exports = function (value) { + if (!isIterable(value)) throw new TypeError(value + " is not iterable"); + return value; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/.lint b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/.lint new file mode 100644 index 0000000..1851752 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/.lint @@ -0,0 +1,13 @@ +@root + +module + +tabs +indent 2 +maxlen 100 + +ass +nomen +plusplus +newcap +vars diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/.npmignore b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/.npmignore new file mode 100644 index 0000000..155e41f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/.npmignore @@ -0,0 +1,4 @@ +.DS_Store +/node_modules +/npm-debug.log +/.lintcache diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/.travis.yml b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/.travis.yml new file mode 100644 index 0000000..afd3509 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +node_js: + - 0.8 + - 0.10 + - 0.11 + +notifications: + email: + - medikoo+es6-symbol@medikoo.com diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/CHANGES b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/CHANGES new file mode 100644 index 0000000..df8c27e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/CHANGES @@ -0,0 +1,34 @@ +v2.0.1 -- 2015.01.28 +* Fix Symbol.prototype[Symbol.isPrimitive] implementation +* Improve validation within Symbol.prototype.toString and + Symbol.prototype.valueOf + +v2.0.0 -- 2015.01.28 +* Update up to changes in specification: + * Implement `for` and `keyFor` + * Remove `Symbol.create` and `Symbol.isRegExp` + * Add `Symbol.match`, `Symbol.replace`, `Symbol.search`, `Symbol.species` and + `Symbol.split` +* Rename `validSymbol` to `validateSymbol` +* Improve documentation +* Remove dead test modules + +v1.0.0 -- 2015.01.26 +* Fix enumerability for symbol properties set normally (e.g. obj[symbol] = value) +* Introduce initialization via hidden constructor +* Fix isSymbol handling of polyfill values when native Symbol is present +* Fix spelling of LICENSE +* Configure lint scripts + +v0.1.1 -- 2014.10.07 +* Fix isImplemented, so it returns true in case of polyfill +* Improve documentations + +v0.1.0 -- 2014.04.28 +* Assure strictly npm dependencies +* Update to use latest versions of dependencies +* Fix implementation detection so it doesn't crash on `String(symbol)` +* throw on `new Symbol()` (as decided by TC39) + +v0.0.0 -- 2013.11.15 +* Initial (dev) version
\ No newline at end of file diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/LICENSE b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/LICENSE new file mode 100644 index 0000000..04724a3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2013-2015 Mariusz Nowak (www.medikoo.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/README.md b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/README.md new file mode 100644 index 0000000..95d6780 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/README.md @@ -0,0 +1,71 @@ +# es6-symbol +## ECMAScript 6 Symbol polyfill + +For more information about symbols see following links +- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html) +- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) +- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor) + +### Limitations + +Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely. + +### Usage + +If you'd like to use native version when it exists and fallback to polyfill if it doesn't (but without implementing `Symbol` on global scope), do: + +```javascript +var Symbol = require('es6-symbol'); +``` + +If you want to make sure your environment implements `Symbol`, do: + +```javascript +require('es6-symbol/implement'); +``` + +If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do: + +```javascript +var Symbol = require('es6-symbol/polyfill'); +``` + +#### API + +Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples: + +```javascript +var Symbol = require('es6-symbol'); + +var symbol = Symbol('My custom symbol'); +var x = {}; + +x[symbol] = 'foo'; +console.log(x[symbol]); 'foo' + +// Detect iterable: +var iterator, result; +if (possiblyIterable[Symbol.iterator]) { + iterator = possiblyIterable[Symbol.iterator](); + result = iterator.next(); + while(!result.done) { + console.log(result.value); + result = iterator.next(); + } +} +``` + +### Installation +#### NPM + +In your project path: + + $ npm install es6-symbol + +##### Browser + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## Tests [](https://travis-ci.org/medikoo/es6-symbol) + + $ npm test diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/implement.js new file mode 100644 index 0000000..153edac --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/implement.js @@ -0,0 +1,7 @@ +'use strict'; + +if (!require('./is-implemented')()) { + Object.defineProperty(require('es5-ext/global'), 'Symbol', + { value: require('./polyfill'), configurable: true, enumerable: false, + writable: true }); +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/index.js new file mode 100644 index 0000000..609f1fa --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./is-implemented')() ? Symbol : require('./polyfill'); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-implemented.js new file mode 100644 index 0000000..53759f3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-implemented.js @@ -0,0 +1,18 @@ +'use strict'; + +module.exports = function () { + var symbol; + if (typeof Symbol !== 'function') return false; + symbol = Symbol('test symbol'); + try { String(symbol); } catch (e) { return false; } + if (typeof Symbol.iterator === 'symbol') return true; + + // Return 'true' for polyfills + if (typeof Symbol.isConcatSpreadable !== 'object') return false; + if (typeof Symbol.iterator !== 'object') return false; + if (typeof Symbol.toPrimitive !== 'object') return false; + if (typeof Symbol.toStringTag !== 'object') return false; + if (typeof Symbol.unscopables !== 'object') return false; + + return true; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-native-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-native-implemented.js new file mode 100644 index 0000000..a8cb8b8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-native-implemented.js @@ -0,0 +1,8 @@ +// Exports true if environment provides native `Symbol` implementation + +'use strict'; + +module.exports = (function () { + if (typeof Symbol !== 'function') return false; + return (typeof Symbol.iterator === 'symbol'); +}()); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-symbol.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-symbol.js new file mode 100644 index 0000000..beeba2c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-symbol.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function (x) { + return (x && ((typeof x === 'symbol') || (x['@@toStringTag'] === 'Symbol'))) || false; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/package.json b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/package.json new file mode 100644 index 0000000..0efffea --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/package.json @@ -0,0 +1,63 @@ +{ + "name": "es6-symbol", + "version": "2.0.1", + "description": "ECMAScript6 Symbol polyfill", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "keywords": [ + "symbol", + "private", + "property", + "es6", + "ecmascript", + "harmony" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-symbol.git" + }, + "dependencies": { + "d": "~0.1.1", + "es5-ext": "~0.10.5" + }, + "devDependencies": { + "tad": "~0.2.1", + "xlint": "~0.2.2", + "xlint-jslint-medikoo": "~0.1.2" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "MIT", + "gitHead": "51f6938d7830269fefa38f02eb912f5472b3ccd7", + "bugs": { + "url": "https://github.com/medikoo/es6-symbol/issues" + }, + "homepage": "https://github.com/medikoo/es6-symbol", + "_id": "es6-symbol@2.0.1", + "_shasum": "761b5c67cfd4f1d18afb234f691d678682cb3bf3", + "_from": "es6-symbol@>=2.0.1 <2.1.0", + "_npmVersion": "1.4.28", + "_npmUser": { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + }, + "maintainers": [ + { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + } + ], + "dist": { + "shasum": "761b5c67cfd4f1d18afb234f691d678682cb3bf3", + "tarball": "http://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/polyfill.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/polyfill.js new file mode 100644 index 0000000..735eb67 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/polyfill.js @@ -0,0 +1,77 @@ +'use strict'; + +var d = require('d') + , validateSymbol = require('./validate-symbol') + + , create = Object.create, defineProperties = Object.defineProperties + , defineProperty = Object.defineProperty, objPrototype = Object.prototype + , Symbol, HiddenSymbol, globalSymbols = create(null); + +var generateName = (function () { + var created = create(null); + return function (desc) { + var postfix = 0, name; + while (created[desc + (postfix || '')]) ++postfix; + desc += (postfix || ''); + created[desc] = true; + name = '@@' + desc; + defineProperty(objPrototype, name, d.gs(null, function (value) { + defineProperty(this, name, d(value)); + })); + return name; + }; +}()); + +HiddenSymbol = function Symbol(description) { + if (this instanceof HiddenSymbol) throw new TypeError('TypeError: Symbol is not a constructor'); + return Symbol(description); +}; +module.exports = Symbol = function Symbol(description) { + var symbol; + if (this instanceof Symbol) throw new TypeError('TypeError: Symbol is not a constructor'); + symbol = create(HiddenSymbol.prototype); + description = (description === undefined ? '' : String(description)); + return defineProperties(symbol, { + __description__: d('', description), + __name__: d('', generateName(description)) + }); +}; +defineProperties(Symbol, { + for: d(function (key) { + if (globalSymbols[key]) return globalSymbols[key]; + return (globalSymbols[key] = Symbol(String(key))); + }), + keyFor: d(function (s) { + var key; + validateSymbol(s); + for (key in globalSymbols) if (globalSymbols[key] === s) return key; + }), + hasInstance: d('', Symbol('hasInstance')), + isConcatSpreadable: d('', Symbol('isConcatSpreadable')), + iterator: d('', Symbol('iterator')), + match: d('', Symbol('match')), + replace: d('', Symbol('replace')), + search: d('', Symbol('search')), + species: d('', Symbol('species')), + split: d('', Symbol('split')), + toPrimitive: d('', Symbol('toPrimitive')), + toStringTag: d('', Symbol('toStringTag')), + unscopables: d('', Symbol('unscopables')) +}); +defineProperties(HiddenSymbol.prototype, { + constructor: d(Symbol), + toString: d('', function () { return this.__name__; }) +}); + +defineProperties(Symbol.prototype, { + toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }), + valueOf: d(function () { return validateSymbol(this); }) +}); +defineProperty(Symbol.prototype, Symbol.toPrimitive, d('', + function () { return validateSymbol(this); })); +defineProperty(Symbol.prototype, Symbol.toStringTag, d('c', 'Symbol')); + +defineProperty(HiddenSymbol.prototype, Symbol.toPrimitive, + d('c', Symbol.prototype[Symbol.toPrimitive])); +defineProperty(HiddenSymbol.prototype, Symbol.toStringTag, + d('c', Symbol.prototype[Symbol.toStringTag])); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/implement.js new file mode 100644 index 0000000..eb35c30 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/implement.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof Symbol, 'function'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/index.js new file mode 100644 index 0000000..62b3296 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/index.js @@ -0,0 +1,12 @@ +'use strict'; + +var d = require('d') + + , defineProperty = Object.defineProperty; + +module.exports = function (T, a) { + var symbol = T('test'), x = {}; + defineProperty(x, symbol, d('foo')); + a(x.test, undefined, "Name"); + a(x[symbol], 'foo', "Get"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-implemented.js new file mode 100644 index 0000000..bb0d645 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-implemented.js @@ -0,0 +1,14 @@ +'use strict'; + +var global = require('es5-ext/global') + , polyfill = require('../polyfill'); + +module.exports = function (t, a) { + var cache; + a(typeof t(), 'boolean'); + cache = global.Symbol; + global.Symbol = polyfill; + a(t(), true); + if (cache === undefined) delete global.Symbol; + else global.Symbol = cache; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-native-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-native-implemented.js new file mode 100644 index 0000000..df8ba03 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-native-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t, 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-symbol.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-symbol.js new file mode 100644 index 0000000..ac24b9a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/is-symbol.js @@ -0,0 +1,16 @@ +'use strict'; + +var SymbolPoly = require('../polyfill'); + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(true), false, "Primitive"); + a(t('raz'), false, "String"); + a(t({}), false, "Object"); + a(t([]), false, "Array"); + if (typeof Symbol !== 'undefined') { + a(t(Symbol()), true, "Native"); + } + a(t(SymbolPoly()), true, "Polyfill"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/polyfill.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/polyfill.js new file mode 100644 index 0000000..83fb5e9 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/polyfill.js @@ -0,0 +1,27 @@ +'use strict'; + +var d = require('d') + , isSymbol = require('../is-symbol') + + , defineProperty = Object.defineProperty; + +module.exports = function (T, a) { + var symbol = T('test'), x = {}; + defineProperty(x, symbol, d('foo')); + a(x.test, undefined, "Name"); + a(x[symbol], 'foo', "Get"); + a(x instanceof T, false); + + a(isSymbol(symbol), true, "Symbol"); + a(isSymbol(T.iterator), true, "iterator"); + a(isSymbol(T.toStringTag), true, "toStringTag"); + + x = {}; + x[symbol] = 'foo'; + a.deep(Object.getOwnPropertyDescriptor(x, symbol), { configurable: true, enumerable: false, + value: 'foo', writable: true }); + symbol = T.for('marko'); + a(isSymbol(symbol), true); + a(T.for('marko'), symbol); + a(T.keyFor(symbol), 'marko'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/validate-symbol.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/validate-symbol.js new file mode 100644 index 0000000..2c8f84c --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test/validate-symbol.js @@ -0,0 +1,19 @@ +'use strict'; + +var SymbolPoly = require('../polyfill'); + +module.exports = function (t, a) { + var symbol; + a.throws(function () { t(undefined); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Null"); + a.throws(function () { t(true); }, TypeError, "Primitive"); + a.throws(function () { t('raz'); }, TypeError, "String"); + a.throws(function () { t({}); }, TypeError, "Object"); + a.throws(function () { t([]); }, TypeError, "Array"); + if (typeof Symbol !== 'undefined') { + symbol = Symbol(); + a(t(symbol), symbol, "Native"); + } + symbol = SymbolPoly(); + a(t(symbol), symbol, "Polyfill"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/validate-symbol.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/validate-symbol.js new file mode 100644 index 0000000..4275004 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/validate-symbol.js @@ -0,0 +1,8 @@ +'use strict'; + +var isSymbol = require('./is-symbol'); + +module.exports = function (value) { + if (!isSymbol(value)) throw new TypeError(value + " is not a symbol"); + return value; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/package.json b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/package.json new file mode 100644 index 0000000..07973df --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/package.json @@ -0,0 +1,64 @@ +{ + "name": "es6-weak-map", + "version": "0.1.4", + "description": "ECMAScript6 WeakMap polyfill", + "author": { + "name": "Mariusz Nowak", + "email": "medyk@medikoo.com", + "url": "http://www.medikoo.com/" + }, + "keywords": [ + "map", + "weakmap", + "collection", + "es6", + "harmony", + "list", + "hash", + "gc" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-weak-map.git" + }, + "dependencies": { + "d": "~0.1.1", + "es5-ext": "~0.10.6", + "es6-iterator": "~0.1.3", + "es6-symbol": "~2.0.1" + }, + "devDependencies": { + "tad": "~0.2.2" + }, + "scripts": { + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "MIT", + "gitHead": "e68802395b82a700257374c379cfaafe84ee8552", + "bugs": { + "url": "https://github.com/medikoo/es6-weak-map/issues" + }, + "homepage": "https://github.com/medikoo/es6-weak-map", + "_id": "es6-weak-map@0.1.4", + "_shasum": "706cef9e99aa236ba7766c239c8b9e286ea7d228", + "_from": "es6-weak-map@>=0.1.2 <0.2.0", + "_npmVersion": "2.7.4", + "_nodeVersion": "0.12.2", + "_npmUser": { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + }, + "maintainers": [ + { + "name": "medikoo", + "email": "medikoo+npm@medikoo.com" + } + ], + "dist": { + "shasum": "706cef9e99aa236ba7766c239c8b9e286ea7d228", + "tarball": "http://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/polyfill.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/polyfill.js new file mode 100644 index 0000000..1d15660 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/polyfill.js @@ -0,0 +1,75 @@ +'use strict'; + +var setPrototypeOf = require('es5-ext/object/set-prototype-of') + , object = require('es5-ext/object/valid-object') + , value = require('es5-ext/object/valid-value') + , d = require('d') + , getIterator = require('es6-iterator/get') + , forOf = require('es6-iterator/for-of') + , toStringTagSymbol = require('es6-symbol').toStringTag + , isNative = require('./is-native-implemented') + + , isArray = Array.isArray, defineProperty = Object.defineProperty, random = Math.random + , hasOwnProperty = Object.prototype.hasOwnProperty + , genId, WeakMapPoly; + +genId = (function () { + var generated = Object.create(null); + return function () { + var id; + do { id = random().toString(36).slice(2); } while (generated[id]); + generated[id] = true; + return id; + }; +}()); + +module.exports = WeakMapPoly = function (/*iterable*/) { + var iterable = arguments[0]; + if (!(this instanceof WeakMapPoly)) return new WeakMapPoly(iterable); + if (this.__weakMapData__ !== undefined) { + throw new TypeError(this + " cannot be reinitialized"); + } + if (iterable != null) { + if (!isArray(iterable)) iterable = getIterator(iterable); + } + defineProperty(this, '__weakMapData__', d('c', '$weakMap$' + genId())); + if (!iterable) return; + forOf(iterable, function (val) { + value(val); + this.set(val[0], val[1]); + }, this); +}; + +if (isNative) { + if (setPrototypeOf) setPrototypeOf(WeakMapPoly, WeakMap); + WeakMapPoly.prototype = Object.create(WeakMap.prototype, { + constructor: d(WeakMapPoly) + }); +} + +Object.defineProperties(WeakMapPoly.prototype, { + clear: d(function () { + defineProperty(this, '__weakMapData__', d('c', '$weakMap$' + genId())); + }), + delete: d(function (key) { + if (hasOwnProperty.call(object(key), this.__weakMapData__)) { + delete key[this.__weakMapData__]; + return true; + } + return false; + }), + get: d(function (key) { + if (hasOwnProperty.call(object(key), this.__weakMapData__)) { + return key[this.__weakMapData__]; + } + }), + has: d(function (key) { + return hasOwnProperty.call(object(key), this.__weakMapData__); + }), + set: d(function (key, value) { + defineProperty(object(key), this.__weakMapData__, d('c', value)); + return this; + }), + toString: d(function () { return '[object WeakMap]'; }) +}); +defineProperty(WeakMapPoly.prototype, toStringTagSymbol, d('c', 'WeakMap')); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/implement.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/implement.js new file mode 100644 index 0000000..860027e --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/implement.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof WeakMap, 'function'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/index.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/index.js new file mode 100644 index 0000000..9b26e4f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/index.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function (T, a) { + var x = {}; + a((new T([[x, 'foo']])).get(x), 'foo'); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/is-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/is-implemented.js new file mode 100644 index 0000000..1a88328 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/is-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t(), 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/is-native-implemented.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/is-native-implemented.js new file mode 100644 index 0000000..df8ba03 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/is-native-implemented.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = function (t, a) { a(typeof t, 'boolean'); }; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/is-weak-map.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/is-weak-map.js new file mode 100644 index 0000000..ba8c045 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/is-weak-map.js @@ -0,0 +1,16 @@ +'use strict'; + +var WeakMapPoly = require('../polyfill'); + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(true), false, "Primitive"); + a(t('raz'), false, "String"); + a(t({}), false, "Object"); + a(t([]), false, "Array"); + if (typeof WeakMap !== 'undefined') { + a(t(new WeakMap()), true, "Native"); + } + a(t(new WeakMapPoly()), true, "Polyfill"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/polyfill.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/polyfill.js new file mode 100644 index 0000000..1a4885b --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/polyfill.js @@ -0,0 +1,22 @@ +'use strict'; + +module.exports = function (T, a) { + var x = {}, y = {}, z = {}, arr = [[x, 'raz'], [y, 'dwa']], map = new T(arr); + + a(map instanceof T, true, "WeakMap"); + a(map.has(x), true, "Has: true"); + a(map.get(x), 'raz', "Get: contains"); + a(map.has(z), false, "Has: false"); + a(map.get(z), undefined, "Get: doesn't contain"); + a(map.set(z, 'trzy'), map, "Set: return"); + a(map.has(z), true, "Add"); + a(map.delete({}), false, "Delete: false"); + + a(map.delete(x), true, "Delete: true"); + a(map.get(x), undefined, "Get: after delete"); + a(map.has(x), false, "Has: after delete"); + + a(map.has(y), true, "Has: pre clear"); + map.clear(); + a(map.has(y), false, "Has: after clear"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/valid-weak-map.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/valid-weak-map.js new file mode 100644 index 0000000..a782342 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/valid-weak-map.js @@ -0,0 +1,19 @@ +'use strict'; + +var WeakMapPoly = require('../polyfill'); + +module.exports = function (t, a) { + var map; + a.throws(function () { t(undefined); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Null"); + a.throws(function () { t(true); }, TypeError, "Primitive"); + a.throws(function () { t('raz'); }, TypeError, "String"); + a.throws(function () { t({}); }, TypeError, "Object"); + a.throws(function () { t([]); }, TypeError, "Array"); + if (typeof WeakMap !== 'undefined') { + map = new WeakMap(); + a(t(map), map, "Native"); + } + map = new WeakMapPoly(); + a(t(map), map, "Polyfill"); +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/valid-weak-map.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/valid-weak-map.js new file mode 100644 index 0000000..bfb579f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/valid-weak-map.js @@ -0,0 +1,8 @@ +'use strict'; + +var isWeakMap = require('./is-weak-map'); + +module.exports = function (x) { + if (!isWeakMap(x)) throw new TypeError(x + " is not a WeakMap"); + return x; +}; diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/LICENSE.md b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/LICENSE.md new file mode 100644 index 0000000..493db50 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/LICENSE.md @@ -0,0 +1,20 @@ +Copyright (c) 2013 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/README.md b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/README.md new file mode 100644 index 0000000..7c450e3 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/README.md @@ -0,0 +1,36 @@ +# Mixto: A simple mixin superclass [](https://travis-ci.org/atom/mixto) + +To create a mixin, subclass mixto: + +```coffee +Mixin = require 'mixto' + +class MyMixin extends Mixin + @classMethod: -> console.log("foo") + instanceMethod: -> console.log("bar") +``` + +Then mix into classes with `.includeInto`: + +```coffee +class MyClass + MyMixin.includeInto(this) + +MyClass.classMethod() +(new MyClass).instanceMethod() +``` + +Or extend individual objects with `.extend`: + +```coffee-script +myObject = {a: 1, b: 2} +MyMixin.extend(myObject) +myObject.instanceMethod() +``` + +Or build standalone instances of your 'mixin': + +``` +standalone = new MyMixin +standalone.instanceMethod() +``` diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/lib/mixin.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/lib/mixin.js new file mode 100644 index 0000000..a6fdd4f --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/lib/mixin.js @@ -0,0 +1,51 @@ +(function() { + var ExcludedClassProperties, ExcludedPrototypeProperties, Mixin, name; + + module.exports = Mixin = (function() { + Mixin.includeInto = function(constructor) { + var name, value, _ref; + this.extend(constructor.prototype); + for (name in this) { + value = this[name]; + if (ExcludedClassProperties.indexOf(name) === -1) { + if (!constructor.hasOwnProperty(name)) { + constructor[name] = value; + } + } + } + return (_ref = this.included) != null ? _ref.call(constructor) : void 0; + }; + + Mixin.extend = function(object) { + var name, _i, _len, _ref, _ref1; + _ref = Object.getOwnPropertyNames(this.prototype); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + name = _ref[_i]; + if (ExcludedPrototypeProperties.indexOf(name) === -1) { + if (!object.hasOwnProperty(name)) { + object[name] = this.prototype[name]; + } + } + } + return (_ref1 = this.prototype.extended) != null ? _ref1.call(object) : void 0; + }; + + function Mixin() { + if (typeof this.extended === "function") { + this.extended(); + } + } + + return Mixin; + + })(); + + ExcludedClassProperties = ['__super__']; + + for (name in Mixin) { + ExcludedClassProperties.push(name); + } + + ExcludedPrototypeProperties = ['constructor', 'extended']; + +}).call(this); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/package.json b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/package.json new file mode 100644 index 0000000..be85e24 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/mixto/package.json @@ -0,0 +1,66 @@ +{ + "name": "mixto", + "version": "1.0.0", + "description": "A mixin superclass. Its subclasses have `.extend` and `.includeInto` methods to mix behavior into other objects and classes.", + "main": "lib/mixin", + "scripts": { + "prepublish": "grunt clean coffee lint", + "test": "grunt test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/atom/mixto.git" + }, + "keywords": [ + "mixin", + "trait" + ], + "bugs": { + "url": "https://github.com/atom/mixto/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/atom/mixto/raw/master/LICENSE.md" + } + ], + "devDependencies": { + "coffee-script": "~1.6.3", + "jasmine-focused": "~0.19.0", + "grunt-contrib-coffee": "~0.7.0", + "grunt-cli": "~0.1.8", + "grunt": "~0.4.1", + "grunt-shell": "~0.2.2", + "grunt-coffeelint": "0.0.6", + "rimraf": "~2.2.2" + }, + "author": { + "name": "Nathan Sobo" + }, + "_id": "mixto@1.0.0", + "dist": { + "shasum": "c320ef61b52f2898f522e17d8bbc6d506d8425b6", + "tarball": "http://registry.npmjs.org/mixto/-/mixto-1.0.0.tgz" + }, + "_from": "mixto@>=1.0.0 <2.0.0", + "_npmVersion": "1.3.2", + "_npmUser": { + "name": "kevinsawicki", + "email": "kevinsawicki@gmail.com" + }, + "maintainers": [ + { + "name": "nathansobo", + "email": "nathansobo@gmail.com" + }, + { + "name": "kevinsawicki", + "email": "kevinsawicki@gmail.com" + } + ], + "directories": {}, + "_shasum": "c320ef61b52f2898f522e17d8bbc6d506d8425b6", + "_resolved": "https://registry.npmjs.org/mixto/-/mixto-1.0.0.tgz", + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/atom/mixto" +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/LICENSE.md b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/LICENSE.md new file mode 100644 index 0000000..493db50 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/LICENSE.md @@ -0,0 +1,20 @@ +Copyright (c) 2013 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/README.md b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/README.md new file mode 100644 index 0000000..6ef1e04 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/README.md @@ -0,0 +1,80 @@ +# Property Accessors Mixin [](https://travis-ci.org/atom/property-accessors) + +A mixin for defining dynamic properties. + +## Basic Usage + +To define a basic property accessor, use the `accessor` declaration. If you've +included the mixin into a class, you define a prototype property by calling +`@::accessor` on its prototype. + +```coffee +PropertyAccessors = require 'property-accessors' + +class Vehicle + PropertyAccessors.includeInto(this) + + @::accessor 'type', + get: -> + switch @doorCount + when 4 then 'sedan' # i know this isn't strictly accurate + when 2 then 'coupe' + set: (type) -> + switch type + when 'sedan' then @doorCount = 4 + when 'coupe' then @doorCount = 2 + +car = new Vehicle +car.doorCount = 2 +car.type # => 'coupe' +``` + +You can define a class-level property by *extending* with the mixin rather than +including it (which extends the prototype). + +```coffee +class Vehicle + PropertyAccessors.extend(this) + + @accessor 'vehicleCount', get: -> @allVehicles.length +``` + +You can just pass a single function if you only want to define a getter: + +```coffee +class Vehicle + PropertyAccessors.includeInto(this) + + @::accessor 'type', -> # ... +``` + +## Fancy Usage + +### Lazy Accessors + +Lazy accessors call a function the first time a property is accessed. You are +still free to overwrite this value by assigning the property explicitly. + +```coffee +class ScienceLab + PropertyAccessors.includeInto(this) + + @::lazyAccessor 'crazyComputation', -> computeCrazyComputation() +``` + +### Advised Accessors + +Advised accessors allow you to call code before the reading or writing of a +property value. If a property is being assigned, your advice function is called +with the value being assigned and the old value. + +```coffee +class SpyStation + @advisedAccessor 'online', + get: -> @ensureAllSystemsNominal() + set: -> @ensureUserIsSpy() + +station = new SpyStation +station.online = true # ensures user is a spy, then assigns true +station.online # ensures all systems are nominal, then returns true +``` diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/lib/property-accessors.js b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/lib/property-accessors.js new file mode 100644 index 0000000..4cb92d8 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/lib/property-accessors.js @@ -0,0 +1,74 @@ +(function() { + var Mixin, PropertyAccessors, WeakMap, _ref, _ref1, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + + Mixin = require('mixto'); + + WeakMap = (_ref = global.WeakMap) != null ? _ref : require('es6-weak-map'); + + module.exports = PropertyAccessors = (function(_super) { + __extends(PropertyAccessors, _super); + + function PropertyAccessors() { + _ref1 = PropertyAccessors.__super__.constructor.apply(this, arguments); + return _ref1; + } + + PropertyAccessors.prototype.accessor = function(name, definition) { + if (typeof definition === 'function') { + definition = { + get: definition + }; + } + return Object.defineProperty(this, name, definition); + }; + + PropertyAccessors.prototype.advisedAccessor = function(name, definition) { + var getAdvice, setAdvice, values; + if (typeof definition === 'function') { + getAdvice = definition; + } else { + getAdvice = definition.get; + setAdvice = definition.set; + } + values = new WeakMap; + return this.accessor(name, { + get: function() { + if (getAdvice != null) { + getAdvice.call(this); + } + return values.get(this); + }, + set: function(newValue) { + if (setAdvice != null) { + setAdvice.call(this, newValue, values.get(this)); + } + return values.set(this, newValue); + } + }); + }; + + PropertyAccessors.prototype.lazyAccessor = function(name, definition) { + var values; + values = new WeakMap; + return this.accessor(name, { + get: function() { + if (values.has(this)) { + return values.get(this); + } else { + values.set(this, definition.call(this)); + return values.get(this); + } + }, + set: function(value) { + return values.set(this, value); + } + }); + }; + + return PropertyAccessors; + + })(Mixin); + +}).call(this); diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/package.json b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/package.json new file mode 100644 index 0000000..66179a4 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/property-accessors/package.json @@ -0,0 +1,75 @@ +{ + "name": "property-accessors", + "version": "1.1.3", + "description": "A mixin for declaring property accessors", + "main": "lib/property-accessors", + "scripts": { + "test": "grunt test", + "publish": "grunt" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/atom/property-accessors.git" + }, + "keywords": [ + "property", + "accessors", + "metaprogramming" + ], + "author": { + "name": "Nathan Sobo" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/atom/telepath/raw/master/LICENSE.md" + } + ], + "bugs": { + "url": "https://github.com/atom/property-accessors/issues" + }, + "homepage": "http://atom.github.io/property-accessors/", + "dependencies": { + "mixto": "1.x", + "es6-weak-map": "^0.1.2" + }, + "devDependencies": { + "jasmine-focused": "1.x", + "grunt-contrib-coffee": "~0.7.0", + "grunt-cli": "~0.1.8", + "grunt": "~0.4.1", + "grunt-shell": "~0.2.2", + "grunt-coffeelint": "0.0.6", + "rimraf": "~2.2.2" + }, + "gitHead": "c90f096dfc8f589ecb8186cadfbfcf97dc5f5cc6", + "_id": "property-accessors@1.1.3", + "_shasum": "1dde84024631865909ef30703365680c5f928b15", + "_from": "property-accessors@>=1.1.0 <2.0.0", + "_npmVersion": "1.4.28", + "_npmUser": { + "name": "kevinsawicki", + "email": "kevinsawicki@gmail.com" + }, + "maintainers": [ + { + "name": "nathansobo", + "email": "nathansobo@gmail.com" + }, + { + "name": "kevinsawicki", + "email": "kevinsawicki@gmail.com" + }, + { + "name": "benogle", + "email": "ogle.ben@gmail.com" + } + ], + "dist": { + "shasum": "1dde84024631865909ef30703365680c5f928b15", + "tarball": "http://registry.npmjs.org/property-accessors/-/property-accessors-1.1.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/property-accessors/-/property-accessors-1.1.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/package.json b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/package.json new file mode 100644 index 0000000..53b6b8a --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/node_modules/emissary/package.json @@ -0,0 +1,78 @@ +{ + "name": "emissary", + "version": "1.3.3", + "description": "Utility mixins for subscribing to and emitting events.", + "main": "lib/emissary.js", + "scripts": { + "test": "grunt test", + "prepublish": "grunt clean lint coffee" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/atom/emissary.git" + }, + "bugs": { + "url": "https://github.com/atom/emissary/issues" + }, + "homepage": "http://atom.github.io/emissary", + "keywords": [ + "event-emitter", + "events", + "subscribe", + "subscriber" + ], + "author": { + "name": "Nathan Sobo" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/atom/emissary/raw/master/LICENSE.md" + } + ], + "dependencies": { + "underscore-plus": "1.x", + "mixto": "1.x", + "property-accessors": "^1.1", + "es6-weak-map": "^0.1.2" + }, + "devDependencies": { + "jasmine-focused": "1.x", + "grunt-contrib-coffee": "~0.7.0", + "grunt-cli": "~0.1.8", + "grunt": "~0.4.1", + "grunt-shell": "~0.2.2", + "grunt-coffeelint": "0.0.6", + "rimraf": "~2.2.2" + }, + "gitHead": "13170d3e1f8b1cd4396d6dceb3c3bccf0887dae2", + "_id": "emissary@1.3.3", + "_shasum": "a618d92d682b232d31111dc3625a5df661799606", + "_from": "emissary@>=1.2.0 <2.0.0", + "_npmVersion": "1.4.28", + "_npmUser": { + "name": "kevinsawicki", + "email": "kevinsawicki@gmail.com" + }, + "maintainers": [ + { + "name": "nathansobo", + "email": "nathansobo@gmail.com" + }, + { + "name": "kevinsawicki", + "email": "kevinsawicki@gmail.com" + }, + { + "name": "benogle", + "email": "ogle.ben@gmail.com" + } + ], + "dist": { + "shasum": "a618d92d682b232d31111dc3625a5df661799606", + "tarball": "http://registry.npmjs.org/emissary/-/emissary-1.3.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/emissary/-/emissary-1.3.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/atom/packages/vim-mode/node_modules/grim/package.json b/atom/packages/vim-mode/node_modules/grim/package.json new file mode 100644 index 0000000..2e7bd07 --- /dev/null +++ b/atom/packages/vim-mode/node_modules/grim/package.json @@ -0,0 +1,73 @@ +{ + "name": "grim", + "version": "1.4.2", + "description": "Log usage of deprecated methods", + "main": "./lib/grim", + "scripts": { + "prepublish": "grunt clean lint coffee", + "test": "grunt test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/atom/grim.git" + }, + "bugs": { + "url": "https://github.com/atom/grim/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/atom/grim/raw/master/LICENSE.md" + } + ], + "dependencies": { + "emissary": "^1.2.0" + }, + "devDependencies": { + "coffee-script": "^1.7.0", + "jasmine-focused": "^1.0.4", + "grunt-contrib-coffee": "^0.9.0", + "grunt-cli": "^0.1.8", + "grunt": "^0.4.1", + "grunt-shell": "^0.2.2", + "grunt-coffeelint": "^0.0.6", + "rimraf": "^2.2.2", + "coffee-cache": "^0.2.0", + "temp": "^0.6.0" + }, + "gitHead": "82c45ef794ce93e4455c29365441c62bf94b90a8", + "homepage": "https://github.com/atom/grim#readme", + "_id": "grim@1.4.2", + "_shasum": "b33abee33ec351bab8695818d511a049ca62ef04", + "_from": "grim@>=1.4.1 <2.0.0", + "_npmVersion": "2.11.3", + "_nodeVersion": "0.12.7", + "_npmUser": { + "name": "nathansobo", + "email": "nathan@github.com" + }, + "maintainers": [ + { + "name": "probablycorey", + "email": "probablycorey@gmail.com" + }, + { + "name": "benogle", + "email": "ogle.ben@gmail.com" + }, + { + "name": "kevinsawicki", + "email": "kevinsawicki@gmail.com" + }, + { + "name": "nathansobo", + "email": "nathan@github.com" + } + ], + "dist": { + "shasum": "b33abee33ec351bab8695818d511a049ca62ef04", + "tarball": "http://registry.npmjs.org/grim/-/grim-1.4.2.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/grim/-/grim-1.4.2.tgz" +} diff --git a/atom/packages/vim-mode/node_modules/underscore-plus/node_modules/underscore/package.json b/atom/packages/vim-mode/node_modules/underscore-plus/node_modules/underscore/package.json index fb45655..505b2f4 100644 --- a/atom/packages/vim-mode/node_modules/underscore-plus/node_modules/underscore/package.json +++ b/atom/packages/vim-mode/node_modules/underscore-plus/node_modules/underscore/package.json @@ -62,5 +62,6 @@ ], "directories": {}, "_shasum": "8b38b10cacdef63337b8b24e4ff86d45aea529a8", - "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz" + "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/atom/packages/vim-mode/node_modules/underscore-plus/package.json b/atom/packages/vim-mode/node_modules/underscore-plus/package.json index b52af2d..98add9f 100644 --- a/atom/packages/vim-mode/node_modules/underscore-plus/package.json +++ b/atom/packages/vim-mode/node_modules/underscore-plus/package.json @@ -15,7 +15,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/atom/underscore-plus.git" + "url": "git+https://github.com/atom/underscore-plus.git" }, "bugs": { "url": "https://github.com/atom/underscore-plus/issues" @@ -74,5 +74,6 @@ "tarball": "http://registry.npmjs.org/underscore-plus/-/underscore-plus-1.6.6.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/underscore-plus/-/underscore-plus-1.6.6.tgz" + "_resolved": "https://registry.npmjs.org/underscore-plus/-/underscore-plus-1.6.6.tgz", + "readme": "ERROR: No README data found!" } diff --git a/atom/packages/vim-mode/package.json b/atom/packages/vim-mode/package.json index 6843024..731ee6a 100644 --- a/atom/packages/vim-mode/package.json +++ b/atom/packages/vim-mode/package.json @@ -1,20 +1,21 @@ { "name": "vim-mode", "main": "./lib/vim-mode", - "version": "0.54.0", + "version": "0.60.0", "description": "Add vim modal control", "license": "MIT", "private": true, "repository": { "type": "git", - "url": "https://github.com/atom/vim-mode" + "url": "git+https://github.com/atom/vim-mode.git" }, "engines": { "atom": ">0.151.0" }, "dependencies": { - "underscore-plus": "1.x", - "event-kit": "^0.7.2" + "event-kit": "^0.7.2", + "grim": "^1.4.1", + "underscore-plus": "1.x" }, "consumedServices": { "status-bar": { @@ -34,16 +35,16 @@ "devDependencies": { "coffeelint": "^1.10.1" }, - "readme": "## Vim Mode package [](https://travis-ci.org/atom/vim-mode)\n\nProvides vim modal control for Atom, ideally blending the best of vim\nand Atom.\n\n### Installing\n\nUse the Atom package manager, which can be found in the Settings view or\nrun `apm install vim-mode` from the command line.\n\n### Current Status\n\nSizable portions of Vim's command mode work as you'd expect, including\nmany complex combinations. Even so, this package is far from finished (Vim\nwasn't built in a day).\n\nIf you want the vim ex line (for `:w`, `:s`, etc.), you can try [ex-mode](https://atom.io/packages/ex-mode)\nwhich works in conjuction with this plugin.\n\nCurrently, vim-mode requires soft line wraps to be disabled, and has some issues\nwith international keyboard layouts.\n\nIf there's a feature of Vim you're missing, it might just be that you use it\nmore often than other developers. Adding a feature can be quick and easy. Check\nout the [closed pull requests](https://github.com/atom/vim-mode/pulls?direction=desc&page=1&sort=created&state=closed)\nto see examples of community contributions. We're looking forward to yours, too.\n\n### Documentation\n\n* [Overview](https://github.com/atom/vim-mode/blob/master/docs/overview.md)\n* [Motions](https://github.com/atom/vim-mode/blob/master/docs/motions.md)\n* [Operators](https://github.com/atom/vim-mode/blob/master/docs/operators.md)\n* [Windows](https://github.com/atom/vim-mode/blob/master/docs/windows.md)\n* [Scrolling](https://github.com/atom/vim-mode/blob/master/docs/scrolling.md)\n\n### Development\n\n* Create a branch with your feature/fix.\n* Add a spec (take inspiration from the ones that are already there).\n* If you're adding a command be sure to update the appropriate file in\n `docs/`\n* Create a PR.\n\nWhen in doubt, open a PR earlier rather than later so that you can receive\nfeedback from the community. We want to get your fix or feature included as much\nas you do.\n\nSee [the contribution guide](https://github.com/atom/vim-mode/blob/master/CONTRIBUTING.md).\n", + "readme": "## Vim Mode package [](https://travis-ci.org/atom/vim-mode)\n\nProvides vim modal control for Atom, ideally blending the best of vim\nand Atom.\n\n### Installing\n\nUse the Atom package manager, which can be found in the Settings view or\nrun `apm install vim-mode` from the command line.\n\n### Current Status\n\nSizable portions of Vim's normal mode work as you'd expect, including\nmany complex combinations. Even so, this package is far from finished (Vim\nwasn't built in a day).\n\nIf you want the vim ex line (for `:w`, `:s`, etc.), you can try [ex-mode](https://atom.io/packages/ex-mode)\nwhich works in conjuction with this plugin.\n\nCurrently, vim-mode has some issues with international keyboard layouts.\n\nIf there's a feature of Vim you're missing, it might just be that you use it\nmore often than other developers. Adding a feature can be quick and easy. Check\nout the [closed pull requests](https://github.com/atom/vim-mode/pulls?direction=desc&page=1&sort=created&state=closed)\nto see examples of community contributions. We're looking forward to yours, too.\n\n### Documentation\n\n* [Overview](https://github.com/atom/vim-mode/blob/master/docs/overview.md)\n* [Motions and Text Objects](https://github.com/atom/vim-mode/blob/master/docs/motions.md)\n* [Operators](https://github.com/atom/vim-mode/blob/master/docs/operators.md)\n* [Windows](https://github.com/atom/vim-mode/blob/master/docs/windows.md)\n* [Scrolling](https://github.com/atom/vim-mode/blob/master/docs/scrolling.md)\n\n### Development\n\n* Create a branch with your feature/fix.\n* Add a spec (take inspiration from the ones that are already there).\n* If you're adding a command be sure to update the appropriate file in\n `docs/`\n* Create a PR.\n\nWhen in doubt, open a PR earlier rather than later so that you can receive\nfeedback from the community. We want to get your fix or feature included as much\nas you do.\n\nSee [the contribution guide](https://github.com/atom/vim-mode/blob/master/CONTRIBUTING.md).\n", "readmeFilename": "README.md", "bugs": { "url": "https://github.com/atom/vim-mode/issues" }, - "homepage": "https://github.com/atom/vim-mode", - "_id": "vim-mode@0.54.0", - "_shasum": "619db8e3fab094d98ed3082c1ae8fe38c3659157", - "_resolved": "file:../d-11562-87009-1vvfmad/package.tgz", - "_from": "../d-11562-87009-1vvfmad/package.tgz", + "homepage": "https://github.com/atom/vim-mode#readme", + "_id": "vim-mode@0.60.0", + "_shasum": "c8a64fe60b40b71148f78df595cd813faef8d1f4", + "_resolved": "file:../d-115828-94481-cfhog7/package.tgz", + "_from": "../d-115828-94481-cfhog7/package.tgz", "_atomModuleCache": { "version": 1, "dependencies": [ @@ -98,6 +99,51 @@ "path": "node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/property-accessors/lib/property-accessors.js" }, { + "name": "grim", + "version": "1.4.2", + "path": "node_modules/grim/lib/grim.js" + }, + { + "name": "emissary", + "version": "1.3.3", + "path": "node_modules/grim/node_modules/emissary/lib/emissary.js" + }, + { + "name": "es6-weak-map", + "version": "0.1.4", + "path": "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/index.js" + }, + { + "name": "d", + "version": "0.1.1", + "path": "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/index.js" + }, + { + "name": "es5-ext", + "version": "0.10.7", + "path": "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/index.js" + }, + { + "name": "es6-iterator", + "version": "0.1.3", + "path": "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/index.js" + }, + { + "name": "es6-symbol", + "version": "2.0.1", + "path": "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/index.js" + }, + { + "name": "mixto", + "version": "1.0.0", + "path": "node_modules/grim/node_modules/emissary/node_modules/mixto/lib/mixin.js" + }, + { + "name": "property-accessors", + "version": "1.1.3", + "path": "node_modules/grim/node_modules/emissary/node_modules/property-accessors/lib/property-accessors.js" + }, + { "name": "underscore-plus", "version": "1.6.6", "path": "node_modules/underscore-plus/lib/underscore-plus.js" @@ -122,12 +168,22 @@ "node_modules/event-kit/node_modules/grim/node_modules/emissary/package.json", "node_modules/event-kit/node_modules/grim/package.json", "node_modules/event-kit/package.json", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/package.json", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/package.json", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/package.json", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/package.json", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/package.json", + "node_modules/grim/node_modules/emissary/node_modules/mixto/package.json", + "node_modules/grim/node_modules/emissary/node_modules/property-accessors/package.json", + "node_modules/grim/node_modules/emissary/package.json", + "node_modules/grim/package.json", "node_modules/underscore-plus/node_modules/underscore/package.json", "node_modules/underscore-plus/package.json", "package.json" ], ".coffee": [ "lib/global-vim-state.coffee", + "lib/insert-mode.coffee", "lib/motions/find-motion.coffee", "lib/motions/general-motions.coffee", "lib/motions/index.coffee", @@ -148,7 +204,7 @@ "lib/utils.coffee", "lib/view-models/search-view-model.coffee", "lib/view-models/view-model.coffee", - "lib/view-models/vim-command-mode-input-element.coffee", + "lib/view-models/vim-normal-mode-input-element.coffee", "lib/vim-mode.coffee", "lib/vim-state.coffee" ], @@ -567,6 +623,416 @@ "node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/valid-weak-map.js", "node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/mixto/lib/mixin.js", "node_modules/event-kit/node_modules/grim/node_modules/emissary/node_modules/property-accessors/lib/property-accessors.js", + "node_modules/grim/lib/deprecation.js", + "node_modules/grim/lib/grim.js", + "node_modules/grim/node_modules/emissary/lib/behavior.js", + "node_modules/grim/node_modules/emissary/lib/emissary.js", + "node_modules/grim/node_modules/emissary/lib/emitter.js", + "node_modules/grim/node_modules/emissary/lib/helpers.js", + "node_modules/grim/node_modules/emissary/lib/signal.js", + "node_modules/grim/node_modules/emissary/lib/subscriber.js", + "node_modules/grim/node_modules/emissary/lib/subscription.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-native-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/is-weak-map.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/auto-bind.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/lazy.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/_compare-by-length.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/binary-search.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/clear.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/compact.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/contains.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/diff.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-index-of.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/e-last-index-of.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/exclusion.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first-index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/first.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/flatten.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/for-each-right.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/group.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/indexes-of.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/intersection.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-copy.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/is-uniq.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last-index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/last.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/remove.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/separate.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/some-right.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/uniq.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_is-extensible.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy-safe.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/_sub-array-dummy.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/generate.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/is-plain-array.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/to-array.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/valid-array.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/boolean/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/boolean/is-boolean.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/copy.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/days-in-month.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-day.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-month.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/floor-year.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/format.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/is-date.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/valid-date.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/#/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/#/throw.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/custom.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/is-error.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/valid-error.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/compose.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/copy.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/curry.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/lock.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/not.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/partial.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/spread.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#/to-string-tokens.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/_define-length.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/constant.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/identity.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/invoke.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/is-arguments.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/is-function.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/noop.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/pluck.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/valid-function.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/global.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/for-each.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/is.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate-object.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable/validate.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/_pack-ieee754.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/_unpack-ieee754.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/#/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/#/pad.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-number.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-integer.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-pos-integer.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/to-uint32.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/_iterate.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/clear.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/compact.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/compare.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/copy-deep.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/copy.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/count.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/create.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/eq.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/every.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/filter.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/first-key.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/flatten.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/for-each.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/get-property-names.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-array-like.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-callable.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy-deep.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-copy.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-empty.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-object.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is-plain-object.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/is.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/key-of.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/map-keys.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/map.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin-prototypes.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/mixin.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/normalize-options.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/primitive-set.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/safe-traverse.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/serialize.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/some.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/to-array.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/unserialize.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-callable.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-object.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/valid-value.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like-object.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-array-like.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable-value.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/validate-stringifiable.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-sticky.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/is-unicode.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/escape.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/is-reg-exp.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/valid-reg-exp.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/at.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/camel-to-hyphen.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/capitalize.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/case-insensitive-compare.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/hyphen-to-camel.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/indent.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/last.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/_data.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/pad.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace-all.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/plain-replace.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/format-method.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/is-string.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/random-uniq.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw/shim.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/#/chain.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/array.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/for-of.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/get.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/is-iterable.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/string.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/valid-iterable.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/implement.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/index.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-native-implemented.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/is-symbol.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/polyfill.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/validate-symbol.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/polyfill.js", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/valid-weak-map.js", + "node_modules/grim/node_modules/emissary/node_modules/mixto/lib/mixin.js", + "node_modules/grim/node_modules/emissary/node_modules/property-accessors/lib/property-accessors.js", "node_modules/underscore-plus/lib/underscore-plus.js", "node_modules/underscore-plus/node_modules/underscore/underscore-min.js", "node_modules/underscore-plus/node_modules/underscore/underscore.js" @@ -583,8 +1049,9 @@ "spec" ], "dependencies": { - "underscore-plus": "1.x", - "event-kit": "^0.7.2" + "event-kit": "^0.7.2", + "grim": "^1.4.1", + "underscore-plus": "1.x" } }, { @@ -834,6 +1301,241 @@ }, { "paths": [ + "node_modules/grim/lib", + "node_modules/grim" + ], + "dependencies": { + "emissary": "^1.2.0" + } + }, + { + "paths": [ + "node_modules/grim/node_modules/emissary/lib", + "node_modules/grim/node_modules/emissary" + ], + "dependencies": { + "underscore-plus": "1.x", + "mixto": "1.x", + "property-accessors": "^1.1", + "es6-weak-map": "^0.1.2" + } + }, + { + "paths": [ + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test" + ], + "dependencies": { + "d": "~0.1.1", + "es5-ext": "~0.10.6", + "es6-iterator": "~0.1.3", + "es6-symbol": "~2.0.1" + } + }, + { + "paths": [ + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/d/test" + ], + "dependencies": { + "es5-ext": "~0.10.2" + } + }, + { + "paths": [ + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/@@iterator", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/concat", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/copy-within", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/entries", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/fill", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/filter", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/find-index", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/keys", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/map", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/slice", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/splice", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/#/values", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/from", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/array/of", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/boolean", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/date", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/error", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/function", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/iterable", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/acosh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/asinh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/atanh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cbrt", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/clz32", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/cosh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/expm1", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/fround", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/hypot", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/imul", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log10", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log1p", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/log2", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sign", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/sinh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/tanh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/math/trunc", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/epsilon", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-finite", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-integer", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-nan", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/is-safe-integer", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/max-safe-integer", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/number/min-safe-integer", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/assign", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/keys", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object/set-prototype-of", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/match", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/replace", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/search", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/split", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/sticky", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp/#/unicode", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/reg-exp", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/@@iterator", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/code-point-at", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/contains", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/ends-with", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/normalize", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/repeat", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/#/starts-with", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/from-code-point", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/string/raw", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/@@iterator", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/concat", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/copy-within", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/entries", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/fill", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/filter", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/find-index", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/keys", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/map", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/slice", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/values", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/from", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/of", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/boolean", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/date", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/error", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/function", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/iterable", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/acosh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/asinh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/atanh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cbrt", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/clz32", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/cosh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/expm1", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/fround", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/hypot", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/imul", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log10", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log1p", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/log2", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sign", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/sinh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/tanh", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/math/trunc", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/epsilon", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-finite", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-integer", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-nan", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/is-safe-integer", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/max-safe-integer", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/number/min-safe-integer", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/assign", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/keys", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/object/set-prototype-of", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/match", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/replace", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/search", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/split", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/sticky", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp/#/unicode", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/reg-exp", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/@@iterator", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/code-point-at", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/contains", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/ends-with", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/normalize", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/repeat", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/#/starts-with", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/from-code-point", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/string/raw" + ], + "dependencies": { + "es6-iterator": "~0.1.3", + "es6-symbol": "~2.0.1" + } + }, + { + "paths": [ + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test/#", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-iterator/test" + ], + "dependencies": { + "d": "~0.1.1", + "es5-ext": "~0.10.5", + "es6-symbol": "~2.0.1" + } + }, + { + "paths": [ + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol", + "node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es6-symbol/test" + ], + "dependencies": { + "d": "~0.1.1", + "es5-ext": "~0.10.5" + } + }, + { + "paths": [ + "node_modules/grim/node_modules/emissary/node_modules/property-accessors/lib", + "node_modules/grim/node_modules/emissary/node_modules/property-accessors" + ], + "dependencies": { + "mixto": "1.x", + "es6-weak-map": "^0.1.2" + } + }, + { + "paths": [ "node_modules/underscore-plus/lib", "node_modules/underscore-plus" ], diff --git a/atom/packages/vim-mode/spec/insert-mode-spec.coffee b/atom/packages/vim-mode/spec/insert-mode-spec.coffee new file mode 100644 index 0000000..061cb50 --- /dev/null +++ b/atom/packages/vim-mode/spec/insert-mode-spec.coffee @@ -0,0 +1,73 @@ +helpers = require './spec-helper' + +describe "Insert mode commands", -> + [editor, editorElement, vimState] = [] + + beforeEach -> + vimMode = atom.packages.loadPackage('vim-mode') + vimMode.activateResources() + + helpers.getEditorElement (element) -> + editorElement = element + editor = editorElement.getModel() + vimState = editorElement.vimState + vimState.activateNormalMode() + vimState.resetNormalMode() + + keydown = (key, options={}) -> + options.element ?= editorElement + helpers.keydown(key, options) + + describe "Copy from line above/below", -> + beforeEach -> + editor.setText("12345\n\nabcd\nefghi") + editor.setCursorBufferPosition([1, 0]) + editor.addCursorAtBufferPosition([3, 0]) + keydown 'i' + + describe "the ctrl-y command", -> + it "copies from the line above", -> + keydown 'y', ctrl: true + expect(editor.getText()).toBe '12345\n1\nabcd\naefghi' + + editor.insertText ' ' + keydown 'y', ctrl: true + expect(editor.getText()).toBe '12345\n1 3\nabcd\na cefghi' + + it "does nothing if there's nothing above the cursor", -> + editor.insertText 'fill' + keydown 'y', ctrl: true + expect(editor.getText()).toBe '12345\nfill5\nabcd\nfillefghi' + + keydown 'y', ctrl: true + expect(editor.getText()).toBe '12345\nfill5\nabcd\nfillefghi' + + it "does nothing on the first line", -> + editor.setCursorBufferPosition([0, 2]) + editor.addCursorAtBufferPosition([3, 2]) + editor.insertText 'a' + expect(editor.getText()).toBe '12a345\n\nabcd\nefaghi' + keydown 'y', ctrl: true + expect(editor.getText()).toBe '12a345\n\nabcd\nefadghi' + + describe "the ctrl-e command", -> + beforeEach -> + atom.keymaps.add "test", + 'atom-text-editor.vim-mode.insert-mode': + 'ctrl-e': 'vim-mode:copy-from-line-below' + + it "copies from the line below", -> + keydown 'e', ctrl: true + expect(editor.getText()).toBe '12345\na\nabcd\nefghi' + + editor.insertText ' ' + keydown 'e', ctrl: true + expect(editor.getText()).toBe '12345\na c\nabcd\n efghi' + + it "does nothing if there's nothing below the cursor", -> + editor.insertText 'foo' + keydown 'e', ctrl: true + expect(editor.getText()).toBe '12345\nfood\nabcd\nfooefghi' + + keydown 'e', ctrl: true + expect(editor.getText()).toBe '12345\nfood\nabcd\nfooefghi' diff --git a/atom/packages/vim-mode/spec/motions-spec.coffee b/atom/packages/vim-mode/spec/motions-spec.coffee index f7114ed..9c205ec 100644 --- a/atom/packages/vim-mode/spec/motions-spec.coffee +++ b/atom/packages/vim-mode/spec/motions-spec.coffee @@ -11,20 +11,21 @@ describe "Motions", -> editorElement = element editor = editorElement.getModel() vimState = editorElement.vimState - vimState.activateCommandMode() - vimState.resetCommandMode() + vimState.activateNormalMode() + vimState.resetNormalMode() keydown = (key, options={}) -> options.element ?= editorElement helpers.keydown(key, options) - commandModeInputKeydown = (key, opts = {}) -> - editor.commandModeInputView.editorElement.getModel().setText(key) + normalModeInputKeydown = (key, opts = {}) -> + theEditor = opts.editor or editor + theEditor.normalModeInputView.editorElement.getModel().setText(key) - submitCommandModeInputText = (text) -> - commandEditor = editor.commandModeInputView.editorElement - commandEditor.getModel().setText(text) - atom.commands.dispatch(commandEditor, "core:confirm") + submitNormalModeInputText = (text) -> + inputEditor = editor.normalModeInputView.editorElement + inputEditor.getModel().setText(text) + atom.commands.dispatch(inputEditor, "core:confirm") describe "simple motions", -> beforeEach -> @@ -144,30 +145,21 @@ describe "Motions", -> keydown('w') expect(editor.getCursorScreenPosition()).toEqual [2, 0] - # FIXME: The definition of Cursor#getEndOfCurrentWordBufferPosition, - # means that the end of the word can't be the current cursor - # position (even though it is when your cursor is on a new line). - # - # Therefore it picks the end of the next word here (which is [3,3]) - # to start looking for the next word, which is also the end of the - # buffer so the cursor never advances. - # - # See atom/vim-mode#3 keydown('w') expect(editor.getCursorScreenPosition()).toEqual [3, 0] keydown('w') - expect(editor.getCursorScreenPosition()).toEqual [3, 3] + expect(editor.getCursorScreenPosition()).toEqual [3, 2] - # After cursor gets to the EOF, it should stay there. + # When the cursor gets to the EOF, it should stay there. keydown('w') - expect(editor.getCursorScreenPosition()).toEqual [3, 3] + expect(editor.getCursorScreenPosition()).toEqual [3, 2] it "moves the cursor to the end of the word if last word in file", -> editor.setText("abc") editor.setCursorScreenPosition([0, 0]) keydown('w') - expect(editor.getCursorScreenPosition()).toEqual([0, 3]) + expect(editor.getCursorScreenPosition()).toEqual([0, 2]) describe "as a selection", -> describe "within a word", -> @@ -460,10 +452,10 @@ describe "Motions", -> describe "as a selection", -> it "selects to the beginning of the whole word", -> - editor.setCursorScreenPosition([1, 10]) + editor.setCursorScreenPosition([1, 9]) keydown('y') keydown('B', shift: true) - expect(vimState.getRegister('"').text).toBe 'xyz-123' + expect(vimState.getRegister('"').text).toBe 'xyz-12' it "doesn't go past the beginning of the file", -> editor.setCursorScreenPosition([0, 0]) @@ -850,7 +842,7 @@ describe "Motions", -> editor.setCursorScreenPosition([0, 2]) describe "as a motion", -> - describe "in command mode", -> + describe "in normal mode", -> beforeEach -> keydown('g') keydown('g') @@ -885,7 +877,7 @@ describe "Motions", -> expect(editor.getCursorScreenPosition()).toEqual [0, 1] describe "as a repeated motion", -> - describe "in command mode", -> + describe "in normal mode", -> beforeEach -> keydown('2') keydown('g') @@ -965,7 +957,7 @@ describe "Motions", -> beforeEach -> keydown('G', shift: true) it "moves the cursor to the last line after whitespace", -> - expect(editor.getCursorScreenPosition()).toEqual [3, 1] + expect(editor.getCursorScreenPosition()).toEqual [3, 0] describe "as a repeated motion", -> beforeEach -> @@ -997,61 +989,77 @@ describe "Motions", -> editor.setText("abc\ndef\nabc\ndef\n") editor.setCursorBufferPosition([0, 0]) + # clear search history + vimState.globalVimState.searchHistory = [] + vimState.globalVimState.currentSearch = {} + describe "as a motion", -> + it "beeps when repeating nonexistent last search", -> + keydown '/' + submitNormalModeInputText '' + expect(editor.getCursorBufferPosition()).toEqual [0, 0] + expect(atom.beep).toHaveBeenCalled() + it "moves the cursor to the specified search pattern", -> keydown('/') - submitCommandModeInputText 'def' + submitNormalModeInputText 'def' expect(editor.getCursorBufferPosition()).toEqual [1, 0] expect(pane.activate).toHaveBeenCalled() + expect(atom.beep).not.toHaveBeenCalled() it "loops back around", -> editor.setCursorBufferPosition([3, 0]) keydown('/') - submitCommandModeInputText 'def' + submitNormalModeInputText 'def' expect(editor.getCursorBufferPosition()).toEqual [1, 0] + expect(atom.beep).not.toHaveBeenCalled() it "uses a valid regex as a regex", -> keydown('/') # Cycle through the 'abc' on the first line with a character pattern - submitCommandModeInputText '[abc]' + submitNormalModeInputText '[abc]' expect(editor.getCursorBufferPosition()).toEqual [0, 1] keydown('n') expect(editor.getCursorBufferPosition()).toEqual [0, 2] + expect(atom.beep).not.toHaveBeenCalled() it "uses an invalid regex as a literal string", -> # Go straight to the literal [abc editor.setText("abc\n[abc]\n") keydown('/') - submitCommandModeInputText '[abc' + submitNormalModeInputText '[abc' expect(editor.getCursorBufferPosition()).toEqual [1, 0] keydown('n') expect(editor.getCursorBufferPosition()).toEqual [1, 0] + expect(atom.beep).not.toHaveBeenCalled() it "uses ? as a literal string", -> editor.setText("abc\n[a?c?\n") keydown('/') - submitCommandModeInputText '?' + submitNormalModeInputText '?' expect(editor.getCursorBufferPosition()).toEqual [1, 2] keydown('n') expect(editor.getCursorBufferPosition()).toEqual [1, 4] + expect(atom.beep).not.toHaveBeenCalled() it 'works with selection in visual mode', -> editor.setText('one two three') keydown('v') keydown('/') - submitCommandModeInputText 'th' + submitNormalModeInputText 'th' expect(editor.getCursorBufferPosition()).toEqual [0, 9] keydown('d') expect(editor.getText()).toBe 'hree' + expect(atom.beep).not.toHaveBeenCalled() it 'extends selection when repeating search in visual mode', -> editor.setText('line1\nline2\nline3') keydown('v') keydown('/') - submitCommandModeInputText 'line' + submitNormalModeInputText 'line' {start, end} = editor.getSelectedBufferRange() expect(start.row).toEqual 0 expect(end.row).toEqual 1 @@ -1059,6 +1067,7 @@ describe "Motions", -> {start, end} = editor.getSelectedBufferRange() expect(start.row).toEqual 0 expect(end.row).toEqual 2 + expect(atom.beep).not.toHaveBeenCalled() describe "case sensitivity", -> beforeEach -> @@ -1067,60 +1076,76 @@ describe "Motions", -> keydown('/') it "works in case sensitive mode", -> - submitCommandModeInputText 'ABC' + submitNormalModeInputText 'ABC' expect(editor.getCursorBufferPosition()).toEqual [2, 0] keydown('n') expect(editor.getCursorBufferPosition()).toEqual [2, 0] + expect(atom.beep).not.toHaveBeenCalled() it "works in case insensitive mode", -> - submitCommandModeInputText '\\cAbC' + submitNormalModeInputText '\\cAbC' expect(editor.getCursorBufferPosition()).toEqual [1, 0] keydown('n') expect(editor.getCursorBufferPosition()).toEqual [2, 0] + expect(atom.beep).not.toHaveBeenCalled() it "works in case insensitive mode wherever \\c is", -> - submitCommandModeInputText 'AbC\\c' + submitNormalModeInputText 'AbC\\c' expect(editor.getCursorBufferPosition()).toEqual [1, 0] keydown('n') expect(editor.getCursorBufferPosition()).toEqual [2, 0] + expect(atom.beep).not.toHaveBeenCalled() it "uses case insensitive search if useSmartcaseForSearch is true and searching lowercase", -> atom.config.set 'vim-mode.useSmartcaseForSearch', true - submitCommandModeInputText 'abc' + submitNormalModeInputText 'abc' expect(editor.getCursorBufferPosition()).toEqual [1, 0] keydown('n') expect(editor.getCursorBufferPosition()).toEqual [2, 0] + expect(atom.beep).not.toHaveBeenCalled() it "uses case sensitive search if useSmartcaseForSearch is true and searching uppercase", -> atom.config.set 'vim-mode.useSmartcaseForSearch', true - submitCommandModeInputText 'ABC' + submitNormalModeInputText 'ABC' expect(editor.getCursorBufferPosition()).toEqual [2, 0] keydown('n') expect(editor.getCursorBufferPosition()).toEqual [2, 0] + expect(atom.beep).not.toHaveBeenCalled() describe "repeating", -> it "does nothing with no search history", -> - # This tests that no exception is raised + editor.setCursorBufferPosition([0, 0]) + keydown('n') + expect(editor.getCursorBufferPosition()).toEqual [0, 0] + expect(atom.beep).toHaveBeenCalled() + + editor.setCursorBufferPosition([1, 1]) keydown('n') + expect(editor.getCursorBufferPosition()).toEqual [1, 1] + expect(atom.beep.callCount).toBe 2 + describe "repeating with search history", -> beforeEach -> keydown('/') - submitCommandModeInputText 'def' + submitNormalModeInputText 'def' it "repeats previous search with /<enter>", -> keydown('/') - submitCommandModeInputText('') + submitNormalModeInputText('') expect(editor.getCursorBufferPosition()).toEqual [3, 0] + expect(atom.beep).not.toHaveBeenCalled() it "repeats previous search with //", -> keydown('/') - submitCommandModeInputText('/') + submitNormalModeInputText('/') expect(editor.getCursorBufferPosition()).toEqual [3, 0] + expect(atom.beep).not.toHaveBeenCalled() describe "the n keybinding", -> it "repeats the last search", -> keydown('n') expect(editor.getCursorBufferPosition()).toEqual [3, 0] + expect(atom.beep).not.toHaveBeenCalled() describe "the N keybinding", -> it "repeats the last search backwards", -> @@ -1129,98 +1154,109 @@ describe "Motions", -> expect(editor.getCursorBufferPosition()).toEqual [3, 0] keydown('N', shift: true) expect(editor.getCursorBufferPosition()).toEqual [1, 0] + expect(atom.beep).not.toHaveBeenCalled() describe "composing", -> it "composes with operators", -> keydown('d') keydown('/') - submitCommandModeInputText('def') + submitNormalModeInputText('def') expect(editor.getText()).toEqual "def\nabc\ndef\n" + expect(atom.beep).not.toHaveBeenCalled() it "repeats correctly with operators", -> keydown('d') keydown('/') - submitCommandModeInputText('def') + submitNormalModeInputText('def') keydown('.') expect(editor.getText()).toEqual "def\n" + expect(atom.beep).not.toHaveBeenCalled() describe "when reversed as ?", -> it "moves the cursor backwards to the specified search pattern", -> keydown('?') - submitCommandModeInputText('def') + submitNormalModeInputText('def') expect(editor.getCursorBufferPosition()).toEqual [3, 0] + expect(atom.beep).not.toHaveBeenCalled() it "accepts / as a literal search pattern", -> editor.setText("abc\nd/f\nabc\nd/f\n") editor.setCursorBufferPosition([0, 0]) keydown('?') - submitCommandModeInputText('/') + submitNormalModeInputText('/') expect(editor.getCursorBufferPosition()).toEqual [3, 1] keydown('?') - submitCommandModeInputText('/') + submitNormalModeInputText('/') expect(editor.getCursorBufferPosition()).toEqual [1, 1] + expect(atom.beep).not.toHaveBeenCalled() describe "repeating", -> beforeEach -> keydown('?') - submitCommandModeInputText('def') + submitNormalModeInputText('def') it "repeats previous search as reversed with ?<enter>", -> keydown('?') - submitCommandModeInputText('') + submitNormalModeInputText('') expect(editor.getCursorBufferPosition()).toEqual [1, 0] + expect(atom.beep).not.toHaveBeenCalled() it "repeats previous search as reversed with ??", -> keydown('?') - submitCommandModeInputText('?') + submitNormalModeInputText('?') expect(editor.getCursorBufferPosition()).toEqual [1, 0] + expect(atom.beep).not.toHaveBeenCalled() describe 'the n keybinding', -> it "repeats the last search backwards", -> editor.setCursorBufferPosition([0, 0]) keydown('n') expect(editor.getCursorBufferPosition()).toEqual [3, 0] + expect(atom.beep).not.toHaveBeenCalled() describe 'the N keybinding', -> it "repeats the last search forwards", -> editor.setCursorBufferPosition([0, 0]) keydown('N', shift: true) expect(editor.getCursorBufferPosition()).toEqual [1, 0] + expect(atom.beep).not.toHaveBeenCalled() describe "using search history", -> - commandEditor = null + inputEditor = null beforeEach -> keydown('/') - submitCommandModeInputText('def') + submitNormalModeInputText('def') expect(editor.getCursorBufferPosition()).toEqual [1, 0] keydown('/') - submitCommandModeInputText('abc') + submitNormalModeInputText('abc') expect(editor.getCursorBufferPosition()).toEqual [2, 0] - commandEditor = editor.commandModeInputView.editorElement + inputEditor = editor.normalModeInputView.editorElement it "allows searching history in the search field", -> keydown('/') - atom.commands.dispatch(commandEditor, 'core:move-up') - expect(commandEditor.getModel().getText()).toEqual('abc') - atom.commands.dispatch(commandEditor, 'core:move-up') - expect(commandEditor.getModel().getText()).toEqual('def') - atom.commands.dispatch(commandEditor, 'core:move-up') - expect(commandEditor.getModel().getText()).toEqual('def') + atom.commands.dispatch(inputEditor, 'core:move-up') + expect(inputEditor.getModel().getText()).toEqual('abc') + atom.commands.dispatch(inputEditor, 'core:move-up') + expect(inputEditor.getModel().getText()).toEqual('def') + atom.commands.dispatch(inputEditor, 'core:move-up') + expect(inputEditor.getModel().getText()).toEqual('def') + expect(atom.beep).not.toHaveBeenCalled() it "resets the search field to empty when scrolling back", -> keydown('/') - atom.commands.dispatch(commandEditor, 'core:move-up') - expect(commandEditor.getModel().getText()).toEqual('abc') - atom.commands.dispatch(commandEditor, 'core:move-up') - expect(commandEditor.getModel().getText()).toEqual('def') - atom.commands.dispatch(commandEditor, 'core:move-down') - expect(commandEditor.getModel().getText()).toEqual('abc') - atom.commands.dispatch(commandEditor, 'core:move-down') - expect(commandEditor.getModel().getText()).toEqual '' + atom.commands.dispatch(inputEditor, 'core:move-up') + expect(inputEditor.getModel().getText()).toEqual('abc') + atom.commands.dispatch(inputEditor, 'core:move-up') + expect(inputEditor.getModel().getText()).toEqual('def') + atom.commands.dispatch(inputEditor, 'core:move-down') + expect(inputEditor.getModel().getText()).toEqual('abc') + atom.commands.dispatch(inputEditor, 'core:move-down') + expect(inputEditor.getModel().getText()).toEqual '' + expect(atom.beep).not.toHaveBeenCalled() describe "the * keybinding", -> beforeEach -> @@ -1253,14 +1289,9 @@ describe "Motions", -> it "doesn't move cursor unless next match has exact word ending", -> editor.setText("abc\n@def\nabc\n@def1\n") - # FIXME: I suspect there is a bug laying around - # Cursor#getEndOfCurrentWordBufferPosition, this function - # is returning '@' as a word, instead of returning the whole - # word '@def', this behavior is avoided in this test, when we - # execute the '*' command when cursor is on character after '@' - # (in this particular example, the 'd' char) editor.setCursorBufferPosition([1, 1]) keydown("*") + # this is because of the default isKeyword value of vim-mode that includes @ expect(editor.getCursorBufferPosition()).toEqual [1, 0] # FIXME: This behavior is different from the one found in @@ -1404,58 +1435,58 @@ describe "Motions", -> it 'moves to the beginning of the line of a mark', -> editor.setCursorBufferPosition([1, 1]) keydown('m') - commandModeInputKeydown('a') + normalModeInputKeydown('a') editor.setCursorBufferPosition([0, 0]) keydown('\'') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorBufferPosition()).toEqual [1, 4] it 'moves literally to a mark', -> editor.setCursorBufferPosition([1, 1]) keydown('m') - commandModeInputKeydown('a') + normalModeInputKeydown('a') editor.setCursorBufferPosition([0, 0]) keydown('`') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorBufferPosition()).toEqual [1, 1] it 'deletes to a mark by line', -> editor.setCursorBufferPosition([1, 5]) keydown('m') - commandModeInputKeydown('a') + normalModeInputKeydown('a') editor.setCursorBufferPosition([0, 0]) keydown('d') keydown('\'') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getText()).toEqual '56\n' it 'deletes before to a mark literally', -> editor.setCursorBufferPosition([1, 5]) keydown('m') - commandModeInputKeydown('a') + normalModeInputKeydown('a') editor.setCursorBufferPosition([0, 1]) keydown('d') keydown('`') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getText()).toEqual ' 4\n56\n' it 'deletes after to a mark literally', -> editor.setCursorBufferPosition([1, 5]) keydown('m') - commandModeInputKeydown('a') + normalModeInputKeydown('a') editor.setCursorBufferPosition([2, 1]) keydown('d') keydown('`') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getText()).toEqual ' 12\n 36\n' it 'moves back to previous', -> editor.setCursorBufferPosition([1, 5]) keydown('`') - commandModeInputKeydown('`') + normalModeInputKeydown('`') editor.setCursorBufferPosition([2, 1]) keydown('`') - commandModeInputKeydown('`') + normalModeInputKeydown('`') expect(editor.getCursorBufferPosition()).toEqual [1, 5] describe 'the f/F keybindings', -> @@ -1465,56 +1496,57 @@ describe "Motions", -> it 'moves to the first specified character it finds', -> keydown('f') - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 2] it 'moves backwards to the first specified character it finds', -> editor.setCursorScreenPosition([0, 2]) keydown('F', shift: true) - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 0] it 'respects count forward', -> keydown('2') keydown('f') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 6] it 'respects count backward', -> editor.setCursorScreenPosition([0, 6]) keydown('2') keydown('F', shift: true) - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 0] it "doesn't move if the character specified isn't found", -> keydown('f') - commandModeInputKeydown('d') + normalModeInputKeydown('d') expect(editor.getCursorScreenPosition()).toEqual [0, 0] + expect(atom.beep).not.toHaveBeenCalled() it "doesn't move if there aren't the specified count of the specified character", -> keydown('1') keydown('0') keydown('f') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 0] # a bug was making this behaviour depend on the count keydown('1') keydown('1') keydown('f') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 0] # and backwards now editor.setCursorScreenPosition([0, 6]) keydown('1') keydown('0') keydown('F', shift: true) - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 6] keydown('1') keydown('1') keydown('F', shift: true) - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 6] it "composes with d", -> @@ -1522,9 +1554,47 @@ describe "Motions", -> keydown('d') keydown('2') keydown('f') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getText()).toEqual 'abcbc\n' + it "cancels c when no match found", -> + keydown('c') + keydown('f') + normalModeInputKeydown('d') + expect(editor.getText()).toBe("abcabcabcabc\n") + expect(editor.getCursorScreenPosition()).toEqual [0, 0] + expect(vimState.mode).toBe "normal" + + describe 'with accented characters', -> + buildIMECompositionEvent = (event, {data, target}={}) -> + event = new Event(event) + event.data = data + Object.defineProperty(event, 'target', get: -> target) + event + + buildTextInputEvent = ({data, target}) -> + event = new Event('textInput') + event.data = data + Object.defineProperty(event, 'target', get: -> target) + event + + beforeEach -> + editor.setText("abcébcabcébc\n") + editor.setCursorScreenPosition([0, 0]) + + it 'works with IME composition', -> + keydown('f') + normalModeEditor = editor.normalModeInputView.editorElement + jasmine.attachToDOM(normalModeEditor) + domNode = normalModeEditor.component.domNode + inputNode = domNode.querySelector('.hidden-input') + domNode.dispatchEvent(buildIMECompositionEvent('compositionstart', target: inputNode)) + domNode.dispatchEvent(buildIMECompositionEvent('compositionupdate', data: "´", target: inputNode)) + expect(normalModeEditor.getModel().getText()).toEqual '´' + domNode.dispatchEvent(buildIMECompositionEvent('compositionend', data: "é", target: inputNode)) + domNode.dispatchEvent(buildTextInputEvent(data: 'é', target: inputNode)) + expect(editor.getCursorScreenPosition()).toEqual [0, 3] + describe 'the t/T keybindings', -> beforeEach -> editor.setText("abcabcabcabc\n") @@ -1532,60 +1602,61 @@ describe "Motions", -> it 'moves to the character previous to the first specified character it finds', -> keydown('t') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 2] # or stays put when it's already there keydown('t') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 2] it 'moves backwards to the character after the first specified character it finds', -> editor.setCursorScreenPosition([0, 2]) keydown('T', shift: true) - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 1] it 'respects count forward', -> keydown('2') keydown('t') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 5] it 'respects count backward', -> editor.setCursorScreenPosition([0, 6]) keydown('2') keydown('T', shift: true) - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 1] it "doesn't move if the character specified isn't found", -> keydown('t') - commandModeInputKeydown('d') + normalModeInputKeydown('d') expect(editor.getCursorScreenPosition()).toEqual [0, 0] + expect(atom.beep).not.toHaveBeenCalled() it "doesn't move if there aren't the specified count of the specified character", -> keydown('1') keydown('0') keydown('t') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 0] # a bug was making this behaviour depend on the count keydown('1') keydown('1') keydown('t') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 0] # and backwards now editor.setCursorScreenPosition([0, 6]) keydown('1') keydown('0') keydown('T', shift: true) - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 6] keydown('1') keydown('1') keydown('T', shift: true) - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(editor.getCursorScreenPosition()).toEqual [0, 6] it "composes with d", -> @@ -1593,9 +1664,34 @@ describe "Motions", -> keydown('d') keydown('2') keydown('t') - commandModeInputKeydown('b') + normalModeInputKeydown('b') expect(editor.getText()).toBe 'abcbcabc\n' + it "selects character under cursor even when no movement happens", -> + editor.setCursorBufferPosition([0, 0]) + keydown('d') + keydown('t') + normalModeInputKeydown('b') + expect(editor.getText()).toBe 'bcabcabcabc\n' + + describe 'the v keybinding', -> + beforeEach -> + editor.setText("01\n002\n0003\n00004\n000005\n") + editor.setCursorScreenPosition([1, 1]) + + it "selects down a line", -> + keydown('v') + keydown('j') + keydown('j') + expect(editor.getSelectedText()).toBe "02\n0003\n00" + expect(editor.getSelectedBufferRange().isSingleLine()).toBeFalsy() + + it "selects right", -> + keydown('v') + keydown('l') + expect(editor.getSelectedText()).toBe "02" + expect(editor.getSelectedBufferRange().isSingleLine()).toBeTruthy() + describe 'the V keybinding', -> beforeEach -> editor.setText("01\n002\n0003\n00004\n000005\n") @@ -1603,9 +1699,11 @@ describe "Motions", -> it "selects down a line", -> keydown('V', shift: true) + expect(editor.getSelectedBufferRange().isSingleLine()).toBeFalsy() keydown('j') keydown('j') expect(editor.getSelectedText()).toBe "002\n0003\n00004\n" + expect(editor.getSelectedBufferRange().isSingleLine()).toBeFalsy() it "selects up a line", -> keydown('V', shift: true) @@ -1619,7 +1717,7 @@ describe "Motions", -> it "repeat f in same direction", -> keydown('f') - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 2] keydown(';') expect(editor.getCursorScreenPosition()).toEqual [0, 5] @@ -1629,7 +1727,7 @@ describe "Motions", -> it "repeat F in same direction", -> editor.setCursorScreenPosition([0, 10]) keydown('F', shift: true) - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 8] keydown(';') expect(editor.getCursorScreenPosition()).toEqual [0, 5] @@ -1639,7 +1737,7 @@ describe "Motions", -> it "repeat f in opposite direction", -> editor.setCursorScreenPosition([0, 6]) keydown('f') - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 8] keydown(',') expect(editor.getCursorScreenPosition()).toEqual [0, 5] @@ -1649,7 +1747,7 @@ describe "Motions", -> it "repeat F in opposite direction", -> editor.setCursorScreenPosition([0, 4]) keydown('F', shift: true) - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 2] keydown(',') expect(editor.getCursorScreenPosition()).toEqual [0, 5] @@ -1658,7 +1756,7 @@ describe "Motions", -> it "alternate repeat f in same direction and reverse", -> keydown('f') - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 2] keydown(';') expect(editor.getCursorScreenPosition()).toEqual [0, 5] @@ -1668,7 +1766,7 @@ describe "Motions", -> it "alternate repeat F in same direction and reverse", -> editor.setCursorScreenPosition([0, 10]) keydown('F', shift: true) - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 8] keydown(';') expect(editor.getCursorScreenPosition()).toEqual [0, 5] @@ -1677,7 +1775,7 @@ describe "Motions", -> it "repeat t in same direction", -> keydown('t') - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 1] keydown(';') expect(editor.getCursorScreenPosition()).toEqual [0, 4] @@ -1685,7 +1783,7 @@ describe "Motions", -> it "repeat T in same direction", -> editor.setCursorScreenPosition([0, 10]) keydown('T', shift: true) - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 9] keydown(';') expect(editor.getCursorScreenPosition()).toEqual [0, 6] @@ -1693,7 +1791,7 @@ describe "Motions", -> it "repeat t in opposite direction first, and then reverse", -> editor.setCursorScreenPosition([0, 3]) keydown('t') - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 4] keydown(',') expect(editor.getCursorScreenPosition()).toEqual [0, 3] @@ -1703,7 +1801,7 @@ describe "Motions", -> it "repeat T in opposite direction first, and then reverse", -> editor.setCursorScreenPosition([0, 4]) keydown('T', shift: true) - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 3] keydown(',') expect(editor.getCursorScreenPosition()).toEqual [0, 4] @@ -1713,7 +1811,7 @@ describe "Motions", -> it "repeat with count in same direction", -> editor.setCursorScreenPosition([0, 0]) keydown('f') - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 2] keydown('2') keydown(';') @@ -1722,12 +1820,45 @@ describe "Motions", -> it "repeat with count in reverse direction", -> editor.setCursorScreenPosition([0, 6]) keydown('f') - commandModeInputKeydown('c') + normalModeInputKeydown('c') expect(editor.getCursorScreenPosition()).toEqual [0, 8] keydown('2') keydown(',') expect(editor.getCursorScreenPosition()).toEqual [0, 2] + it "shares the most recent find/till command with other editors", -> + helpers.getEditorElement (otherEditorElement) -> + otherEditor = otherEditorElement.getModel() + + editor.setText("a baz bar\n") + editor.setCursorScreenPosition([0, 0]) + + otherEditor.setText("foo bar baz") + otherEditor.setCursorScreenPosition([0, 0]) + + # by default keyDown and such go in the usual editor + keydown('f') + normalModeInputKeydown('b') + expect(editor.getCursorScreenPosition()).toEqual [0, 2] + expect(otherEditor.getCursorScreenPosition()).toEqual [0, 0] + + # replay same find in the other editor + keydown(';', element: otherEditorElement) + expect(editor.getCursorScreenPosition()).toEqual [0, 2] + expect(otherEditor.getCursorScreenPosition()).toEqual [0, 4] + + # do a till in the other editor + keydown('t', element: otherEditorElement) + normalModeInputKeydown('r', editor: otherEditor) + expect(editor.getCursorScreenPosition()).toEqual [0, 2] + expect(otherEditor.getCursorScreenPosition()).toEqual [0, 5] + + # and replay in the normal editor + keydown(';') + expect(editor.getCursorScreenPosition()).toEqual [0, 7] + expect(otherEditor.getCursorScreenPosition()).toEqual [0, 5] + expect(atom.beep).not.toHaveBeenCalled() + describe 'the % motion', -> beforeEach -> editor.setText("( ( ) )--{ text in here; and a function call(with parameters) }\n") @@ -1780,7 +1911,7 @@ describe "Motions", -> it "does not affect search history", -> keydown('/') - submitCommandModeInputText 'func' + submitNormalModeInputText 'func' expect(editor.getCursorBufferPosition()).toEqual [0, 31] keydown('%') expect(editor.getCursorBufferPosition()).toEqual [0, 60] diff --git a/atom/packages/vim-mode/spec/operators-spec.coffee b/atom/packages/vim-mode/spec/operators-spec.coffee index a41edb3..0dff120 100644 --- a/atom/packages/vim-mode/spec/operators-spec.coffee +++ b/atom/packages/vim-mode/spec/operators-spec.coffee @@ -12,29 +12,30 @@ describe "Operators", -> editorElement = element editor = editorElement.getModel() vimState = editorElement.vimState - vimState.activateCommandMode() - vimState.resetCommandMode() + vimState.activateNormalMode() + vimState.resetNormalMode() keydown = (key, options={}) -> options.element ?= editorElement helpers.keydown(key, options) - commandModeInputKeydown = (key, opts = {}) -> - editor.commandModeInputView.editorElement.getModel().setText(key) + normalModeInputKeydown = (key, opts = {}) -> + editor.normalModeInputView.editorElement.getModel().setText(key) describe "cancelling operations", -> - it "does not throw an error even if no operation is pending", -> + it "throws an error when no operation is pending", -> # cancel operation pushes an empty input operation - # doing this without a pending operation throws an exception + # doing this without a pending operation would throw an exception expect(-> vimState.pushOperations(new Input(''))).toThrow() - # make sure commandModeInputView is created + it "cancels and cleans up properly", -> + # make sure normalModeInputView is created keydown('/') expect(vimState.isOperatorPending()).toBe true - editor.commandModeInputView.viewModel.cancel() + editor.normalModeInputView.viewModel.cancel() expect(vimState.isOperatorPending()).toBe false - expect(-> editor.commandModeInputView.viewModel.cancel()).not.toThrow() + expect(editor.normalModeInputView).toBe undefined describe "the x keybinding", -> describe "on a line with content", -> @@ -88,6 +89,18 @@ describe "Operators", -> expect(editor.getCursorScreenPosition()).toEqual [0, 0] expect(vimState.getRegister('"').text).toBe 'bc' + describe "with multiple cursors", -> + beforeEach -> + editor.setText "abc\n012345\n\nxyz" + editor.setCursorScreenPosition [1, 4] + editor.addCursorAtBufferPosition [0, 1] + + it "is undone as one operation", -> + keydown('x') + expect(editor.getText()).toBe "ac\n01235\n\nxyz" + keydown('u') + expect(editor.getText()).toBe "abc\n012345\n\nxyz" + describe "with vim-mode.wrapLeftRightMotion", -> beforeEach -> editor.setText("abc\n012345\n\nxyz") @@ -147,7 +160,6 @@ describe "Operators", -> expect(editor.getCursorScreenPosition()).toEqual [0, 1] expect(vimState.getRegister('"').text).toBe '0123\n\nx' - describe "on an empty line", -> beforeEach -> editor.setText("abc\n012345\n\nxyz") @@ -165,7 +177,6 @@ describe "Operators", -> expect(editor.getText()).toBe "abc\n012345\nxyz" expect(editor.getCursorScreenPosition()).toEqual [2, 0] - describe "the X keybinding", -> describe "on a line with content", -> beforeEach -> @@ -194,7 +205,6 @@ describe "Operators", -> expect(editor.getCursorScreenPosition()).toEqual [0, 2] expect(vimState.getRegister('"').text).toBe '\n' - describe "on an empty line", -> beforeEach -> editor.setText("012345\n\nabcdef") @@ -303,7 +313,7 @@ describe "Operators", -> it "enters operator-pending mode", -> keydown('d') expect(editorElement.classList.contains('operator-pending-mode')).toBe(true) - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) describe "when followed by a d", -> it "deletes the current line and exits operator-pending mode", -> @@ -317,7 +327,7 @@ describe "Operators", -> expect(editor.getCursorScreenPosition()).toEqual [1, 0] expect(vimState.getRegister('"').text).toBe "abcde\n" expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "deletes the last line", -> editor.setText("12345\nabcde\nABCDE") @@ -344,16 +354,30 @@ describe "Operators", -> editor.setText("12345\nabcde\nABCDE\nQWERT") editor.setCursorScreenPosition([1, 1]) + it "undoes both lines", -> keydown('d') keydown('2') keydown('d') keydown('u') - it "undoes both lines", -> expect(editor.getText()).toBe "12345\nabcde\nABCDE\nQWERT" expect(editor.getSelectedText()).toBe '' + describe "with multiple cursors", -> + beforeEach -> + editor.setCursorBufferPosition([1, 1]) + editor.addCursorAtBufferPosition([0, 0]) + + it "is undone as one operation", -> + keydown('d') + keydown('l') + + keydown('u') + + expect(editor.getText()).toBe "12345\nabcde\nABCDE\nQWERT" + expect(editor.getSelectedText()).toBe '' + describe "when followed by a w", -> it "deletes the next word until the end of the line and exits operator-pending mode", -> editor.setText("abcd efg\nabc") @@ -368,7 +392,7 @@ describe "Operators", -> expect(editor.getCursorScreenPosition()).toEqual [0, 5] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "deletes to the beginning of the next word", -> editor.setText('abcd efg') @@ -404,59 +428,61 @@ describe "Operators", -> expect(editor.getCursorScreenPosition()).toEqual [0, 6] expect(vimState.getRegister('"').text).toBe "abcde" expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + describe "when followed by a j", -> + originalText = "12345\nabcde\nABCDE\n" - describe "when followed by an j", -> beforeEach -> - originalText = "12345\nabcde\nABCDE" editor.setText(originalText) - describe "on the beginning of the file", -> + describe "on the beginning of the file", -> + it "deletes the next two lines", -> editor.setCursorScreenPosition([0, 0]) - it "deletes the next two lines", -> - keydown('d') - keydown('j') - expect(editor.getText()).toBe("ABCDE") + keydown('d') + keydown('j') + expect(editor.getText()).toBe("ABCDE\n") - describe "on the end of the file", -> - editor.setCursorScreenPosition([4, 2]) - it "deletes nothing", -> - keydown('d') - keydown('j') - expect(editor.getText()).toBe(originalText) + describe "on the end of the file", -> + it "deletes nothing", -> + editor.setCursorScreenPosition([4, 0]) + keydown('d') + keydown('j') + expect(editor.getText()).toBe(originalText) - describe "on the middle of second line", -> - editor.setCursorScreenPosition([2, 1]) - it "deletes the last two lines", -> - keydown('d') - keydown('j') - expect(editor.getText()).toBe("12345") + describe "on the middle of second line", -> + it "deletes the last two lines", -> + editor.setCursorScreenPosition([1, 2]) + keydown('d') + keydown('j') + expect(editor.getText()).toBe("12345\n") describe "when followed by an k", -> + originalText = "12345\nabcde\nABCDE" + beforeEach -> - originalText = "12345\nabcde\nABCDE" editor.setText(originalText) - describe "on the end of the file", -> - editor.setCursorScreenPosition([4, 2]) - it "deletes the bottom two lines", -> - keydown('d') - keydown('k') - expect(editor.getText()).toBe("ABCDE") + describe "on the end of the file", -> + it "deletes the bottom two lines", -> + editor.setCursorScreenPosition([2, 4]) + keydown('d') + keydown('k') + expect(editor.getText()).toBe("12345\n") - describe "on the beginning of the file", -> + describe "on the beginning of the file", -> + xit "deletes nothing", -> editor.setCursorScreenPosition([0, 0]) - it "deletes nothing", -> - keydown('d') - keydown('k') - expect(editor.getText()).toBe(originalText) + keydown('d') + keydown('k') + expect(editor.getText()).toBe(originalText) - describe "when on the middle of second line", -> - editor.setCursorScreenPosition([2, 1]) - it "deletes the first two lines", -> - keydown('d') - keydown('k') - expect(editor.getText()).toBe("12345") + describe "when on the middle of second line", -> + it "deletes the first two lines", -> + editor.setCursorScreenPosition([1, 2]) + keydown('d') + keydown('k') + expect(editor.getText()).toBe("ABCDE") describe "when followed by a G", -> beforeEach -> @@ -509,7 +535,7 @@ describe "Operators", -> keydown('y') keydown('d') keydown('t') - commandModeInputKeydown(')') + normalModeInputKeydown(')') expect(editor.getText()).toBe("test ()") expect(editor.getCursorScreenPosition()).toEqual [0, 6] @@ -538,7 +564,7 @@ describe "Operators", -> keydown('d') keydown('t') - commandModeInputKeydown('d') + normalModeInputKeydown('d') expect(editor.getText()).toBe "d\nabc\nd" expect(editor.getCursorBufferPositions()).toEqual [ @@ -561,16 +587,45 @@ describe "Operators", -> editor.setText("12345\nabcde\nABCDE") describe "when followed by a c", -> - it "deletes the current line and enters insert mode", -> - editor.setCursorScreenPosition([1, 1]) + describe "with autoindent", -> + beforeEach -> + editor.setText("12345\n abcde\nABCDE") + editor.setCursorScreenPosition([1, 1]) + spyOn(editor, 'shouldAutoIndent').andReturn(true) + spyOn(editor, 'autoIndentBufferRow').andCallFake (line) -> + editor.indent() + spyOn(editor.languageMode, 'suggestedIndentForLineAtBufferRow').andCallFake -> 1 - keydown('c') - keydown('c') + it "deletes the current line and enters insert mode", -> + editor.setCursorScreenPosition([1, 1]) - expect(editor.getText()).toBe "12345\n\nABCDE" - expect(editor.getCursorScreenPosition()).toEqual [1, 0] - expect(editorElement.classList.contains('command-mode')).toBe(false) - expect(editorElement.classList.contains('insert-mode')).toBe(true) + keydown('c') + keydown('c') + + expect(editor.getText()).toBe "12345\n \nABCDE" + expect(editor.getCursorScreenPosition()).toEqual [1, 2] + expect(editorElement.classList.contains('normal-mode')).toBe(false) + expect(editorElement.classList.contains('insert-mode')).toBe(true) + + it "is repeatable", -> + keydown('c') + keydown('c') + editor.insertText("abc") + keydown 'escape' + expect(editor.getText()).toBe "12345\n abc\nABCDE" + editor.setCursorScreenPosition([2, 3]) + keydown '.' + expect(editor.getText()).toBe "12345\n abc\n abc\n" + + it "is undoable", -> + keydown('c') + keydown('c') + editor.insertText("abc") + keydown 'escape' + expect(editor.getText()).toBe "12345\n abc\nABCDE" + keydown 'u' + expect(editor.getText()).toBe "12345\n abcde\nABCDE" + expect(editor.getSelectedText()).toBe '' describe "when the cursor is on the last line", -> it "deletes the line's content and enters insert mode on the last line", -> @@ -581,7 +636,7 @@ describe "Operators", -> expect(editor.getText()).toBe "12345\nabcde\n\n" expect(editor.getCursorScreenPosition()).toEqual [2, 0] - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) expect(editorElement.classList.contains('insert-mode')).toBe(true) describe "when the cursor is on the only line", -> @@ -592,9 +647,9 @@ describe "Operators", -> keydown('c') keydown('c') - expect(editor.getText()).toBe "\n" + expect(editor.getText()).toBe "" expect(editor.getCursorScreenPosition()).toEqual [0, 0] - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) expect(editorElement.classList.contains('insert-mode')).toBe(true) describe "when followed by i w", -> @@ -611,7 +666,7 @@ describe "Operators", -> # Just cannot get "typing" to work correctly in test. editor.setText("12345\nfg\nABCDE") keydown('escape') - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) expect(editor.getText()).toBe "12345\nfg\nABCDE" keydown('u') @@ -651,6 +706,88 @@ describe "Operators", -> keydown('escape') expect(editor.getText()).toBe("12345\n\n") + describe "when followed by a %", -> + beforeEach -> + editor.setText("12345(67)8\nabc(d)e\nA()BCDE") + + describe "before brackets or on the first one", -> + beforeEach -> + editor.setCursorScreenPosition([0, 1]) + editor.addCursorAtScreenPosition([1, 1]) + editor.addCursorAtScreenPosition([2, 1]) + keydown('c') + keydown('%') + editor.insertText('x') + + it "replaces inclusively until matching bracket", -> + expect(editor.getText()).toBe("1x8\naxe\nAxBCDE") + expect(vimState.mode).toBe "insert" + + it "undoes correctly with u", -> + keydown('escape') + expect(vimState.mode).toBe "normal" + keydown 'u' + expect(editor.getText()).toBe("12345(67)8\nabc(d)e\nA()BCDE") + + describe "inside brackets or on the ending one", -> + it "replaces inclusively backwards until matching bracket", -> + editor.setCursorScreenPosition([0, 6]) + editor.addCursorAtScreenPosition([1, 5]) + editor.addCursorAtScreenPosition([2, 2]) + keydown('c') + keydown('%') + editor.insertText('x') + expect(editor.getText()).toBe("12345x7)8\nabcxe\nAxBCDE") + expect(vimState.mode).toBe "insert" + + describe "after or without brackets", -> + it "deletes nothing", -> + editor.setText("12345(67)8\nabc(d)e\nABCDE") + editor.setCursorScreenPosition([0, 9]) + editor.addCursorAtScreenPosition([2, 2]) + keydown('c') + keydown('%') + expect(editor.getText()).toBe("12345(67)8\nabc(d)e\nABCDE") + expect(vimState.mode).toBe "normal" + + describe "repetition with .", -> + beforeEach -> + editor.setCursorScreenPosition([0, 1]) + keydown('c') + keydown('%') + editor.insertText('x') + keydown('escape') + + it "repeats correctly before a bracket", -> + editor.setCursorScreenPosition([1, 0]) + keydown('.') + expect(editor.getText()).toBe("1x8\nxe\nA()BCDE") + expect(vimState.mode).toBe "normal" + + it "repeats correctly on the opening bracket", -> + editor.setCursorScreenPosition([1, 3]) + keydown('.') + expect(editor.getText()).toBe("1x8\nabcxe\nA()BCDE") + expect(vimState.mode).toBe "normal" + + it "repeats correctly inside brackets", -> + editor.setCursorScreenPosition([1, 4]) + keydown('.') + expect(editor.getText()).toBe("1x8\nabcx)e\nA()BCDE") + expect(vimState.mode).toBe "normal" + + it "repeats correctly on the closing bracket", -> + editor.setCursorScreenPosition([1, 5]) + keydown('.') + expect(editor.getText()).toBe("1x8\nabcxe\nA()BCDE") + expect(vimState.mode).toBe "normal" + + it "does nothing when repeated after a bracket", -> + editor.setCursorScreenPosition([2, 3]) + keydown('.') + expect(editor.getText()).toBe("1x8\nabc(d)e\nA()BCDE") + expect(vimState.mode).toBe "normal" + describe "when followed by a goto line G", -> beforeEach -> editor.setText "12345\nabcde\nABCDE" @@ -673,6 +810,130 @@ describe "Operators", -> keydown('escape') expect(editor.getText()).toBe("12345\n\nABCDE") + describe "in visual mode", -> + beforeEach -> + editor.setText "123456789\nabcde\nfghijklmnopq\nuvwxyz" + editor.setCursorScreenPosition [1, 1] + + describe "with characterwise selection on a single line", -> + it "repeats with .", -> + keydown 'v' + keydown '2' + keydown 'l' + keydown 'c' + editor.insertText "ab" + keydown 'escape' + expect(editor.getText()).toBe "123456789\naabe\nfghijklmnopq\nuvwxyz" + + editor.setCursorScreenPosition [0, 1] + keydown '.' + expect(editor.getText()).toBe "1ab56789\naabe\nfghijklmnopq\nuvwxyz" + + it "repeats shortened with . near the end of the line", -> + editor.setCursorScreenPosition [0, 2] + keydown 'v' + keydown '4' + keydown 'l' + keydown 'c' + editor.insertText "ab" + keydown 'escape' + expect(editor.getText()).toBe "12ab89\nabcde\nfghijklmnopq\nuvwxyz" + + editor.setCursorScreenPosition [1, 3] + keydown '.' + expect(editor.getText()).toBe "12ab89\nabcab\nfghijklmnopq\nuvwxyz" + + it "repeats shortened with . near the end of the line regardless of whether motion wrapping is enabled", -> + atom.config.set('vim-mode.wrapLeftRightMotion', true) + editor.setCursorScreenPosition [0, 2] + keydown 'v' + keydown '4' + keydown 'l' + keydown 'c' + editor.insertText "ab" + keydown 'escape' + expect(editor.getText()).toBe "12ab89\nabcde\nfghijklmnopq\nuvwxyz" + + editor.setCursorScreenPosition [1, 3] + keydown '.' + # this differs from VIM, which would eat the \n before fghij... + expect(editor.getText()).toBe "12ab89\nabcab\nfghijklmnopq\nuvwxyz" + + describe "is repeatable with characterwise selection over multiple lines", -> + it "repeats with .", -> + keydown 'v' + keydown 'j' + keydown '3' + keydown 'l' + keydown 'c' + editor.insertText "x" + keydown 'escape' + expect(editor.getText()).toBe "123456789\naxklmnopq\nuvwxyz" + + editor.setCursorScreenPosition [0, 1] + keydown '.' + expect(editor.getText()).toBe "1xnopq\nuvwxyz" + + it "repeats shortened with . near the end of the line", -> + # this behaviour is unlike VIM, see #737 + keydown 'v' + keydown 'j' + keydown '6' + keydown 'l' + keydown 'c' + editor.insertText "x" + keydown 'escape' + expect(editor.getText()).toBe "123456789\naxnopq\nuvwxyz" + + editor.setCursorScreenPosition [0, 1] + keydown '.' + expect(editor.getText()).toBe "1x\nuvwxyz" + + describe "is repeatable with linewise selection", -> + describe "with one line selected", -> + it "repeats with .", -> + keydown 'V', shift: true + keydown 'c' + editor.insertText "x" + keydown 'escape' + expect(editor.getText()).toBe "123456789\nx\nfghijklmnopq\nuvwxyz" + + editor.setCursorScreenPosition [0, 7] + keydown '.' + expect(editor.getText()).toBe "x\nx\nfghijklmnopq\nuvwxyz" + + editor.setCursorScreenPosition [2, 0] + keydown '.' + expect(editor.getText()).toBe "x\nx\nx\nuvwxyz" + + describe "with multiple lines selected", -> + it "repeats with .", -> + keydown 'V', shift: true + keydown 'j' + keydown 'c' + editor.insertText "x" + keydown 'escape' + expect(editor.getText()).toBe "123456789\nx\nuvwxyz" + + editor.setCursorScreenPosition [0, 7] + keydown '.' + expect(editor.getText()).toBe "x\nuvwxyz" + + it "repeats shortened with . near the end of the file", -> + keydown 'V', shift: true + keydown 'j' + keydown 'c' + editor.insertText "x" + keydown 'escape' + expect(editor.getText()).toBe "123456789\nx\nuvwxyz" + + editor.setCursorScreenPosition [1, 7] + keydown '.' + expect(editor.getText()).toBe "123456789\nx\n" + + xdescribe "is repeatable with block selection", -> + # there is no block selection yet + describe "the C keybinding", -> beforeEach -> editor.getBuffer().setText("012\n") @@ -682,13 +943,14 @@ describe "Operators", -> it "deletes the contents until the end of the line and enters insert mode", -> expect(editor.getText()).toBe "0\n" expect(editor.getCursorScreenPosition()).toEqual [0, 1] - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) expect(editorElement.classList.contains('insert-mode')).toBe(true) describe "the y keybinding", -> beforeEach -> - editor.getBuffer().setText("012 345\nabc\n") + editor.getBuffer().setText("012 345\nabc\ndefg\n") editor.setCursorScreenPosition([0, 4]) + vimState.setRegister('"', text: '345') describe "when selected lines in visual linewise mode", -> beforeEach -> @@ -766,7 +1028,7 @@ describe "Operators", -> it "does not yank when motion fails", -> keydown('y') keydown('t') - commandModeInputKeydown('x') + normalModeInputKeydown('x') expect(vimState.getRegister('"').text).toBe '345' describe "with a text object", -> @@ -782,11 +1044,11 @@ describe "Operators", -> keydown('y') keydown('h') - it "saves the left letter to the default register", -> - expect(vimState.getRegister('"').text).toBe " " + it "saves the left letter to the default register", -> + expect(vimState.getRegister('"').text).toBe " " - it "moves the cursor position to the left", -> - expect(editor.getCursorScreenPosition()).toEqual [0, 3] + it "moves the cursor position to the left", -> + expect(editor.getCursorScreenPosition()).toEqual [0, 3] describe "with a down motion", -> beforeEach -> @@ -799,6 +1061,18 @@ describe "Operators", -> it "leaves the cursor at the starting position", -> expect(editor.getCursorScreenPosition()).toEqual [0, 4] + describe "with an up motion", -> + beforeEach -> + editor.setCursorScreenPosition([2, 2]) + keydown 'y' + keydown 'k' + + it "saves both full lines to the default register", -> + expect(vimState.getRegister('"').text).toBe "abc\ndefg\n" + + it "puts the cursor on the first line and the original column", -> + expect(editor.getCursorScreenPosition()).toEqual [1, 2] + describe "when followed by a G", -> beforeEach -> originalText = "12345\nabcde\nABCDE" @@ -855,6 +1129,47 @@ describe "Operators", -> expect(vimState.getRegister('"').text).toBe '123' expect(editor.getCursorBufferPositions()).toEqual [[0, 0], [1, 2]] + describe "in a long file", -> + beforeEach -> + editor.setHeight(400) + editor.setLineHeightInPixels(10) + editor.setDefaultCharWidth(10) + text = "" + for i in [1..200] + text += "#{i}\n" + editor.setText(text) + + describe "yanking many lines forward", -> + it "does not scroll the window", -> + editor.setCursorBufferPosition [40, 1] + previousScrollTop = editor.getScrollTop() + + # yank many lines + keydown('y') + keydown('1') + keydown('6') + keydown('0') + keydown('G', shift: true) + + expect(editor.getScrollTop()).toEqual(previousScrollTop) + expect(editor.getCursorBufferPosition()).toEqual [40, 1] + expect(vimState.getRegister('"').text.split('\n').length).toBe 121 + + describe "yanking many lines backwards", -> + it "scrolls the window", -> + editor.setCursorBufferPosition [140, 1] + previousScrollTop = editor.getScrollTop() + + # yank many lines + keydown('y') + keydown('6') + keydown('0') + keydown('G', shift: true) + + expect(editor.getScrollTop()).toNotEqual previousScrollTop + expect(editor.getCursorBufferPosition()).toEqual [59, 1] + expect(vimState.getRegister('"').text.split('\n').length).toBe 83 + describe "the yy keybinding", -> describe "on a single line file", -> beforeEach -> @@ -918,6 +1233,15 @@ describe "Operators", -> expect(editor.getText()).toBe "034512\n" expect(editor.getCursorScreenPosition()).toEqual [0, 3] + describe "at the end of a line", -> + beforeEach -> + editor.setCursorScreenPosition [0, 2] + keydown('p') + + it "positions cursor correctly", -> + expect(editor.getText()).toBe "012345\n" + expect(editor.getCursorScreenPosition()).toEqual [0, 5] + describe "when useClipboardAsDefaultRegister enabled", -> it "inserts contents from clipboard", -> atom.config.set 'vim-mode.useClipboardAsDefaultRegister', true @@ -1260,26 +1584,50 @@ describe "Operators", -> it "outdents all three lines", -> expect(editor.getText()).toBe "12345\nabcde\nABCDE" - describe "in visual mode", -> + describe "in visual mode linewise", -> beforeEach -> editor.setCursorScreenPosition([0, 0]) keydown('v', shift: true) - keydown('>') + keydown('j') + + describe "single indent multiple lines", -> + beforeEach -> + keydown('>') + + it "indents both lines once and exits visual mode", -> + expect(editorElement.classList.contains('normal-mode')).toBe(true) + expect(editor.getText()).toBe " 12345\n abcde\nABCDE" + expect(editor.getSelectedBufferRanges()).toEqual [ [[0, 2], [0, 2]] ] - it "indents the current line and remains in visual mode", -> - expect(editorElement.classList.contains('visual-mode')).toBe(true) - expect(editor.getText()).toBe " 12345\nabcde\nABCDE" - expect(editor.getSelectedText()).toBe " 12345\n" + it "allows repeating the operation", -> + keydown('.') + expect(editor.getText()).toBe " 12345\n abcde\nABCDE" - it "allows repeating the operation", -> - keydown("escape") - keydown(".") - expect(editorElement.classList.contains('command-mode')).toBe(true) - expect(editor.getText()).toBe " 12345\nabcde\nABCDE" + describe "multiple indent multiple lines", -> + beforeEach -> + keydown('2') + keydown('>') + + it "indents both lines twice and exits visual mode", -> + expect(editorElement.classList.contains('normal-mode')).toBe(true) + expect(editor.getText()).toBe " 12345\n abcde\nABCDE" + expect(editor.getSelectedBufferRanges()).toEqual [ [[0, 4], [0, 4]] ] + + describe "with multiple selections", -> + beforeEach -> + editor.setCursorScreenPosition([1, 3]) + keydown('v') + keydown('j') + editor.addCursorAtScreenPosition([0, 0]) + + it "indents the lines and keeps the cursors", -> + keydown('>') + expect(editor.getText()).toBe " 12345\n abcde\n ABCDE" + expect(editor.getCursorScreenPositions()).toEqual [[1, 2], [0, 2]] describe "the < keybinding", -> beforeEach -> - editor.setText(" 12345\n abcde\nABCDE") + editor.setText(" 12345\n abcde\nABCDE") editor.setCursorScreenPosition([0, 0]) describe "when followed by a <", -> @@ -1287,9 +1635,9 @@ describe "Operators", -> keydown('<') keydown('<') - it "indents the current line", -> - expect(editor.getText()).toBe "12345\n abcde\nABCDE" - expect(editor.getCursorScreenPosition()).toEqual [0, 0] + it "outdents the current line", -> + expect(editor.getText()).toBe " 12345\n abcde\nABCDE" + expect(editor.getCursorScreenPosition()).toEqual [0, 2] describe "when followed by a repeating <", -> beforeEach -> @@ -1297,25 +1645,43 @@ describe "Operators", -> keydown('<') keydown('<') - it "indents multiple lines at once", -> - expect(editor.getText()).toBe "12345\nabcde\nABCDE" - expect(editor.getCursorScreenPosition()).toEqual [0, 0] + it "outdents multiple lines at once", -> + expect(editor.getText()).toBe " 12345\n abcde\nABCDE" + expect(editor.getCursorScreenPosition()).toEqual [0, 2] describe "undo behavior", -> beforeEach -> keydown('u') it "indents both lines", -> - expect(editor.getText()).toBe " 12345\n abcde\nABCDE" + expect(editor.getText()).toBe " 12345\n abcde\nABCDE" - describe "in visual mode", -> + describe "in visual mode linewise", -> beforeEach -> keydown('v', shift: true) - keydown('<') + keydown('j') + + describe "single outdent multiple lines", -> + beforeEach -> + keydown('<') + + it "outdents the current line and exits visual mode", -> + expect(editorElement.classList.contains('normal-mode')).toBe(true) + expect(editor.getText()).toBe " 12345\n abcde\nABCDE" + expect(editor.getSelectedBufferRanges()).toEqual [ [[0, 2], [0, 2]] ] + + it "allows repeating the operation", -> + keydown('.') + expect(editor.getText()).toBe "12345\nabcde\nABCDE" - it "indents the current line and remains in visual mode", -> - expect(editorElement.classList.contains('visual-mode')).toBe(true) - expect(editor.getText()).toBe "12345\n abcde\nABCDE" - expect(editor.getSelectedText()).toBe "12345\n" + describe "multiple outdent multiple lines", -> + beforeEach -> + keydown('2') + keydown('<') + + it "outdents both lines twice and exits visual mode", -> + expect(editorElement.classList.contains('normal-mode')).toBe(true) + expect(editor.getText()).toBe "12345\nabcde\nABCDE" + expect(editor.getSelectedBufferRanges()).toEqual [ [[0, 0], [0, 0]] ] describe "the = keybinding", -> oldGrammar = [] @@ -1344,6 +1710,16 @@ describe "Operators", -> it "indents the current line", -> expect(editor.indentationForBufferRow(1)).toBe 0 + describe "when followed by a G", -> + beforeEach -> + editor.setCursorScreenPosition([0, 0]) + keydown('=') + keydown('G', shift: true) + + it "uses the default count", -> + expect(editor.indentationForBufferRow(1)).toBe 0 + expect(editor.indentationForBufferRow(2)).toBe 0 + describe "when followed by a repeating =", -> beforeEach -> keydown('2') @@ -1389,7 +1765,7 @@ describe "Operators", -> it "replaces a single character", -> keydown('r') - commandModeInputKeydown('x') + normalModeInputKeydown('x') expect(editor.getText()).toBe 'x2\nx4\n\n' it "does nothing when cancelled", -> @@ -1397,30 +1773,30 @@ describe "Operators", -> expect(editorElement.classList.contains('operator-pending-mode')).toBe(true) keydown('escape') expect(editor.getText()).toBe '12\n34\n\n' - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "replaces a single character with a line break", -> keydown('r') - atom.commands.dispatch(editor.commandModeInputView.editorElement, 'core:confirm') + atom.commands.dispatch(editor.normalModeInputView.editorElement, 'core:confirm') expect(editor.getText()).toBe '\n2\n\n4\n\n' expect(editor.getCursorBufferPositions()).toEqual [[1, 0], [3, 0]] it "composes properly with motions", -> keydown('2') keydown('r') - commandModeInputKeydown('x') + normalModeInputKeydown('x') expect(editor.getText()).toBe 'xx\nxx\n\n' it "does nothing on an empty line", -> editor.setCursorBufferPosition([2, 0]) keydown('r') - commandModeInputKeydown('x') + normalModeInputKeydown('x') expect(editor.getText()).toBe '12\n34\n\n' it "does nothing if asked to replace more characters than there are on a line", -> keydown('3') keydown('r') - commandModeInputKeydown('x') + normalModeInputKeydown('x') expect(editor.getText()).toBe '12\n34\n\n' describe "when in visual mode", -> @@ -1430,14 +1806,42 @@ describe "Operators", -> it "replaces the entire selection with the given character", -> keydown('r') - commandModeInputKeydown('x') + normalModeInputKeydown('x') expect(editor.getText()).toBe 'xx\nxx\n\n' it "leaves the cursor at the beginning of the selection", -> keydown('r') - commandModeInputKeydown('x') + normalModeInputKeydown('x') expect(editor.getCursorBufferPositions()).toEqual [[0, 0], [1, 0]] + describe 'with accented characters', -> + buildIMECompositionEvent = (event, {data, target}={}) -> + event = new Event(event) + event.data = data + Object.defineProperty(event, 'target', get: -> target) + event + + buildTextInputEvent = ({data, target}) -> + event = new Event('textInput') + event.data = data + Object.defineProperty(event, 'target', get: -> target) + event + + it 'works with IME composition', -> + keydown('r') + normalModeEditor = editor.normalModeInputView.editorElement + jasmine.attachToDOM(normalModeEditor) + domNode = normalModeEditor.component.domNode + inputNode = domNode.querySelector('.hidden-input') + domNode.dispatchEvent(buildIMECompositionEvent('compositionstart', target: inputNode)) + domNode.dispatchEvent(buildIMECompositionEvent('compositionupdate', data: 's', target: inputNode)) + expect(normalModeEditor.getModel().getText()).toEqual 's' + domNode.dispatchEvent(buildIMECompositionEvent('compositionupdate', data: 'sd', target: inputNode)) + expect(normalModeEditor.getModel().getText()).toEqual 'sd' + domNode.dispatchEvent(buildIMECompositionEvent('compositionend', target: inputNode)) + domNode.dispatchEvent(buildTextInputEvent(data: '速度', target: inputNode)) + expect(editor.getText()).toBe '速度2\n速度4\n\n' + describe 'the m keybinding', -> beforeEach -> editor.setText('12\n34\n56\n') @@ -1445,7 +1849,7 @@ describe "Operators", -> it 'marks a position', -> keydown('m') - commandModeInputKeydown('a') + normalModeInputKeydown('a') expect(vimState.getMark('a')).toEqual [0, 1] describe 'the ~ keybinding', -> @@ -1490,6 +1894,13 @@ describe "Operators", -> keydown("l") expect(editor.getText()).toBe 'Abc\nXyZ' + it "uses default count", -> + editor.setCursorBufferPosition([0, 0]) + keydown("g") + keydown("~") + keydown("G", shift: true) + expect(editor.getText()).toBe 'AbC\nxYz' + describe 'the U keybinding', -> beforeEach -> editor.setText('aBc\nXyZ') @@ -1513,6 +1924,13 @@ describe "Operators", -> expect(editor.getText()).toBe 'ABC\nXYZ' expect(editor.getCursorScreenPosition()).toEqual [1, 2] + it "uses default count", -> + editor.setCursorBufferPosition([0, 0]) + keydown("g") + keydown("U", shift: true) + keydown("G", shift: true) + expect(editor.getText()).toBe 'ABC\nXYZ' + it "makes the selected text uppercase in visual mode", -> keydown("V", shift: true) keydown("U", shift: true) @@ -1530,6 +1948,13 @@ describe "Operators", -> expect(editor.getText()).toBe 'abc\nXyZ' expect(editor.getCursorScreenPosition()).toEqual [0, 2] + it "uses default count", -> + editor.setCursorBufferPosition([0, 0]) + keydown("g") + keydown("u") + keydown("G", shift: true) + expect(editor.getText()).toBe 'abc\nxyz' + it "makes the selected text lowercase in visual mode", -> keydown("V", shift: true) keydown("u") @@ -1650,18 +2075,21 @@ describe "Operators", -> keydown('a', ctrl: true) expect(editor.getCursorBufferPositions()).toEqual [[0, 2], [1, 3], [2, 4], [3, 3], [4, 0]] expect(editor.getText()).toBe '124\nab46\ncd-66ef\nab-4\na-bcdef' + expect(atom.beep).not.toHaveBeenCalled() it "repeats with .", -> keydown 'a', ctrl: true keydown '.' expect(editor.getCursorBufferPositions()).toEqual [[0, 2], [1, 3], [2, 4], [3, 3], [4, 0]] expect(editor.getText()).toBe '125\nab47\ncd-65ef\nab-3\na-bcdef' + expect(atom.beep).not.toHaveBeenCalled() it "can have a count", -> keydown '5' keydown 'a', ctrl: true expect(editor.getCursorBufferPositions()).toEqual [[0, 2], [1, 3], [2, 4], [3, 2], [4, 0]] expect(editor.getText()).toBe '128\nab50\ncd-62ef\nab0\na-bcdef' + expect(atom.beep).not.toHaveBeenCalled() it "can make a negative number positive, change number of digits", -> keydown '9' @@ -1669,12 +2097,14 @@ describe "Operators", -> keydown 'a', ctrl: true expect(editor.getCursorBufferPositions()).toEqual [[0, 2], [1, 4], [2, 3], [3, 3], [4, 0]] expect(editor.getText()).toBe '222\nab144\ncd32ef\nab94\na-bcdef' + expect(atom.beep).not.toHaveBeenCalled() it "does nothing when cursor is after the number", -> editor.setCursorBufferPosition [2, 5] keydown 'a', ctrl: true expect(editor.getCursorBufferPositions()).toEqual [[2, 5]] expect(editor.getText()).toBe '123\nab45\ncd-67ef\nab-5\na-bcdef' + expect(atom.beep).toHaveBeenCalled() it "does nothing on an empty line", -> editor.setText('\n') @@ -1683,6 +2113,7 @@ describe "Operators", -> keydown 'a', ctrl: true expect(editor.getCursorBufferPositions()).toEqual [[0, 0], [1, 0]] expect(editor.getText()).toBe '\n' + expect(atom.beep).toHaveBeenCalled() it "honours the vim-mode:numberRegex setting", -> editor.setText('123\nab45\ncd -67ef\nab-5\na-bcdef') @@ -1695,24 +2126,28 @@ describe "Operators", -> keydown('a', ctrl: true) expect(editor.getCursorBufferPositions()).toEqual [[0, 2], [1, 3], [2, 5], [3, 3], [4, 0]] expect(editor.getText()).toBe '124\nab46\ncd -66ef\nab-6\na-bcdef' + expect(atom.beep).not.toHaveBeenCalled() describe "decreasing numbers", -> it "decreases the next number", -> keydown('x', ctrl: true) expect(editor.getCursorBufferPositions()).toEqual [[0, 2], [1, 3], [2, 4], [3, 3], [4, 0]] expect(editor.getText()).toBe '122\nab44\ncd-68ef\nab-6\na-bcdef' + expect(atom.beep).not.toHaveBeenCalled() it "repeats with .", -> keydown 'x', ctrl: true keydown '.' expect(editor.getCursorBufferPositions()).toEqual [[0, 2], [1, 3], [2, 4], [3, 3], [4, 0]] expect(editor.getText()).toBe '121\nab43\ncd-69ef\nab-7\na-bcdef' + expect(atom.beep).not.toHaveBeenCalled() it "can have a count", -> keydown '5' keydown 'x', ctrl: true expect(editor.getCursorBufferPositions()).toEqual [[0, 2], [1, 3], [2, 4], [3, 4], [4, 0]] expect(editor.getText()).toBe '118\nab40\ncd-72ef\nab-10\na-bcdef' + expect(atom.beep).not.toHaveBeenCalled() it "can make a positive number negative, change number of digits", -> keydown '9' @@ -1720,12 +2155,14 @@ describe "Operators", -> keydown 'x', ctrl: true expect(editor.getCursorBufferPositions()).toEqual [[0, 1], [1, 4], [2, 5], [3, 5], [4, 0]] expect(editor.getText()).toBe '24\nab-54\ncd-166ef\nab-104\na-bcdef' + expect(atom.beep).not.toHaveBeenCalled() it "does nothing when cursor is after the number", -> editor.setCursorBufferPosition [2, 5] keydown 'x', ctrl: true expect(editor.getCursorBufferPositions()).toEqual [[2, 5]] expect(editor.getText()).toBe '123\nab45\ncd-67ef\nab-5\na-bcdef' + expect(atom.beep).toHaveBeenCalled() it "does nothing on an empty line", -> editor.setText('\n') @@ -1734,6 +2171,7 @@ describe "Operators", -> keydown 'x', ctrl: true expect(editor.getCursorBufferPositions()).toEqual [[0, 0], [1, 0]] expect(editor.getText()).toBe '\n' + expect(atom.beep).toHaveBeenCalled() it "honours the vim-mode:numberRegex setting", -> editor.setText('123\nab45\ncd -67ef\nab-5\na-bcdef') @@ -1746,3 +2184,101 @@ describe "Operators", -> keydown('x', ctrl: true) expect(editor.getCursorBufferPositions()).toEqual [[0, 2], [1, 3], [2, 5], [3, 3], [4, 0]] expect(editor.getText()).toBe '122\nab44\ncd -68ef\nab-4\na-bcdef' + expect(atom.beep).not.toHaveBeenCalled() + + describe 'the R keybinding', -> + beforeEach -> + editor.setText('12345\n67890') + editor.setCursorBufferPosition([0, 2]) + + it "enters replace mode and replaces characters", -> + keydown "R", shift: true + expect(editorElement.classList.contains('insert-mode')).toBe true + expect(editorElement.classList.contains('replace-mode')).toBe true + + editor.insertText "ab" + keydown 'escape' + + expect(editor.getText()).toBe "12ab5\n67890" + expect(editor.getCursorScreenPosition()).toEqual [0, 3] + expect(editorElement.classList.contains('insert-mode')).toBe false + expect(editorElement.classList.contains('replace-mode')).toBe false + expect(editorElement.classList.contains('normal-mode')).toBe true + + it "continues beyond end of line as insert", -> + keydown "R", shift: true + expect(editorElement.classList.contains('insert-mode')).toBe true + expect(editorElement.classList.contains('replace-mode')).toBe true + + editor.insertText "abcde" + keydown 'escape' + + expect(editor.getText()).toBe "12abcde\n67890" + + it "treats backspace as undo", -> + editor.insertText "foo" + keydown "R", shift: true + + editor.insertText "a" + editor.insertText "b" + expect(editor.getText()).toBe "12fooab5\n67890" + + keydown 'backspace', raw: true + expect(editor.getText()).toBe "12fooa45\n67890" + + editor.insertText "c" + + expect(editor.getText()).toBe "12fooac5\n67890" + + keydown 'backspace', raw: true + keydown 'backspace', raw: true + + expect(editor.getText()).toBe "12foo345\n67890" + expect(editor.getSelectedText()).toBe "" + + keydown 'backspace', raw: true + expect(editor.getText()).toBe "12foo345\n67890" + expect(editor.getSelectedText()).toBe "" + + it "can be repeated", -> + keydown "R", shift: true + editor.insertText "ab" + keydown 'escape' + editor.setCursorBufferPosition([1, 2]) + keydown '.' + expect(editor.getText()).toBe "12ab5\n67ab0" + expect(editor.getCursorScreenPosition()).toEqual [1, 3] + + editor.setCursorBufferPosition([0, 4]) + keydown '.' + expect(editor.getText()).toBe "12abab\n67ab0" + expect(editor.getCursorScreenPosition()).toEqual [0, 5] + + it "can be interrupted by arrow keys and behave as insert for repeat", -> + # FIXME don't know how to test this (also, depends on PR #568) + + it "repeats correctly when backspace was used in the text", -> + keydown "R", shift: true + editor.insertText "a" + keydown 'backspace', raw: true + editor.insertText "b" + keydown 'escape' + editor.setCursorBufferPosition([1, 2]) + keydown '.' + expect(editor.getText()).toBe "12b45\n67b90" + expect(editor.getCursorScreenPosition()).toEqual [1, 2] + + editor.setCursorBufferPosition([0, 4]) + keydown '.' + expect(editor.getText()).toBe "12b4b\n67b90" + expect(editor.getCursorScreenPosition()).toEqual [0, 4] + + it "doesn't replace a character if newline is entered", -> + keydown "R", shift: true + expect(editorElement.classList.contains('insert-mode')).toBe true + expect(editorElement.classList.contains('replace-mode')).toBe true + + editor.insertText "\n" + keydown 'escape' + + expect(editor.getText()).toBe "12\n345\n67890" diff --git a/atom/packages/vim-mode/spec/prefixes-spec.coffee b/atom/packages/vim-mode/spec/prefixes-spec.coffee index e782d20..71c4a12 100644 --- a/atom/packages/vim-mode/spec/prefixes-spec.coffee +++ b/atom/packages/vim-mode/spec/prefixes-spec.coffee @@ -11,8 +11,8 @@ describe "Prefixes", -> editorElement = element editor = editorElement.getModel() vimState = editorElement.vimState - vimState.activateCommandMode() - vimState.resetCommandMode() + vimState.activateNormalMode() + vimState.resetNormalMode() keydown = (key, options={}) -> options.element ?= editorElement @@ -146,3 +146,37 @@ describe "Prefixes", -> it "throws away anything written to it", -> vimState.setRegister('%', "new content") expect(vimState.getRegister('%').text).toEqual '/Users/atom/known_value.txt' + + describe "the ctrl-r command in insert mode", -> + beforeEach -> + editor.setText "02\n" + editor.setCursorScreenPosition [0, 0] + vimState.setRegister('"', text: '345') + vimState.setRegister('a', text: 'abc') + atom.clipboard.write "clip" + keydown 'a' + editor.insertText '1' + + it "inserts contents of the unnamed register with \"", -> + keydown 'r', ctrl: true + keydown '"' + expect(editor.getText()).toBe '013452\n' + + describe "when useClipboardAsDefaultRegister enabled", -> + it "inserts contents from clipboard with \"", -> + atom.config.set 'vim-mode.useClipboardAsDefaultRegister', true + keydown 'r', ctrl: true + keydown '"' + expect(editor.getText()).toBe '01clip2\n' + + it "inserts contents of the 'a' register", -> + keydown 'r', ctrl: true + keydown 'a' + expect(editor.getText()).toBe '01abc2\n' + + it "is cancelled with the escape key", -> + keydown 'r', ctrl: true + keydown 'escape' + expect(editor.getText()).toBe '012\n' + expect(vimState.mode).toBe "insert" + expect(editor.getCursorScreenPosition()).toEqual [0, 2] diff --git a/atom/packages/vim-mode/spec/scroll-spec.coffee b/atom/packages/vim-mode/spec/scroll-spec.coffee index 9473193..ebe400a 100644 --- a/atom/packages/vim-mode/spec/scroll-spec.coffee +++ b/atom/packages/vim-mode/spec/scroll-spec.coffee @@ -11,8 +11,8 @@ describe "Scrolling", -> editorElement = element editor = editorElement.getModel() vimState = editorElement.vimState - vimState.activateCommandMode() - vimState.resetCommandMode() + vimState.activateNormalMode() + vimState.resetNormalMode() keydown = (key, options={}) -> options.element ?= editorElement @@ -120,3 +120,111 @@ describe "Scrolling", -> keydown('b') expect(editor.setScrollTop).toHaveBeenCalledWith(860) expect(editor.moveToFirstCharacterOfLine).not.toHaveBeenCalled() + + describe "horizontal scroll cursor keybindings", -> + beforeEach -> + editor.setWidth(600) + editor.setLineHeightInPixels(10) + editor.setDefaultCharWidth(10) + text = "" + for i in [100..199] + text += "#{i} " + editor.setText(text) + editor.setCursorBufferPosition([0, 0]) + + describe "the zs keybinding", -> + zsPos = (pos) -> + editor.setCursorBufferPosition([0, pos]) + keydown('z') + keydown('s') + editor.getScrollLeft() + + startPosition = NaN + + beforeEach -> + startPosition = editor.getScrollLeft() + + it "does nothing near the start of the line", -> + pos1 = zsPos(1) + expect(pos1).toEqual(startPosition) + + it "moves the cursor the nearest it can to the left edge of the editor", -> + pos10 = zsPos(10) + expect(pos10).toBeGreaterThan(startPosition) + + pos11 = zsPos(11) + expect(pos11 - pos10).toEqual(10) + + it "does nothing near the end of the line", -> + posEnd = zsPos(399) + expect(editor.getCursorBufferPosition()).toEqual [0, 399] + + pos390 = zsPos(390) + expect(pos390).toEqual(posEnd) + expect(editor.getCursorBufferPosition()).toEqual [0, 390] + + pos340 = zsPos(340) + expect(pos340).toBeLessThan(posEnd) + pos342 = zsPos(342) + expect(pos342 - pos340).toEqual(20) + + it "does nothing if all lines are short", -> + editor.setText('short') + startPosition = editor.getScrollLeft() + pos1 = zsPos(1) + expect(pos1).toEqual(startPosition) + expect(editor.getCursorBufferPosition()).toEqual [0, 1] + pos10 = zsPos(10) + expect(pos10).toEqual(startPosition) + expect(editor.getCursorBufferPosition()).toEqual [0, 4] + + + describe "the ze keybinding", -> + zePos = (pos) -> + editor.setCursorBufferPosition([0, pos]) + keydown('z') + keydown('e') + editor.getScrollLeft() + + startPosition = NaN + + beforeEach -> + startPosition = editor.getScrollLeft() + + it "does nothing near the start of the line", -> + pos1 = zePos(1) + expect(pos1).toEqual(startPosition) + + pos40 = zePos(40) + expect(pos40).toEqual(startPosition) + + it "moves the cursor the nearest it can to the right edge of the editor", -> + pos110 = zePos(110) + expect(pos110).toBeGreaterThan(startPosition) + + pos109 = zePos(109) + expect(pos110 - pos109).toEqual(10) + + it "does nothing when very near the end of the line", -> + posEnd = zePos(399) + expect(editor.getCursorBufferPosition()).toEqual [0, 399] + + pos397 = zePos(397) + expect(pos397).toEqual(posEnd) + expect(editor.getCursorBufferPosition()).toEqual [0, 397] + + pos380 = zePos(380) + expect(pos380).toBeLessThan(posEnd) + + pos382 = zePos(382) + expect(pos382 - pos380).toEqual(20) + + it "does nothing if all lines are short", -> + editor.setText('short') + startPosition = editor.getScrollLeft() + pos1 = zePos(1) + expect(pos1).toEqual(startPosition) + expect(editor.getCursorBufferPosition()).toEqual [0, 1] + pos10 = zePos(10) + expect(pos10).toEqual(startPosition) + expect(editor.getCursorBufferPosition()).toEqual [0, 4] diff --git a/atom/packages/vim-mode/spec/spec-helper.coffee b/atom/packages/vim-mode/spec/spec-helper.coffee index 88ba4b2..7cff2fc 100644 --- a/atom/packages/vim-mode/spec/spec-helper.coffee +++ b/atom/packages/vim-mode/spec/spec-helper.coffee @@ -3,8 +3,13 @@ GlobalVimState = require '../lib/global-vim-state' VimMode = require '../lib/vim-mode' StatusBarManager = require '../lib/status-bar-manager' +[globalVimState, statusBarManager] = [] + beforeEach -> atom.workspace ||= {} + statusBarManager = null + globalVimState = null + spyOn(atom, 'beep') getEditorElement = (callback) -> textEditor = null @@ -17,11 +22,16 @@ getEditorElement = (callback) -> element = document.createElement("atom-text-editor") element.setModel(textEditor) element.classList.add('vim-mode') - element.vimState = new VimState(element, new StatusBarManager, new GlobalVimState) + statusBarManager ?= new StatusBarManager + globalVimState ?= new GlobalVimState + element.vimState = new VimState(element, statusBarManager, globalVimState) element.addEventListener "keydown", (e) -> atom.keymaps.handleKeyboardEvent(e) + # mock parent element for the text editor + document.createElement('html').appendChild(atom.views.getView(textEditor)) + callback(element) mockPlatform = (editorElement, platform) -> diff --git a/atom/packages/vim-mode/spec/text-objects-spec.coffee b/atom/packages/vim-mode/spec/text-objects-spec.coffee index 6991dc7..92b4a7a 100644 --- a/atom/packages/vim-mode/spec/text-objects-spec.coffee +++ b/atom/packages/vim-mode/spec/text-objects-spec.coffee @@ -11,15 +11,23 @@ describe "TextObjects", -> editorElement = element editor = editorElement.getModel() vimState = editorElement.vimState - vimState.activateCommandMode() - vimState.resetCommandMode() + vimState.activateNormalMode() + vimState.resetNormalMode() keydown = (key, options={}) -> options.element ?= editorElement helpers.keydown(key, options) - commandModeInputKeydown = (key, opts = {}) -> - editor.commandModeInputView.editorElement.getModel().setText(key) + describe "Text Object commands in normal mode not preceded by an operator", -> + beforeEach -> + vimState.activateNormalMode() + + it "selects the appropriate text", -> + editor.setText("<html> text </html>") + editor.setCursorScreenPosition([0, 7]) + # Users could dispatch it via the command palette + atom.commands.dispatch(editorElement, "vim-mode:select-inside-tags") + expect(editor.getSelectedScreenRange()).toEqual [[0, 6], [0, 12]] describe "the 'iw' text object", -> beforeEach -> @@ -35,7 +43,7 @@ describe "TextObjects", -> expect(editor.getCursorScreenPosition()).toEqual [0, 6] expect(vimState.getRegister('"').text).toBe "abcde" expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "selects inside the current word in visual mode", -> keydown('v') @@ -44,6 +52,16 @@ describe "TextObjects", -> expect(editor.getSelectedScreenRange()).toEqual [[0, 6], [0, 11]] + it "expands an existing selection in visual mode", -> + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('i') + keydown('w') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 9], [0, 17]] + it "works with multiple cursors", -> editor.addCursorAtBufferPosition([0, 1]) keydown("v") @@ -54,6 +72,39 @@ describe "TextObjects", -> [[0, 0], [0, 5]] ] + describe "the 'iW' text object", -> + beforeEach -> + editor.setText("12(45 ab'de ABCDE") + editor.setCursorScreenPosition([0, 9]) + + it "applies operators inside the current whole word in operator-pending mode", -> + keydown('d') + keydown('i') + keydown('W', shift: true) + + expect(editor.getText()).toBe "12(45 ABCDE" + expect(editor.getCursorScreenPosition()).toEqual [0, 6] + expect(vimState.getRegister('"').text).toBe "ab'de" + expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "selects inside the current whole word in visual mode", -> + keydown('v') + keydown('i') + keydown('W', shift: true) + + expect(editor.getSelectedScreenRange()).toEqual [[0, 6], [0, 11]] + + it "expands an existing selection in visual mode", -> + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('i') + keydown('W', shift: true) + + expect(editor.getSelectedScreenRange()).toEqual [[0, 9], [0, 17]] + describe "the 'i(' text object", -> beforeEach -> editor.setText("( something in here and in (here) )") @@ -66,7 +117,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "()" expect(editor.getCursorScreenPosition()).toEqual [0, 1] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators inside the current word in operator-pending mode (second test)", -> editor.setCursorScreenPosition([0, 29]) @@ -76,7 +127,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "( something in here and in () )" expect(editor.getCursorScreenPosition()).toEqual [0, 28] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "works with multiple cursors", -> editor.setText("( a b ) cde ( f g h ) ijk") @@ -92,6 +143,18 @@ describe "TextObjects", -> [[0, 13], [0, 20]] ] + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('i') + keydown('(') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 32]] + describe "the 'i{' text object", -> beforeEach -> editor.setText("{ something in here and in {here} }") @@ -104,7 +167,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "{}" expect(editor.getCursorScreenPosition()).toEqual [0, 1] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators inside the current word in operator-pending mode (second test)", -> editor.setCursorScreenPosition([0, 29]) @@ -114,7 +177,19 @@ describe "TextObjects", -> expect(editor.getText()).toBe "{ something in here and in {} }" expect(editor.getCursorScreenPosition()).toEqual [0, 28] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('i') + keydown('{') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 32]] describe "the 'i<' text object", -> beforeEach -> @@ -128,7 +203,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "<>" expect(editor.getCursorScreenPosition()).toEqual [0, 1] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators inside the current word in operator-pending mode (second test)", -> editor.setCursorScreenPosition([0, 29]) @@ -138,7 +213,19 @@ describe "TextObjects", -> expect(editor.getText()).toBe "< something in here and in <> >" expect(editor.getCursorScreenPosition()).toEqual [0, 28] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('i') + keydown('<') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 32]] describe "the 'it' text object", -> beforeEach -> @@ -152,7 +239,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "<something>here</something><again>" expect(editor.getCursorScreenPosition()).toEqual [0, 5] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators inside the current word in operator-pending mode", -> editor.setCursorScreenPosition([0, 13]) @@ -162,15 +249,24 @@ describe "TextObjects", -> expect(editor.getText()).toBe "<something></something><again>" expect(editor.getCursorScreenPosition()).toEqual [0, 11] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 7]) + keydown('v') + keydown('6') + keydown('l') + keydown('i') + keydown('t') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 7], [0, 15]] describe "the 'ip' text object", -> beforeEach -> editor.setText("\nParagraph-1\nParagraph-1\nParagraph-1\n\n") - editor.setCursorScreenPosition([2, 2]) + editor.setCursorBufferPosition([2, 2]) it "applies operators inside the current paragraph in operator-pending mode", -> - keydown('y') keydown('i') keydown('p') @@ -179,7 +275,7 @@ describe "TextObjects", -> expect(editor.getCursorScreenPosition()).toEqual [1, 0] expect(vimState.getRegister('"').text).toBe "Paragraph-1\nParagraph-1\nParagraph-1\n" expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "selects inside the current paragraph in visual mode", -> keydown('v') @@ -188,30 +284,105 @@ describe "TextObjects", -> expect(editor.getSelectedScreenRange()).toEqual [[1, 0], [4, 0]] + it "selects between paragraphs in visual mode if invoked on a empty line", -> + editor.setText("text\n\n\n\ntext\n") + editor.setCursorBufferPosition([1, 0]) + + keydown('v') + keydown('i') + keydown('p') + + expect(editor.getSelectedScreenRange()).toEqual [[1, 0], [4, 0]] + + it "selects all the lines", -> + editor.setText("text\ntext\ntext\n") + editor.setCursorBufferPosition([0, 0]) + + keydown('v') + keydown('i') + keydown('p') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 0], [3, 0]] + + it "expands an existing selection in visual mode", -> + editor.setText("\nParagraph-1\nParagraph-1\nParagraph-1\n\n\nParagraph-2\nParagraph-2\nParagraph-2\n") + editor.setCursorBufferPosition([2, 2]) + + keydown('v') + keydown('i') + keydown('p') + + keydown('j') + keydown('j') + keydown('j') + keydown('i') + keydown('p') + + expect(editor.getSelectedScreenRange()).toEqual [[1, 0], [9, 0]] + describe "the 'ap' text object", -> beforeEach -> - editor.setText("text\n\nParagraph-1\nParagraph-1\nParagraph-1\n\nmoretext") + editor.setText("text\n\nParagraph-1\nParagraph-1\nParagraph-1\n\n\nmoretext") editor.setCursorScreenPosition([3, 2]) it "applies operators around the current paragraph in operator-pending mode", -> - keydown('y') keydown('a') keydown('p') - expect(editor.getText()).toBe "text\n\nParagraph-1\nParagraph-1\nParagraph-1\n\nmoretext" + expect(editor.getText()).toBe "text\n\nParagraph-1\nParagraph-1\nParagraph-1\n\n\nmoretext" expect(editor.getCursorScreenPosition()).toEqual [2, 0] - expect(vimState.getRegister('"').text).toBe "Paragraph-1\nParagraph-1\nParagraph-1\n\n" + expect(vimState.getRegister('"').text).toBe "Paragraph-1\nParagraph-1\nParagraph-1\n\n\n" expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "selects around the current paragraph in visual mode", -> keydown('v') keydown('a') keydown('p') - expect(editor.getSelectedScreenRange()).toEqual [[2, 0], [6, 0]] - + expect(editor.getSelectedScreenRange()).toEqual [[2, 0], [7, 0]] + + it "applies operators around the next paragraph in operator-pending mode when started from a blank/only-whitespace line", -> + editor.setText("text\n\n\n\nParagraph-1\nParagraph-1\nParagraph-1\n\n\nmoretext") + editor.setCursorBufferPosition([1, 0]) + + keydown('y') + keydown('a') + keydown('p') + + expect(editor.getText()).toBe "text\n\n\n\nParagraph-1\nParagraph-1\nParagraph-1\n\n\nmoretext" + expect(editor.getCursorScreenPosition()).toEqual [1, 0] + expect(vimState.getRegister('"').text).toBe "\n\n\nParagraph-1\nParagraph-1\nParagraph-1\n" + expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "selects around the next paragraph in visual mode when started from a blank/only-whitespace line", -> + editor.setText("text\n\n\n\nparagraph-1\nparagraph-1\nparagraph-1\n\n\nmoretext") + editor.setCursorBufferPosition([1, 0]) + + keydown('v') + keydown('a') + keydown('p') + + expect(editor.getSelectedScreenRange()).toEqual [[1, 0], [7, 0]] + + it "expands an existing selection in visual mode", -> + editor.setText("text\n\n\n\nparagraph-1\nparagraph-1\nparagraph-1\n\n\n\nparagraph-2\nparagraph-2\nparagraph-2\n\n\nmoretext") + editor.setCursorBufferPosition([5, 0]) + + keydown('v') + keydown('a') + keydown('p') + + keydown('j') + keydown('j') + keydown('j') + keydown('i') + keydown('p') + + expect(editor.getSelectedScreenRange()).toEqual [[4, 0], [13, 0]] + describe "the 'i[' text object", -> beforeEach -> editor.setText("[ something in here and in [here] ]") @@ -224,7 +395,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "[]" expect(editor.getCursorScreenPosition()).toEqual [0, 1] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators inside the current word in operator-pending mode (second test)", -> editor.setCursorScreenPosition([0, 29]) @@ -234,7 +405,19 @@ describe "TextObjects", -> expect(editor.getText()).toBe "[ something in here and in [] ]" expect(editor.getCursorScreenPosition()).toEqual [0, 28] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('i') + keydown('[') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 32]] describe "the 'i\'' text object", -> beforeEach -> @@ -248,7 +431,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "''here' ' and over here" expect(editor.getCursorScreenPosition()).toEqual [0, 1] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators inside the next string in operator-pending mode (if not in a string)", -> editor.setCursorScreenPosition([0, 29]) @@ -258,7 +441,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "' something in here and in 'here'' and over here" expect(editor.getCursorScreenPosition()).toEqual [0, 33] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "makes no change if past the last string on a line", -> editor.setCursorScreenPosition([0, 39]) @@ -268,7 +451,19 @@ describe "TextObjects", -> expect(editor.getText()).toBe "' something in here and in 'here' ' and over here" expect(editor.getCursorScreenPosition()).toEqual [0, 39] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('i') + keydown('\'') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 34]] describe "the 'i\"' text object", -> beforeEach -> @@ -282,7 +477,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "\"\"here\" \" and over here" expect(editor.getCursorScreenPosition()).toEqual [0, 1] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators inside the next string in operator-pending mode (if not in a string)", -> editor.setCursorScreenPosition([0, 29]) @@ -292,7 +487,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "\" something in here and in \"here\"\" and over here" expect(editor.getCursorScreenPosition()).toEqual [0, 33] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "makes no change if past the last string on a line", -> editor.setCursorScreenPosition([0, 39]) @@ -303,6 +498,18 @@ describe "TextObjects", -> expect(editor.getCursorScreenPosition()).toEqual [0, 39] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('i') + keydown('"') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 34]] + describe "the 'aw' text object", -> beforeEach -> editor.setText("12345 abcde ABCDE") @@ -317,7 +524,7 @@ describe "TextObjects", -> expect(editor.getCursorScreenPosition()).toEqual [0, 6] expect(vimState.getRegister('"').text).toBe "abcde " expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "selects from the start of the current word to the start of the next word in visual mode", -> keydown('v') @@ -326,6 +533,17 @@ describe "TextObjects", -> expect(editor.getSelectedScreenRange()).toEqual [[0, 6], [0, 12]] + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 2]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('a') + keydown('w') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 2], [0, 12]] + it "doesn't span newlines", -> editor.setText("12345\nabcde ABCDE") editor.setCursorBufferPosition([0, 3]) @@ -336,6 +554,60 @@ describe "TextObjects", -> expect(editor.getSelectedBufferRanges()).toEqual [[[0, 0], [0, 5]]] + it "doesn't span special characters", -> + editor.setText("1(345\nabcde ABCDE") + editor.setCursorBufferPosition([0, 3]) + + keydown("v") + keydown("a") + keydown("w") + + expect(editor.getSelectedBufferRanges()).toEqual [[[0, 2], [0, 5]]] + + describe "the 'aW' text object", -> + beforeEach -> + editor.setText("12(45 ab'de ABCDE") + editor.setCursorScreenPosition([0, 9]) + + it "applies operators from the start of the current whole word to the start of the next whole word in operator-pending mode", -> + keydown('d') + keydown('a') + keydown('W', shift: true) + + expect(editor.getText()).toBe "12(45 ABCDE" + expect(editor.getCursorScreenPosition()).toEqual [0, 6] + expect(vimState.getRegister('"').text).toBe "ab'de " + expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "selects from the start of the current whole word to the start of the next whole word in visual mode", -> + keydown('v') + keydown('a') + keydown('W', shift: true) + + expect(editor.getSelectedScreenRange()).toEqual [[0, 6], [0, 12]] + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 2]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('a') + keydown('W', shift: true) + + expect(editor.getSelectedScreenRange()).toEqual [[0, 2], [0, 12]] + + it "doesn't span newlines", -> + editor.setText("12(45\nab'de ABCDE") + editor.setCursorBufferPosition([0, 4]) + + keydown('v') + keydown('a') + keydown('W', shift: true) + + expect(editor.getSelectedBufferRanges()).toEqual [[[0, 0], [0, 5]]] + describe "the 'a(' text object", -> beforeEach -> editor.setText("( something in here and in (here) )") @@ -348,7 +620,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "" expect(editor.getCursorScreenPosition()).toEqual [0, 0] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators around the current parentheses in operator-pending mode (second test)", -> editor.setCursorScreenPosition([0, 29]) @@ -358,7 +630,19 @@ describe "TextObjects", -> expect(editor.getText()).toBe "( something in here and in )" expect(editor.getCursorScreenPosition()).toEqual [0, 27] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('a') + keydown('(') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 33]] describe "the 'a{' text object", -> beforeEach -> @@ -372,7 +656,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "" expect(editor.getCursorScreenPosition()).toEqual [0, 0] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators around the current curly brackets in operator-pending mode (second test)", -> editor.setCursorScreenPosition([0, 29]) @@ -382,7 +666,19 @@ describe "TextObjects", -> expect(editor.getText()).toBe "{ something in here and in }" expect(editor.getCursorScreenPosition()).toEqual [0, 27] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('a') + keydown('{') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 33]] describe "the 'a<' text object", -> beforeEach -> @@ -396,7 +692,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "" expect(editor.getCursorScreenPosition()).toEqual [0, 0] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators around the current angle brackets in operator-pending mode (second test)", -> editor.setCursorScreenPosition([0, 29]) @@ -406,7 +702,19 @@ describe "TextObjects", -> expect(editor.getText()).toBe "< something in here and in >" expect(editor.getCursorScreenPosition()).toEqual [0, 27] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('a') + keydown('<') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 33]] describe "the 'a[' text object", -> beforeEach -> @@ -420,7 +728,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "" expect(editor.getCursorScreenPosition()).toEqual [0, 0] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators around the current square brackets in operator-pending mode (second test)", -> editor.setCursorScreenPosition([0, 29]) @@ -430,7 +738,19 @@ describe "TextObjects", -> expect(editor.getText()).toBe "[ something in here and in ]" expect(editor.getCursorScreenPosition()).toEqual [0, 27] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('a') + keydown('[') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 33]] describe "the 'a\'' text object", -> beforeEach -> @@ -444,7 +764,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe "here' '" expect(editor.getCursorScreenPosition()).toEqual [0, 0] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators around the current single quotes in operator-pending mode (second test)", -> editor.setCursorScreenPosition([0, 29]) @@ -454,7 +774,19 @@ describe "TextObjects", -> expect(editor.getText()).toBe "' something in here and in 'here" expect(editor.getCursorScreenPosition()).toEqual [0, 31] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('a') + keydown('\'') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 35]] describe "the 'a\"' text object", -> beforeEach -> @@ -468,7 +800,7 @@ describe "TextObjects", -> expect(editor.getText()).toBe 'here" "' expect(editor.getCursorScreenPosition()).toEqual [0, 0] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "applies operators around the current double quotes in operator-pending mode (second test)", -> editor.setCursorScreenPosition([0, 29]) @@ -478,4 +810,16 @@ describe "TextObjects", -> expect(editor.getText()).toBe "\" something in here and in \"here" expect(editor.getCursorScreenPosition()).toEqual [0, 31] expect(editorElement.classList.contains('operator-pending-mode')).toBe(false) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) + + it "expands an existing selection in visual mode", -> + editor.setCursorScreenPosition([0, 25]) + keydown('v') + keydown('l') + keydown('l') + keydown('l') + keydown('l') + keydown('a') + keydown('"') + + expect(editor.getSelectedScreenRange()).toEqual [[0, 25], [0, 35]] diff --git a/atom/packages/vim-mode/spec/vim-mode-spec.coffee b/atom/packages/vim-mode/spec/vim-mode-spec.coffee index 0f4d8b8..280e545 100644 --- a/atom/packages/vim-mode/spec/vim-mode-spec.coffee +++ b/atom/packages/vim-mode/spec/vim-mode-spec.coffee @@ -18,15 +18,20 @@ describe "VimMode", -> editorElement = atom.views.getView(editor) describe ".activate", -> - it "puts the editor in command-mode initially by default", -> + it "puts the editor in normal-mode initially by default", -> expect(editorElement.classList.contains('vim-mode')).toBe(true) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "shows the current vim mode in the status bar", -> - statusBarTile = workspaceElement.querySelector("#status-bar-vim-mode") - expect(statusBarTile.textContent).toBe("Command") - atom.commands.dispatch(editorElement, "vim-mode:activate-insert-mode") - expect(statusBarTile.textContent).toBe("Insert") + statusBarTile = null + + waitsFor -> + statusBarTile = workspaceElement.querySelector("#status-bar-vim-mode") + + runs -> + expect(statusBarTile.textContent).toBe("Normal") + atom.commands.dispatch(editorElement, "vim-mode:activate-insert-mode") + expect(statusBarTile.textContent).toBe("Insert") it "doesn't register duplicate command listeners for editors", -> editor.setText("12345") @@ -44,7 +49,7 @@ describe "VimMode", -> it "removes the vim classes from the editor", -> atom.packages.deactivatePackage('vim-mode') expect(editorElement.classList.contains("vim-mode")).toBe(false) - expect(editorElement.classList.contains("command-mode")).toBe(false) + expect(editorElement.classList.contains("normal-mode")).toBe(false) it "removes the vim commands from the editor element", -> vimCommands = -> diff --git a/atom/packages/vim-mode/spec/vim-state-spec.coffee b/atom/packages/vim-mode/spec/vim-state-spec.coffee index 741c371..8fd3fb0 100644 --- a/atom/packages/vim-mode/spec/vim-state-spec.coffee +++ b/atom/packages/vim-mode/spec/vim-state-spec.coffee @@ -14,20 +14,20 @@ describe "VimState", -> editorElement = element editor = editorElement.getModel() vimState = editorElement.vimState - vimState.activateCommandMode() - vimState.resetCommandMode() + vimState.activateNormalMode() + vimState.resetNormalMode() keydown = (key, options={}) -> options.element ?= editorElement helpers.keydown(key, options) - commandModeInputKeydown = (key, opts = {}) -> - editor.commandModeInputView.editorElement.getModel().setText(key) + normalModeInputKeydown = (key, opts = {}) -> + editor.normalModeInputView.editorElement.getModel().setText(key) describe "initialization", -> - it "puts the editor in command-mode initially by default", -> + it "puts the editor in normal-mode initially by default", -> expect(editorElement.classList.contains('vim-mode')).toBe(true) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "puts the editor in insert-mode if startInInsertMode is true", -> atom.config.set 'vim-mode.startInInsertMode', true @@ -41,15 +41,15 @@ describe "VimState", -> expect(editorElement.component.isInputEnabled()).toBeTruthy() it "removes the mode classes from the editor", -> - expect(editorElement.classList.contains("command-mode")).toBeTruthy() + expect(editorElement.classList.contains("normal-mode")).toBeTruthy() vimState.destroy() - expect(editorElement.classList.contains("command-mode")).toBeFalsy() + expect(editorElement.classList.contains("normal-mode")).toBeFalsy() it "is a noop when the editor is already destroyed", -> editorElement.getModel().destroy() vimState.destroy() - describe "command-mode", -> + describe "normal-mode", -> describe "when entering an insertable character", -> beforeEach -> keydown('\\') @@ -86,12 +86,18 @@ describe "VimState", -> expect(editor.getCursors().length).toBe 1 describe "the v keybinding", -> - beforeEach -> keydown('v') + beforeEach -> + editor.setText("012345\nabcdef") + editor.setCursorScreenPosition([0, 0]) + keydown('v') it "puts the editor into visual characterwise mode", -> expect(editorElement.classList.contains('visual-mode')).toBe(true) expect(vimState.submode).toEqual 'characterwise' - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) + + it "selects the current character", -> + expect(editor.getLastSelection().getText()).toEqual '0' describe "the V keybinding", -> beforeEach -> @@ -102,33 +108,34 @@ describe "VimState", -> it "puts the editor into visual linewise mode", -> expect(editorElement.classList.contains('visual-mode')).toBe(true) expect(vimState.submode).toEqual 'linewise' - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) it "selects the current line", -> expect(editor.getLastSelection().getText()).toEqual '012345\n' describe "the ctrl-v keybinding", -> - beforeEach -> keydown('v', ctrl: true) + beforeEach -> + editor.setText("012345\nabcdef") + editor.setCursorScreenPosition([0, 0]) + keydown('v', ctrl: true) - it "puts the editor into visual characterwise mode", -> + it "puts the editor into visual blockwise mode", -> expect(editorElement.classList.contains('visual-mode')).toBe(true) expect(vimState.submode).toEqual 'blockwise' - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) describe "selecting text", -> beforeEach -> - spyOn(_._, "now").andCallFake -> window.now editor.setText("abc def") + editor.setCursorScreenPosition([0, 0]) it "puts the editor into visual mode", -> - expect(vimState.mode).toEqual 'command' - editor.setSelectedBufferRanges([[[0, 0], [0, 3]]]) - - advanceClock(100) + expect(vimState.mode).toEqual 'normal' + atom.commands.dispatch(editorElement, "core:select-right") expect(vimState.mode).toEqual 'visual' expect(vimState.submode).toEqual 'characterwise' - expect(editor.getSelectedBufferRanges()).toEqual([[[0, 0], [0, 3]]]) + expect(editor.getSelectedBufferRanges()).toEqual([[[0, 0], [0, 1]]]) it "handles the editor being destroyed shortly after selecting text", -> editor.setSelectedBufferRanges([[[0, 0], [0, 3]]]) @@ -136,27 +143,41 @@ describe "VimState", -> vimState.destroy() advanceClock(100) + it "handles native selection such as core:select-all", -> + atom.commands.dispatch(editorElement, "core:select-all") + expect(editor.getSelectedBufferRanges()).toEqual([[[0, 0], [0, 7]]]) + describe "the i keybinding", -> beforeEach -> keydown('i') it "puts the editor into insert mode", -> expect(editorElement.classList.contains('insert-mode')).toBe(true) - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) - describe "with content", -> - beforeEach -> editor.setText("012345\n\nabcdef") + describe "the R keybinding", -> + beforeEach -> keydown('R', shift: true) - # FIXME: See atom/vim-mode#2 - xdescribe "on a line with content", -> - beforeEach -> editor.setCursorScreenPosition([0, 6]) + it "puts the editor into replace mode", -> + expect(editorElement.classList.contains('insert-mode')).toBe(true) + expect(editorElement.classList.contains('replace-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(false) - it "does not allow the cursor to be placed on the \n character", -> + describe "with content", -> + beforeEach -> + editor.setText("012345\n\nabcdef") + editor.setCursorScreenPosition([0, 0]) + + describe "on a line with content", -> + it "does not allow atom commands to place the cursor on the \\n character", -> + atom.commands.dispatch(editorElement, "editor:move-to-end-of-line") expect(editor.getCursorScreenPosition()).toEqual [0, 5] describe "on an empty line", -> - beforeEach -> editor.setCursorScreenPosition([1, 0]) + beforeEach -> + editor.setCursorScreenPosition([1, 0]) + atom.commands.dispatch(editorElement, "editor:move-to-end-of-line") - it "allows the cursor to be placed on the \n character", -> + it "allows the cursor to be placed on the \\n character", -> expect(editor.getCursorScreenPosition()).toEqual [1, 0] describe 'with character-input operations', -> @@ -165,9 +186,9 @@ describe "VimState", -> it 'properly clears the opStack', -> keydown('d') keydown('r') - expect(vimState.mode).toBe 'command' + expect(vimState.mode).toBe 'normal' expect(vimState.opStack.length).toBe 0 - atom.commands.dispatch(editor.commandModeInputView.editorElement, "core:cancel") + atom.commands.dispatch(editor.normalModeInputView.editorElement, "core:cancel") keydown('d') expect(editor.getText()).toBe '012345\nabcdef' @@ -193,25 +214,78 @@ describe "VimState", -> expect(editor.getCursorScreenPosition()).toEqual [1, 0] describe "on a line with content", -> - beforeEach -> editor.setCursorScreenPosition([0, 6]) + beforeEach -> + editor.setCursorScreenPosition([0, 0]) + atom.commands.dispatch(editorElement, "editor:move-to-end-of-line") + + it "allows the cursor to be placed on the \\n character", -> + expect(editor.getCursorScreenPosition()).toEqual [0, 6] + + it "puts the editor into normal mode when <escape> is pressed", -> + keydown('escape') + + expect(editorElement.classList.contains('normal-mode')).toBe(true) + expect(editorElement.classList.contains('insert-mode')).toBe(false) + expect(editorElement.classList.contains('visual-mode')).toBe(false) + + it "puts the editor into normal mode when <ctrl-c> is pressed", -> + helpers.mockPlatform(editorElement, 'platform-darwin') + keydown('c', ctrl: true) + helpers.unmockPlatform(editorElement) + + expect(editorElement.classList.contains('normal-mode')).toBe(true) + expect(editorElement.classList.contains('insert-mode')).toBe(false) + expect(editorElement.classList.contains('visual-mode')).toBe(false) + + describe "replace-mode", -> + describe "with content", -> + beforeEach -> editor.setText("012345\n\nabcdef") + + describe "when cursor is in the middle of the line", -> + beforeEach -> + editor.setCursorScreenPosition([0, 3]) + keydown('R', shift: true) + + it "moves the cursor to the left when exiting replace mode", -> + keydown('escape') + expect(editor.getCursorScreenPosition()).toEqual [0, 2] + + describe "when cursor is at the beginning of line", -> + beforeEach -> + editor.setCursorScreenPosition([1, 0]) + keydown('R', shift: true) + + it "leaves the cursor at the beginning of line", -> + keydown('escape') + expect(editor.getCursorScreenPosition()).toEqual [1, 0] + + describe "on a line with content", -> + beforeEach -> + keydown('R', shift: true) + editor.setCursorScreenPosition([0, 0]) + atom.commands.dispatch(editorElement, "editor:move-to-end-of-line") - it "allows the cursor to be placed on the \n character", -> + it "allows the cursor to be placed on the \\n character", -> expect(editor.getCursorScreenPosition()).toEqual [0, 6] - it "puts the editor into command mode when <escape> is pressed", -> + it "puts the editor into normal mode when <escape> is pressed", -> + keydown('R', shift: true) keydown('escape') - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) expect(editorElement.classList.contains('insert-mode')).toBe(false) + expect(editorElement.classList.contains('replace-mode')).toBe(false) expect(editorElement.classList.contains('visual-mode')).toBe(false) - it "puts the editor into command mode when <ctrl-c> is pressed", -> + it "puts the editor into normal mode when <ctrl-c> is pressed", -> + keydown('R', shift: true) helpers.mockPlatform(editorElement, 'platform-darwin') keydown('c', ctrl: true) helpers.unmockPlatform(editorElement) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) expect(editorElement.classList.contains('insert-mode')).toBe(false) + expect(editorElement.classList.contains('replace-mode')).toBe(false) expect(editorElement.classList.contains('visual-mode')).toBe(false) describe "visual-mode", -> @@ -224,21 +298,21 @@ describe "VimState", -> expect(editor.getSelectedBufferRanges()).toEqual [[[0, 4], [0, 5]]] expect(editor.getSelectedText()).toBe("t") - it "puts the editor into command mode when <escape> is pressed", -> + it "puts the editor into normal mode when <escape> is pressed", -> keydown('escape') expect(editor.getCursorBufferPositions()).toEqual [[0, 4]] - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) expect(editorElement.classList.contains('visual-mode')).toBe(false) - it "puts the editor into command mode when <escape> is pressed on selection is reversed", -> + it "puts the editor into normal mode when <escape> is pressed on selection is reversed", -> expect(editor.getSelectedText()).toBe("t") keydown("h") keydown("h") expect(editor.getSelectedText()).toBe("e t") expect(editor.getLastSelection().isReversed()).toBe(true) keydown('escape') - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) expect(editor.getCursorBufferPositions()).toEqual [[0, 2]] describe "motions", -> @@ -254,7 +328,6 @@ describe "VimState", -> expect(editor.getSelectedText()).toBe("t") keydown("l") - keydown("l") expect(editor.getSelectedText()).toBe("tw") describe "operators", -> @@ -267,7 +340,7 @@ describe "VimState", -> it "operate on the current selection", -> expect(editor.getText()).toEqual "\nabcdef" - describe "returning to command-mode", -> + describe "returning to normal-mode", -> beforeEach -> editor.setText("012345\n\nabcdef") editor.selectLinesContainingCursors() @@ -302,39 +375,65 @@ describe "VimState", -> [0, 8] ]) + it "harmonizes selection directions", -> + keydown("e") + editor.addCursorAtBufferPosition([0, Infinity]) + keydown("h") + keydown("h") + + expect(editor.getSelectedBufferRanges()).toEqual([ + [[0, 4], [0, 5]], + [[0, 11], [0, 13]] + ]) + expect(editor.getCursorBufferPositions()).toEqual([ + [0, 5] + [0, 11] + ]) + + keydown("o") + + expect(editor.getSelectedBufferRanges()).toEqual([ + [[0, 4], [0, 5]], + [[0, 11], [0, 13]] + ]) + expect(editor.getCursorBufferPositions()).toEqual([ + [0, 5] + [0, 13] + ]) + describe "activate visualmode witin visualmode", -> beforeEach -> keydown('escape') - expect(vimState.mode).toEqual 'command' - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(vimState.mode).toEqual 'normal' + expect(editorElement.classList.contains('normal-mode')).toBe(true) - it "activateVisualMode with same type puts the editor into command mode", -> + it "activateVisualMode with same type puts the editor into normal mode", -> keydown('v') expect(editorElement.classList.contains('visual-mode')).toBe(true) expect(vimState.submode).toEqual 'characterwise' - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) keydown('v') - expect(vimState.mode).toEqual 'command' - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(vimState.mode).toEqual 'normal' + expect(editorElement.classList.contains('normal-mode')).toBe(true) keydown('V', shift: true) expect(editorElement.classList.contains('visual-mode')).toBe(true) expect(vimState.submode).toEqual 'linewise' - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) keydown('V', shift: true) - expect(vimState.mode).toEqual 'command' - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(vimState.mode).toEqual 'normal' + expect(editorElement.classList.contains('normal-mode')).toBe(true) keydown('v', ctrl: true) expect(editorElement.classList.contains('visual-mode')).toBe(true) expect(vimState.submode).toEqual 'blockwise' - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) keydown('v', ctrl: true) - expect(vimState.mode).toEqual 'command' - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(vimState.mode).toEqual 'normal' + expect(editorElement.classList.contains('normal-mode')).toBe(true) describe "change submode within visualmode", -> beforeEach -> @@ -346,22 +445,22 @@ describe "VimState", -> keydown('v') expect(editorElement.classList.contains('visual-mode')).toBe(true) expect(vimState.submode).toEqual 'characterwise' - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) keydown('V', shift: true) expect(editorElement.classList.contains('visual-mode')).toBe(true) expect(vimState.submode).toEqual 'linewise' - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) keydown('v', ctrl: true) expect(editorElement.classList.contains('visual-mode')).toBe(true) expect(vimState.submode).toEqual 'blockwise' - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) keydown('v') expect(editorElement.classList.contains('visual-mode')).toBe(true) expect(vimState.submode).toEqual 'characterwise' - expect(editorElement.classList.contains('command-mode')).toBe(false) + expect(editorElement.classList.contains('normal-mode')).toBe(false) it "recover original range when shift from linewse to characterwise", -> @@ -389,32 +488,32 @@ describe "VimState", -> it "basic marking functionality", -> editor.setCursorScreenPosition([1, 1]) keydown('m') - commandModeInputKeydown('t') + normalModeInputKeydown('t') expect(editor.getText()).toEqual "text in line 1\ntext in line 2\ntext in line 3" editor.setCursorScreenPosition([2, 2]) keydown('`') - commandModeInputKeydown('t') + normalModeInputKeydown('t') expect(editor.getCursorScreenPosition()).toEqual [1, 1] it "real (tracking) marking functionality", -> editor.setCursorScreenPosition([2, 2]) keydown('m') - commandModeInputKeydown('q') + normalModeInputKeydown('q') editor.setCursorScreenPosition([1, 2]) keydown('o') keydown('escape') keydown('`') - commandModeInputKeydown('q') + normalModeInputKeydown('q') expect(editor.getCursorScreenPosition()).toEqual [3, 2] it "real (tracking) marking functionality", -> editor.setCursorScreenPosition([2, 2]) keydown('m') - commandModeInputKeydown('q') + normalModeInputKeydown('q') editor.setCursorScreenPosition([1, 2]) keydown('d') keydown('d') keydown('escape') keydown('`') - commandModeInputKeydown('q') + normalModeInputKeydown('q') expect(editor.getCursorScreenPosition()).toEqual [1, 2] diff --git a/atom/packages/vim-mode/styles/vim-mode.less b/atom/packages/vim-mode/styles/vim-mode.less index a458937..7c5db28 100644 --- a/atom/packages/vim-mode/styles/vim-mode.less +++ b/atom/packages/vim-mode/styles/vim-mode.less @@ -1,7 +1,7 @@ @import "syntax-variables"; @import "ui-variables"; -.command-mode-input atom-text-editor[mini] { +.normal-mode-input atom-text-editor[mini] { background-color: inherit; border: none; width: 100%; @@ -13,6 +13,18 @@ padding-left: 10px; } +.vim-hidden-normal-mode-input { + height: 0px !important; + width: 0px !important; + overflow: hidden !important; + border: none !important; + padding: 0 !important; + display: block !important; + position: fixed !important; + top: -10px !important; + left: -10px !important; +} + .block-cursor(@visibility: visible) { border: 0; background-color: @syntax-cursor-color; @@ -20,27 +32,43 @@ opacity: 0.5; } -atom-text-editor.vim-mode.command-mode, +.underline-cursor(@visibility: visible) { + border: none; + border-bottom: .3em solid @syntax-cursor-color; + background: none; + visibility: @visibility; + opacity: 0.5; +} + +.low-block-cursor(@visibility: visible) { + border: none; + border-bottom: .6em solid @syntax-cursor-color; + background: none; + visibility: @visibility; + opacity: 0.5; +} + +atom-text-editor.vim-mode.normal-mode, atom-text-editor.vim-mode.operator-pending-mode, atom-text-editor.vim-mode.visual-mode, { &::shadow, // shadow-DOM enabled & // shadow-DOM disabled { - .cursor, .cursor.blink-off { + .cursor { .block-cursor(hidden); } } } -atom-text-editor.vim-mode.command-mode.is-focused, +atom-text-editor.vim-mode.normal-mode.is-focused, atom-text-editor.vim-mode.operator-pending-mode.is-focused, atom-text-editor.vim-mode.visual-mode.is-focused { &::shadow, // shadow-DOM enabled & // shadow-DOM disabled { - .cursor, .cursor.blink-off { + .cursor { .block-cursor; } } @@ -56,3 +84,63 @@ atom-text-editor.vim-mode.visual-mode } } } + +atom-text-editor.vim-mode.replace-mode +{ + &::shadow, // shadow-DOM enabled + & // shadow-DOM disabled + { + .cursor { + .underline-cursor(hidden); + } + } +} + +atom-text-editor.vim-mode.replace-mode.is-focused +{ + &::shadow, // shadow-DOM enabled + & // shadow-DOM disabled + { + .cursor { + .underline-cursor; + } + + .cursors.blink-off .cursor { + .underline-cursor(hidden); + } + } +} + +atom-text-editor.vim-mode.operator-pending-mode +{ + &::shadow, // shadow-DOM enabled + & // shadow-DOM disabled + { + .cursor { + .low-block-cursor(hidden); + } + } +} + +atom-text-editor.vim-mode.operator-pending-mode.is-focused +{ + &::shadow, // shadow-DOM enabled + & // shadow-DOM disabled + { + .cursor { + .low-block-cursor; + } + + .cursors.blink-off .cursor { + .low-block-cursor(hidden); + } + } +} + +.search-input atom-text-editor[mini]::before { + content: '/'; +} + +.reverse-search-input atom-text-editor[mini]::before { + content: '?'; +} |