From 7e9e467ab383b91c6aec9843e2c7124326775432 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Sun, 7 Nov 2021 23:40:04 +0100 Subject: [PATCH] Breaking: replace default export with named export --- README.md | 2 +- index.js | 2 +- test/cloneable.js | 2 +- test/self.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b1bf642..9de13fa 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ ## Usage ```js -const supports = require('level-supports') +const { supports } = require('level-supports') db.supports = supports({ bufferKeys: true, diff --git a/index.js b/index.js index 7e8fd8a..0023d3b 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ 'use strict' -module.exports = function supports (...manifests) { +exports.supports = function supports (...manifests) { const manifest = manifests.reduce((acc, m) => Object.assign(acc, m), {}) return Object.assign(manifest, { diff --git a/test/cloneable.js b/test/cloneable.js index 2a64b18..768d1bf 100644 --- a/test/cloneable.js +++ b/test/cloneable.js @@ -1,6 +1,6 @@ 'use strict' -const supports = require('..') +const { supports } = require('..') // Every object in a manifest must have a unique identity, to avoid accidental // mutation. In supports() we only shallowly clone the manifest object itself diff --git a/test/self.js b/test/self.js index 5b3678b..67771cb 100644 --- a/test/self.js +++ b/test/self.js @@ -1,7 +1,7 @@ 'use strict' const test = require('tape') -const supports = require('..') +const { supports } = require('..') const shape = require('./shape') const cloneable = require('./cloneable')