Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
rng: () => Buffer.alloc(16)
});
// $ExpectError
uuid.v4({
rng: () => "bla"
});
// $ExpectError
v4({
rng: () => "bla"
});
v3.name;
v3("bla");
v3("bla", "bla");
v3("bla", v3.DNS);
v3("bla", v3.URL);
v3([0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea]);
v3(
[0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea],
[0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36]
);
// $ExpectError
v3("bla", { yolo: true });
v5.name;
v5("bla");
v5("bla", "bla");
v5("bla", v5.DNS);
v5("bla", v5.URL);
rng: () => "bla"
});
v3.name;
v3("bla");
v3("bla", "bla");
v3("bla", v3.DNS);
v3("bla", v3.URL);
v3([0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea]);
v3(
[0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea],
[0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36]
);
// $ExpectError
v3("bla", { yolo: true });
v5.name;
v5("bla");
v5("bla", "bla");
v5("bla", v5.DNS);
v5("bla", v5.URL);
v5([0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea]);
v5(
[0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea],
[0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36]
);
// $ExpectError
v5("bla", { yolo: true });
return;
}
mutate({
mutation: NEW_COMMENT_MUTATION,
variables: {
author,
authorEmail,
authorUrl,
type: null,
userId,
parent: null,
postId,
content,
date,
clientId: v3(`${author}${key}`, v3.URL),
},
update: ( cache, { data: { createComment: { comment } } } ) => {
const { post } = cache.readQuery({
query: POST_COMMENTS_QUERY,
variables: { id: this.props.id }
});
post.comments.nodes.push(comment);
cache.writeQuery({
query: POST_COMMENTS_QUERY,
data: { post: post }
});
}
})
.then(() => {
console.log('create mutation success');