├── .gitignore ├── LICENSE ├── Post.js ├── README ├── User.js ├── app.js ├── config.js ├── database.js ├── package.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Alexander Zeitler 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Post.js: -------------------------------------------------------------------------------- 1 | var mongoose = require('mongoose'); 2 | 3 | var PostSchema = new mongoose.Schema({ 4 | title: String, 5 | postedBy: { 6 | type: mongoose.Schema.Types.ObjectId, 7 | ref: 'User' 8 | }, 9 | comments: [{ 10 | text: String, 11 | postedBy: { 12 | type: mongoose.Schema.Types.ObjectId, 13 | ref: 'User' 14 | } 15 | }] 16 | }); 17 | 18 | module.exports = mongoose.model("Post", PostSchema); -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This sample shows how to reference mongoose Schema in properties and array properties of another Schema. 2 | 3 | More details can be found here: https://alexanderzeitler.com/articles/mongoose-referencing-schema-in-properties-and-arrays 4 | -------------------------------------------------------------------------------- /User.js: -------------------------------------------------------------------------------- 1 | var mongoose = require('mongoose'); 2 | 3 | var UserSchema = new mongoose.Schema({ 4 | name: String 5 | }); 6 | 7 | module.exports = mongoose.model("User", UserSchema); -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | require("./database"); 2 | 3 | var User = require('./User'), 4 | Post = require('./Post'); 5 | 6 | 7 | var alex = new User({ 8 | name: "Alex" 9 | }); 10 | 11 | var joe = new User({ 12 | name: "Joe" 13 | }) 14 | 15 | alex.save(); 16 | joe.save(); 17 | 18 | var post = new Post({ 19 | title: "Hello World", 20 | postedBy: alex._id, 21 | comments: [{ 22 | text: "Nice post!", 23 | postedBy: joe._id 24 | }, { 25 | text: "Thanks :)", 26 | postedBy: alex._id 27 | }] 28 | }) 29 | 30 | post.save(function(error) { 31 | if (!error) { 32 | Post.find({}) 33 | .populate('postedBy') 34 | .populate('comments.postedBy') 35 | .exec(function(error, posts) { 36 | console.log(JSON.stringify(posts, null, "\t")) 37 | }) 38 | } 39 | }); -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | database: { 3 | connectionString: "mongodb://localhost:27017/schemasample", 4 | databaseName: "schemasample" 5 | }, 6 | debug: { 7 | database: { 8 | connectionString: "mongodb://localhost:27017/schemasample-dev", 9 | databaseName: "schemasample-dev" 10 | } 11 | } 12 | }; 13 | 14 | module.exports = config; -------------------------------------------------------------------------------- /database.js: -------------------------------------------------------------------------------- 1 | var config = require("./config"), 2 | mongoose = require("mongoose"); 3 | 4 | var connectionString = process.env.DEBUG === "true" ? 5 | config.debug.database.connectionString : 6 | config.database.connectionString; 7 | 8 | mongoose.connect(connectionString); 9 | 10 | mongoose.connection.on("connected", function() { 11 | console.log("Connected to " + connectionString); 12 | }); 13 | 14 | mongoose.connection.on("error", function(error) { 15 | console.log("Connection to " + connectionString + " failed:" + error); 16 | }); 17 | 18 | mongoose.connection.on("disconnected", function() { 19 | console.log("Disconnected from " + connectionString); 20 | }); 21 | 22 | process.on("SIGINT", function() { 23 | mongoose.connection.close(function() { 24 | console.log("Disconnected from " + connectionString + " through app termination"); 25 | process.exit(0); 26 | }); 27 | }); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mongoose-schema-reference-sample", 3 | "version": "1.0.0", 4 | "description": "Shows the usage of mongoose Schema referencing", 5 | "main": "app.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/AlexZeitler/mongoose-schema-reference-sample.git" 12 | }, 13 | "keywords": [ 14 | "mongoose", 15 | "schema", 16 | "reference" 17 | ], 18 | "author": "Alexander Zeitler", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/AlexZeitler/mongoose-schema-reference-sample/issues" 22 | }, 23 | "homepage": "https://github.com/AlexZeitler/mongoose-schema-reference-sample", 24 | "dependencies": { 25 | "mongoose": "^5.13.20" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/bson@*": 6 | version "4.2.0" 7 | resolved "https://registry.yarnpkg.com/@types/bson/-/bson-4.2.0.tgz#a2f71e933ff54b2c3bf267b67fa221e295a33337" 8 | integrity sha512-ELCPqAdroMdcuxqwMgUpifQyRoTpyYCNr1V9xKyF40VsBobsj+BbWNRvwGchMgBPGqkw655ypkjj2MEF5ywVwg== 9 | dependencies: 10 | bson "*" 11 | 12 | "@types/bson@1.x || 4.0.x": 13 | version "4.0.5" 14 | resolved "https://registry.yarnpkg.com/@types/bson/-/bson-4.0.5.tgz#9e0e1d1a6f8866483f96868a9b33bc804926b1fc" 15 | integrity sha512-vVLwMUqhYJSQ/WKcE60eFqcyuWse5fGH+NMAXHuKrUAPoryq3ATxk5o4bgYNtg5aOM4APVg7Hnb3ASqUYG0PKg== 16 | dependencies: 17 | "@types/node" "*" 18 | 19 | "@types/mongodb@^3.5.27": 20 | version "3.6.20" 21 | resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-3.6.20.tgz#b7c5c580644f6364002b649af1c06c3c0454e1d2" 22 | integrity sha512-WcdpPJCakFzcWWD9juKoZbRtQxKIMYF/JIAM4JrNHrMcnJL6/a2NWjXxW7fo9hxboxxkg+icff8d7+WIEvKgYQ== 23 | dependencies: 24 | "@types/bson" "*" 25 | "@types/node" "*" 26 | 27 | "@types/node@*": 28 | version "18.11.18" 29 | resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f" 30 | integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA== 31 | 32 | bl@^2.2.1: 33 | version "2.2.1" 34 | resolved "https://registry.yarnpkg.com/bl/-/bl-2.2.1.tgz#8c11a7b730655c5d56898cdc871224f40fd901d5" 35 | integrity sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g== 36 | dependencies: 37 | readable-stream "^2.3.5" 38 | safe-buffer "^5.1.1" 39 | 40 | bluebird@3.5.1: 41 | version "3.5.1" 42 | resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" 43 | integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== 44 | 45 | bson@*: 46 | version "5.0.0" 47 | resolved "https://registry.yarnpkg.com/bson/-/bson-5.0.0.tgz#32b3d10b55be5c7d698cf311b7232a88498efb7d" 48 | integrity sha512-EL2KpZdyhshyyptj6pnQfnFKPoncD9KwZYvgmj/FXQiOUU1HWTHWmBOP4TZXU3YzStcI5qgpIl68YnMo16s26A== 49 | 50 | bson@^1.1.4: 51 | version "1.1.6" 52 | resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.6.tgz#fb819be9a60cd677e0853aee4ca712a785d6618a" 53 | integrity sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg== 54 | 55 | core-util-is@~1.0.0: 56 | version "1.0.3" 57 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" 58 | integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== 59 | 60 | debug@3.1.0: 61 | version "3.1.0" 62 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" 63 | integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== 64 | dependencies: 65 | ms "2.0.0" 66 | 67 | denque@^1.4.1: 68 | version "1.5.1" 69 | resolved "https://registry.yarnpkg.com/denque/-/denque-1.5.1.tgz#07f670e29c9a78f8faecb2566a1e2c11929c5cbf" 70 | integrity sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw== 71 | 72 | inherits@~2.0.3: 73 | version "2.0.4" 74 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 75 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 76 | 77 | isarray@~1.0.0: 78 | version "1.0.0" 79 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 80 | integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== 81 | 82 | kareem@2.3.2: 83 | version "2.3.2" 84 | resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.3.2.tgz#78c4508894985b8d38a0dc15e1a8e11078f2ca93" 85 | integrity sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ== 86 | 87 | memory-pager@^1.0.2: 88 | version "1.5.0" 89 | resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5" 90 | integrity sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg== 91 | 92 | mongodb@3.7.4: 93 | version "3.7.4" 94 | resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.7.4.tgz#119530d826361c3e12ac409b769796d6977037a4" 95 | integrity sha512-K5q8aBqEXMwWdVNh94UQTwZ6BejVbFhh1uB6c5FKtPE9eUMZPUO3sRZdgIEcHSrAWmxzpG/FeODDKL388sqRmw== 96 | dependencies: 97 | bl "^2.2.1" 98 | bson "^1.1.4" 99 | denque "^1.4.1" 100 | optional-require "^1.1.8" 101 | safe-buffer "^5.1.2" 102 | optionalDependencies: 103 | saslprep "^1.0.0" 104 | 105 | mongoose-legacy-pluralize@1.0.2: 106 | version "1.0.2" 107 | resolved "https://registry.yarnpkg.com/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz#3ba9f91fa507b5186d399fb40854bff18fb563e4" 108 | integrity sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ== 109 | 110 | mongoose@^5.13.20: 111 | version "5.13.20" 112 | resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.13.20.tgz#247d3b2c6c4c4b71779d07dda0c72e1bd48a7370" 113 | integrity sha512-TjGFa/XnJYt+wLmn8y9ssjyO2OhBMeEBtOHb9iJM16EWu2Du6L1Q6zSiEK2ziyYQM8agb4tumNIQFzqbxId7MA== 114 | dependencies: 115 | "@types/bson" "1.x || 4.0.x" 116 | "@types/mongodb" "^3.5.27" 117 | bson "^1.1.4" 118 | kareem "2.3.2" 119 | mongodb "3.7.4" 120 | mongoose-legacy-pluralize "1.0.2" 121 | mpath "0.8.4" 122 | mquery "3.2.5" 123 | ms "2.1.2" 124 | optional-require "1.0.x" 125 | regexp-clone "1.0.0" 126 | safe-buffer "5.2.1" 127 | sift "13.5.2" 128 | sliced "1.0.1" 129 | 130 | mpath@0.8.4: 131 | version "0.8.4" 132 | resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.8.4.tgz#6b566d9581621d9e931dd3b142ed3618e7599313" 133 | integrity sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g== 134 | 135 | mquery@3.2.5: 136 | version "3.2.5" 137 | resolved "https://registry.yarnpkg.com/mquery/-/mquery-3.2.5.tgz#8f2305632e4bb197f68f60c0cffa21aaf4060c51" 138 | integrity sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A== 139 | dependencies: 140 | bluebird "3.5.1" 141 | debug "3.1.0" 142 | regexp-clone "^1.0.0" 143 | safe-buffer "5.1.2" 144 | sliced "1.0.1" 145 | 146 | ms@2.0.0: 147 | version "2.0.0" 148 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 149 | integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= 150 | 151 | ms@2.1.2: 152 | version "2.1.2" 153 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" 154 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== 155 | 156 | optional-require@1.0.x: 157 | version "1.0.3" 158 | resolved "https://registry.yarnpkg.com/optional-require/-/optional-require-1.0.3.tgz#275b8e9df1dc6a17ad155369c2422a440f89cb07" 159 | integrity sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA== 160 | 161 | optional-require@^1.1.8: 162 | version "1.1.8" 163 | resolved "https://registry.yarnpkg.com/optional-require/-/optional-require-1.1.8.tgz#16364d76261b75d964c482b2406cb824d8ec44b7" 164 | integrity sha512-jq83qaUb0wNg9Krv1c5OQ+58EK+vHde6aBPzLvPPqJm89UQWsvSuFy9X/OSNJnFeSOKo7btE0n8Nl2+nE+z5nA== 165 | dependencies: 166 | require-at "^1.0.6" 167 | 168 | process-nextick-args@~2.0.0: 169 | version "2.0.1" 170 | resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" 171 | integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== 172 | 173 | readable-stream@^2.3.5: 174 | version "2.3.7" 175 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" 176 | integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== 177 | dependencies: 178 | core-util-is "~1.0.0" 179 | inherits "~2.0.3" 180 | isarray "~1.0.0" 181 | process-nextick-args "~2.0.0" 182 | safe-buffer "~5.1.1" 183 | string_decoder "~1.1.1" 184 | util-deprecate "~1.0.1" 185 | 186 | regexp-clone@1.0.0, regexp-clone@^1.0.0: 187 | version "1.0.0" 188 | resolved "https://registry.yarnpkg.com/regexp-clone/-/regexp-clone-1.0.0.tgz#222db967623277056260b992626354a04ce9bf63" 189 | integrity sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw== 190 | 191 | require-at@^1.0.6: 192 | version "1.0.6" 193 | resolved "https://registry.yarnpkg.com/require-at/-/require-at-1.0.6.tgz#9eb7e3c5e00727f5a4744070a7f560d4de4f6e6a" 194 | integrity sha512-7i1auJbMUrXEAZCOQ0VNJgmcT2VOKPRl2YGJwgpHpC9CE91Mv4/4UYIUm4chGJaI381ZDq1JUicFii64Hapd8g== 195 | 196 | safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: 197 | version "5.1.2" 198 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" 199 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== 200 | 201 | safe-buffer@5.2.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2: 202 | version "5.2.1" 203 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" 204 | integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== 205 | 206 | saslprep@^1.0.0: 207 | version "1.0.3" 208 | resolved "https://registry.yarnpkg.com/saslprep/-/saslprep-1.0.3.tgz#4c02f946b56cf54297e347ba1093e7acac4cf226" 209 | integrity sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag== 210 | dependencies: 211 | sparse-bitfield "^3.0.3" 212 | 213 | sift@13.5.2: 214 | version "13.5.2" 215 | resolved "https://registry.yarnpkg.com/sift/-/sift-13.5.2.tgz#24a715e13c617b086166cd04917d204a591c9da6" 216 | integrity sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA== 217 | 218 | sliced@1.0.1: 219 | version "1.0.1" 220 | resolved "https://registry.yarnpkg.com/sliced/-/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41" 221 | integrity sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E= 222 | 223 | sparse-bitfield@^3.0.3: 224 | version "3.0.3" 225 | resolved "https://registry.yarnpkg.com/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz#ff4ae6e68656056ba4b3e792ab3334d38273ca11" 226 | integrity sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ== 227 | dependencies: 228 | memory-pager "^1.0.2" 229 | 230 | string_decoder@~1.1.1: 231 | version "1.1.1" 232 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" 233 | integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== 234 | dependencies: 235 | safe-buffer "~5.1.0" 236 | 237 | util-deprecate@~1.0.1: 238 | version "1.0.2" 239 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 240 | integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== 241 | --------------------------------------------------------------------------------