- repository(リポジトリ):ファイルや変更内容が保存される場所のことで、パソコン内にあるものをローカルリポジトリ、GitHubなどローカル以外のサーバ上にあるものをリモートリポジトリと呼ぶ
- 作業ディレクトリ:リモートリポジトリをclone(複製)したディレクトリ(ローカルリポジトリ)のことで、作業中のファイルが含まれる
- ステージングエリア:ローカルリポジトリのなかにあるコミットをする予定のファイルを仮置きしておく場所のこと
- Gitディレクトリ:ステージングエリアにあるファイルをコミット(登録)して、変更が確定したディレクトリ
- branch(ブランチ):並行して作業を進めるためにmasterブランチからコミットの流れを分岐すること(最終的にmasterブランチにマージ(合体)される)
DaBi (short for Data Binding) is a dead simple yet complete and self-contained DOM-to-JS and JS-to-DOM data binding library in just 25 lines of pure ES5 and 454 bytes when minified.
Download it right here or include it into your HTML:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import R from 'ramda'; | |
| const items = [ | |
| {id: 1, name: 'Al', country: 'AA'}, | |
| {id: 2, name: 'Connie', country: 'BB'}, | |
| {id: 3, name: 'Doug', country: 'CC'}, | |
| {id: 4, name: 'Zen', country: 'BB'}, | |
| {id: 5, name: 'DatGGboi', country: 'AA'}, | |
| {id: 6, name: 'Connie', country: 'AA'}, | |
| ]; |
| 更新: | 2024-05-21 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 2024.1 |
| URL: | https://voluntas.github.io/ |
概要
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // include ramda library | |
| var users = [ | |
| {id:1, name: 'papas', is_published:true}, | |
| {id:2, name: 'nick', is_published:false}, | |
| {id:3, name: 'Jopahn', is_published:true} | |
| ]; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id=root /> | |
| <script type=module> | |
| import React from 'https://dev.jspm.io/react@16' | |
| import ReactDOM from 'https://dev.jspm.io/react-dom@16' | |
| ReactDOM.render( | |
| React.createElement('h1', null, 'hello'), | |
| document.querySelector('#root') | |
| ) | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { compose, both, either, gte, prop, equals, __ } from "ramda" | |
| const OUR_COUNTRY = "France" | |
| const wasBornInCountry = compose( | |
| equals(OUR_COUNTRY), | |
| prop("birthCountry"), | |
| ) | |
| const wasNaturalized = compose( | |
| Boolean, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { map, filter, partial, partialRight, curry, __, pipe } from "ramda" | |
| const publishedInYear = curry((year, book) => book.year === year) | |
| const titlesForYear = curry((year, books) => | |
| pipe( | |
| filter(publishedInYear(year)), | |
| map(book => book.title), | |
| )(books), | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ifElse, gte, lt, __, always, identity, when, unless } from "ramda" | |
| // const forever21 = age => (age >= 21 ? 21 : age) | |
| // const forever21 = ifElse(gte(__, 21), always(21), identity) | |
| // const forever21 = unless(lt(__, 21), always(21)) | |
| const forever21 = when(gte(__, 21), always(21)) | |
| console.log("forever21(24)", forever21(24)) | |
| console.log("forever21(16)", forever21(16)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { cond, always, lte, gte, T, __, identity } from "ramda" | |
| const water = cond([ | |
| [lte(__, 0), temp => `water freezes at ${temp}°C`], | |
| [gte(__, 100), temp => `water boils at ${temp}°C`], | |
| [T, temp => `nothing special happens at ${temp}°C`], | |
| ]) | |
| console.log(water(-222)) |