MCPcopy Index your code
hub / github.com/OneNoteDev/WebClipper / from

Function from

lib/sanitize-html.js:718–732  ·  view source on GitHub ↗
(that, value, encodingOrOffset, length)

Source from the content-addressed store, hash-verified

716}
717
718function from (that, value, encodingOrOffset, length) {
719 if (typeof value === 'number') {
720 throw new TypeError('"value" argument must not be a number')
721 }
722
723 if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
724 return fromArrayBuffer(that, value, encodingOrOffset, length)
725 }
726
727 if (typeof value === 'string') {
728 return fromString(that, value, encodingOrOffset)
729 }
730
731 return fromObject(that, value)
732}
733
734/**
735 * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError

Callers 2

BufferFunction · 0.85
sanitize-html.jsFile · 0.85

Calls 3

fromArrayBufferFunction · 0.85
fromStringFunction · 0.85
fromObjectFunction · 0.85

Tested by

no test coverage detected