{"version":3,"file":"is-buffer.mjs","names":[],"sources":["../src/is-buffer.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n                       🗲 Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website:                  https://stormsoftware.com\n Repository:               https://github.com/storm-software/stryke\n Documentation:            https://docs.stormsoftware.com/projects/stryke\n Contact:                  https://stormsoftware.com/contact\n\n SPDX-License-Identifier:  Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Buffer } from \"node:buffer\";\n\nexport const isBufferExists = typeof Buffer !== \"undefined\";\n\n/**\n * Check if the provided value's type is `Buffer`\n */\nexport const isBuffer: (value: unknown) => value is Buffer = isBufferExists\n  ? Buffer.isBuffer.bind(Buffer)\n  : /**\n   * Check if the provided value's type is `Buffer`\n\n   * @param _ - The value to type check\n   * @returns An indicator specifying if the value provided is of type `Buffer`\n   */\n    function isBuffer(_: Parameters<typeof Buffer.isBuffer>[0]): _ is Buffer {\n      return false;\n    };\n"],"mappings":";;;AAoBA,MAAa,iBAAiB,OAAO,WAAW;;;;AAKhD,MAAa,WAAgD,iBACzD,OAAO,SAAS,KAAK,OAAO,GAO5B,SAAS,SAAS,GAAuD;AACvE,QAAO"}