Giter Club home page Giter Club logo

Comments (10)

azu avatar azu commented on August 19, 2024 1

Change Array by copy

これは対応しないといけない。
詳細はIssueを切って考える

  • Array.prototype.toReversed() -> Array
  • Array.prototype.toSorted(compareFn) -> Array
  • Array.prototype.toSpliced(start, deleteCount, ...items) -> Array
  • Array.prototype.with(index, value) -> Array

配列 · JavaScript Primer #jsprimer

方向としては

  • 非破壊、破壊を手前にして、それぞれを並べて書く
  • 破壊をおいてから、非破壊という概念としてまとめて書く

from js-primer.

azu avatar azu commented on August 19, 2024

proposal-array-find-from-last

lastIndexOfがあるので、findLastIndexの対応を追加するのが自然そう

https://jsprimer.net/basic/array/#indexof 最後に追加する感じかな。

from js-primer.

azu avatar azu commented on August 19, 2024

Hashbang Grammar

Node CLIのユースケースはCLIの配布までやってないので、hashbangが出てこない。

https://jsprimer.net/basic/comments/ に1行コメントの亜種として足すのはありそうだけど、あんまり強い理由ないかも。

HTML-likeコメントみたいに可能なら追加するぐらいかな。
あんまり増やしても意味はないので、何か面白くなるような感じなら足すイメージ

from js-primer.

azu avatar azu commented on August 19, 2024

Symbol as a Key

仕組み的には結構面白いことになってる。

  • Symbol()
  • Symbol.for()

に意味的な違いが結構出てる。

対応的には、weakの話でキーに指定できるものへsymbolが追加されたことだけど、
キーに指定できるものを書いてはない?

また、弱い参照で値を持つ特性上、WeakSetの値として使えるのは参照型のオブジェクトだけです

Setのここだけ修正が入りそう

from js-primer.

azu avatar azu commented on August 19, 2024

ES2023がリリースされるのは 27.06.2023 - 28.06.2023の予定
Meeting calendar - Ecma International
https://www.ecma-international.org/about-ecma/meeting-calendar/

✅は全てのブラウザが対応してるかどうか(2023-06-30)
Firefoxが未実装なものがある

#!test
// #!が1行コメントとして扱われるように仕様化された
const sequence = [1, 2, 3];
sequence.toReversed(); // => [3, 2, 1]
sequence; // => [1, 2, 3]

const outOfOrder = new Uint8Array([3, 1, 2]);
outOfOrder.toSorted(); // => Uint8Array [1, 2, 3]
outOfOrder; // => Uint8Array [3, 1, 2]

const correctionNeeded = [1, 1, 3];
correctionNeeded.with(1, 2); // => [1, 2, 3]
correctionNeeded; // => [1, 1, 3]
const array = [{ value: 1 }, { value: 2 }, { value: 3 }, { value: 4 }];
array.findLastIndex(n => n.value % 2 === 1); // => 2
array.findLast(n => n.value % 2 === 1); // => { value: 3 }
const map = new WeakMap();
const s = Symbol("desc");
map.set(s, {})
map.get(s); // => {}

from js-primer.

azu avatar azu commented on August 19, 2024

https://www.ecma-international.org/news/ecma-international-approves-new-standards-at-the-125th-general-assembly-27-june-2023/
https://github.com/tc39/ecma262/releases/tag/es2023
ES2023 リリース

from js-primer.

azu avatar azu commented on August 19, 2024

Hashbang Grammar
以外は対応が完了。

コメント · JavaScript Primer #jsprimerに足すかはなんか微妙。
とりあえずIssue化して対応したい人がいたら対応するぐらいでいいかな。

あとはリリースノートとかを書く

from js-primer.

azu avatar azu commented on August 19, 2024

from js-primer.

azu avatar azu commented on August 19, 2024
  • リリースノートにライセンスの変更についてを追加する #1690
  • 水曜ぐらいにリリース

from js-primer.

azu avatar azu commented on August 19, 2024

リリース!!

from js-primer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.