- [backlog-api][] ![][badge:backlog-api]
- [backlog-cli][] ![][badge:backlog-cli]
- [bath][] ![][badge:bath]
- [beater][] ![][badge:beater]
- [beater-cli][] ![][badge:beater-cli]
- [beater-cli-reporter][] ![][badge:beater-cli-reporter]
- [beater-html-reporter][] ![][badge:beater-html-reporter]
- [beater-reporter][] ![][badge:beater-reporter]
- [b-html][] ![][badge:b-html]
- [b-html-cli][] ![][badge:b-html-cli]
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
// Original: https://github.com/Raynos/weakmap-shim create-store | |
type StoreId = Object; | |
type Store = (obj: Object) => Object; | |
type Item = { _storeId: StoreId; valueOf: ItemValueOf; }; | |
type ItemValueOf = (storeId?: StoreId) => Object | Item; | |
const createStore = (): Store => { | |
const storeId: StoreId = {}; | |
return (obj: Object | Item): Item => { |
- http://www.ecma-international.org/ecma-262/6.0/#table-40
- http://www.ecma-international.org/ecma-262/6.0/#table-42
// TypeScript の import の挙動
import v from "mod"; // var v = require('mod').default;
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 * as assert from 'power-assert'; | |
import beater from 'beater'; | |
import { range, range2, take, fib, fib2, splitWord } from './generator'; | |
const { test } = beater(); | |
test('range()', () => { | |
const iterator = range(3); | |
assert.deepEqual(iterator.next(), { value: 0, done: false }); | |
assert.deepEqual(iterator.next(), { value: 1, done: false }); |
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
// 1. test はいずれかひとつの group に属しないといけないのかが気になる。 | |
import { group } from 'beater'; | |
const g = group('g1'); | |
g.test('t1', () => { | |
assert(1 === 1); | |
}); | |
// 2. 1. の callback 版。1. と同じ問題がある。 | |
import { group } from 'beater'; | |
group('g1', test => { |
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
% npm test (git)-[master] -? | |
> [email protected] test /Users/bouzuya/.ghq/github.com/bouzuya/rfc6570-expand | |
> eater | |
19 files | |
✓ success: .tmp/test/extended2.js | |
✓ success: .tmp/test/extended4.js | |
✓ success: .tmp/test/extended1.js | |
✓ success: .tmp/test/extended3.js |
各 npm packages のテストリポジトリ: bouzuya/rfc6570-npm-packages
- RFC6570 - URI Template に関する覚書 ... bouzuya による RFC6570 自体に関する覚書
- Implementations · uri-templates/uritemplate-spec Wiki ... 実装の一覧。
RFC6570 の情報やそれを JavaScript から利用するための npm package についての覚書。
URI Template は変数展開を通じて URI の範囲を示す文字列。この仕様は URI Template の構文とそのURI Template を URI 参照に展開するための処理を定義する。