diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 21:46:22 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 21:46:22 -0500 |
commit | a065e04d529da1d847b5062a12c46d916408bf32 (patch) | |
tree | fe0f8bcec1ff39a3c499a2708222dcf15224ff70 /files/ja/web/javascript/reference/global_objects | |
parent | 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (diff) | |
download | translated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.gz translated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.bz2 translated-content-a065e04d529da1d847b5062a12c46d916408bf32.zip |
update based on https://github.com/mdn/yari/issues/2028
Diffstat (limited to 'files/ja/web/javascript/reference/global_objects')
8 files changed, 0 insertions, 688 deletions
diff --git a/files/ja/web/javascript/reference/global_objects/array/observe/index.html b/files/ja/web/javascript/reference/global_objects/array/observe/index.html deleted file mode 100644 index e480baf2e3..0000000000 --- a/files/ja/web/javascript/reference/global_objects/array/observe/index.html +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Array.observe() -slug: Web/JavaScript/Reference/Global_Objects/Array/observe -tags: - - Array - - JavaScript - - Method - - Obsolete -translation_of: Archive/Web/JavaScript/Array.observe ---- -<div>{{JSRef}} {{obsolete_header}}</div> - -<p><strong><code>Array.observe()</code></strong> メソッドは、配列への変更を非同期で監視するために使用されました。オブジェクト用の {{jsxref("Object.observe()")}} と似ています。変更内容は、発生した順番に時系列で提供されます。accept type list <code>["add", "update", "delete", "splice"]</code> で呼び出された <code>Object.observe()</code> と同等です。しかしながら、この API の使用は非推奨となり、ブラウザから削除されています。代わりに、一般的な {{jsxref("Proxy")}} オブジェクトを使用してください。</p> - -<h2 id="Syntax" name="Syntax">構文</h2> - -<pre class="syntaxbox">Array.observe(<var>arr</var>, <var>callback</var>)</pre> - -<h3 id="Parameters" name="Parameters">引数</h3> - -<dl> - <dt><code>arr</code></dt> - <dd>監視される配列。</dd> - <dt><code>callback</code></dt> - <dd>変更されるたびに毎回呼び出される関数。次の引数を持ちます: - <dl> - <dt><code>changes</code></dt> - <dd>変更されたオブジェクトの配列。変更オブジェクトのプロパティは次の通り: - <ul> - <li><strong><code>name</code></strong>: 変更されたプロパティの名前。</li> - <li><strong><code>object</code></strong>: 変更後の配列。</li> - <li><strong><code>type</code></strong>: 変更の種類を示す文字列。 <code>"add"</code>, <code>"update"</code>, <code>"delete"</code>, <code>"splice"</code> のいずれか一つ。</li> - <li><strong><code>oldValue</code></strong>: <code>"update"</code>, <code>"delete"</code> の場合のみ、変更前の値。</li> - <li><strong><code>index</code></strong>: <code>"splice"</code> の場合のみ。変更が発生したインデックス。</li> - <li><strong><code>removed</code></strong>: <code>"splice"</code> の場合のみ。取り除かれた要素の配列。</li> - <li><strong><code>addedCount</code></strong>: <code>"splice"</code> の場合のみ。追加された要素の数。</li> - </ul> - </dd> - </dl> - </dd> -</dl> - -<h2 id="Description" name="Description">説明</h2> - -<p><code>callback</code> 関数は、<code>arr</code> に変更が発生する度に呼ばれます。すべての変更が発生した順に配列として渡されます。</p> - -<div class="note"> -<p><a href="/docs/Web/JavaScript/Reference/Global_Objects/Array/pop"><code>Array.prototype.pop()</code></a> など、Array メソッド経由の変更は、<code>"splice"</code> 変更として報告されます。配列の長さが変更されないインデックスの割り当て変更は、<code>"update"</code> 変更として報告されます。</p> -</div> - -<h2 id="Examples" name="Examples">例</h2> - -<h3 id='="Logging_different_change_types"' name='="Logging_different_change_types"'>異なる変更のログを取る</h3> - -<pre class="brush: js">var arr = ['a', 'b', 'c']; - -Array.observe(arr, function(changes) { - console.log(changes); -}); - -arr[1] = 'B'; -// [{type: 'update', object: , name: '1', oldValue: 'b'}] - -arr[3] = 'd'; -// [{type: 'splice', object: , index: 3, removed: [], addedCount: 1}] - -arr.splice(1, 2, 'beta', 'gamma', 'delta'); -// [{type: 'splice', object: , index: 1, removed: ['B', 'c', 'd'], addedCount: 3}] -</pre> - -<h2 id="Specifications" name="Specifications">仕様</h2> - -<p><a href="https://github.com/arv/ecmascript-object-observe">Strawman proposal specification</a>.</p> - -<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザ実装状況</h2> - -<div> -<p>{{Compat("javascript.builtins.Array.observe")}}</p> -</div> - -<p> </p> - -<h2 id="See_also" name="See_also">関連情報</h2> - -<ul> - <li><a href="//stackoverflow.com/q/29269057/778272">Under what condition would Array.observe's “add” event trigger?</a></li> - <li>{{jsxref("Array.unobserve()")}} {{obsolete_inline}}</li> - <li>{{jsxref("Object.observe()")}} {{obsolete_inline}}</li> -</ul> diff --git a/files/ja/web/javascript/reference/global_objects/array/unobserve/index.html b/files/ja/web/javascript/reference/global_objects/array/unobserve/index.html deleted file mode 100644 index 1eafff5efa..0000000000 --- a/files/ja/web/javascript/reference/global_objects/array/unobserve/index.html +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: Array.unobserve -slug: Web/JavaScript/Reference/Global_Objects/Array/unobserve -tags: - - Array - - JavaScript - - Method - - Obsolete -translation_of: Archive/Web/JavaScript/Array.unobserve ---- -<div>{{JSRef}} {{obsolete_header}}</div> - -<p>Array<strong>.unobserve()</strong>メソッドは、{{jsxref("Array.observe()")}} で設定された監視を削除するために使われていましたが、非推奨となりブラウザから削除されました。代わりに、一般的な {{jsxref("Proxy")}} オブジェクトを使用してください。</p> - -<h2 id="Syntax" name="Syntax">構文</h2> - -<pre class="syntaxbox">Array.unobserve(<var>arr</var>, <var>callback</var>)</pre> - -<h3 id="Parameters" name="Parameters">引数</h3> - -<dl> - <dt><code>arr</code></dt> - <dd>監視を停止する配列。</dd> - <dt><code>callback</code></dt> - <dd><strong>arr</strong> 配列の変更時に毎回呼び出されるのを停止するための、オブザーバへの参照。</dd> -</dl> - -<h2 id="Description" name="Description">説明</h2> - -<p>配列からオブザーバを削除するため、<code>Array.unobserve()</code> は {{jsxref("Array.observe()")}} の後に呼び出される必要があります。</p> - -<p>callback は関数への参照とすべきであり、匿名関数ではいけません。なぜなら、この参照は以前のオブザーバを解除するために使用されるからです。callback として匿名関数を使った <strong>Array.unobserve()</strong> の呼び出しは、オブザーバを削除できないので無意味です。</p> - -<h2 id="Examples" name="Examples">例</h2> - -<h3 id="Unobserving_an_array" name="Unobserving_an_array">配列の監視を削除</h3> - -<pre class="brush: js">var arr = [1, 2, 3]; - -var observer = function(changes) { - console.log(changes); -} - -Array.observe(arr, observer); - -arr.push(4); -// [{type: "splice", object: <arr>, index: 3, removed:[], addedCount: 1}] - -Array.unobserve(arr, observer); - -arr.pop(); -// callback は呼び出されなかった。</pre> - -<h3 id="Using_an_anonymous_function" name="Using_an_anonymous_function">匿名関数の使用</h3> - -<pre class="brush: js">var persons = ['Khalid', 'Ahmed', 'Mohammed']; - -Array.observe(persons, function (changes) { - console.log(changes); -}); - -persons.shift(); -// [{type: "splice", object: <arr>, index: 0, removed: [ "Khalid" ], addedCount: 0 }] - -Array.unobserve(persons, function (changes) { - console.log(changes); -}); - -persons.push('Abdullah'); -// [{type: "splice", object: <arr>, index: 2, removed: [], addedCount: 1 }] -// callback は常に呼び出される。 -</pre> - -<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザ実装状況</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>機能</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>基本サポート</td> - <td>{{CompatChrome("36")}} [1]</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatOpera("23")}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>機能</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>基本サポート</td> - <td>{{CompatNo}}</td> - <td>{{CompatChrome("36")}} [1]</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatOpera("23")}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Chrome 49 で非推奨になりました。</p> - -<h2 id="See_also" name="See_also">関連情報</h2> - -<ul> - <li>{{jsxref("Array.observe()")}} {{obsolete_inline}}</li> - <li>{{jsxref("Object.observe()")}} {{obsolete_inline}}</li> - <li>{{jsxref("Object.unobserve()")}} {{obsolete_inline}}</li> -</ul> diff --git a/files/ja/web/javascript/reference/global_objects/arraybuffer/transfer/index.html b/files/ja/web/javascript/reference/global_objects/arraybuffer/transfer/index.html deleted file mode 100644 index 2070e902a4..0000000000 --- a/files/ja/web/javascript/reference/global_objects/arraybuffer/transfer/index.html +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: ArrayBuffer.transfer() -slug: Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer -tags: - - ArrayBuffer - - ECMAScript7 - - Experimental - - Expérimental(2) - - JavaScript - - Method - - Reference - - Référence(2) - - TypedArrays -translation_of: Archive/Web/JavaScript/ArrayBuffer.transfer ---- -<div>{{JSRef}} {{SeeCompatTable}}</div> - -<p>静的な <code><strong>ArrayBuffer.transfer()</strong></code> メソッドは、<code>oldBuffer</code> のデータから得られる内容の新しい <code>ArrayBuffer</code> を返し、<code>newByteLength</code> によって切断されるかゼロ拡張されます。<code>newByteLength</code> が <code>undefined</code> なら、<code>oldBuffer</code> の <code>byteLength</code> が使われます。この操作により <code>oldBuffer</code> はデタッチ状態のままになります。</p> - -<h2 id="Syntax" name="Syntax">構文</h2> - -<pre class="syntaxbox"><code>ArrayBuffer.transfer(oldBuffer [, newByteLength]);</code></pre> - -<h3 id="Parameters" name="Parameters">引数</h3> - -<dl> - <dt><code>oldBuffer</code></dt> - <dd>転送するための {{jsxref("ArrayBuffer")}} オブジェクト</dd> - <dt>newByteLength</dt> - <dd>新しい <code>ArrayBuffer</code> オブジェクトのバイト長</dd> -</dl> - -<h3 id="戻り値">戻り値</h3> - -<p>新しい <code>ArrayBuffer</code> オブジェクト。</p> - -<h2 id="説明">説明</h2> - -<p><code>ArrayBuffer.transfer()</code> メソッドによって、<code>ArrayBuffer</code> オブジェクトを成長し、デタッチできます。コピーなしで <code>ArrayBuffer</code> を成長される能力は大規模バッファに対してもっと早くなる利点を持っています。<code>ArrayBuffer</code> をデタッチする機能によって、基底メモリがリリースされるときを開発者が明示的に制御できます。これにより、すべての参照を削除し、ガベージコレクションを待たずに済みます。</p> - -<h2 id="例">例</h2> - -<pre class="brush: js">var buf1 = new ArrayBuffer(40); -new Int32Array(buf1)[0] = 42; - -var buf2 = ArrayBuffer.transfer(buf1, 80); -buf1.byteLength; // 0 -buf2.byteLength; // 80 -new Int32Array(buf2)[0]; // 42 - -var buf3 = ArrayBuffer.transfer(buf2, 0); -buf2.byteLength; // 0 -buf3.byteLength; // 0 -</pre> - -<h2 id="ポリフィル">ポリフィル</h2> - -<p>次のコードをスクリプトの先頭に挿入することで、transfer<font face="Consolas, Liberation Mono, Courier, monospace">()</font> の機能の大部分をネイティブにサポートしていない環境でも対処できるようになります。これはこの API と完全に同じではありませんが、この関数はある ArrayBuffer からそのほかの ArrayBuffer にデータを変換します。</p> - -<pre>if (!ArrayBuffer.transfer) { - ArrayBuffer.transfer = function(source, length) { - source = Object(source); - var dest = new ArrayBuffer(length); - if (!(source instanceof ArrayBuffer) || !(dest instanceof ArrayBuffer)) { - throw new TypeError('Source and destination must be ArrayBuffer instances'); - } - if (dest.byteLength >= source.byteLength) { - var nextOffset = 0; - var leftBytes = source.byteLength; - var wordSizes = [8, 4, 2, 1]; - wordSizes.forEach(function(_wordSize_) { - if (leftBytes >= _wordSize_) { - var done = transferWith(_wordSize_, source, dest, nextOffset, leftBytes); - nextOffset = done.nextOffset; - leftBytes = done.leftBytes; - } - }); - } - return dest; - function transferWith(wordSize, source, dest, nextOffset, leftBytes) { - var ViewClass = Uint8Array; - switch (wordSize) { - case 8: - ViewClass = Float64Array; - break; - case 4: - ViewClass = Float32Array; - break; - case 2: - ViewClass = Uint16Array; - break; - case 1: - ViewClass = Uint8Array; - break; - default: - ViewClass = Uint8Array; - break; - } - var view_source = new ViewClass(source, nextOffset, Math.trunc(leftBytes / wordSize)); - var view_dest = new ViewClass(dest, nextOffset, Math.trunc(leftBytes / wordSize)); - for (var i = 0; i < view_dest.length; i++) { - view_dest[i] = view_source[i]; - } - return { - nextOffset : view_source.byteOffset + view_source.byteLength, - leftBytes : source.byteLength - (view_source.byteOffset + view_source.byteLength) - } - } - }; -}</pre> - -<h2 id="仕様">仕様</h2> - -<p>いづれの現行仕様のドラフトにも含まれていませんが、ECMA-262 エディションの機能として<a href="https://gist.github.com/lukewagner/2735af7eea411e18cf20">提案</a><a href="https://esdiscuss.org/topic/sept-23-2014-meeting-notes">されました</a>。</p> - -<h2 id="ブラウザ実装状況">ブラウザ実装状況</h2> - - - -<p>{{Compat("javascript.builtins.ArrayBuffer.transfer")}}</p> - -<h2 id="関連情報">関連情報</h2> - -<ul> - <li><a href="/docs/Web/JavaScript/Typed_arrays" title="en/JavaScript typed arrays">JavaScript typed arrays</a></li> -</ul> diff --git a/files/ja/web/javascript/reference/global_objects/iterator/index.html b/files/ja/web/javascript/reference/global_objects/iterator/index.html deleted file mode 100644 index 3a641ff7d9..0000000000 --- a/files/ja/web/javascript/reference/global_objects/iterator/index.html +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: Iterator -slug: Web/JavaScript/Reference/Global_Objects/Iterator -tags: - - Deprecated - - JavaScript - - Legacy Iterator - - Reference -translation_of: Archive/Web/Iterator ---- -<div>{{jsSidebar("Objects")}}</div> - -<div class="warning"><strong>非標準。</strong> <code><strong>Iterator</strong></code> 関数は SpiderMonkey固有の機能で、ある時点で削除されます。将来向きの用途に対して、<a href="/docs/Web/JavaScript/Reference/Statements/for...of" title="/docs/Web/JavaScript/Reference/Statements/for...of">for..of</a>ループと<a href="/docs/Web/JavaScript/Guide/The_Iterator_protocol">iterator protocol</a>を使用することを検討してください。</div> - -<h2 id="概要">概要</h2> - -<p>レガシーイテレータプロトコルを実装し、オブジェクトの列挙可能なプロパティに対して反復するオブジェクトを返します。</p> - -<h2 id="構文">構文</h2> - -<pre class="syntaxbox">Iterator(<var>object</var>, [keyOnly])</pre> - -<h3 id="引数">引数</h3> - -<dl> - <dt><code>object</code></dt> - <dd>プロパティを反復処理するオブジェクト。</dd> - <dt><code>keyOnly</code></dt> - <dd><code>keyOnly</code> が truthy な値である場合は、<code>Iterator.prototype.next</code> が <code>property_name</code> のみ返します。</dd> -</dl> - -<h2 id="説明">説明</h2> - -<p>使用方法の概要が<a href="/docs/JavaScript/Guide/Iterators_and_Generators" title="/docs/JavaScript/Guide/Iterators_and_Generators">Iterators and Generators</a>ページで提供されています。</p> - -<h2 id="メソッド">メソッド</h2> - -<dl> - <dt><code><strong>Iterator.prototype.next</strong></code></dt> - <dd><code>[property_name, property_value]</code>フォーマットで次のアイテムを返します。それ以上のアイテムが存在しない場合、<code><a href="/docs/Web/JavaScript/Reference/Global_Objects/StopIteration">StopIteration</a></code>をスローします。</dd> -</dl> - -<h2 id="例">例</h2> - -<h3 id="オブジェクトのプロパティを反復処理する">オブジェクトのプロパティを反復処理する</h3> - -<pre class="brush: js">var a = { - x: 10, - y: 20, -}; -var iter = Iterator(a); -console.log(iter.next()); // ["x", 10] -console.log(iter.next()); // ["y", 20] -console.log(iter.next()); // throws StopIteration -</pre> - -<h3 id="レガシーデストラクタfor-in文を使用してオブジェクトのプロパティを反復処理する">レガシーデストラクタ<code>for-in</code>文を使用してオブジェクトのプロパティを反復処理する</h3> - -<pre class="brush: js">var a = { - x: 10, - y: 20, -}; - -for (var [name, value] in Iterator(a)) { - console.log(name, value); // x 10 - // y 20 -} -</pre> - -<h3 id="for-ofとともにイテレータを使用する">for-ofとともにイテレータを使用する</h3> - -<pre class="brush: js">var a = { - x: 10, - y: 20, -}; - -for (var [name, value] of Iterator(a)) { // @@iterator is used - console.log(name, value); // x 10 - // y 20 -}</pre> - -<h2 id="仕様">仕様</h2> - -<p>非標準。すべての現在の仕様書でサポートされていません。</p> - -<h2 id="ブラウザ実装状況">ブラウザ実装状況</h2> - -<p>サポートされていません。バージョン 57 より前の Firefox でサポートしていました。</p> - -<h2 id="関連情報">関連情報</h2> - -<ul> - <li><a href="/docs/JavaScript/Guide/Iterators_and_Generators" title="/en-US/docs/JavaScript/Guide/Iterators_and_Generators">Iterators and Generators</a></li> - <li><code><a href="/docs/Web/JavaScript/Reference/Global_Objects/StopIteration">StopIteration</a></code></li> -</ul> diff --git a/files/ja/web/javascript/reference/global_objects/object/count/index.html b/files/ja/web/javascript/reference/global_objects/object/count/index.html deleted file mode 100644 index 62975242b6..0000000000 --- a/files/ja/web/javascript/reference/global_objects/object/count/index.html +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Object.prototype.__count__ -slug: Web/JavaScript/Reference/Global_Objects/Object/count -tags: - - JavaScript - - Object - - Obsolute - - Property - - Prototype -translation_of: Archive/Web/JavaScript/Object.count ---- -<div>{{JSRef}}{{Non-standard_Header}}{{obsolete_header("gecko2")}}</div> - -<p><strong><code>__count__</code></strong> プロパティはオブジェクトの列挙可能なプロパティの数を保存するために使用されていましたが、削除されました。</p> - -<h2 id="Syntax" name="Syntax">構文</h2> - -<pre class="syntaxbox"><code><var>obj</var>.__count__</code></pre> - -<h2 id="Examples" name="Examples">例</h2> - -<pre class="brush: js">{ 1: 1 }.__count__ // 1 -[].__count__ // 0 -[1].__count__ // 1 -[1, /* hole */, 2, 3].__count__ // 3 -</pre> - -<h2 id="Specifications" name="Specifications">仕様書</h2> - -<p>どの仕様書でも定義されていません。</p> - -<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2> - -<div> -<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div> - -<p>{{Compat("javascript.builtins.Object.count")}}</p> -</div> - -<h2 id="See_also" name="See_also">関連情報</h2> - -<ul> - <li><a class="external" href="http://whereswalden.com/2010/04/06/more-changes-coming-to-spidermonkey-the-magical-__count__-property-of-objects-is-being-removed/">[Blog post] More changes coming to SpiderMonkey: the magical __count__ property is being removed</a></li> -</ul> diff --git a/files/ja/web/javascript/reference/global_objects/parallelarray/index.html b/files/ja/web/javascript/reference/global_objects/parallelarray/index.html deleted file mode 100644 index 192b09e3f4..0000000000 --- a/files/ja/web/javascript/reference/global_objects/parallelarray/index.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: ParallelArray -slug: Web/JavaScript/Reference/Global_Objects/ParallelArray -tags: - - JavaScript - - Obsolete - - ParallelArray -translation_of: Archive/Web/ParallelArray ---- -<div> -<div>{{jsSidebar("Objects")}}{{obsolete_header}}</div> -</div> - -<div class="note">p><strong>ノート:</strong> このオブジェクトは Firefox 17 で実装され {{ Gecko(29) }} から削除されました。現在は Nightly チャネルでのみ ParallelJS (PJS) を使用可能です ({{ bug(944074) }})。</div> - -<p><strong>ParallelArray</strong> の目標は、ウェブアプリケーション上でデータ並列性を実現することです。ParallelArray 上で利用可能な高階関数は並列的に実行されます(ただし、並列的に実行できない場合は必要に応じて直列実行にフォールバックします)。並列実行性を保証したい場合には、Javascript の機能のうち、<a href="/en-US/docs/ParallelizableJavaScriptSubset" title="/en-US/docs/ParallelizableJavaScriptSubset">Firefox がサポートする並列可能なサブセット</a>のみを利用するようにすることが推奨されています。</p> - -<h2 id="構文">構文</h2> - -<pre class="syntaxbox">new ParallelArray() -new ParallelArray([element0, element1, ...]) -new ParallelArray(arrayLength, elementalFunction)</pre> - -<h2 id="ParallelArray_インスタンス"><code>ParallelArray</code> インスタンス</h2> - -<h3 id="プロパティ">プロパティ</h3> - -<dl> - <dt>length</dt> - <dd><code>ParallelArray</code>の要素の数</dd> -</dl> - -<h3 id="メソッド">メソッド</h3> - -<dl> - <dt>map</dt> - <dt>reduce</dt> - <dt>scan</dt> - <dt>scatter</dt> - <dt>filter</dt> - <dt>flatten</dt> - <dt>partition</dt> - <dt>get</dt> -</dl> - -<h2 id="例">例</h2> - -<h3 id="例_並列的に_map_処理を行う">例: 並列的に <code>map</code> 処理を行う</h3> - -<pre class="brush: js">var p = new ParallelArray([0, 1, 2, 3, 4]); -var m = p.map(function (v) { - return v + 1; -});</pre> - -<h2 id="参考文献">参考文献</h2> - -<ul> - <li><a href="http://wiki.ecmascript.org/doku.php?id=strawman:data_parallelism" title="http://wiki.ecmascript.org/doku.php?id=strawman:data_parallelism">Ecmascript ParallelArray strawman</a></li> -</ul> diff --git a/files/ja/web/javascript/reference/global_objects/stopiteration/index.html b/files/ja/web/javascript/reference/global_objects/stopiteration/index.html deleted file mode 100644 index 79972224a8..0000000000 --- a/files/ja/web/javascript/reference/global_objects/stopiteration/index.html +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: StopIteration -slug: Web/JavaScript/Reference/Global_Objects/StopIteration -tags: - - JavaScript - - Legacy Iterator - - Non-standard - - Reference - - StopItaration -translation_of: Archive/Web/StopIteration ---- -<div>{{jsSidebar("Objects")}}</div> - -<div class="warning"><strong>非標準。</strong> <code><strong>StopIteration</strong></code> オブジェクトはSpiderMonkey特有の機能です。将来向きの用途に対して、<a href="/docs/Web/JavaScript/Reference/Statements/for...of" title="/docs/Web/JavaScript/Reference/Statements/for...of">for..of</a> ループと<a href="/docs/Web/JavaScript/Guide/The_Iterator_protocol">iterator protocol</a>を使用することを検討してください。</div> - -<h2 id="概要">概要</h2> - -<p><code><strong>StopIteration</strong></code> オブジェクトはレガシーイテレータプロトコルにおける反復の終了を通知するために使用します。</p> - -<h2 id="Syntax" name="Syntax">構文</h2> - -<pre class="syntaxbox">StopIteration</pre> - -<h2 id="説明">説明</h2> - -<p>使用法の概要は、<a href="/docs/JavaScript/Guide/Iterators_and_Generators" title="/docs/JavaScript/Guide/Iterators_and_Generators">Iterators and Generators</a> ページ上で利用可能です</p> - -<h2 id="例">例</h2> - -<p><code>StopIteration</code>は<a href="/docs/Web/JavaScript/Reference/Global_Objects/Iterator"><code>Iterator</code></a>によってスローされます。</p> - -<pre class="brush: js">var a = { - x: 10, - y: 20, -}; -var iter = Iterator(a); -console.log(iter.next()); // ["x", 10] -console.log(iter.next()); // ["y", 20] -console.log(iter.next()); // throws StopIteration -</pre> - -<p><code>StopIteration</code>をスローする。</p> - -<pre class="brush: js">function f() { - yield 1; - yield 2; - throw StopIteration; - yield 3; // this is not executed. -} - -for (var n in f()) { - console.log(n); // 1 - // 2 -} -</pre> - -<h2 id="仕様">仕様</h2> - -<p>非標準。すべての現在の標準仕様でサポートされていません。</p> - -<h2 id="関連情報">関連情報</h2> - -<ul> - <li><a href="/docs/JavaScript/Guide/Iterators_and_Generators" title="/en-US/docs/JavaScript/Guide/Iterators_and_Generators">Iterators and Generators</a></li> - <li><a href="/docs/Web/JavaScript/Reference/Global_Objects/Iterator">Iterator</a></li> -</ul> diff --git a/files/ja/web/javascript/reference/global_objects/string/quote/index.html b/files/ja/web/javascript/reference/global_objects/string/quote/index.html deleted file mode 100644 index 2a074faf32..0000000000 --- a/files/ja/web/javascript/reference/global_objects/string/quote/index.html +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: String.prototype.quote() -slug: Web/JavaScript/Reference/Global_Objects/String/quote -tags: - - String - - String Methods -translation_of: Archive/Web/JavaScript/String.quote ---- -<div>{{JSRef}} {{obsolete_header("37")}} {{non-standard_header}}</div> - -<p>特殊文字をエスケープシーケンスで置換しダブル・クォーテーション(<code>"</code>)でラップした文字列のコピーを返します。</p> - -<h2 id="Syntax" name="Syntax">構文</h2> - -<pre class="syntaxbox"><code><em>str</em>.quote()</code></pre> - -<h3 id="Return_value">Return value</h3> - -<p>A new string representing the original string wrapped in double-quotes, with any special characters escaped.</p> - -<h2 id="Examples" name="Examples">例</h2> - -<p>In the table below thequote()method replaces any special characters and wraps the strings in double-quotes. Also note the third column where a wrapped {{jsxref("Global_Objects/eval", "eval()")}} evaluates the escape sequences again.</p> - -<table class="fullwidth-table" style="width: 100%;"> - <thead> - <tr> - <th class="header" scope="col"><code>str</code></th> - <th class="header" scope="col"><code>str.quote()</code></th> - <th class="header" scope="col"><code><a href="/ja/docs/JavaScript/Reference/Global_Objects/eval" title="JavaScript/Reference/Global_Objects/eval">eval</a>( str.quote() )</code></th> - </tr> - </thead> - <tbody> - <tr> - <td><code>Hello world!</code></td> - <td><code>"Hello world!"</code></td> - <td><code>Hello world!</code></td> - </tr> - <tr> - <td><code>Hello<br> - world!</code></td> - <td><code>"Hello\n\tworld!"</code></td> - <td><code>Hello<br> - world!</code></td> - </tr> - <tr> - <td><code>" \ — '</code></td> - <td><code>"\" \\ \u2014 '"</code></td> - <td><code>" \ — '</code></td> - </tr> - </tbody> -</table> - -<h2 id="仕様">仕様</h2> - -<p>Not part of any standard. Implemented in JavaScript 1.3.</p> - -<h2 id="ポリフィル">ポリフィル</h2> - -<pre class="syntaxbox"><code>if (!String.prototype.quote) - String.prototype.quote = function(){ - return JSON.stringify( this ); // since IE8 -</code> }</pre> - -<h2 id="ブラウザ互換性情報">ブラウザ互換性情報</h2> - -<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> - -<p>{{Compat("javascript.builtins.String.quote")}}</p> - -<h2 id="関連情報">関連情報</h2> - -<ul> - <li>{{jsxref("JSON.stringify()")}}</li> -</ul> |