INNER CODE UNIT · JavaScript

SequenceArchive

ramiel/mongoose-sequence · lib/sequence_archive.js:4

const SequenceArchive = () => {
  const sequences = new Map();

  /**
   * Check if a sequence already exists
   *
   * @param      {string}   id      The id of the sequence to look for
   * @return     {boolean}
   */
  const existsSequence = (id) => sequences.has(id);

  /**
   * Add a new sequence to the archive
   *
   * @param      {array}          id        The id of the sequence
   * @param      {Autoincrement}  sequence  A sequence
   */
  const addSequence = (id, sequence) => {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…