A data-binding function for the DOM.

Overview

Alert: this library is now deprecated. s2 is its successor. It implements what simulacra does in a better way (using Proxy), and more.

Simulacra.js

Build Status npm Version License

Simulacra.js returns a DOM Node that updates in reaction to mutations in a JavaScript object. Get it from npm:

$ npm i simulacra --save

Synopsis

Simulacra.js returns a DOM Node that updates when an object changes. Its API is a single function, and it does not introduce any new syntax or a template language. It recursively adds metaprogramming features to vanilla data structures to work.

It is a fairly low cost abstraction, though it may not be quite as fast as hand-optimized code. The approximate size of this library is ~5 KB (minified and gzipped).

Usage

Simulacra.js uses plain HTML for templating, and it does not introduce its own template language. This makes it straightforward to start with a static HTML page and add interactive parts. Here's a sample template:

<template id="product">
  <h1 class="name"></h1>
  <div class="details">
    <div><span class="size"></span></div>
    <h4 class="vendor"></h4>
  </div>
</template>

Using the <template> tag is optional, any DOM element will suffice. The shape of the state is important since it has a straightforward mapping to the DOM, and arrays are iterated over to output multiple DOM elements. Here's some sample state:

var state = {
  name: 'Pumpkin Spice Latte',
  details: {
    size: [ 'Tall', 'Grande', 'Venti' ],
    vendor: 'Coffee Co.'
  }
}

Simulacra.js exports only a single function, which binds an object to the DOM. The first argument must be a singular object, and the second argument is a data structure that defines the bindings. The definition must be a CSS selector string, change function or definition object (parent binding only), or an array with at most three elements:

  • Index 0: a CSS selector string.
  • Index 1: either a definition object, or a change function.
  • Index 2: if index 1 is a definition object, this may be a change function.
var bindObject = require('simulacra') // or `window.simulacra`
var template = document.getElementById('product')

var node = bindObject(state, [ template, {
  name: '.name',
  details: [ '.details', {
    size: '.size',
    vendor: '.vendor'
  } ]
} ])

document.body.appendChild(node)

The DOM will update if any of the bound keys are assigned a different value, or if any Array.prototype methods on the value are invoked. Arrays and single values may be used interchangeably, the only difference is that Simulacra.js will iterate over array values.

Change Function

By default, the value will be assigned to the element's textContent property (or value or checked for inputs). A user-defined change function may be passed for arbitrary element manipulation, and its return value determines the new textContent, value, or checked attribute if it is not applied on a definition object. The change function may be passed as the second or third position, it has the signature (element, value, previousValue, path):

  • element: the local DOM element.
  • value: the value assigned to the key of the bound object.
  • previousValue: the previous value assigned to the key of the bound object.
  • path: an object containing info on where the change occurred.

To manipulate an element in a custom way, one may define a change function like so:

[ selector, function (element, value, previousValue) {
  // Attach listeners before inserting a DOM Node.
  if (previousValue === null)
    element.addEventListener('click', function () {
      alert('clicked')
    })

  return 'Hi ' + value + '!'
} ]

A change function can be determined to be an insert, mutate, or remove operation based on whether the value or previous value is null:

  • Value but not previous value: insert operation.
  • Value and previous value: mutate operation.
  • No value: remove operation.

There are some special cases for the change function:

  • If the bound element is an input or a textarea, the default behavior will be to update the state when the input changes. This may be overridden with a custom change function.
  • If the bound element is the same as its parent, its value will not be iterated over if it is an array.
  • If the change function returns simulacra.retainElement for a remove operation, then Node.removeChild will not be called. This is useful for implementing animations when removing an element from the DOM.
  • If the change function is applied on a definition object, it will never be a mutate operation, it will first remove and then insert in case of setting a new object over an existing object.

Helper Functions

Simulacra.js includes some built-in helper functions for common use cases, such as event listening and animations. They are optionalto use, and are opt-in functionality. To use them, one can define a change function like so:

var bindObject = require('simulacra')

// This is a Symbol used to signal that an element should be retained
// in the DOM after its value is unset.
var retainElement = bindObject.retainElement

// Helpers are convenience functions for common features, optional to use.
var helpers = require('simulacra/helpers')
var animate = helpers.animate
var bindEvents = helpers.bindEvents

