UNPKG

persistent-programming

Version:

[![Build Status](https://travis-ci.com/unsegnor/object-repository.svg?branch=master)](https://travis-ci.com/unsegnor/object-repository) # object-repository Object repository. Just to work with javascript objects implementing transparent persistence. No 'S

18 lines (14 loc) 361 B
module.exports = function() { let satisfiedObject return Object.freeze({ isSatisfiedBy, setSatisfiedBy }) async function isSatisfiedBy(object){ if(satisfiedObject === object) return true throw new Error('object not expected') } function setSatisfiedBy(object){ satisfiedObject = object } }