March 26, 2020 Contributors


msys.counter.add — Add to the current value of the specified counter


msys.counter.add(object_or_path, delta);

object_or_path: mixed
delta: number


The first argument is either a path to a counter (for example, /sites/site_name/errors) or a counter object that was returned by If a string is provided containing the path to a counter that does not exist, the counter is created with STRICT semantics. The second argument is atomically added to the current value of the counter.

Enable this function with the statement require('msys.counter');.

For a code example see “ example”.

See Also

msys.counter.reset,,, msys.counter.unlink, counter