// Accepts a hash keyed by event names, using this has the advantage of
// automatically removing event listeners, even if the element is still
// in the DOM. The optional second argument is `useCapture`.
var bindFn = bindEvents({
  // The first argument is the DOM event, second is the path.
  click: function (event, path) {
    event.target.classList.toggle('alternate')
  }
})

// Accepts class names on insert, mutate, and remove, and a time in ms for
// how long to retain an element after removal.
var animateFn = animate('fade-in', 'bounce', 'fade-out', 1500)

function change (node, value) {
  animateFn.apply(null, arguments)
  bindFn.apply(null, arguments)
  return value || retainElement
}

Server-Side Rendering

Simulacra.js includes an optimized string rendering function. It implements a subset of Simulacra.js and the DOM, but it should work for most common use cases.

const render = require('simulacra/render')

const state = { message: 'Hello world!' }
const binding = { message: 'h1' }
const template = '<h1></h1>'

// The first call to `render` will process the template.
render(state, binding, template)

// Subsequent calls do not need the template anymore.
console.log(render(state, binding))

This will print the string <h1>Hello world!</h1> to stdout.

The DOM API in Node.js can also work, it should be called within the context of the window global, however this may be optional in some implementations. In the following example, Domino is used as the DOM implementation.

const domino = require('domino')
const bindObject = require('simulacra')

const window = domino.createWindow('<h1></h1>')
const $ = bindObject.bind(window)
const state = { message: 'Hello world!' }
const binding = [ 'body', { message: 'h1' } ]

console.log($(state, binding).innerHTML)

This will also print the string <h1>Hello world!</h1> to stdout.

Rehydrating from Server Rendered Page

Simulacra.js also allows server-rendered DOM to be re-used or rehydrated. The main function accepts an optional third argument for this purpose:

const bindObject = require('simulacra')

const state = { /* the state must be populated beforehand */ }
const binding = [ ... ]

// Rehydrate from existing DOM Node.
const node = document.querySelector(...)

bindObject(state, binding, node)

Instead of returning a new Node, it will return the Node that was passed in, so it's not necessary to manually append the return value to the DOM. All change functions will be run so that event binding can happen, but return values will be ignored. If the Node could not be rehydrated properly, it will throw an error.

Benchmarks

There are a few benchmarks implemented with Simulacra.js:

Philosophy

The namesake of this library comes from Jean Baudrillard's Simulacra and Simulation. The mental model it provides is that the user interface is a first order simulacrum, or a faithful representation of state.

Its design is motivated by this quote:

"It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures." —Alan Perlis

Simulacra.js does data binding differently:

  • Rather than having much of a public API, it tries to be as opaque as possible. Every built-in way to mutate state is overridden, and becomes an integral part of how it works.
  • There is no templating syntax at all. Instead, the binding structure determines how to render an element. This also means that the state has a one-to-one mapping to the DOM.
  • All changes are atomic and run synchronously, there is no internal usage of timers or event loops and no need to wait for changes to occur.
  • It does not force any component architecture, use a single bound object or as many as desired.

What Simulacra.js does is capture the intent of state changes, so it is important to use the correct semantics. Using state.details = { ... } is different from Object.assign(state.details, { ... }), the former will assume that the entire object changed and remove and append a new element, while the latter will re-use the same element and check the differences in the key values. For arrays, it is almost always more efficient to use the proper array mutator methods (push, splice, pop, etc). This is also important for implementing animations, since it determines whether elements are created, updated, or removed.

Nodes are updated if and only if their values change, that is each value has a 1:1 correspondence to the DOM. Generally, elements should be rendered based on their value alone, external inputs should be avoided.

How it Works

On initialization, Simulacra.js replaces bound elements from the template with empty text nodes (markers) for memoizing their positions. Based on a value in the bound state object, it clones template elements and applies the change function on the cloned elements, and appends them near the marker or adjacent nodes.

When a bound key is assigned, it gets internally casted into an array if it is not an array already, and the values of the array are compared with previous values. Based on whether a value at an index has changed, Simulacra.js will remove, insert, or mutate a DOM element corresponding to the value. Array mutator methods are overridden with optimized implementations, which are faster and simpler than diffing changes between DOM trees.

Caveats

  • The delete keyword will not trigger a DOM update. Although ES6 Proxy has a trap for this keyword, its browser support is lacking and it can not be polyfilled. Also, it would break the API of Simulacra.js for this one feature, so the recommended practice is to set the value to null rather than trying to delete the key.
  • Out-of-bounds array index assignment will not work, because the number of setters is equal to the length of the array. Similarly, setting the length of an array will not work because a setter can't be defined on the length property.

Under the Hood

This library requires these JavaScript features:

  • Object.defineProperty (ES5): used for binding keys on objects.

It also makes use of these DOM API features:

  • Node.contains (DOM Living Standard): used for checking if bound nodes are valid.
  • Node.nextElementSibling (DOM Living Standard): used for checking if a node is the last child or not.
  • Node.nextSibling (DOM Level 1): used for performance optimizations.
  • Node.appendChild (DOM Level 1): used for appending nodes.
  • Node.insertBefore (DOM Level 1): used for inserting nodes.
  • Node.removeChild (DOM Level 1): used for removing nodes.
  • Node.cloneNode (DOM Level 2): used for creating nodes.
  • Node.normalize (DOM Level 2): cleaning up DOM nodes.
  • Node.isEqualNode (DOM Level 3): used for equality checking after cloning nodes.
  • TreeWalker (DOM Level 2): fast iteration through DOM nodes.
  • MutationObserver (DOM Level 4): used for the animate helper.

No shims are included. The bare minimum should be IE9, which has object property support.

Similar Projects

  • Vue.js uses meta-programming to a limited extent. In contrast to Simulacra.js, it uses a templating language and comes with its own notion of components.
  • Binding.scala also binds objects to the DOM, but uses a templating language and is written in Scala.
  • Bind.js has a similar API, but only works on simple key-value pairs and is unoptimized for arrays.
  • Plates has a similar concept, but uses string templating instead of the DOM API.

License

This software is licensed under the MIT license.

