MCPcopy Index your code
hub / github.com/angular-app/angular-app / uid

Function uid

server/lib/xsrf.js:3–9  ·  view source on GitHub ↗
(len)

Source from the content-addressed store, hash-verified

1var crypto = require('crypto');
2
3function uid(len) {
4 return crypto.randomBytes(Math.ceil(len * 3 / 4))
5 .toString('base64')
6 .slice(0, len)
7 .replace(/\//g, '-')
8 .replace(/\+/g, '_');
9}
10
11// The xsrf middleware provide AngularJS style XSRF-TOKEN provision and validation
12// Add it to your server configuration after the session middleware:

Callers 1

xsrf.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected