diff options
author | grant-kun <[email protected]> | 2022-09-26 11:32:15 -0500 |
---|---|---|
committer | grant-kun <[email protected]> | 2022-09-26 11:32:15 -0500 |
commit | fb1a557749b7b83e9e732df7c65cdb3f17d0400a (patch) | |
tree | 681d83ad203c94e322aa84a7e2e65d5cc679370e /node_modules/depd/lib | |
parent | 34e9facde87cac19e7d68f6ffce28546d92c9979 (diff) | |
parent | 4b237cd7f3d9ebffdfc60d987c4df3c2595c3b7c (diff) |
Merge branch 'main' of https://github.com/squiresgrant/kanna-site
Diffstat (limited to 'node_modules/depd/lib')
-rw-r--r-- | node_modules/depd/lib/browser/index.js | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/node_modules/depd/lib/browser/index.js b/node_modules/depd/lib/browser/index.js deleted file mode 100644 index 6be45cc..0000000 --- a/node_modules/depd/lib/browser/index.js +++ /dev/null @@ -1,77 +0,0 @@ -/*! - * depd - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = depd - -/** - * Create deprecate for namespace in caller. - */ - -function depd (namespace) { - if (!namespace) { - throw new TypeError('argument namespace is required') - } - - function deprecate (message) { - // no-op in browser - } - - deprecate._file = undefined - deprecate._ignored = true - deprecate._namespace = namespace - deprecate._traced = false - deprecate._warned = Object.create(null) - - deprecate.function = wrapfunction - deprecate.property = wrapproperty - - return deprecate -} - -/** - * Return a wrapped function in a deprecation message. - * - * This is a no-op version of the wrapper, which does nothing but call - * validation. - */ - -function wrapfunction (fn, message) { - if (typeof fn !== 'function') { - throw new TypeError('argument fn must be a function') - } - - return fn -} - -/** - * Wrap property in a deprecation message. - * - * This is a no-op version of the wrapper, which does nothing but call - * validation. - */ - -function wrapproperty (obj, prop, message) { - if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { - throw new TypeError('argument obj must be object') - } - - var descriptor = Object.getOwnPropertyDescriptor(obj, prop) - - if (!descriptor) { - throw new TypeError('must call property on owner object') - } - - if (!descriptor.configurable) { - throw new TypeError('property must be configurable') - } -} |