Comments
  • Question: detect mount of the whole component

    Question: detect mount of the whole component

    Having the following code:

    function createComponent(template) {
      var state = {
        name: ''
      };
      return simulacra(state, [ template, {
        name: '.name'
      } ]);
    }
    

    Is there a way to detect mount of a component returned from createComponent function within createComponent function?

    opened by pavel 17
  • Conditional rendering example

    Conditional rendering example

    Imagine we have different markup for empty list and for list which contains elements. E.g. for empty one we could end up with something like:

    <div class="items state-empty">There are no items yet</div>
    

    And for list with items, markup could be:

    <div class="items">
      <div class="item">
        <h5 class="name"></h5>
        <p class="description"></p>
      </div>
    </div>
    

    How could we use simulacra to deal with such cases? How do you solve conditional rendering problem with it?

    opened by OEvgeny 12
  • How to add change binding

    How to add change binding

    I have the following that works OK ...

               template = document.createElement('template')
    	template.innerHTML = '<table border=1><tr><td><input type="text"></td></tr></table>'
    
    	  data = { rows:[
    		{cells:['one','two','three']},
    		{cells:['four','five','six']}
    		]
    	  }
    	  
    	   bindings = [ template, {
    		rows: [ 'tr', 			
    				{cells: '[type="text"]'}
    			]
    	  } ]
    
    	  outlet = document.body
    	  outlet.appendChild(simulacra(data, bindings))
    

    How do I structure the bindings to add a change event to input box?

    opened by mikeptweet 10
  • Merging states or flexible objects?

    Merging states or flexible objects?

    I don't know to explain exactly what I mean but here's my use case:

    1. I have a big object where I want to store everything related to my app (an ecommerce application). Things like user details, cart, UI state information (eg: pending response from the server while updating an item's quantity etc
    2. I want to bind parts of this state to different UI components.
    3. Depending on the interaction and server ajax responses this state object should be able to receive new properties.

    Or maybe you know of a different solution to my problem.

    I chose your library because it's small, allows binding to existing HTML and can also register events. The closest to my requirements is rivetsjs http://rivetsjs.com/ but it doesn't seem it is under active development

    opened by adrianmiu 6
  • Initialize Change Function

    Initialize Change Function

    I would like to run a change function when my object is bound. Example:

    let mainNode = bindObject( state, [ mainTemplate, {
      messages: '#messages',
      name: [ '#signin', function ( node, value, previousValue ) {
        console.log('i ran');
        if( value === null ) {
          node.style.display = 'block';
          return bindObject.retainElement;
        }
        else {
          node.style.display = 'none';
        }
      }]
    }]);
    

    The change function associated with name doesn't get run unless I actually change state.name. While it is a function called change, it would be nice if it ran at init time. messages is automatically inserted as expected at init.

    Is this a misguided approach, and if so, do you have any recommendations on how to get that function to run other than setting state.name after init time?

    Thank you.

    opened by jakesower 5
  • Ultra-lightweight DOM implementation for server rendering

    Ultra-lightweight DOM implementation for server rendering

    While domino is a comprehensive solution to running DOM in Node.js, Simulacra.js uses only a subset of the DOM API. Essentially all it needs to do is build a string and support only the DOM API that Simulacra.js uses.

    Strawman:

    const simulacra = require('simulacra')
    
    // DOM subset used by Simulacra.js
    const DOM = require('simulacra/dom')
    
    const bindObject = (data, binding, node) =>
      simulacra.call(DOM, data, binding, node)
    

    Or maybe even better:

    // Use built-in DOM implementation.
    // Return value is a string instead of DOM Node.
    const renderHTML = require('simulacra/render')
    
    const output = renderHTML(data, binding, templateString)
    
    opened by gr0uch 5
  • String output

    String output

    Perhaps there should be a reduced use case for server-side rendering. Basically, all that it needs to do is output a string, without worrying about data mutation. jsdom could help here in keeping the API compatible in Node.js. A potential bottleneck with this approach is the initial time it takes to get a new instance of jsdom.

    opened by gr0uch 4
  • try animationFrames to improve Painting time

    try animationFrames to improve Painting time

    Hi @0x8890 , I really like this slim DOM focuesed thing!

    As painting is the biggest remaining time block (in a zero-layout page!) It could be interesting to research anmationFrames to improve rendering performance due to DOM thrashing. I have experienced ( on mobile ) that it sometimes makes a relevant difference and sometimes not. It's interesting as simulacra "knows" DOM changes that belong together and should be wrapped in one rendering pass.

    This guy did a good writeup: http://wilsonpage.co.uk/preventing-layout-thrashing/

    opened by nkuehn 4
  • Order of objects in arrays (rendered via <ul>) is not maintained.

    Order of objects in arrays (rendered via

    Just tried mutating a bound array item. The change is reflected, but the order of items in the rendered result does not match the one in the array anymore.

    Here is a codepen that demonstrates the issue: http://codepen.io/anon/pen/XmwJBd

    Is that the expected behavior or do I use the API in the wrong way?

    opened by Blechhirn 4
  • Under The Hood: Template tag?

    Under The Hood: Template tag?

    You mentioned in the README that "it works in IE9+ with a WeakMap polyfill" but it seems like the template tag requires a pretty new browser.

    Did I miss something, or is the template tag support not a problem?

    opened by james2doyle 4
  • Why does order of the bindings matter?

    Why does order of the bindings matter?

    For this template:

    <div class="news">
      <div class="image"></div>
      <h3></h3>
      <p></p>
    </div>
    

    This binding produces the expected iterated list of news:

    news: ['.news', {
      img: '.image',
      title: 'h3',
      excerpt: 'p'
    }]
    

    image

    But when changing the order of the bindings to this:

    news: ['.news', {
      title: 'h3',
      excerpt: 'p',
      img: '.image'
    }]
    

    I get this:

    image

    It seems weird that the binding would be so tightly coupled to the DOM structure.

    opened by PierBover 3
  • Bump qs from 6.5.2 to 6.5.3

    Bump qs from 6.5.2 to 6.5.3

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump shell-quote from 1.7.2 to 1.7.3

    Bump shell-quote from 1.7.2 to 1.7.3

    Bumps shell-quote from 1.7.2 to 1.7.3.

    Changelog

    Sourced from shell-quote's changelog.

    1.7.3

    • Fix a security issue where the regex for windows drive letters allowed some shell meta-characters to escape the quoting rules. (CVE-2021-42740)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump ajv from 6.12.2 to 6.12.6

    Bump ajv from 6.12.2 to 6.12.6

    Bumps ajv from 6.12.2 to 6.12.6.

    Release notes

    Sourced from ajv's releases.

    v6.12.6

    Fix performance issue of "url" format.

    v6.12.5

    Fix uri scheme validation (@​ChALkeR). Fix boolean schemas with strictKeywords option (#1270)

    v6.12.4

    Fix: coercion of one-item arrays to scalar that should fail validation (failing example).

    v6.12.3

    Pass schema object to processCode function Option for strictNumbers (@​issacgerges, #1128) Fixed vulnerability related to untrusted schemas (CVE-2020-15366)

    Commits
    • fe59143 6.12.6
    • d580d3e Merge pull request #1298 from ajv-validator/fix-url
    • fd36389 fix: regular expression for "url" format
    • 490e34c docs: link to v7-beta branch
    • 9cd93a1 docs: note about v7 in readme
    • 877d286 Merge pull request #1262 from b4h0-c4t/refactor-opt-object-type
    • f1c8e45 6.12.5
    • 764035e Merge branch 'ChALkeR-chalker/fix-comma'
    • 3798160 Merge branch 'chalker/fix-comma' of git://github.com/ChALkeR/ajv into ChALkeR...
    • a3c7eba Merge branch 'refactor-opt-object-type' of github.com:b4h0-c4t/ajv into refac...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump cached-path-relative from 1.0.2 to 1.1.0

    Bump cached-path-relative from 1.0.2 to 1.1.0

    Bumps cached-path-relative from 1.0.2 to 1.1.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump marked from 1.1.0 to 4.0.10

    Bump marked from 1.1.0 to 4.0.10

    Bumps marked from 1.1.0 to 4.0.10.

    Release notes

    Sourced from marked's releases.

    v4.0.10

    4.0.10 (2022-01-13)

    Bug Fixes

    • security: fix redos vulnerabilities (8f80657)

    v4.0.9

    4.0.9 (2022-01-06)

    Bug Fixes

    v4.0.8

    4.0.8 (2021-12-19)

    Bug Fixes

    v4.0.7

    4.0.7 (2021-12-09)

    Bug Fixes

    v4.0.6

    4.0.6 (2021-12-02)

    Bug Fixes

    v4.0.5

    4.0.5 (2021-11-25)

    Bug Fixes

    • table after paragraph without blank line (#2298) (5714212)

    v4.0.4

    4.0.4 (2021-11-19)

    ... (truncated)

    Commits
    • ae01170 chore(release): 4.0.10 [skip ci]
    • fceda57 🗜️ build [skip ci]
    • 8f80657 fix(security): fix redos vulnerabilities
    • c4a3ccd Merge pull request from GHSA-rrrm-qjm4-v8hf
    • d7212a6 chore(deps-dev): Bump jasmine from 4.0.0 to 4.0.1 (#2352)
    • 5a84db5 chore(deps-dev): Bump rollup from 2.62.0 to 2.63.0 (#2350)
    • 2bc67a5 chore(deps-dev): Bump markdown-it from 12.3.0 to 12.3.2 (#2351)
    • 98996b8 chore(deps-dev): Bump @​babel/preset-env from 7.16.5 to 7.16.7 (#2353)
    • ebc2c95 chore(deps-dev): Bump highlight.js from 11.3.1 to 11.4.0 (#2354)
    • e5171a9 chore(release): 4.0.9 [skip ci]
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump postcss from 7.0.30 to 7.0.36

    Bump postcss from 7.0.30 to 7.0.36

    Bumps postcss from 7.0.30 to 7.0.36.

    Release notes

    Sourced from postcss's releases.

    7.0.36

    • Backport ReDoS vulnerabilities from PostCSS 8.

    7.0.35

    7.0.34

    • Fix compatibility with postcss-scss 2.

    7.0.33

    • Add error message for PostCSS 8 plugins.

    7.0.32

    7.0.31

    • Use only the latest source map annotation (by @​emzoumpo).
    Changelog

    Sourced from postcss's changelog.

    7.0.36

    • Backport ReDoS vulnerabilities from PostCSS 8.

    7.0.35

    • Add migration guide link to PostCSS 8 error text.

    7.0.34

    • Fix compatibility with postcss-scss 2.

    7.0.33

    • Add error message for PostCSS 8 plugins.

    7.0.36

    • Backport ReDoS vulnerabilities from PostCSS 8.

    7.0.35

    • Add migration guide link to PostCSS 8 error text.

    7.0.34

    • Fix compatibility with postcss-scss 2.

    7.0.33

    • Add error message for PostCSS 8 plugins.

    7.0.32

    7.0.31

    • Use only the latest source map annotation (by Emmanouil Zoumpoulakis).
    Commits
    • 67e3d7b Release 7.0.36 version
    • 54cbf3c Backport ReDoS vulnerabilities from PostCSS 8
    • 12832f3 Release 7.0.35 version
    • 4455ef6 Use OpenCollective in funding
    • e867c79 Add migration guide to PostCSS 8 error
    • 32a22a9 Release 7.0.34 version
    • 2293982 Lock build targets
    • 2c3a111 Release 7.0.33 version
    • 4105f21 Use yaspeller instead of yaspeller-ci
    • c8d02a0 Revert yaspeller-ci removal
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Owner
郑达里
status quo! status quo!
郑达里
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A quickstart AWS Lambda function code generator. Downloads a template function code file, test harness file, sample SAM deffiniation and appropriate file structure.

Welcome to function-stencil ?? A quickstart AWS Lambda function code generator. Downloads a template function code file, test harness file, sample SAM

Ben Smith 21 Jun 20, 2022
Tries to execute sync/async function, returns a specified default value if the function throws

good-try Tries to execute sync/async function, returns a specified default value if the function throws. Why Why not nice-try with it's 70+ million do

Antonio Stoilkov 14 Dec 8, 2022
Wrap a function with bun-livereload to automatically reload any imports inside the function the next time it is called

bun-livereload Wrap a function with bun-livereload to automatically reload any imports inside the function the next time it is called. import liveRelo

Jarred Sumner 19 Dec 19, 2022
An easy peasy UI binding library.

Peasy UI This is the repository for Peasy UI, a small-ish and relatively easy to use UI binding library. Introduction Peasy UI provides uncomplicated

null 8 Nov 8, 2022
A Node.js binding to webview

webview-nodejs English | 中文(简体) A Node.js binding to webview, a tiny cross-platform webview library to build modern cross-platform desktop GUIs using

Winterreisender 12 Dec 13, 2022
Node.js implementation binding for the RWKV.cpp module

RWKV.cpp NodeJS bindings Arguably the easiest way to get RWKV.cpp running on node.js. # Install globally npm install -g rwkv-cpp-node # This will sta

RWKV 9 May 10, 2023
A lightweight function that executes callback when we see specific DOM elements.

did-i-see A lightweight function that executes callback when we see specific DOM elements. Built with IntersectionObserver. ?? Demo: https://did-i-see

Kaan Ersoy 4 Oct 18, 2022
Custom Vitest matchers to test the state of the DOM, forked from jest-dom.

vitest-dom Custom Vitest matchers to test the state of the DOM This library is a fork of @testing-library/jest-dom. It shares that library's implement

Chance Strickland 14 Dec 16, 2022
An extension of DOM-testing-library to provide hooks into the shadow dom

Why? Currently, DOM-testing-library does not support checking shadow roots for elements. This can be troublesome when you're looking for something wit

Konnor Rogers 28 Dec 13, 2022
JSON Visio is data visualization tool for your json data which seamlessly illustrates your data on graphs without having to restructure anything, paste directly or import file.

JSON Visio is data visualization tool for your json data which seamlessly illustrates your data on graphs without having to restructure anything, paste directly or import file.

Aykut Saraç 20.6k Jan 4, 2023
It shows an effective way to correct bus arrival information using data analytics based on Amazon Serverless such as Kiness Data Stream, Kinesis Data Firehose, S3, and Lambda.

Amazon Serverless를 이용한 실시간 버스 정보 수집 및 저장 본 github repository는 버스 정보를 주기적으로 수집하여 분석할 수 있도록, Amazon Serverless인 Amazon Kinesis Data Stream, Kinesis Data

John Park 4 Nov 13, 2022
A table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, row context menus, dark theme, and more.

Mantine DataTable A "dark-theme aware" table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagina

Ionut-Cristian Florescu 331 Jan 4, 2023
Tool to sign data with a Cardano-Secret-Key // verify data with a Cardano-Public-Key // generate CIP-8 & CIP-36 data

Tool to sign data with a Cardano-Secret-Key // verify data with a Cardano-Public-Key // generate CIP-8 & CIP-36 data

Martin Lang 11 Dec 21, 2022
⚖️ Limit an async function's concurrency with ease!

limit-concur Limit an async function's concurrency with ease! Install $ npm i limit-concur Usage import got from 'got' import limitConcur from 'limit-

Tomer Aberbach 19 Apr 8, 2022
An adapter where you can define which function to run

Switch Functions An adapter where you can define which function to run Installation This is a Node.js module available through the npm registry. Befor

Badass Team 2 Jun 17, 2022