Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RFC6570 - URI Template のための npm package に関する覚書

RFC6570 - URI Template のための npm package に関する覚書

各 npm packages のテストリポジトリ: bouzuya/rfc6570-npm-packages

参考

npm package 'rfc6570'

  • npm 'rfc6570' の検索結果 32 件 (2016-05-28T11:01+09:00)

1 依存関係の調査

  1. npm:rfc6570
  • deps: none
  1. npm:uri-templates
  • deps: none
  1. npm:uritemplate
  • deps: none
  1. npm:uri-template.js
  • deps: ...
  1. npm:uri-template-lite
  • deps: none
  1. npm:uri-templates-codegen
  • deps: none
  1. npm:uri-template
  • deps: ...
  1. npm:url-template
  • deps: none
  1. npm:URIjs
  • renamed -> urijs
  1. npm:urijs
  • deps: none
  1. npm:temple
  • deps: none
  1. npm:feignjs
  • deps: uri-templates
  1. npm:uri-template-w-unescaped
  • deps: none
  1. npm:haleoas
  • deps: url-template
  1. npm:urit
  • deps: uritemplate
  1. npm:restwrapper
  • deps: uri-templates
  1. npm:ember-data-url-templates
  • deps: uri-templates
  1. npm:express-uri-template
  • deps: none
  1. npm:routeswitch
  • deps: ...
  1. npm:ci-adapter
  • deps: url-template
  1. npm:route-parser
  • deps: none
  1. npm:swagger-router
  • deps: ...
  1. npm:angular-model-factory
  • deps: none
  1. npm:passport-fellowshipone
  • deps: urijs ...
  1. npm:angular-model-factory-cse
  • deps: none
  1. npm:litejs
  • deps: none
  1. npm:halacious
  • deps: url-template
  1. npm:halogen-model
  • deps: uritemplate
  1. npm:rest
  • deps: when
  1. npm:hyperbone-model
  • deps: uritemplate
  1. npm:angular-hypermedia
  • deps: uri-templates
  1. npm:webappfind
  • deps: none

2 rename および依存関係から他の rfc2570 npm package に依存しているものを除外

  1. npm:rfc6570
  2. npm:uri-templates
  3. npm:uritemplate
  4. npm:uri-template.js
  5. npm:uri-template-lite
  6. npm:uri-templates-codegen
  7. npm:uri-template
  8. npm:url-template
  9. npm:urijs
  10. npm:temple
  11. npm:uri-template-w-unescaped
  12. npm:express-uri-template
  13. npm:routeswitch
  14. npm:route-parser
  15. npm:swagger-router
  16. npm:angular-model-factory
  17. npm:angular-model-factory-cse
  18. npm:litejs
  19. npm:rest
  20. npm:webappfind

3 展開・抽出以外の操作を重視したもの・ソース未公開のものを除外

  1. npm:rfc6570
  1. npm:uri-templates
  1. npm:uritemplate
  1. npm:uri-template.js
  1. npm:uri-template-lite
  1. npm:uri-template
  1. npm:url-template
  1. npm:urijs
  1. npm:temple

4 download 数の降順に並び替え・依存関係情報を追加・再付番

  1. 1 npm:urijs
  1. 2 npm:url-template
  1. 3 npm:uri-templates
  1. 4 npm:uritemplate
  1. 5 npm:uri-template
  1. 6 npm:uri-template-lite
  • 455 DL /    2 star / deps: none / [litejs/uri-template-lite][]
    
  1. 7 npm:rfc6570
  • 402 DL /    8 star / deps: none / [LuvDaSun/rfc6570][]
    
  1. 8 npm:temple
  •  97 DL /    5 star / deps: none / [brettstimmerman/temple][]
    
  1. 9 npm:uri-template.js
  •  39 DL /    4 star / deps: lodash / [rezigned/uri-template.js][]
    

5 expand / extract で分類

expand ... template + params -> uri

  1. 1 npm:urijs
  1. 2 npm:url-template
  1. 3 npm:uri-templates
  1. 4 npm:uritemplate
  1. 5 npm:uri-template
  1. 6 npm:uri-template-lite
  • 455 DL /    2 star / deps: none / [litejs/uri-template-lite][]
    
  1. 7 npm:rfc6570
  • 402 DL /    8 star / deps: none / [LuvDaSun/rfc6570][]
    
  1. 8 npm:temple
  •  97 DL /    5 star / deps: none / [brettstimmerman/temple][]
    
  1. 9 npm:uri-template.js
  •  39 DL /    4 star / deps: lodash / [rezigned/uri-template.js][]
    

extract ... template + uri -> params

  1. 3 npm:uri-templates
  1. 6 npm:uri-template-lite
  • 455 DL /    2 star / deps: none / [litejs/uri-template-lite][]
    
  • Array の parse が怪しい。カンマ区切りの文字列になる。
  1. 7 npm:rfc6570
  • 402 DL /    8 star / deps: none / [LuvDaSun/rfc6570][]
    
  • Array の parse が怪しい。カンマ区切りの文字列になる。
  1. 9 npm:uri-template.js
  •  39 DL /    4 star / deps: lodash / [rezigned/uri-template.js][]
    

uritemplate-test の spec-examples by sections に失敗したテスト

✗ failure:  1 urijs 3.2.4 Fragment Expansion foo{#empty}
AssertionError: foo / foo#   # test/index.js:28

  assert(uris.some(u => u === uri), `${ uri } / ${ uris }`)
         |    |                                            
         |    false                                        
         ["foo#"]                                          
✗ failure:  2 url-template 3.2.2 Simple String Expansion {hello}
AssertionError: Hello%20World! / Hello%20World%21   # test/index.js:28

  assert(uris.some(u => u === uri), `${ uri } / ${ uris }`)
         |    |                                            
         |    false                                        
         ["Hello%20World%21"]                              
✗ failure:  2 url-template 3.2.2 Simple String Expansion {x,hello,y}
AssertionError: 1024,Hello%20World!,768 / 1024,Hello%20World%21,768   # test/index.js:28

  assert(uris.some(u => u === uri), `${ uri } / ${ uris }`)
         |    |                                            
         |    false                                        
         ["1024,Hello%20World%21,768"]                     

✗ failure:  2 url-template 3.2.7 Path-Style Parameter Expansion {;v,bar,who}
AssertionError: ;v=6;bar;who=fred / ;v=6;who=fred   # test/index.js:28

  assert(uris.some(u => u === uri), `${ uri } / ${ uris }`)
         |    |                                            
         |    false                                        
         [";v=6;who=fred"]                                 
✗ failure:  2 url-template 3.2.7 Path-Style Parameter Expansion {
;x,y,undef}
AssertionError: ;x=1024;y=768;undef / ;x=1024;y=768   # test/index.js:28

  assert(uris.some(u => u === uri), `${ uri } / ${ uris }`)
         |    |                                            
         |    false                                        
         [";x=1024;y=768"]                                 

(NOTE: 今回の調査に無関係だが気になるもの)

  1. npm:routeswitch
  1. npm:route-parser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment