Lines Matching refs:safe
34 ## Why not [safe-buffer](https://npmjs.com/safe-buffer)?
36 _In short: while `safe-buffer` serves as a polyfill for the new API, it allows old API usage and
39 `safe-buffer` could be used safely to get the new API while still keeping support for older
41 I found out that `safe-buffer` is itself causing problems in some cases.
52 …e 'Buffer.alloc()' or 'Buffer.from()' (use 'https://www.npmjs.com/package/safe-buffer' for '<4.5.0…
59 Let's now throw in `safe-buffer`!
62 $ cat example.safe-buffer.js
63 const Buffer = require('safe-buffer').Buffer
65 $ standard example.safe-buffer.js
66 $ ./node-v6.13.0-linux-x64/bin/node example.safe-buffer.js
70 See the problem? Adding in `safe-buffer` _magically removes the lint warning_, but the behavior
75 That was done by design. I first considered changing `safe-buffer`, prohibiting old API usage or
76 emitting warnings on it, but that significantly diverges from `safe-buffer` design. After some
81 «fixing» the lint warning by blindly including `safe-buffer` without any actual changes.
83 Also in some cases, even if the API _was_ migrated to use of safe Buffer API — a random pull request