@stdlib/string-from-code-point
Advanced tools
Comparing version
@@ -1,5 +0,19 @@ | ||
"use strict";var l=function(o,r){return function(){return r||o((r={exports:{}}).exports,r),r.exports}};var g=l(function(O,f){ | ||
var m=require('@stdlib/assert-is-nonnegative-integer/dist').isPrimitive,p=require('@stdlib/assert-is-collection/dist'),v=require('@stdlib/error-tools-fmtprodmsg/dist'),u=require('@stdlib/constants-unicode-max/dist'),c=require('@stdlib/constants-unicode-max-bmp/dist'),d=String.fromCharCode,h=65536,x=55296,C=56320,w=1023;function q(o){var r,t,a,n,s,e,i;if(r=arguments.length,r===1&&p(o))a=arguments[0],r=a.length;else for(a=[],i=0;i<r;i++)a.push(arguments[i]);if(r===0)throw new Error(v('1Oh1V'));for(t="",i=0;i<r;i++){if(e=a[i],!m(e))throw new TypeError(v('1OhAM',e));if(e>u)throw new RangeError(v('1OhE5',u,e));e<=c?t+=d(e):(e-=h,s=(e>>10)+x,n=(e&w)+C,t+=d(s,n))}return t}f.exports=q | ||
});var D=g();module.exports=D; | ||
/** @license Apache-2.0 */ | ||
"use strict";var l=function(o,r){return function(){return r||o((r={exports:{}}).exports,r),r.exports}};var g=l(function(O,f){"use strict";var m=require("@stdlib/assert-is-nonnegative-integer").isPrimitive,p=require("@stdlib/assert-is-collection"),v=require("@stdlib/string-format"),u=require("@stdlib/constants-unicode-max"),c=require("@stdlib/constants-unicode-max-bmp"),d=String.fromCharCode,h=65536,x=55296,C=56320,w=1023;function q(o){var r,t,a,n,s,e,i;if(r=arguments.length,r===1&&p(o))a=arguments[0],r=a.length;else for(a=[],i=0;i<r;i++)a.push(arguments[i]);if(r===0)throw new Error("insufficient arguments. Must provide either an array of code points or one or more code points as separate arguments.");for(t="",i=0;i<r;i++){if(e=a[i],!m(e))throw new TypeError(v("invalid argument. Must provide valid code points (i.e., nonnegative integers). Value: `%s`.",e));if(e>u)throw new RangeError(v("invalid argument. Must provide a valid code point (i.e., cannot exceed %u). Value: `%s`.",u,e));e<=c?t+=d(e):(e-=h,s=(e>>10)+x,n=(e&w)+C,t+=d(s,n))}return t}f.exports=q});var D=g();module.exports=D; | ||
/** | ||
* @license Apache-2.0 | ||
* | ||
* Copyright (c) 2018 The Stdlib Authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@stdlib/string-from-code-point", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Create a string from a sequence of Unicode code points.", | ||
@@ -34,6 +34,7 @@ "license": "Apache-2.0", | ||
"@stdlib/assert-is-collection": "^0.2.1", | ||
"@stdlib/assert-is-nonnegative-integer": "^0.2.1", | ||
"@stdlib/constants-unicode-max": "^0.2.1", | ||
"@stdlib/constants-unicode-max-bmp": "^0.2.1", | ||
"@stdlib/string-format": "^0.2.1" | ||
"@stdlib/assert-is-nonnegative-integer": "^0.2.2", | ||
"@stdlib/constants-unicode-max": "^0.2.2", | ||
"@stdlib/constants-unicode-max-bmp": "^0.2.2", | ||
"@stdlib/string-format": "^0.2.2", | ||
"@stdlib/error-tools-fmtprodmsg": "^0.2.2" | ||
}, | ||
@@ -40,0 +41,0 @@ "devDependencies": {}, |
@@ -204,4 +204,4 @@ <!-- | ||
[test-image]: https://github.com/stdlib-js/string-from-code-point/actions/workflows/test.yml/badge.svg?branch=v0.2.1 | ||
[test-url]: https://github.com/stdlib-js/string-from-code-point/actions/workflows/test.yml?query=branch:v0.2.1 | ||
[test-image]: https://github.com/stdlib-js/string-from-code-point/actions/workflows/test.yml/badge.svg?branch=v0.2.2 | ||
[test-url]: https://github.com/stdlib-js/string-from-code-point/actions/workflows/test.yml?query=branch:v0.2.2 | ||
@@ -208,0 +208,0 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/string-from-code-point/main.svg |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
36145
2.53%209
8.29%6
20%