项目作者: customcommander

项目描述 :
Read/write bibliographic records in RIS format.
高级语言: Gherkin
项目地址: git://github.com/customcommander/ris.git
创建时间: 2020-06-20T08:18:11Z
项目社区:https://github.com/customcommander/ris

开源协议:MIT License

下载


GitHub Workflow Status
@customcommander/ris" alt="npm (scoped)">
@customcommander/ris?label=minified%20bundle%20size" alt="npm bundle size (scoped)">

RIS

  1. npm i @customcommander/ris

@customcommander/ris is a JavaScript library available on NPM that lets you read and write bibliographic records in the RIS format.

  1. const {read, write} = require('@customcommander/ris');
  2. read(`
  3. TY - JOUR
  4. TI - Foo
  5. ER -
  6. TY - BOOK
  7. TI - Bar
  8. ER -
  9. TY - CHAP
  10. TI - Baz
  11. ER -
  12. `);
  13. //=> [ {TY: ['JOUR'], TI: ['Foo']}
  14. //=> , {TY: ['BOOK'], TI: ['Bar']}
  15. //=> , {TY: ['CHAP'], TI: ['Baz']}]
  16. write([ { "TY": ["JOUR"]
  17. , "TI": ["Hello World!"]}
  18. , { "TY": ["JOUR"]
  19. , "TI": ["Apollo 11"]
  20. , "DA": [{ "year": "1969"
  21. , "month": "07"
  22. , "day": "20"
  23. , "info": "Moon"}]}]);
  24. // => TY - JOUR
  25. // => TI - Hello World!
  26. // => ER -
  27. // =>
  28. // => TY - JOUR
  29. // => TI - Apollo 11
  30. // => DA - 1969/07/20/Moon
  31. // => ER -
  32. // =>